Small DC 3V-6V Hobby Motor 2000RPM

Similar documents
Arduino Lesson 13. DC Motors. Created by Simon Monk

Your Multimeter. The Arduino Uno 10/1/2012. Using Your Arduino, Breadboard and Multimeter. EAS 199A Fall Work in teams of two!

Arduino Motor Shield (L298) Manual

Basic DC Motor Circuits. Living with the Lab Gerald Recktenwald Portland State University

Basic DC Motor Circuits

Arduino Lesson 16. Stepper Motors

PolyBot Board. User's Guide V1.11 9/20/08

ARDUINO SEVERINO SERIAL SINGLE SIDED VERSION 3 S3v3 (REVISION 2) USER MANUAL

Arduino Lesson 14. Servo Motors

revolution Contents: Introduction Power 28-pin Project Board with input/output cables

Introduction to Arduino

Lab 6 Introduction to Serial and Wireless Communication

Arduino project. Arduino board. Serial transmission

Electronic Brick of Current Sensor

RGB LED Strips. Created by lady ada. Last updated on :00:18 PM EST

AUTOMATIC CALL RECORDER JAMECO PART NO

K8025 VIDEO PATTERN GENERATOR. Check the picture quality of your monitor or TV, ideal for adjustment or troubleshooting.

The basic set up for your K2 to run PSK31 By Glenn Maclean WA7SPY

AMZ-FX Guitar effects. (2007) Mosfet Body Diodes. Accessed 22/12/09.

PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard

Assembly and User Guide

1602 LCD adopts standard 14 pins(no backlight) or 16pins(with backlight) interface, Instruction of each pin interface is as follows:

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board

Basic Pulse Width Modulation

Electronics 5: Arduino, PWM, Mosfetts and Motors

Arduino Shield Manual

Arduino Shield Manual

BIULA AUDIO TRIGGER for Canon Digic II DSLR

Total solder points: 205 Difficulty level: beginner advanced UNIVERSAL BATTERY CHARGER / DISCHARGER K7300 ILLUSTRATED ASSEMBLY MANUAL

Pololu DRV8835 Dual Motor Driver Shield for Arduino

RC Camera Control. User Guide v /20/2012

Pulse Width Modulation (PWM) LED Dimmer Circuit. Using a 555 Timer Chip

DS1307 Real Time Clock Breakout Board Kit

Kit Watt Audio Amplifier

Joule Thief 3.0 Kit. June 2012, Rev Joule Thief 3.0

!Operation:!1. Connect an external power source to J1 (+ and - IN terminals). The

Total solder points: 248 Difficulty level: beginner advanced. 15 Channel infrared receiver K8050 ILLUSTRATED ASSEMBLY MANUAL

Tutorial. replace them with cell-phone operated module. The advantages of a cell-phone operated bot are:-

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

RADIANT PLASMA 4700 Plasma Spark Generator

Arduino Microcontroller Guide W. Durfee, University of Minnesota ver. oct-2011 Available on-line at

Schematic & Parts List: PIC16F688 Satellite Tracker & Rotor Controller

Table 1 Comparison of DC, Uni-Polar and Bi-polar Stepper Motors

Electronics. Discrete assembly of an operational amplifier as a transistor circuit. LD Physics Leaflets P

GLOLAB Two Wire Stepper Motor Positioner

BrightSign Expander Hardware Guide

Robot Board Sub-System Testing. Abstract. Introduction and Theory. Equipment. Procedures. EE 101 Spring 2006 Date: Lab Section # Lab #6

ECEN 1400, Introduction to Analog and Digital Electronics

K8068 BUS DIMMER FOR HOME MODULAR LIGHT SYSTEM ILLUSTRATED ASSEMBLY MANUAL H8068IP-1

Talon and Talon SR User Manual

MDC Series

WORKING WITH STEPPER MOTORS

SYSTEM 4C. C R H Electronics Design

POCKET AUDIO GENERATOR K8065

TEECES DOME LIGHTING SYSTEMS

PCAN-MicroMod Evaluation Test and Development Environment for the PCAN-MicroMod. User Manual. Document version ( )

ETEC Digital Controls PIC Lab 10 Pulse Width Modulation

A PIC16F628 controlled FLL (Frequency Locked Loop) VFO for HF

GLOLAB Universal Telephone Hold

H-Bridge Motor Control

Microstep Driver Manual Version 6/13/2006

Arduino Lab 1 - The Voltage Divider

CONSTRUCTING A VARIABLE POWER SUPPLY UNIT

EXPRESS PCB TUTORIAL Author: Lee Morey Revised: JE Feb 2015

Blue Point Engineering

200W DISCRETE POWER AMPLIFIER K8060

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

Series AMLDL-Z Up to 1000mA LED Driver

EET272 Worksheet Week 9

How to Move Canon EF Lenses. Yosuke Bando

K4401 SOUND GENERATOR. them at the touch of a button. Specifications

1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver

SYSTEM 45. C R H Electronics Design

cs281: Introduction to Computer Systems Lab08 Interrupt Handling and Stepper Motor Controller

Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II

A Versatile Audio Amplifier

Programming the Arduino

Design and Construction of Variable DC Source for Laboratory Using Solar Energy

AirCasting Particle Monitor Bill of Materials

4/Really Getting Started with Arduino

ABB Drives. User s Manual HTL Encoder Interface FEN-31

DUAL ELECTRONIC DICE K3400

Arduino ADK Back. For information on using the board with the Android OS, see Google's ADK documentation.

Pulse Width Modulation Amplifiers EQUIVALENT CIRCUIT DIAGRAM. 200mV + - SMART CONTROLLER .01F OSC Q pF

Total solder points: 18 Difficulty level: beginner advanced UNIVERSAL POWER SUPPLY 5-14DC / 1A K2570 ILLUSTRATED ASSEMBLY MANUAL

CAUTION! THE 7I29 USES VOLTAGE AND POWER LEVELS THAT REPRESENT A HAZARD TO LIFE AND LIMB.

Total solder points: 115 Difficulty level: beginner advanced 4 CHANNEL RUNNING LIGHT K8032 ILLUSTRATED ASSEMBLY MANUAL

LM 358 Op Amp. If you have small signals and need a more useful reading we could amplify it using the op amp, this is commonly used in sensors.

DC Motor with Shaft Encoder

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

Theory and Practice of Tangible User Interfaces. Thursday Week 2: Digital Input and Output. week. Digital Input and Output. RGB LEDs fade with PWM

If an occupancy of room is zero, i.e. room is empty then light source will be switched off automatically

Sending an SMS with Temboo

Advanced LED Controller (LED Chaser)

Start with Arduino: Introduction to. the Creative Use of. Electronics. Made in Germany. by Stefan Hermann

Arduino Lesson 0. Getting Started

MIDECO 64-outputs MIDI note decoder USER MANUAL. Roman Sowa 2012

Transcription:

Small DC 3V-6V Hobby Motor 2000RPM If the DC motors seem to 'cut out' or 'skip', solder a ceramic or disc 1uF capacitor between the motor tabs (on the motor itself!) as it helps to reduce noise and interference This small hobby DC motor can be controlled using 1. IRF520 MOSFET module 2. Transistor 3. LS9110S H-Bridge It must not be connected directly to an output of the board because it draws too much current. Model 130 Weight: 17g Axial length of 38mm outside diameter: 20mm Support Voltage 3V to 6V DC No Loading : 3V Current : 0.14A locked - rotor current is 0.92A 6V Current : 0.18A locked - rotor current is 1.5A

Example1 Using a Transistor This example uses a common transistor to provide enough current to drive the motor Components Needed: Board, breadboard and wires TIP120 transistor (can handle up to 5A with heat-sink) 100k Potentiometer, 470 ohm resistor IN4001 diode general purpose or 6V external battery 1A Pin A0 (Input) 10K Potentiometer SIG Pin 3 (Output) 470 Ohm Resistor Base External battery, Diode (Anode) Collector, Motor ve, Diode (Cathode) Extn Collector, Motor +ve Code Example1 // Driving a small 3V-6V DC Motor using a transistor // Note: the motor draws up to 1.5A at 6V so must be powered by an external PSU and also must not // be connected directly to an output pin of the // The 470 ohm to the base of the transistor protects the output pin of the from supplying too // much current when the transistor is ON */ #include <.h> const int PotPin = A0; const int MotorPin = 3;

int MotorSpeedVal; void setup() { pinmode( MotorPin,OUTPUT); void loop() { // read analog input (0-1023) and divide by 4 to generate output in range 0-255 // 0 will be off, 255 will correspond to a PWM of 100% MotorSpeedVal = analogread( PotPin ) / 4; // an alternative way is to use the map function // MotorSpeedVal = map(analogread(potpin), 0, 1023, 0, 255) // write the value to the transistor which controls the motor analogwrite( MotorPin, MotorSpeedVal ); Example 2 Using IRF520 MOSFET Module In this example we will use a 10K potentiometer to control the speed of the motor, and an IRF520 MOSFET Module to provide enough current for the motor. Components Needed: Board IRF520 MOSFET Module Breadboard and wires 100k Potentiometer or 6V external battery 1A

MOSFET CONNECTIONS SIG PWM from Vin V- Connect to motor V+ Connect to motor Circuit Diagram Pin 3 (Output PWM) 6V Battery +ve 6V Battery ve IRF520 Board SIG Vin Motor +ve V+ Motor ve V- Pin A0 (Input) 100K Potentiometer Sig Code Example2 // Driving a small 3V-6V DC Motor using the IRF520 Module board // Note: the motor draws up to 1.5A at 6V so must be powered by an external PSU and also must not // be connected directly to an output pin of the /* Connections wire as follows Pin 3 (Output PWM) 6V Battery +ve 6V Battery ve IRF520 Board SIG Vin Motor +ve V+ Motor ve V- */ Pin A0 (Input) 100K Potentiometer Sig #include <.h> const int PotPin = A0; const int MotorPin = 3;

int MotorSpeedVal; void setup() { pinmode( MotorPin,OUTPUT); void loop() { // read analog input (0-1023) and divide by 4 to generate output in range 0-255 MotorSpeedVal = analogread( PotPin ) / 4; // write the value to the IRF520 which controls the motor analogwrite( MotorPin, MotorSpeedVal ); Example 3-1 Using the LS9110S H-Bridge The board has 6 male pins and 2 double terminals. The motors connect to the 2 terminals. In the middle of the male pins are the and pins. This is the input voltage for the L9110 chips. Some H-bridges like the L293 and L298 require a logic voltage and a separate voltage for the motors, the L9110 does not. You only have to supply it one voltage (between 2.5 and 12V). The other 4 pins control the direction and speed of the motors. Pin A-IA and A-IB control motor A, and Pin B-IA and B-IB control motor B. To control motor A you set pin A-IA high and pin A-IB low, to change the direction you just set pin A-IA low and pin A-IB high. Same thing for motor B. To control the speed of both motors 4 PWM pins are required; instead of just setting a pin high you pwm it.

Connections Motor +ve Motor ve 100K SIG 100K 100K LS9110S Board Battery 6V Motor A PWR Motor A 6V A-IA Pin 3 A-IB Pin 5 Pin A0 Code Example 3_1_LS9110S // Driving a small 3V-6V DC Motor using the LS9110S Module board // Note: the motor draws up to 1.5A at 6V so must be powered by an external PSU and also must not // be connected directly to an output pin of the // Example 3_1, simple forward direction /* Connections wire as follows LS9110S Board Battery 6V Motor +ve Motor A PWR Motor ve Motor A 6V A-IA Pin 3 A-IB Pin 5 100K SIG Pin A0 100K 100K */ #include <.h> /* choose PW pins for MotorPinA and B */ const int PotPin = A0; const int MotorPinA = 5; const int MotorPinB = 6; int MotorSpeedVal; void setup() { pinmode( MotorPinA,OUTPUT); pinmode( MotorPinB,OUTPUT); void loop() { // read analog input (0-1023) and divide by 4 to generate output in range 0-255 MotorSpeedVal = analogread( PotPin ) / 4; // write the value to the two pins of the LS9110S which controls the motor // forward direction // set MotorPinB low for forward and control speed via MotorPinA analogwrite(motorpinb, 0);

analogwrite( MotorPinA, MotorSpeedVal ); // NOTE: MPA=High, MPB = Low, forward, MPA=Low, MPB=High, reverse The LS9110S is capable of reversing the direction of the motor. This is controlled by the A-IA and A-IB levels for Motor A. In the next example, a push button is used to reverse the direction of the motor. Example 3-2 Using the LS9110S H-Bridge - Reversing This example uses a Push Button to reverse the direction of the motor. Each time the button is pressed, the motor will reverse direction. Code Example 3_2_LS9110S // Driving a small 3V-6V DC Motor using the LS9110S Module board // Note: the motor draws up to 1.5A at 6V so must be powered by an external PSU and also must not // be connected directly to an output pin of the // Example 3_2, reversing direction using a push button /* Connections wire as follows LS9110S Board Battery 6V Motor +ve Motor A PWR Motor ve Motor A 6V A-IA Pin 3 A-IB Pin 5 100K SIG Pin A0

*/ 100K 100K Push Button Push Button to Pin 4 and then via 2.2K Ohm to #include <.h> /* choose PW pins for MotorPinA and B */ const int PotPin = A0; const int PBPin = 4; const int MotorPinA = 5; const int MotorPinB = 6; // define constants for Forward and Reverse const int FORWARD = 1; const int REVERSE = 0; int MotorSpeedVal; int state = FORWARD; // the current state of the motor direction int reading; // the current reading from the PBpin int previous = LOW; // the previous reading from the PBpin // the follow variables are long's because the time, measured in milliseconds, // will quickly become a bigger number than can be stored in an int long time = 0; // the last time the output pin was toggled long debounce = 200; // the debounce time void setup() { pinmode(pbpin, INPUT); pinmode( MotorPinA,OUTPUT); pinmode( MotorPinB,OUTPUT); // initialize and start the motor forward // read analog input (0-1023) and divide by 4 to generate output in range 0-255 MotorSpeedVal = analogread( PotPin ) / 4; // write the value to the two pins of the LS9110S which controls the motor // forward direction // set MotorPinB low for forward and control speed via MotorPinA analogwrite(motorpinb, 0); analogwrite( MotorPinA, MotorSpeedVal ); // NOTE: MPA=High, MPB = Low, forward, MPA=Low, MPB=High, reverse void loop() { // read analog input (0-1023) and divide by 4 to generate output in range 0-255 MotorSpeedVal = analogread( PotPin ) / 4; // read the PBPin state reading = digitalread(pbpin); // if the input just went from LOW and HIGH and we've waited long enough // to ignore any noise on the circuit, then we need to reverse direction if (reading == HIGH && previous == LOW && millis() - time > debounce) { if (state == HIGH) state = LOW;

else state = HIGH; time = millis(); if ( state == LOW ) { // reverse // write the value to the two pins of the LS9110S which controls the motor // forward direction // set MotorPinA low for Reverse and control speed via MotorPinB analogwrite(motorpina, 0); analogwrite( MotorPinB, MotorSpeedVal ); // NOTE: MPA=High, MPB = Low, forward, MPA=Low, MPB=High, reverse else { // forward // write the value to the two pins of the LS9110S which controls the motor // forward direction // set MotorPinB low for Forward and control speed via MotorPinA analogwrite(motorpinb, 0); analogwrite( MotorPinA, MotorSpeedVal ); // NOTE: MPA=High, MPB = Low, forward, MPA=Low, MPB=High, reverse previous = reading; Example 4 Using the L293D Motor Control H-Bridge Shield The H-bridge is provided with a library class and that is used to control the motor. Connections Remove the EXTN PWR jumper on the L293D board Connect up external power to the L293D board Power the from USB or its own Power Supply Source Motor +ve Motor ve Battery 6V +ve Battery 6V L293D Board M1 PWR M1 EXT PWR EXT PWR

If you would like to have the powered from USB and the motors powered from a DC power supply, plug in the USB cable. Then connect the motor supply to the PWR_EXT block on the shield. Do not place the jumper on the shield. This is a suggested method of powering your motor project If you would like to have 2 separate DC power supplies for the and motors. Plug in the supply for the into the DC jack, and connect the motor supply to the PWR_EXT block. Make sure the jumper is removed from the motor shield. Code Example 4 // Driving a small 3V-6V DC Motor using the L293D Module board // Note: the motor draws up to 1.5A at 6V so must be powered by an external PSU and also must not // be connected directly to an output pin of the /* wire the motor to MC1 on the L293D board and plug the L293D shield into the board Remember to supply external power to the L293D board Copy the AFMotor library */ #include <.h> #include <AFMotor.h> AF_DCMotor motor(1, MOTOR12_64KHZ); // create motor #1, 64KHz pwm void setup() { Serial.begin(9600); // set up Serial library at 9600 bps Serial.println("Motor test!"); motor.setspeed(200); // set the speed to 200/255 void loop() { Serial.print("forward"); motor.run(forward); // turn it on going forward delay(2000); Serial.print("reverse"); motor.run(backward); // the other way delay(2000); Serial.print("stop"); motor.run(release); // stopped delay(2000);