Microprocessors Tutorial 2: Arduino Robotics

Slides:



Advertisements
Similar presentations
EMS1EP Lecture 8 Pulse Width Modulation (PWM)
Advertisements

MOTION CONTROL ECE 105 Industrial Electronics Engr. Jeffrey T. Dellosa College of Engineering and Information Technology Caraga State University Ampayon,
Servo Background Servos provide control of rotary position Servos are used extensively in the remote control hobby world for: Aircraft (flaps, ailerons,
What is Arduino?  Arduino is a ATMEL 168 micro-controller kit designed specially for small projects  User friendly IDE(Integrated Development Environment)
Controlling Motors OBEY ME!. On-Off Control 1. Switch control.
Encoders, Motors, Power, Mini Project #1 10/24/2014.
Basic DC Motor Circuits
Intro to the Arduino Topics: The Arduino Digital IO Analog IO Serial Communication.
Potentiometer Electric circuit Cell or Battery Resistor Switch Bulb Earth/Ground LED.
L.
Secret Door Knock Detector
SENIOR DESIGN 10/16.
Servo Control Using Analog Signal Obtain “analog” input using analogRead().
September 15, 2007 D.Giandomenico PWM Motor Control with IFI Robotics Victor884 Electronic Speed Controller David Giandomenico Lynbrook High School Robotics.
Introduction.
Micromouse Meeting #3 Lecture #2 Power Motors Encoders.
 Main Components:  Sensors  Micro controller  Motor drivers  Chasis.
Embedded Programming and Robotics Lesson 2 C Programming Refresher C Programming1.
Introduction to Arduino Prepared by R. Lamond.  “Arduino is an open-source electronics prototyping platform based on flexible, easy- to-use hardware.
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
Embedded Programming and Robotics
Controller, Sensors and Motors Ding Ke Tutorial 1, UGB 230N.
Dean Brock, Rebecca Bruce and Susan Reiser, CCSC SE 2009 Using Arduino Material taken from Todbot blog Bionic Arduino Todbot blog Bionic ArduinoTodbot.
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.
Microprocessors Tutorial 1: Arduino Basics
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.
BM-305 Mikrodenetleyiciler Güz 2015 (3. Sunu) (Yrd. Doç. Dr. Deniz Dal)
Microprocessors Tutorial 1: Arduino Basics
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.
Automatic accident avoiding system PROJECT MEMBERS MUTHUKUMAR.K (05ME33) SAKTHIDHASAN.S (05ME39) SAKTHIVEL.N (05ME40) VINOTH.S (05ME56) PROJECT GUIDE:
ARDUINO 1. Basics  Comments  /* * Blink * * The basic Arduino example. Turns on an LED on for one second, * then off for one second, and so on... We.
Arduino Circuits and Code. int ledPin = 9; void setup() { pinMode(ledPin, OUTPUT); } void loop() { digitalWrite(ledPin, LOW); delay(1000); digitalWrite(ledPin,
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
NATCAR SUMMER CLASS II 6 July 2004 Chung Hsieh. Topic of Discussion Power Supply Motor Drive Circuits Braking.
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.
SMV Electric Tutorials
Rebecca Bruce and Susan Reiser, May 2015 Analog Input and Output.
PWM: Pulse Width Modulation © 2014 Project Lead The Way, Inc.Digital Electronics.
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.
Solar Powered LED Blinds Group 28: Austin Estes and Kerr Oliva TA: Katherine O’Kane.
Casne.ncl.ac.uk Taking care of the CrumbleBot Please do NOT stress the robot's motors 1.Do NOT push the robot 2.Do NOT hold the.
Bdps 2 Lecture 2. Circuits and Ohm's Law For resistive circuits.
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
Module 8 Tutorial  An 8086 system is used for controlling the speed of a motor. The motor can operate at 5 different speeds (1- 5).  The speed.
ARM CORTEX (STM32) BASED MOTOR SPEED CONTROL SUBMITTED BY EDGEFX TEAM.
Arduino Application: Speed control of small DC Motors
1 Transistor. 2 Transistors are used to turn components on and off They come in all different shapes and sizes.
Motors & Motor Controllers
Introduction to Motors, servos and steppers
simple example program to control a DC-Motor
Outline Introduction to digital-to-analog converter (DAC)
If you want to swing an robot arm or …
Using Arduino to modify RC controls Nick Carter 12/31/2015
Microprocessors Tutorial 1: Arduino Basics
Arduino Application: Speed control of small DC Motors
Arduino Week 2 Lab ECE 1020 Prof. Ahmadi.
Introduction to H-Bridge
Secret Door Knock Detector
Sensors and actuators Sensors Resistive sensors
CTY SAR FCPS Shawn Lupoli, Elliot Tan
UNIT 11: RC-SERVOMOTOR CONTROL
Pulse-Width Modulation: Simulating variable DC output
CTY SAR FCPS Alexander Velikanov
Presentation transcript:

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 8. MAKE: Robot react 9. Challenge: Solve Maze 10. Links

Robot Anatomy

Robot Anatomy

Sensor Review Example: Analog Arduino mapping: 0-5V  0-1023 3 connections: V+, pin, GND Serial Monitor: Use Serial.begin(9600) to start communication Use custom function serialOutputValue(“msg”, value) to see sensor value in serial monitor This robot has IR range sensor: Outputs 0.0 - 2.6V (0-600 in Arduino) Peaks at 15cm, farther objects create lower voltage BUT code inverts relationship! Example: Example 1 Analog_in

Pulse Width Modulation Duty cycle = percentage of time signal is positive in square wave Min-Max voltage: 0 – 5v Min-Max Arduino mapping: 0 – 255 PWM pins have a ~ on Arduino 10% average 50% average 90% average

Challenge: Fade Increments Make: Fade Use analogWrite(pin, value) to fade light on/off using for loop to vary value Remember PWM range is 0-255 Recall LED connection: long leg = positive small resistor in series necessary Challenge: Fade Increments Use PWM to fade the led from 0 to full in 5 seconds, hold for 2 secs, fade back down in 7 seconds. Then each loop would do it faster and faster or brighter and brighter!

Motors They draw more current than USB/Arduino can supply (40mA per pin, 200mA in total) so need another power supply: batteries Current through in 1 direction turns them in 1 direction More voltage = More speed, how to control voltage? Use electronically controlled switch (transistor) between motor and batteries Use PWM pin to control switch Motors in this robot run on 4.5-7.0V and have a peak current of 1A.

H- Bridge Used to make 1 motor turn in either direction by directing current use 4 switches controlled by 2 signals

H- Bridge The IC we will use (SN754410N) has 2 H-Bridges to control 2 motors PWM is used here at the enable pin to control speed A

Robot Control Library Example: Written by Sebastien Parent-Charette last year Get sensor values with updateSensorRangeState() And values state_sensor_range_value Display with serialOutputValue(“msg”, value) Change directions with modifyMotorState(motor, direction, speed) Followed by updateMotorState() Example: Example 3: Spin_in_a_Loop

MAKE: Robot Move MAKE: Robot React Change code in Example 3 so you are in control For example, go forward 5s, stop, turn right 90˚, forward, backwards, left 270 ˚ and come back. Use modifyMotorState(motor, direction, speed) updateMotorState() MAKE: Robot React When you feel comfortable, add sensor information Use Example 4: Wall stop, as a base Get sensor data with updateSensorRangeState() Use state_sensor_range_value to decide on a move

CHALLENGE: solve the maze! Create your own algorithm to beat the maze using Example 0: Template Or start from our other example codes Example 4, 5, 6

Useful Links http://www.jeremyblum.com/category/arduino-tutorials/ Arduino Examples http://arduino.cc/en/Tutorial/HomePage MAKE projects http://makezine.com/arduino/ http://makezine.com/category/electronics/arduino/?post_type=projects Jeremy Blum Tutorials (#5: motors and transistors) http://www.jeremyblum.com/category/arduino-tutorials/

academics@ieee.concordia.ca ieee.concordia.ca Questions? Comments? Suggestions? academics@ieee.concordia.ca ieee.concordia.ca