Analog Output Materials: animatronic head Processing Quiz HW: code links.

Slides:



Advertisements
Similar presentations
Sensing and Control.
Advertisements

EMS1EP Lecture 8 Pulse Width Modulation (PWM)
Potentiometer Electric circuit Cell or Battery Resistor Switch Bulb Earth/Ground LED.
Servos The material presented is taken from a variety of sources including:
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
Part A: Controlling Oscillation Frequency with Capacitors and Resistors Part B: Diodes and Light Experiment Timer.
COMP3221: Microprocessors and Embedded Systems Lecture 20: Analog Output Lecturer: Hui Wu Session 2, 2004.
New Human Computer Interfaces Amnon Dekel HUJI – CSE, Spring 2007 Class ? May
DC-DC Converters Convert a fixed DC Source into a Variable DC Source
Secret Door Knock Detector
SENIOR DESIGN 10/16.
DC Motor Control  mouse EE 496 Advisor: Dr. Tep Dobry.
Pulse Width Modulation Professor: Dr. Miguel Alonso Jr.
PWM (Pulse Width Modulation)
Servo Control Using Analog Signal Obtain “analog” input using analogRead().
Digital I/O Connecting to the Outside World
Introduction.
Single Phase Induction Motor Adjustable Speed Control Using DSP and Micro-Controller Jianming Yao ECE734 Project Fall 2000.
Micromouse Meeting #3 Lecture #2 Power Motors Encoders.
Microprocessors Tutorial 2: Arduino Robotics
Power Electronics DC to AC Converters
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
Microcontrollers Module 4: Motion Control. Module Objectives Upon successful completion of this module, students will be able to: Give examples of microcontroller.
Dean Brock, Rebecca Bruce and Susan Reiser, CCSC SE 2009 Using Arduino Material taken from Todbot blog Bionic Arduino Todbot blog Bionic ArduinoTodbot.
T IMERS - 2. O UTPUT U NIT Each capture/compare block contains an output unit. The output unit is used to generate output signals such as PWM signals.
Microcontroller Hands-on Workshop #3 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 7, 2009.
Segway Controller Notes. = connection on top layer of circuit board = connection on bottom layer of circuit board Ground Plane: Areas enclosed by the.
1  Actuators are used in order to produce mechanical movement in robots.
MCU: Interrupts and Timers Ganesh Pitchiah. What’s an MCU ?
CS 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Hybrid I/O – Pulses.
Arduino Week 2 Lab ECE 1020 Prof. Ahmadi. Objectives 1. Control the rotation of standard servo motor  A standard servo motor is limited in its rotation.
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.
Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.
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.
STEPPER MOTORS Name: Mr.R.Anandaraj Designation: Associate. Professor Department: Electrical and Electronics Engineering Subject code :EC 6252 Year: II.
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
DC Motor Control The material presented is taken from a variety of sources including: ponents/inductor001.html#howworks,
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.
Microcontroller Applications ELEC 421 Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
PIC18F4431. PIC18F1330 Infrared Encoder/Decoder.
ECE 4330 – Final Project By: John Litzenberger.  A IC temperature sensor (DS1620)  Reads through ADC (pin.0 Port A)  Feedback control for extreme conditions.
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)
Waveform 1.1 Basic Digital Waveform Parameters 1 Paul Godin Updated September 2007 Last edit Sept 2009.
Istituto Tecnico Industriale A.Monaco EURLAB Moving a robot simple example program to control a DC-Motor Next - Press the button (left)
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)
Microcontroller basics
Introduction to Motors, servos and steppers
Outline Introduction to digital-to-analog converter (DAC)
Introduction to Servos
Dimming Function – Pulse-width Modulation (PWM)
Date of download: 10/27/2017 Copyright © ASME. All rights reserved.
Arduino - Introduction
BRX Technical Training
BM-305 Mikrodenetleyiciler Güz 2017 (3. Sunu)
Servos The material presented is taken from a variety of sources including:
CBC Fundamentals Lecture is based on material from Robotic Explorations: A Hands-on Introduction to Engineering, Fred Martin, Prentice Hall, 2001.
Secret Door Knock Detector
Arduino : Introduction & Programming
Sensors and actuators Sensors Resistive sensors
UNIT 11: RC-SERVOMOTOR CONTROL
Announcements Bring two motors to lab this week.
UNIT 5 Analog signals.
Pulse-Width Modulation: Simulating variable DC output
Presentation transcript:

Analog Output Materials: animatronic head Processing Quiz HW: code links

Digital / Analog The Arduino,and other digital microcontrollers can’t produce a varying voltage, they can only produce a high voltage (in our case 5V) or low (in our case 0V). So instead, we "fake" an analog voltage by producing a series of voltage pulses at regular intervals, and varying the width of the pulses. This is called pulse width modulation (PWM). The resulting average voltage is sometimes called a pseudo-analog voltage.

PWM In the graph below, we pulse our pin high for the same length of time we pulse it low. The time the pin is high (called the pulsewidth) is about half the total time it takes to go from low to high to low again. This ratio is called the duty cycle. The duty cycle is 50%,and the average voltage is about half the total voltage.

If we make the duty cycle less than 50% by pulsing for a shorter amount of time than we pause, we get a lower effective voltage: The pulsewidth is usually a very small time, on the order of a few microseconds or milliseconds at most.

analogWrite() There are two ways to create a series of pulses: analogWrite() or writing your own pulseout. analogWrite(pin, pulsewidth); Pin refers to the pin you’re going to pulse Pulsewidth is a value from corresponds to 0 volts, and 255 corresponds to 5 volts. Every change of one point changes the pseudo-analog output voltage by 5/255, or volts.

Applications of Analog Output (PWM) DC Motor Speed Control Tone generation Servomotor LED Dimming

Whats a servo?

Analog Control of Servo The minimum (minPulse) and maxiumum (maxPuluse) values will be different depending on your specific servo motor. Ideally, it should be between 1 and 2 milliseconds, but in practice, milliseconds works well for me.

Tone Generation /* Play Melody * * * Program to play a simple melody * * Tones are created by quickly pulsing a speaker on and off * using PWM, to create signature frequencies. * * Each note has a frequency, created by varying the period of * vibration, measured in microseconds. We'll use pulse-width * modulation (PWM) to create that vibration. * We calculate the pulse-width to be half the period; we pulse * the speaker HIGH for 'pulse-width' microseconds, then LOW * for 'pulse-width' microseconds. * This pulsing creates a vibration of the desired frequency. * (See usb)

Homework Bring in a datasheet for an analog sensor. Look at Processing.org.