DesignSpark Electrical Logolinkedin
Menu Search
Ask a Question

Arduino Motor Drive

In Arduino Leonardo Board, there is a fan out current limit for an I/O port pin of Arduino Leonardo board that is about 40mA, which is not enough for a DC motor to run with load. In order not to overload the I/O port and to control the rotational speed of the motor by using the PWM signal generated by the Arduino Board, a circuit is designed to convert the amplitude PWM signal from 5V to 9V from the power source.

 This is the schematic the circuit:

Bills of Materials:
RS 100 ohm Resistor  RS stock number: (707-8142)
Fairchild Semiconductor PN2222ATA Transistor RS stock number: (739-0381)
Fairchild Semiconductor 1N4004 Diode RS stock number: (759-6678)

This is the experimental setup:

 

In our circuit, there are mainly two components. The first one is the diode(the upper one). When the motor is changing its rotational speed, back EMF is induced. In order to prevent the Arduino board is burnt by the back EMF, a diode is used.

 

The second component is the transistor(the lower one), when the signal output is at “HIGH”, it will switch on the transistor, that means the 9V source and the motor is at close circuit. On the other hand, when signal output is at “LOW”, it will switch off the transistor, that means the 9V source and the motor is at open circuit. In the logical view, it transforms the PWM signal output of the Arduino board from amplitude of 5V to 9V. By modifying the duty cycle of the PWM signal, the average supplying voltage is changed. In other words, the rotational speed of the motor increases with the duty cycle.

Demo Video:

Update:

The schematic was updated, two different capacitors were added to two motor drivers  show as below:

Bills of Materials:


RS 100 ohm Resistor RS stock number: (707-8142)
Fairchild Semiconductor PN2222ATA Transistor RS stock number: (739-0381)
Fairchild Semiconductor 1N4004 Diode RS stock number: (759-6678)
Nichion 47uF Capacitor RS Stock Number: (475-9425)
Muraia 0.1uF Capacitor RS Stock Number: (653-0119)

The ceramic capacitor were connected in parallel with motor, which can filters out some noise generated when the motor is starting up, the other one act as decoupling capacitor, which can bypass the power source and ground.

 

sunnywty has not written a bio yet…

1 Aug 2014, 8:16

Comments

July 26, 2014 20:09

Another way would be to use a Mosfet and I like using TVS Diodes for catching surge etc Vishay have come out with some very good TVS in the last couple of years.
Just another way of looking at things.
Oh! for got don't forget the Caps.

ALL THE BEST

Rachael

0 Votes