Hi folks ! I am very new to this great platform i have programming experience but my electronic knowledge is very vague...but i want to learn so here is my first question for you.

I have a small motor from a kids toy car i tested it and it runs on 3 V and higher . I got to this result by connecting it to different voltages if there is a way i can find at what tenssion a component operates please tell me. Ok so i want to connect this motor to my arduino it has 2 wires :) where do i put them and i understood by reading a book that i need to set a diode but i don't know where i must put that diode and what kind of diode so if you can explain me more i will be grateful.


The arduino cannot provide enough current to power a motor by its self; if you try, you will burn it out. Instead, you can use a transistor to turn on the motor, or an h-bridge to allow you to reverse the motor: (H-bridge) (Swap the solenoid for a motor, and it should work).


I am very confused arduino doesn't output 5 V ? If my motors runs on 3 V why i need to use an external power source ?

Arduino pins do output 5V, but they give a VERY maximum current of 40mA (safer to assume 20mA though). Draw any more and you will need to replace the ATmega - you'll have burned it out. Motors take varying ammounts of current, but usually they draw a minimum of 0.25A; that is 250mA, 12.5 times more current than the safe maximum. That will destroy the arduino.


Got it thanks very much

opc0de: I have a small motor from a kids toy car i tested it and it runs on 3 V and higher . I got to this result by connecting it to different voltages if there is a way i can find at what tenssion a component operates please tell me.

As far as figuring out what voltage a motor needs to run, your best bet in the case of your situation is to look at the toy itself, and figure out what kind of batteries it takes, and how much voltage they produce - once you have that information, then you'll know approximately what your upper-end for the motor will be (you can then experiment with voltages lower than that to find the lower end).

If you just had the motor, but no other info, sometimes there may be model number (and possibly the name of the manufacturer or a maker's mark) which you might be able to look up for a spec on google. If that isn't forthcoming, but you know the model and manufacturer, then you might be able to contact the manufacturer directly with a nicely worded email asking for some information; they may have something in their archives that they can provide you.

Beyond that, to figure out the voltage a motor will need will essentially come down to some familiarity with motors, and some experience with the size of the motor, etc; for instance, most small toy motors will work on anything from 3 to 6 volts DC; you can overvolt them a bit, but not too much (nor under too high of a load) and generally the cheap bearings will wear out quickly (or the windings will burn out). Slightly larger motors you can figure on needing 6 to 12 volts. For most small DC motors (under 1/4 hp), 12-24 volts DC is fairly common. Beyond that, you start getting into larger DC motors, like those used for treadmills and the like (which will generally take up to around 120 volts DC or thereabouts, but will typically run with much less, even down to 6 volts).

Figuring out the current needs of a motor is a bit trickier - first off, you need a multimeter. For small motors, that you suspect are under the maximum current measurement rating of your meter (typically 10 amps), you can connect the meter probes up to the 10A current measurement jacks, then insert the meter in-line with the motor (that is, connected serially), and power the motor with its "rated" voltage. For larger motors which may have a much higher current capability, you need to buy or built what is called a "current shunt" - its basically a very low-value resistor that you insert in-line with the device to be measured, then you measure (with your meter) the voltage drop across the resistor. Not just any resistor will do, it needs to be fairly high-wattage, and fairly low-value (0.1 ohms or less); since solid copper wire (like used for wiring a home) has a given amount of resistance per unit of length and cross-section (gauge), you can build your own low-cost shunt of fairly exact resistance if you want (there are plenty of tutorials on-line detailing how to do this). Otherwise, you need to purchase or otherwise procure a proper current shunt (they are typically made of a special metal that doesn't change resistance based on environmental factors over time).

Once you know the voltage drop, plus the resistance of the shunt, you can calculate the current using Ohm's law.

Make sure you make two measurements - one measurement with the motor "free running" (called the no-load and/or "running" current value), and one with the shaft "locked" (or as locked as is humanly possible - when doing this, don't use your bare hands on anything but the smallest of motors, since many motors can easy slip your grasp and cause abrasions or worse - a homemade pony-brake with limited slip can be useful here; also, if you do lock the rotor so it doesn't turn, make your measurement as quick as possible to avoid burning out the windings, welding the commutator, etc); the "locked-shaft" measurement is called the "startup" or "stalled" current value - it's the maximum amount of current the motor will pull (which will happen at startup or under heavy load - both conditions are considered "stalled").

You will, of course, need a source of voltage that can supply the voltage and current to the motor - this may or may not be easy to obtain (for some 12 volt motors, the cheapest and easiest current source is a car battery, or other lead-acid battery; a large SLA can work, too - just note that in the case of a car battery, it can deliver hundreds of amps - more than enough to melt the motor and catch it, the battery, and you in a fiery conflageration very quickly, so be careful, and take all proper precautions before going down this road).