Arduino DC Motor Motion Control Instructor: Dr Matthew Khin Yi Kyaw.

Slides:



Advertisements
Similar presentations
Wireless Cue Light Project
Advertisements

EMS1EP Lecture 6 Digital Inputs
EMS1EP Lecture 8 Pulse Width Modulation (PWM)
Anurag Dwivedi & Rudra Pratap Suman.  Open Source electronic prototyping platform based on flexible easy to use hardware and software.
Embedded Sumo 1T4 – 1T5 UTRA.
Basic DC Motor Circuits
ELCT 201 week 13 Analog ON/OFF control system conversion to Digital ON/OFF control system.
Arduino. Arduino is a tool for making computers that can sense and control more of the physical world than your desktop computer. It's an open-source.
1 Arduino Board: Arduino UNO Arduino Programing Environment: Arduino 0022
 Main Components:  Sensors  Micro controller  Motor drivers  Chasis.
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
2.0 EMBEDDED CONTROLLER Engr. Hj. Mohamad Fauzi bin Zakaria Department of Mechatronics and Robotics Engineering Faculty of Electrical and Electronic Engineering.
Microcontroller Hands-on Workshop #3 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 7, 2009.
Microprocessors Tutorial 1: Arduino Basics
Lab 1 - Microcontrollers Complete the program template below being sure to select the correct parameters to meet the requirements (see the Microcontroller.
Intro to Arduino Programming. Draw your circuits before you build them From Arduino 330 Ohm From Arduino 330 Ohm From Arduino 330 Ohm.
Good LED Circuit 5V0 GND. What Voltage Does Meter See? Answer: 5 V.
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.
Arduino Circuits and Code. int ledPin = 9; void setup() { pinMode(ledPin, OUTPUT); } void loop() { digitalWrite(ledPin, LOW); delay(1000); digitalWrite(ledPin,
Arduino Training New Mexico Mathematics, Engineering, and Science Achievement (NM MESA) Getting Started.
Arduino libraries Datatekniker Udvidet hardware/software.
INTERNET OF EVERYTHING SDU 2016 Week 4. Simple Digital and Analog Inputs  The Arduino’s ability to sense digital and analog inputs allows it to respond.
Motor TYWu.
Microcontroller basics Embedded systems for mortals.
Servo Motor Control Using Arduino Instructor: Dr Matthew Khin Yi Kyaw.
:Blink Blink: Er. Sahil Khanna
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).
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
Pulse-Width Modulation: Simulating variable DC output
Infrared Proximity Sensors & Liquid Crystal Display Instructor Dr Matthew Khin Yi Kyaw.
Pulse Width Modulation Instructor Dr Matthew Khi Yi Kyaw.
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.
Arduino.
DC MOTOR INTERFACING WITH 8051 MICROCONTROLLER PRESENTED BY
Application of Programming: Scratch & Arduino
simple example program to control a DC-Motor
If you want to swing an robot arm or …
ECET 402 Help Bcome Exceptional / snaptutorial.com
Microcontroller basics
connect a DC-Motor with an arduino
Wireless Cue Light Project
Microprocessors Tutorial 1: Arduino Basics
UTA010 : Engineering Design – II
Get Your Project Started with Arduino
European Robotic LABoratory
UCD ElecSoc Robotics Club 2017/2018
Arduino Part 1 Topics: Microcontrollers Programming Basics
Arduino.
How to avoid catching things on fire.
Analog Input through POT
Roller Coaster Design Project
Arduino Application: Speed control of small DC Motors
IoT Programming the Particle Photon.
Servos and Stepper Motors
CS-4540 Robotics - Lab 05 Switch inputs to the Arduino Uno
Topics: Programming Constructs: loops & conditionals Digital Input
Arduino : Introduction & Programming
Arduino Practice: Photoresistors, PWM, Potentiometers, Motors
Sensors and actuators Sensors Resistive sensors
LED and a Button.
Arduino Motor Lab Inspired by NYU ITP project
Arduino 7 Segment Display Lab
Arduino Uno circuit basics
Arduino程式範例.
Interrupts.
Buttons.
Presentation transcript:

Arduino DC Motor Motion Control Instructor: Dr Matthew Khin Yi Kyaw

DC Motors It runs on DC voltage It has two power connections(one terminal is positive and the other is negative) The current for running motor is……. Arduino output pin can provide 40mA current So, it needs motor driver.

H- Bridge

L239DIC 16- pin two-channel motor control IC. Each channel has a separate enable pin, 2 input pins, 2 ground pins, and 2 output pins.

Simple DC Motor Motion Control Circuit Diagram

Pin Connection of Arduino to Peripheral (motor and switch) Arduino pin 02: pin 12: pin 05: pin 04: Peripheral switch Positive terminal of motor (pin 7) Negative terminal of motor (pin 2) Enable pin for the IC

software const int switchPin=2; const int motor1Pin=12; const int motor2Pin=5; const int enablePin=4; void setup(){ pinMode(switchPin,INPUT); pinMode(motor1Pin,OUTPUT); pinMode(motor2Pin,OUTPUT); pinMode(enablePin,OUTPUT); digitalWrite(enablePin,HIGH); } void loop(){ if(digitalRead(switchPin)==HIGH){ digitalWrite(motor1Pin,LOW); digitalWrite(motor2Pin,HIGH); } else { digitalWrite(motor1Pin,HIGH); digitalWrite(motor2Pin,LOW); }

Speed Control Using PWM Pin Connection of Arduino to Peripheral (motor and switch) Arduino pin 02: pin 03: pin 05: pin 09: Pin 13: switch Positive terminal of motor (pin 7) Negative terminal of motor (pin 2) Enable pin for the IC Peripheral L.E.D

Software 1 Do the pin assignments in setup function 2 Turn the LED on only when the push button is pressed Write PWM code using analogWrite( )

Homework You have to complete the following assignments as your homework. 1. Use an input character from the serial port to turn-on the DC motors 2.Implement the given circuit as shown in Figure. 3. Write your own code to control two DC-motors for following scenarios: Both motors are moving in same direction Motors are moving in opposite directions Motor 1 is moving, but motor 2 isn’t moving Motor2 is moving, but motor 1 is moving at half of the speed of motor 2

Circuit Diagram of HW2

References \Arduino Programming Notebook" by - by Brian W. Evans.. Beginning Android ADK with Arduino by Mario Bohmer robotics/.