DC motors are ubiquitous. They convert electrical/magnetic energy, produced by a wire carrying current in a magnetic field, to motion, and they appear in all sorts of appliances and applications, e.g., they are found in small fans, ceiling fans, air cleaners, solder fume extractors, quadcopters, small helicopters, and other drones, hand-held rotary tools, circular saws, drills, lathes, sanders, cars, robots (where they rotate tires, or move robotic arms, etc.), aquarium air pumps, Maker projects, and many other areas. The most popular motors generally have shafts that are round, or 'D'-shaped (i.e., flattened on one side), flattened on two sides, or geared (i.e., have gears directly cut into the shaft or mounted on the shaft). See photographs for examples of these popular shaft styles. Although motors can run from DC, AC, and in the case of universal motors from both DC and AC, this tutorial only discusses DC motors in detail.

Electric current and magnetism go hand-in-hand as it is impossible to have one without the other. As can be seen in the photographs current through a wire moves a compass needle owing to the magnetic field generated around the wire by the current passing through it. Hans Christian Oersted, the Danish physicist, identified this connection between electricity and magnetism in the early 1800's. [Some interesting but not essential information: The 'Oe' in the name shown here, can be replaced by a single capital Danish O (i.e., Ø) and on occasion one sees his name as Ørsted].

Magnetism produced by current flowing through a single wire is weak. If this wire is wound into a coil the magnetic field becomes stronger. If this coil is then wrapped around a ferrite core its magnetic field becomes even stronger.

The theory of DC motors is not too difficult to understand, if we recall that for magnets opposite poles attract and similar poles repeal. A DC motor works by having the poles of a rotor through which current flows, thereby producing a magnetic field, subjected to another magnetic field which attracts the magnetic field of the rotor. It is interesting to learn that the opposite is also true. That is, as a motor rotates the interaction of the magnetic fields produces a voltage. This can be seen in the video above where a NEMA-17 stepper motor is turned to produce a voltage and light an LED, i.e., where the motor is used as a generator.

In this tutorial we will discuss several types of DC motors: continuous DC motors, gear Motors, DC servo motors, brushless DC motors, coreless DC motors, vibration motors, and DC stepper motors, although there are many other types of motors, these are probably the most popular with Arduino users.

Motors are devices that can impart motion, i.e., movement, to our projects. You can see two of my prior Instructables where this occurs: “Personal, portable, lightweight, air conditioner: An inexpensive and effective DIY project”, and “Making a Hypnotic disk using an Arduino and small DC motor”. They provide examples of DC motors that were used in Arduino projects. Some other Arduino projects using motors are BlackStar Vvek’s, “Arduino based humanoid robot using servo motors”, “Arduino + K'nex Motors” by link2_thepast, martinbolton’s “Arduino+Stepper Motor Camera Slider”, etc. In fact, many Instructables can be found that use an Arduino and one or more motors.

Fortunately, with DC motors used by Makers, we need not be too concerned with voltage (although we need to be sure a motor is designed to work at the voltage we have available) or current (although we need to be sure we have a switch that will handle the current the motor takes, as motors usually take more current than is available, e.g., from an Arduino digital or analog pin).

Our main concerns with motors are speed and torque. Speed for motors is measured, unlike it is when we measure the speed of a car in miles per hour or kilometers per hour, in rotations per minute (RPM) or radians/sec, e.g., 3,000 RPM or 450 rad/sec. Note these are but two examples of how motor speed might be represented. They are not meant to imply that 3,000 RPM is equal to 450 rad/sec; it is not. Fortunately, it is easy to covert from RPM to radians/sec or degrees/sec or the reverse. Speed is represented by the Greek letter omega, ω.

Sir Isaac Newton's second law of motion is: Force equals mass multiplied by Acceleration, where Force and Acceleration are directional, although mass is not. Torque is a "twisting/turning force". Force is frequently measured in Newton (N), and when we multiply force by length we get torque, e.g., Newton-meters (N-m), Newton-centimeters (N-cm), or ounce-inches (oz-in).

In a motor the torque is always tangent to a circle centered on the shaft, i.e., it is at a right angle to a diameter. The symbol designating torque is the lowercase Greek letter tau, τ, and less frequently the English capital letter T. Datasheets for DC motors usually provide speed in both RPM, and radians or degrees/sec.

Torque is often presented in datasheets in several forms (e.g., as peak torque, stall torque (more on this later), and rated torque, etc. DC motor datasheets are usually quite comprehensive and present other motor parameters as well. It should be noted that motors can have the same power capability, but different speed and torque, as it is possible to exchange speed for torque (for more on this see gear motors below). Mass and weight are not the same. Although they are often interchanged in informal conversations. For example, on the moon a motor would have the same mass it does on Earth, but its weight would be different.

Step 1: Continuous Motors

There are four main parts to many continuous brushed DC motors. The rotor (the part that rotates) or armature (in engineering speak the armature is the component of an assembly that turns/pivots and that holds the main current carrying coils that produce a magnetic field) here the rotor and armature are the same, i.e., they are both the turning component in the center.

The stator, as its name might suggest, is stationary, it provides the magnetic field that surrounds the rotor (it is often in two parts if the stator is made from a permanent magnet). If so, the stator magnets are known as field magnets. Field magnets are reliable, as the magnetic field remains at a constant level, although their fields may diminish with time. Permanent magnets are found in many brushed motors. If the stator is made from an electromagnet the coils used to produce this magnetic field are known as field windings or field coils. The remaining two parts of a typical brushed motor are the commutator, and the brushes/contacts.

Some decades ago DC motors used actual copper "brushes" that were held by springs and pressed against the commutator to shift current to the coils and keep the motors turning. Today DC motors have contacts that "brush" against the commutator, but true brushes are uncommon. Although actual brushes are not common, these devices are still referred to as brushed motors. Brushed motors are inexpensive, and usually have operational lives that are longer than the devices they are part of.

However, brushless motors are also available today, as noted previously, and seem to be trending upward as brushes/contacts can wear out, and may produce sparking. Brushed motors, as noted, are less expensive to manufacture and are commonly used in Maker projects. However, it is important to learn if their rotors rotate in bushings or ball bearings, as bushings have a shorter operational live.There will be more on brushless motors later in this tutorial.

In a simple DC motor the armature connects to a DC power source to produce a magnetic field when current flows. However, when the armature moves to become orthogonal to the stator, i.e., at right angles to the stator's magnetic field, there is almost no torque experienced. The momentum of the rotor usually carries it forward to continue spinning. To overcome this ‘defect’, a second armature coil at right angles to the first is added so that there is always one segment of the armature that is exposed to a higher magnetic torque, i.e., is receiving power while the rotor is in a stronger portion of the magnetic field of the stator.

In most working DC motors (see attached photographs) there are several armature coils offset from each other. In general, the more windings a coil has the higher its resistance, and the greater its torque, but the slower its speed. These coils insure that the motor turns smoothly and always yields a high torque at all points in its rotation. The rotor is connected to a commutator, which is a component that allows the rotor coil to change polarity as required to rotate continuously. The commutator is usually just a simple cylinder with contacts that have insulating gaps between them to allow "brush" conductive elements to connect, in turn, to the DC power source (see attached photographs). That is, it provides a simple switch to change the DC input. The commutator is connected to the DC power source by contacts that "brush" against the contacts on the commutator.

Permanent magnet stators are used in many small DC motors, an example of which can be seen in the attached photographs. In other small DC motors and many larger DC motors the stator is magnetized by the same power source as the rotor. This can occur in one of two ways: parallel (producing a shunt motor) or serial producing a series motor. The stator can be connected to the DC power source in series or in parallel with the armature/rotor.

There is a space between the rotor and stator, so as to allow the rotor to turn easily. This space is referred to as the "air gap" between the two. Most motors are rotary, but there are motors where the rotary motion is converted to linear motion. These devices are known as "linear motors" or "linear actuators (although actuators may get their energy from sources other than DC)". Most motors used in Maker projects are fractional horsepower (FHP), as they have a rating less than one horsepower.

See the pictures here of the disassembled small continuous DC motor. The two permanent magnets that make up the stator, the rotor/armature, and the coils can be easily seen in the attached photographs of the this motor.

Step 2: An Arduino Project Using a Continuous Motor

A continuous DC motor usually requires more amperage than the maximum 40ma, 20ma is best, current available using an analog or digital Arduino pin. This restriction is not a problem when using an LED, but is a problem when using a DC motor. To overcome this limitation, a 2N2222 transistor was used here, these can be obtained for less than $0.20 each. They work well as switches, and in the project presented here, the 2N2222 easily switches the required motor current on and off. A datasheet for this transistor, can be found at e.g.,


This datasheet notes that the maximum voltage between emitter and base should not exceed 6.0 V, So, be sure to keep your voltage below this maximum value, or you risk damaging the transistor.

The attached picture is of a 2N2222 in the less expensive TO-92 package rather than the original metal TO-18 package. In this configuration the 2N2222 / 2N2222A is also called a P2N2222 or PN2222A. It is important to review the datasheet for the particular version of this transistor that you use, to ensure that the maximum acceptable voltages and currents from base to emitter, and collector to emitter, are not exceeded.

An alternative choice would be a MOSFET. We could also use a mechanical device such as a relay, or if you do not need to drive it from an Arduino a simple switch. If you need to handle more power then the 2N2222 can safely dissipate, a TIP120, darlington complementary, transistor will work. If properly heat sinked it can handle as much as 5A. For still more amperage, a TO-220 packaged N-Channel RFP30N06LE (P30NO6LE, P30N06) MOSFET can handle somewhat over 30 amps when its drain flange is appropriately connected to a metal heat sink. This N-Channel MOSFET can be driven from an Arduino, and is useful for large DC motors.

The higher current flows between the 2N2222’s collector and emitter pins and is controlled by the base and emitter pins. For this NPN transistor, when the base pin is set to turn the transistor on, as in this project, the transistor switch allows more current to flow between the collector and emitter pins of the 2N2222 than flows between its base and emitter. A 1N4001 diode was placed across the two pins of the motor, with the line on the diode facing the positive voltage. It is placed in the opposite direction to normal current flow, and so usually has no current passing through it. The 1N4001 is used as a flyback diode to offer a path for the energy produced by the collapsing magnetic field of the motor when the power is shutoff. It is hard to place the diode incorrectly without knowing it, as if configured this way it will shunt the current to the motor and the motor will not spin.

Although this may only occur for a few microseconds, it can produce quite high voltage, in the range of 100s of volts, enough to damage the transistor. All DC motors work in an essentially similar manner. So, when using these with an Arduino, a transistor, BJP or MOSFET, or relay, etc., a switch that can handle the extra current needed by the motor is required, and likely a user-added flyback diode.

Fortunately, the 5v pin of the Arduino can provide about 450ma from USB and slightly more if the barrel jack is used, perhaps as much as 650ma. The 5v pin and ground were used to power the continuous motor used in the sketch presented in the next Step.

Step 3: Sketch for the Arduino Project Using a Continuous Motor

In an early part of the sketch’s loop function, the continuous DC motor is turned on for 5 seconds (5000 milliseconds). A HIGH signal, i.e., 5v, is sent to the motor. [The motor used here takes less current than can be provided by the Arduino's 5v power supply. However, if the motor you are using takes more current, a power supply separate from that available on the Arduino will be needed.] After the motor is run for 5 seconds, it is gradually slowed down to a complete stop using digital pin 6, which can process pulse width modulation (PWM) signals.

Here the motor turns in one direction. The speed of the motor is slowed down using a PWM signal starting at 255 and decreasing in increments of 3 until it reaches 0. The use of PWM allows us to mimic voltages between 0 and 5v. At some point the simulated voltage to the motor is too low to turn the motor, i.e., the PWM duty cycle is too low to activate the motor. For this example that approximate point is when the duty cycle reaches 30. At this point in the sketch, the LED is turned off, as the motor is not spinning. A propeller, rather than a twisted wire, was connected to the motor here, as it allows us to easily see the action a balanced motor as it turns, as it provides better balance to the motor than an asymmetric wire would. However, if you do not have a propeller, a twisted wire would yield related results. However, if you only have a wire that cannot be balanced on both sides of the shaft, you should likely read Part 2 of this tutorial that contains a Step on vibration motors, as an unbalanced load on the motor is likely to cause it to vibrate.

A red LED (just visible in the video) is turned on and faded to completely off in concert with the speed of the motor. This is accomplished in 30 lines of code as can be seen here.

To see the sketch exactly as written please download the text file.


// Run a motor at full speed then continuously reduce its speed until
it is off.

// Fade an LED in consonance with the motor's speed

int motorInputPin = 6;

int ledPin = 10;

int delay2 = 5000;

int delay3 = 50;

void setup() {

pinMode(motorInputPin, OUTPUT);

pinMode(ledPin, OUTPUT);


void loop() {

// Turn motor on for delay2/1000 seconds

digitalWrite(ledPin, HIGH);

digitalWrite(motorInputPin, HIGH);


// Continuously slow motor down

for (int i = 255; i >= 1; i = i - 2) {

analogWrite(motorInputPin, i);

analogWrite(ledPin, i);

// Delay delay3/1000 seconds between changes in motor speed



// Pause for delay2/1000 seconds



Step 4: H Bridge, Motor Direction Reversal

No presentation of DC motors would be complete without a mention of H Bridges. The theory behind an H Bridge is quite simple, and easy to understand. It gets its name from the configuration of its main components: 4 switching elements and a DC motor that can be diagrammed in the configuration of the capital letter ‘H’ (see photograph above).

Its operation is straightforward, if S1 and S4 are closed while S2 and S3 stay open the current flows through the motor in one direction from + to ground. If S2 and S3 are closed while S1 and S4 are open the current flows through the motor in the opposite direction from + to ground. (See attached photograph). The illustration here shows the switching elements as normally open switches, i.e., mechanical devices. Notice that these switches need to be closed in a particular fashion. If for example either switch pairs S1 and S3 or S2 and S4 were closed at the same time this would provide a short circuit path between the positive voltage and ground. Closing S1 and S2 while leaving S3 and S4 open will have no effect as S1 and S2 are connected to the same positive voltage and so no current will flow. The situation is similar if we close S3 and S4 at the same time while leaving S1 and S2 open, in this situation S3 and S4 are both connected to ground. If current is not running through the motor, as when switch S1 and S2 are closed and S3 and S4 are open or vice versa, the motor will stop.

The switching elements could just as well be relays, another mechanical element, or solid state devices such as bipolar junction transistors (BJTs), or metal oxide semiconductor field effect transistors (MOSFETs). In most modern H Bridges the switching elements are solid state devices, usually MOSFETS. The advantages of MOSFETs over BJT is that they can switch current to large loads while needing only a small amount of current to switch on. In practice diodes are placed across each switching element, with the lines on the diodes facing the positive voltage. This is done so that when e.g. all switches are open after the motor has been running, the current generated by the motor, due to its collapsing magnetic field, has a path to take. However, rather than use discrete components, e.g., switches, relays, BJTs, or MOSFETs, most H Bridge board makers use integrated circuits (ICs), such as the board based on the L298 IC shown above.

If you use an H Bridge module with your own Arduino sketch, it is probably an excellent idea to open all switching elements before changing direction, as this will insure a short circuit is not created even momentarily.

H Bridges are found in power inverters, robots, motor controllers, etc. They are frequently used to drive a stepper motor

Step 5: DC Gear Motors

Most continuous DC motors typically run at 1,000s of revolutions per minute (RPMs). Gear motors are often used to reduce RPMs (speeds) to less than 1,000, and one can easily find gear motors with RPMs of less than 100. They use, as the name would imply, an assemblage of gears, a reduction gear train, to obtain this reduced speed. In general, the more the reduction the slower the speed. DC gear motors come in a myriad of speeds, shapes, and sizes. They are hard not to enjoy.

An excellent example of the need for a gear motor is a timepiece, such as an analog wristwatch. The motor in a wristwatch needs to provide rotations at slow speeds. For example, the second-hand rotates at only one RPM. Another example are the tires in a robot car, which also must rotate at relatively slow speeds. While the main motor, in a gear motor, may rotate at over 1,000 RPM, reduction gears allow for a much slower rotation of the output. Gear motors can provide significant torque are low RPMs. In fact, torque increases as speed slows. In general, the higher the current the higher the torque. Gear motors are found in automobiles, clocks, washing machines, drills, kitchen mixers, and in industrial equipment such as cranes, jacks, winches, conveyor belts, etc. They can change direction (just swap the leads to the motor), spin at different speeds, and stop quickly. They are often found in robots, e.g., robot cars. A word of caution: efforts to run a motor above or below its voltage range can damage the motor. If the motor will not turn the voltage is likely too low, and if it feels hot to the touch the voltage is probably too high. Gear motors can often be identified as their rotating shafts are often not aligned with the center of the main motor, to provide room for the gears, but not always (see photographs).

As voltage increases the speed of the motor typically increases (see attached video). One of the videos shown here is for a DC gear motor where the voltage ranges from 2-17 volts. The higher the voltage the faster the gear motor's rotation. The voltage first goes from low to high and then back to low.

The second video shows the slow speeds possible using a gear motor even with some minor changes in input voltage. The last video is of a 12v gear motor run at less than 12v, so it runs somewhat slower than it would at a full 12v.

Step 6: Afterwards

If you have come to this point congratulations. You should now have a basic understanding of some of the key elements of the DC motors covered in this Part. I hope you found Part 1 of this Instructable interesting and of value.

If you liked this Part of the tutorial you may want to continue on by reading Part 2 at, https://www.instructables.com/id/DC-Motors-Part-23-...

It may be obvious, that this tutorial, even though it is in three parts, just "scratches the surface" of DC motors. Each of the motors covered here could have its own multi-part tutorial, or perhaps an entire textbook.

If you have any comments, suggestions, or questions related to this Part of the tutorial, please be kind enough to add your comments below, to those already received.

If you have any thoughts or questions, related to DC motors in general, but not covered in this tutorial, or any suggestions for how I could improve this or the other Parts of the tutorial, I would be pleased to hear from you. You can contact me at transiintbox@gmail.com. (Please replace the second 'i' with an 'e' to contact me. Thank you.)

<p>Hi,</p><p>I want to use this Arduino Nano with solar panel : </p><p><a href="https://www.aliexpress.com/item/Nano-CH340-ATmega328P-MicroUSB-Compatible-for-Arduino-Nano-V3/32572612009.html?spm=2114.13010608.0.75.yCaRT7" rel="nofollow">https://www.aliexpress.com/item/Nano-CH340-ATmega3...</a></p><p>I discovered this new blind automation I presume they also use a Nano Arduino : </p><p><a href="https://www.indiegogo.com/projects/movez-motorize-blinds-and-shades-gadget#/" rel="nofollow">https://www.indiegogo.com/projects/movez-motorize-...</a></p><p><a href="http://www.teptron.com/move.html" rel="nofollow">http://www.teptron.com/move.html</a></p><p>But I do not know which motor they use. It seems to be a small motor like this : </p><p><a href="https://www.aliexpress.com/item/Smart-Electronics-28BYJ-48-5V-4-Phase-DC-Gear-Stepper-Motor-With-ULN2003-Driver-Board-for/32314913056.html?spm=2114.01010208.3.114.5iCEDC&ws_ab_test=searchweb201556_8,searchweb201602_1_10065_10068_112_10069_110_111_418_10017_109_108_10060_10061_10062_10057_10056_10055_10037_10054_301_10033_10059_10032_10058_10073_10070_10052_10053_10050_10051,searchweb201603_3&btsid=be49b0f3-fd57-4ec6-8700-3157af8bc653" rel="nofollow">https://www.aliexpress.com/item/Smart-Electronics-...</a></p><p>Am I true and do you have any idea ?</p><p>Sincerely thanks.</p><p>Miguipda ;-)</p>
<p>Dear Miguipda,</p><p>Thank you for the question. I think you are correct that this product likely uses a stepper motor. </p><p>It could be as you suggest a 28BYJ-48 stepper. However, the 28BYJ-48 has relatively low torque, so that seems unlikely, to me, of course I could be wrong.</p><p>I didn't see any pictures of the motor itself. So, if you have pictures of that motor, please feel free to send it to me at transiintbox@gmail.com. (Please replace the second 'i' with an 'e' to contact me. Thank you.) </p><p> That email can receive pictures, and I will be pleased to see if I recognize the motor. If so, I will be happy to identify it for you.</p><p>If it is a stepper, you may want to read Part 3 of my tutorial, not yet posted, which covers stepper motors. </p><p>The very best. </p>
<p>Hi,</p><p>with pleasure to read soon the motor that could be used with this nano arduino board. <a href="https://www.aliexpress.com/item/Nano-CH340-ATmega328P-MicroUSB-Compatible-for-Arduino-Nano-V3/32572612009.html?spm=2114.13010308.0.0.nuX5J8" rel="nofollow">https://www.aliexpress.com/item/Nano-CH340-ATmega3...</a></p><p>I though it could be this motor because they also give the motor driver board that may then be used (I do not know how) with this small nano arduino board.<br></p><p><a href="https://www.aliexpress.com/item/Smart-Electronics-28BYJ-48-5V-4-Phase-DC-Gear-Stepper-Motor-With-ULN2003-Driver-Board-for/32314913056.html?spm=2114.13010308.0.0.nuX5J8" rel="nofollow">https://www.aliexpress.com/item/Smart-Electronics-...</a></p><p>This nano board is interesting to be used when powered with a solar power bank (easy to replace when needed) : (I do not know if this one is enough) : <a href="https://www.aliexpress.com/item/5000mAh-Waterproof-Solar-Power-Bank-Dual-USB-Portable-Charger-Outdoor-Travel-Enternal-Battery-Powerbank-for-iPhone/32711829789.html?spm=2114.13010308.0.0.nuX5J8" rel="nofollow">https://www.aliexpress.com/item/5000mAh-Waterproof...</a></p><p>By considering the blind will must be used in three conditions :<br>1) by bluetooth with user decided smartphone action<br>2) to simulate presence for security reasons when in holiday<br>3) when light is switched on inside (because outside a street light may disturb to select when dark outside)</p><p>Sincerely thanks.</p>
<p>Dear miguipda1,</p><p>Thank you for the follow-up. </p><p>Unfortunately, it is impossible for me to know what motor or controller they are using without photographs of those items, even if the photos do not provide much associated information.</p><p> As I noted in my previous message, if you have a chance to see photos and would be kind enough to forward them to my email, I would be pleased to look them over to see if I can identify the motor and/or driver module for you. </p><p>Without photographs, I do not feel I have enough information to even venture a guess. </p><p>However, as mentioned in my earlier comment, I do not think the motor suggested previously is a good candidate. Although, I could clearly be wrong. </p><p>The very best. </p>
<p>A simple question. For a DC brushed rotor, when the load through the motor is switched off it is stated a collapsing magnetic field (within the inductor) creates a reverse current. A &quot;snubber&quot; diode is used to ground that voltage at the motor so the switching system is not damaged.</p><p>I also assume this collapsing magnetic field is moving within a permanent magnetic field (if the stator produces a continuous field). As stated earlier (not in direct words) in your article this creates a changing voltage at a changing current at the inputs to the motor.</p><p>When &quot;snubbed,&quot; I assume there is now a force being applied to slow down the motor? On a 2 HP 13A 125VDC pulse controlled motor, How much power is this? (How is the current rating of a diode selected?)</p><p>Could this energy be captured from the motor and stored so that it can be &quot;additive&quot; to the power sent to the motor? (IE stored kinetically in another motor switch in, then that kinetic energy added back, or capacitively, or through a RI circuit?)</p><p>Just for fun of course.</p><p>- not afraid of the math required...</p>
<p>gddee </p><p>Some good questions.</p><p>Yes, when current in an inductor of any kind, including a motor winding, is shut off, the collapsing magnetic field - and the fundamental nature of an inductor - tries to keep the current flowing. </p><p>On a inductor in a relay, for example, you use a &quot;fold back&quot;, &quot;fly back&quot; diode which are just plain reverse polarized diodes in parallel with the coil. They allow the coil current to continue - by circulating back to the beginning - until it dissipates.</p><p>Without this, the inductor really wants that current to keep flowing. It will create lots of volts in an effort to push those amps. The magnitude of the voltage, and the fact that it is reversed, will blow apart many semiconductor driver circuits without diodes.</p><p>As an aside, the &quot;points&quot; in an older ignition coil car were basically a switch that pulsed current in the primary of the coil, inducing a much higher pulse out the secondary. Contrary to what most think, the spark didn't happen when the points closed - but when they opened! It takes a while for the current to build up, but you can stop it on a dime. How did they keep the points from arcing and burning up? A diode would have defeated the purpose - we want to stop the current abruptly. Instead, they added a small capacitor (called a condenser). As the points started to open, the cap would charge. By the time of he cap was fully charged, the points were open far enough a spark couldn't gap across them!</p><p>Ok, back to the DC motor &quot;snubber&quot;.</p><p>Things are bade much more confusing by the armature and brushes. While the voltage is always going one way into the motor, the voltage across each coil is constantly switching as it attracts, then repels each magnet in turn. You can't put a snubber on the coils, they are kinda &quot;AC&quot;. You can't really reclaim any energy, because the magnetic flux is caused by a change in current. When it's going one way, and you switch it to the other, you've changed it by twice as much - you haven't really wasted anything.</p><p>Now from the outside of the DC motor: the commutator, brushes, and multiple coins conspire to make it look like an inductor. But worse. The coasting of motor actually makes look like a bigger inductor, because it's a generator! So if we abruptly cut off the power, the inductance will create a bad voltage, and the continued in rotation of the motor will generate more bad voltage.</p><p>A diode gets rid of the bad voltage in the same way as a conventional inductor.</p><p>I've always thought it should put a huge load (line a short circuit) on the generator, and stop it quickly, but this doesn't happen. And good thing, or PWM motor control wouldn't work. <strong>Can someone explain why the diode doesn't load the &quot;generator&quot;?</strong></p><p>Fun thing to try with a brushless motor. Hold the leads apart. Spin it with your hand. Short any two leads together. Try to turn it by hand</p><p>Again, why does shorting the leads of a brushed motor not cause this??</p>
<p>I use Doral Electronics on E-Bay for this application. Contact them and let them know all the parameters and they will hook you up.</p>
<p>Hi,</p><p>The safest way to insure you have the appropriate diode is to consult the manufacturer's data sheet for the motor, as the exact calculation depends on may factors which we are unlikely to know without further measurements. </p><p>On the manufacturer's data sheet you should find a &quot;Typical Application&quot; or &quot;Test Circuit&quot; or something similar that may specify the appropriate diode to be used. If this is available to you, it is the best way to proceed.</p><p>However, if you cannot find this on the datasheet, or the datatsheet for the motor is not available to you, then you may want to use an oscilloscope to find the transient value of the peak voltage when the motor is turned off. Using this, and the current, would allow you to determine power using the formula P=IE. This information could then be used to select an appropriate diode. </p><p>The energy generated during the collapsing magnetic field is of very short duration, so I have never thought about your interesting idea of storing it and adding it at a future time.</p>
<p>Piggyback question; in the case of a simple DC case motor, such as the one shown above, can I just increase the gauge of the wire or the number of windings to be able to increase the speed of the motor? I do understand that higher rpms induce greater wear on the simple bearings.</p>
Back in the early to mid 1960's, slot car tracks, and racing, were a big hobby. As a teen who was into electronics and anything electrical, I knew that by reducing the number of turns on each pole of those small motors would reduce the voltage rating of the motor. I used a slightly larger guage wire, and counted the turns of wire on the first pole until filled, then wound the same number of turns on each pole to keep the motor balanced. I won a lot of ribbons and trophies with my slot cars. I would usually lap the field of cars in a 100 lap race! I know I wasn't the first to discover this, because as the hobby grew, magazines that followed the slot care scene appeared on the market. It wasn't long until &quot;my secret&quot; was published and everyone with any soldering skill, did the same.
Was there any &quot;formula&quot; or just trial and error (which has served science and mechanics for millennia)? How did your modifications affect the service life of your modified motors?<br><br>Thanks so much for your enlightening post!
There probably is some formula, but at the age of fourteen, the only thing I did know, was that by decreasing the number of turns would lower the voltage. By lowering to voltage, the motor would draw more current. So, if the motor was wound with 22ga wire, I would replace it with 18ga wire, therefore I would have fewer turns per pole on the motor. <br>I had always been interested in electronics and had got my Amateur Radio License when I was twelve. I understood the theory of what I was doing, but never knew of a formula for it! During my experiments, I wound some motors that turned so many rpm's, that they would sling the windings off the poles! When that happened, I would rewind with one size smaller wire to slow the motor down. <br>About the time I turned sixteen, the slot car craze was over, and the two tracks near me had shut down. But for almost four years in the mid 1960's, it was a fun hobby.
<p>Dear tcoe,</p><p>You, obviously, have<br>considerable experience wiring motors. Your insights should be interesting and helpful to readers such as cdavenport. </p><p>The very best.</p>
<p>Thank you so much! I'm going to give that an experimental try!</p>
<p>Dear cdavenport,</p><p>Hello again. </p><p>Unfortunately, I think I am misunderstanding part of your question, as motors come with winding already placed inside them, usually placed there by automated machinery. Would you like to change these windings by using your own gauge wire and rewinding? </p><p>I will be pleased to answer the part of your question I think I understand, if your motor has ball bearings rather than bushings it will be considerably harder to &ldquo;wear&rdquo; it out. </p><p>The very best. </p>
<p>Thanks, Jordan. Let's just suppose that I wish to rewind the armature on a basic 3 volt can motor which have only simple plastic bearings. Are there formulas that allow me to predict what affect the number of windings and the gauge of the wire will have on the performance of the motor?</p><p>One additional related question: does the precision of the wire wind, side-by-side as opposed to just wound round like a cord, effect the efficiency of a motor?</p><p>Thanks for considering these questions. I've been repairing motors for years and have never found answers to these basic questions.</p>
<p>&quot;H Bridges are found in power inverters, robots, motor controllers, etc. They are frequently used to drive a stepper motor.&quot;</p><p>I don't think this is true; stepper motors reverse by reversing the sequence of energizing the coils. H-bridges are not used.</p><p>Thanks; I enjoyed the tutorial.</p>
<p>Of course. Thanks. I had forgotten about bipolar stepper motors. For those, you need to reverse the current, so you need H-bridges.</p>
<p>Dear dkraemer1,</p><p>Your welcome. Thanks for the follow-up.</p><p>Again, the very best. </p>
<p>Dear dkraemer1,</p><p>Thank you for taking the time to leave your comments. They are appreciated. </p><p>You are correct, as you can indeed reverse direction for a stepper motor by changing the order of its coil activations. However, H Bridges are often used to control stepper motors, see e.g., the on-line articles:</p><p>1) Controlling a Stepper Motor With an H-Bridge</p><p>2) Dual H-Bridge Motor Driver for DC or Steppers - 600mA - L293D</p><p>3) DRV8846 Dual H-Bridge Stepper Motor Driver</p><p>4) Bipolar Stepper Motor Control with an Arduino and H-Bridge</p><p>5) or see this product sold through Amazon-SainSmart L298N Dual H Bridge Stepper Motor Driver Controller Board Module for Arduino UNO MEGA R3 Mega2560 Duemilanove Nano Robot</p><p>6) etc.</p><p>The very best, and thanks again for your comments.</p><p>Jordan</p>
<p>In part two, can you discuss the factors which cause a given motor to operate @ a given voltage /current? I am thinking it is the resistance or impedence of the coils.</p>
<p>Dear cdavenport,</p><p>Thank you for your suggestions.</p><p>I have already written Parts 2 and 3 and only need to review, and perhaps expand, the topics I cover in these parts slightly. </p><p>Discussing &ldquo;the factors which cause a given motor to operate @ a given voltage /current&rdquo; is not included in either of these Parts. However, I will be pleased to keep your thoughts in mind for a possible future tutorial.</p><p>The very best. </p>
<p>Wouldn't the radians per second for your 3000 RPM motor be 314 rad/sec? (3000 RPM/60 sec/min)*2 PI rad/rev</p>
<p>Dear phase90</p><p>You got it; 3,000 RPM is slightly larger than (314 radians) /<br>second, as pi is slightly over 3.14.</p><p>The 3,000 RPM and 450 rad/sec values in this Part were only<br>examples to show how speed might be represented. They were not meant to imply equivalence. However, in re-reading that section I can see how these values might be<br>misinterpreted. So, I have changed the text accordingly. Thanks.</p><p>The very best. </p>
No problem. I see what you are saying. I did misinterpret it as being the same rather than a representation of each unit. Cheers.
<p>Dear phase90.</p><p>Thank you for the follow-up.</p><p>As always, the very best. </p>
<p>Looking forward to part 2!</p>
<p>Dear Jen,</p><p>Thanks for the pleasant comment. Part 2 is now in draft and almost completed. I am pleased to say that I had written all three parts before posting Part 1. So, Parts 2 and 3 are only waiting my review and minor expansions. </p><p>The very best. </p>
<p>- Will you cover torque conversions and gearing selections? (or Part 3, as if people are using stepper motors most will be straightforward.)</p><p>- Noise reduction/increase?</p><p>- Heat buildup/dissipation?</p><p>- All of other motor types?</p><p>- Pancake? polyphase? </p><p>Just asking (learning more is cool.)</p>
<p>Dear gddee,</p><p>It a pleasure to send this second message to you, and thank you for your questions. I am afraid I missed seeing them earlier.</p><p>I briefly mention heat issues when I discuss coreless motors in Part 2, where heat dissaption can be a problem. The only motors discussed in this tutorial are those mentioned in its title. There is a picture, and a mention of pancake motors for cell phones when vibration motors are discussed. I hope the remaining two Parts will add a bit to your knowledge in these areas.</p><p>As always, the very best.</p>
<p>The description for the 2N2222 is going to cause problems - If you apply2V or 5V to between the base and the emitter, you will instantly destroy the transistor! You have to have a current-limiting resistor in the base circuit. Bipolar transistors are current-operated devices, not voltage, so the E-C current is controlled by the E-B current. Maximum base voltage is around 0.7V. If you need voltage operation, use a MOSFET.</p>
<p>Dear Duanehall,</p><p>Thank you for taking the time to post. I am sure many<br>readers will appreciate your comments. </p><p>The very best. </p>
<p>Good stuff. My electric bike uses a DC brushless motor with hall connectors rather than brushes for timings. The bike motors can go over 4KW, most are 250 - 750W and are a good economical transport system (if you don't mind fresh air and getting wet at times). A good starter guide is at http://www.ebikes.ca/learn/hub-motors.html </p>
<p>Dear AlanS14,</p><p>Hi, it is nice to receive such agreeable comments from<br>someone who uses an electric bike. They do provide excellent economical<br>transportation. </p><p>The very best. </p>
<p>very informative,</p><p>keep one posting these sort of super IBLE`s</p><p>We need it for the ones needed</p>
<p>Dear WannaDuino,</p><p>Thank you for your comment. It is certainly motivational for<br>future postings. I hope you will find Parts<br>2 and 3 as informative you have Part 1.</p><p>The very best</p>
<p>excellent 'ible! Thanks foe helping this noob understand thes principles of electromagnetic motion!!!</p>
<p>Dear a41capt,</p><p>Thank you for your &quot;excellent 'ible!&quot; comment, and for taking time to post it. I am glad you found this Instructable of value. Hopefully, after reading Parts 1-3 you will not feel like a &quot;noob&quot;, at least as regards DC motors, for too much longer. </p><p>The very best. </p>
Well done! Looking forward to P.2
<p>Dear MarcelH2,</p><p>Thank you for taking the time to comment, and for your &quot;Well done!&quot;. I hope the remaining two Parts will prove to be just what you expect. </p><p>The very best. </p>
<p>Hello and thank you for presenting this thorough instructable. I needed this refresher on DC motors and you did a splendid job. Looking forward to reading the rest of the instructable and the future installments. </p><p>I also appreciate your writing style...you keep the reader following along as you are explaining each type of motor and each variation .</p><p>Build_it_Bob </p>
<p>Dear Build_it_Bob,</p><p>Thank you for the feedback and your kind comments about this Instructable and my writing style. Your taking the effort to comment is truly appreciated. </p><p>The very best. </p>
<p>Great tutorial - one small comment - bushings hold up surprisingly well as long as you don't have side thrust. If you're running belts do try to find ball bearing motors but don't hesitate to use bushed motors when you don't have side thrust.</p><p>Thanks </p>
<p>Hi,</p><p>Thanks for your thoughts. What other comment could one ask for than &quot;<strong><em>great tutorial</em></strong>&quot;. </p><p>For important projects, I always use the longest lasting motors. However, some readers may choose to follow a different philosophy. For those readers, your personal experience with bushing-based motors, and when they work without problem, will be of real value. </p><p>The very best.</p>
<p>Great tutorial.</p>
<p>Dear DIY Hacks and How Tos,</p><p>Thank you for the kind comment; it is appreciated. I can safely, and happily say, it is the first comment I've had from a Mad Genius :-&gt; ].</p><p>The very best. </p>

About This Instructable




More by R Jordan Kreindler:Arduino Stepper Drivers Tutorial-2/2 Arduino Stepper Drivers Tutorial-1/2 DC Motors Tutorial-3/3: Steppers 
Add instructable to: