Hey, I was testing out some DC motors the other day, one was a normal small 6v dc motor and the other a super small dc motor which I scavenged from a toy helicopter. At first the small helicopter motor worked fine but after 15-20 sec the motor shuts off, and the Arduino seems to reset. Then after several failed attempts to start the motor will start to spin again only to last for 15-20 sec before the cycle repeats. At first though I thought it was a loose connection but I've double checked it and it seems fine, also the cycle repeats itself in the same orderly fashion every time so I thought that maybe it was drawing too much current and then it was resetting Arduino and waiting for the capacitors to build back up or something like that. The other 6v Dc motor has no problems whatsoever. Whats happening? How can I stop it? Here some pictures, and diagrams for how I have it wired up,
What voltage did you use for the small motor ?
5v, I couldnt find any specifications so I just plugged it in.
Did it get hot ?
Did you test it outside your circuit , separate from the arduino ?
Are you powering the motor from the Arduino 5V rail? This is a bad idea,
risks damaging the Arduino, but here the problem seems to be interference,
probably due to the motor putting lots of noise onto the 5V rail.
Add decoupling caps (01uF, 1uF) across 5v & gnd
The 'tiny' RC helicopter motor might draw a TON more power than another random motor. The battery might be able to supply it OK, but after a few seconds the battery becomes -unable- to supply enough power, so the voltage drops and the Arduino resets.
The motors that seem to work, run one up to speed, grab the motor shaft to stall it, an I'd bet it resets the Arduino.
Measure both with a multimeter ammeter (in 1A or higher mode.)
Regardless of anything else, yeah, it's NOT a good idea to run 'power' items off the same source that powers the controller. The Arduino power system is designed to power itself, and the -circuit- part of plug-in/shield/accessory boards, but not power devices such as motors/solenoids/servos.
Here are 2 reasons why I think you are experiencing this problem. (Reason b is probably more likely, seeing that the motor is being powered through transistor. But still read reason a to get what I'm talking about).
a) The motor/transistor may be drawing all the power from the arduino so it has no electricity to keep the arduino on. It's like unplugging the arduino from it's power supply. When the motor is off and it isn't taking away any electricity the arduino gets enough power to turn itself on and starts the program at the beginning.
b) I was testing some transistors to see which pin was which and I powered a small 5v motor that works without a transistor, but the transistor sucked away all the arduino's power so it kept connecting and disconnecting from my computer. Maybe you have got the wrong type of transistor or it is connected to the wrong pins.Transistor pins don't go in the same order.
What voltage did you use for the small motor ?
5v, I couldnt find any specifications so I just plugged it in.
This is your problem. You need a 6V AA battery pack for the small dc motor. Any attempt to continue with you your current power connections will be in vain.
Yes, your exactly right, rashemmel. I had the dc motors run off another power source and it worked fine. But this is still a problem as I can only afford to have one battery, so how can I use one battery to power arduino, dc motor, and other sensors? Thanks for all the replies!
Unfortunately, the voltages don't work out in your favor. If you were using a motor that ran off 7 to 12V you could power the motor and the arduino using the arduino exteranl dc power jack wired in parallel with the motor.. B6 ohm 2W resistor ecause the motor you are using runs off 6 volts, the only way to power them both is to use a 9V AA battery pack add a series dropping resistor for the small dc motor. The 9V plugs into the ext.dc power jack of the arduino and the resistor is wired in series with the small dc motor and the 9V battery pack. In order to do this , you would need to know how much current that motor draws at 6v by putting a meter in series (on 10A current scale, plugged into the 10A jack of the meter ) . Using an example that assumes you measure 0.5A (500mA) at 6V, and Vload =6V, the dropping resistor value would be (Vin -Vload)/Iload=(9V-6V)/0.5A=6 ohms. The power rating of the dropping resistor would be P= Iload x Vdropped=0.5A x 3V =1.5W, so you would use a 2W , 6 ohm resistor in series with the small dc motor. If the current measured was 1A, then Rdropping=9V-6V/1A= 3 ohm, and the power rating would be P= 1A x 3V= 3W.
Hi,in your posts, it seems you are just connecting stuff and seeing if it works, if it doesn't you don't provide any necessary info like what the applied voltage was, what current it was drawing.
Do you have a DMM to measure your circuit conditions?
One that will measure up to 10A are quite common and at good prices.
DMM will be indispensable in you implementation of this project and help us immensely.
Tom......
Question, Did you look and analyse how the original chopper, you got the motors from, accomplished its goal?
Reallyhappyman:
Yes, your exactly right, rashemmel. I had the dc motors run off another power source and it worked fine. But this is still a problem as I can only afford to have one battery, so how can I use one battery to power arduino, dc motor, and other sensors? Thanks for all the replies!
The battery will need to handle the maximum current draw comfortably, including
the peak current taken by the motor.