Servo Control Using Analog Signal Obtain “analog” input using analogRead().

Slides:



Advertisements
Similar presentations
Solar Array & Maximum Power Point Tracker Group Senior Design Project 2003 Stephanie Chin Jeanell Gadson Katie Nordstrom Advisor: Karen Panetta.
Advertisements

EMS1EP Lecture 8 Pulse Width Modulation (PWM)
1 ADC – Analog to Digital Converter and PWM Waveform Generation with EZDSP2812 Professor: Chen, Pei-Chung 陳 沛 仲 Student: Thanh-Nhan Nguyen 阮 誠 仁 2008,
Potentiometer Electric circuit Cell or Battery Resistor Switch Bulb Earth/Ground LED.
Tony Yi 5/2/2015 CENG4480 TUTORIAL 3. ABOUT ME I am “the other” tutor of CENG4480 You can find me at Rm116 in SHB
Secret Door Knock Detector
SENIOR DESIGN 10/16.
PWM Pulse Width Modulation API  Achieves PWM by cascading 2 timers…  The output of lower order will be fed to input of upper order timer…  The output.
Introduction.
M.S.P.V.L. Polytechnic College, Pavoorchatram
Micromouse Meeting #3 Lecture #2 Power Motors Encoders.
Microprocessors Tutorial 2: Arduino Robotics
Embedded Programming and Robotics Lesson 2 C Programming Refresher C Programming1.
Pulse Width Modulation (PWM) LED Dimmer Circuit
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
Intro to Arduino Zero to Virtual Prototyping in Seven Hours
Development of a universal bidirectional galvanic isolated switch module for power converter applications Kopano Mokhalodi Vaal University of Technology.
MCU: Interrupts and Timers Ganesh Pitchiah. What’s an MCU ?
Control Angle via Button Pushes One button increases angle. Other decreases angle. Both light LED.
CS 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Hybrid I/O – Pulses.
PWM Circuit Based on the 555 Timer. Introduction In applications LED Brightness Control we may want to vary voltage given to it. Most often we use a variable.
Lecture 15: Digital to Analog Converters Lecturers: Professor John Devlin Mr Robert Ross.
SE-3910 Real-time Systems Week 2, Class 2 – Return stuff, New HW Assignment! – Quiz! (Possibly with review) Ohm’s Law Kirkhoff’s Current Law Switches Using/reading.
Pulse Width Modulation (PWM). 100% Pulse Width Modulation (PWM) 0% On the chipKIT there are 490 periods per second. Use analogWrite(pin, value) to control.
BM-305 Mikrodenetleyiciler Güz 2015 (3. Sunu) (Yrd. Doç. Dr. Deniz Dal)
Microprocessors Tutorial 2: Arduino Robotics. Agenda 1. Robot Anatomy 2. Sensor Review 3. PWM 4. MAKE: Fade 5. Motors 6. H Bridge 7. Robot Control library.
Servo Demonstration In MPIDE, select File > Examples > Servo > Sweep.
Microcontroller Applications ELEC 421 Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
Data Acquisition Device (DAQ) A DAQ is a cool little device that allows you to interface hardware to a computer. Here is what we will do:  Create a square.
PIC18F4431. PIC18F1330 Infrared Encoder/Decoder.
PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi.
Timer 1 and 2 operation, PWM Principles. Timer 1 Operation.
PWM: Pulse Width Modulation © 2014 Project Lead The Way, Inc.Digital Electronics.
[Lab10] Output PWM  Output PWM Signal  Example  Exercise(Optional)
Analog Output Materials: animatronic head Processing Quiz HW: code links.
Throttle Arduino RC Receiver Stock Golf Cart Motor Controller Motor 1 PWM signal: Voltage: 0 – 5V Period = 22ms Positive Pulse Width: 1ms – 2ms Digital.
Servo Motor Control Using Arduino Instructor: Dr Matthew Khin Yi Kyaw.
Istituto Tecnico Industriale A.Monaco EURLAB Moving a robot simple example program to control a DC-Motor Next - Press the button (left)
Istituto Tecnico Industriale A.Monaco EURLAB Control a Servo Motor If you want to swing an robot arm or … steer a robot you need a special motor (Servo).
Pulse-Width Modulation: Simulating variable DC output
Microcontroller basics Embedded systems for mortals.
1 Microcontrollers. 2 Programmers work in the virtual world Machinery works in the physical world Microcontrollers connect the virtual and physical world.
Team 7 Chaofan Chen Dhruvmin Gandhi Larry Gerhardt Pulse-width Modulation with the TIVA C.
BM-305 Mikrodenetleyiciler Güz 2016 (3. Sunu)
PULSE MODULATION.
simple example program to control a DC-Motor
Outline Introduction to digital-to-analog converter (DAC)
Microcontroller basics
Demodulation PWM Signal
If you want to swing an robot arm or …
Microcontroller Applications
Date of download: 10/27/2017 Copyright © ASME. All rights reserved.
Arduino - Introduction
BM-305 Mikrodenetleyiciler Güz 2017 (3. Sunu)
Roller Coaster Design Project
Introduction to Arduinos
Arduino Analog I/O Analog input pins: 0 – 5
CBC Fundamentals Lecture is based on material from Robotic Explorations: A Hands-on Introduction to Engineering, Fred Martin, Prentice Hall, 2001.
CenSSIS/NE-LSAMP REU “LabVIEW control of the Sport232 Interface”
Secret Door Knock Detector
Arduino : Introduction & Programming
Sensors and actuators Sensors Resistive sensors
Dr. Unnikrishnan P.C. Professor, EEE
Mark Bristow CENBD 452 Fall 2002
UNIT 11: RC-SERVOMOTOR CONTROL
UNIT 5 Analog signals.
Introduction to Arduino
Integrated Circuits Computer Signals
Pulse-Width Modulation: Simulating variable DC output
Maker Education Manipulator
Presentation transcript:

Servo Control Using Analog Signal Obtain “analog” input using analogRead().

Conversion of Analog to Digital Obtain “analog” input using analogRead(). analogRead() returns a value between 0 (if pin at ground) and 1023 (if pin at 3.3 V). Argument of analogRead() is the pin to read (only pins labeled ANALOG IN can be used).

Pulse Width Modulation (PWM)

100%

Pulse Width Modulation (PWM) 0% On the chipKIT there are 490 periods per second. Use analogWrite(pin, value) to control the duty cycle on a pin. The value must be between 0 and 255. The pin must be one of the underlined pins.

Pulse Width Modulation (PWM) If you take the average value over one period, you can think of the voltage as being between 0 V (0% duty cycle) and 3.3 V (100% duty cycle). There are 256 different voltage levels. Can demonstrate this with an LED attached to pin 9 and the example sketch Fading.

Pulse Width Modulation (PWM) Upload example sketch Fading for this circuit.

Pulse Width Modulation (PWM) Write sketch led_with_potentiometer for this circuit.

Pulse Width Modulation (PWM) Write sketch led_with_inc_and_dec for this circuit.