Pages: [1]   Go Down
Author Topic: DC motor won't work under load - Possible supply problem?  (Read 1103 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all

I'm doing some learning with Arduino, and to test some concepts I've put a very simple circuit with a car toy DC motor.
I don't have any specifications for the motor, and don't have a clue on how to get them.

First the circuit (sorry for the atrocious ASCII):

Code:
                       o--diode----o
9V +---------|---------|-DC motor--|-o
            Light                    |
            Sensor                   C (collector)
             | ....Arduino magic..  B (base)
                                     E ----- GND


I'm using a transistor (2n3904) as a switch to turn on the motor. The base is connected to a digital pin that responds to a light sensor.

Both the Arduino and the motor are powered with the same 9V battery. When I shine a light on the sensor, the motor spins if there is almost no load (wheels off the table), but as soon as I put the car on the table, it stops. My guess is the 9V battery is not enough for both the Arduino and the motor, but I've tried this with external supply for the Arduino (serial cable) and got the same result.

When I feed the 9V directly to the motor, it works. I know there is a V loss on the transistor (around 0,3?), but I don't think this should be trouble...

Any ideas?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm using a transistor (2n3904) as a switch to turn on the motor. The base is connected to a digital pin that responds to a light sensor.

You might be overloading the output pin if your not using a series resistor between the output pin and the base of the transistor. Try a 500-1000 ohm resistor.

Lefty
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Forgot to put it on the "diagram", but I'm actually using a 330ohm resistor between digital output and base pin, and 990 between base and GND (saw somewhere this setup, and adjusted the values until I got a response from the motor).

Maybe I should adjust these values? I have no idea how to calculate something like this...
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I took the switch from here http://www.rason.org/Projects/transwit/transwit.htm, look at Figure 2.

I used the 9V as it was the cheapest / easiest to find, I'll look for something better...
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

As well as the 9v battery being unsuitable (unless it is an expensive lithium one), the 2n3904 transistor is not designed for switching the amount of current taken by a motor under load. Use instead a bc337 for a small motor, or an npn power transistor or mosfet for a larger motor.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Pages: [1]   Go Up
Jump to: