Tutorial 05 for Arduino: Motors and Transistors
Why Electrical Engineering Stack Exchange recommends it
Electronics Stack Exchange askers cite it as the tutorial they followed when their Arduino-and-transistor motor circuits misbehave, and use it as the reference circuit in their questions.
Recommended by 0 people across 0 different months, 2013 to 2018.
What it is
Episode 5 of Jeremy Blum's Arduino tutorial series, about 17 minutes long, showing how to drive DC motors from an Arduino using a transistor, with a flyback diode and capacitor. It covers the wiring and code, with parts list and schematics on his website.
What people said
Cites Kenn · 2013-02 · Electrical Engineering Stack Exchange · on “How to determine what transistor is needed”
I created a circuit that uses a transistor to run a small (1.5 - 3v) motor. The transistor I used was a 2n3904 NPN. I calculated Beta to be about 11 when it's hooked up to an Arduino the base resistor I used was 47 Ohms and it worked well. Given that I moved the circuit from the Arduino to a HiTechnic prototyping board, It's digital pins only put out 3.3v and from what I can tell (they don't say this online or in any documentation) the current is really tiny, about 8mA. Because of that it seems like I need use a different transistor - at least that is my guess, because even when I put a base resistor with 0 Ohms of resistance the motor barley turns and the current into the collector is barle
Cites pwee92 · 2013-07 · Electrical Engineering Stack Exchange · on “Transistor circuit to toggle motor on/off not working (Arduino)”
Hi Nick, The motor I am using is for toy/robot purposes - [LINK] I feel like the current given from the i/o pin should be enough, especially given tutorials like this: [this video] I tried to follow that example exactly (minus the diode, I cant grab one right now), but to no avail.
Cites pwee92 · 2013-07 · Electrical Engineering Stack Exchange · on “Transistor circuit to toggle motor on/off not working (Arduino)”
Hi Passerby, I implemented all of these changes today - added a 1n4001 in parallel with the motor and capacitor, following the circuit shown in this video: [this video] swapped out the 2n3904 with a 2n2222, and changed the base resistor to 470ohm. I still have the same problem however. If I feed the base with the 5V from the arduino, the motor turns on, but feeding it a HIGH signal from a digital I/O pin yields nothing. I'm stuck yet again :s
Cites Tobias Heuts · 2018-08 · Electrical Engineering Stack Exchange · on “9V battery versus 6xAA batteries”
I've been following this tutorial on Arduinos, for the ones that are interested it's this one. [this video] Yesterday I was struggling to get a servo moving. Sometimes it made small twitchy kind of movements, other times it wouldn't move at all. So I did some research on what the reason for this could have been. The most common answer was: Don't use a 9V battery for a motor. I ended up buying 6xAA batteries, which do very well in moving the servo. But in the tutorial he IS using a 9V battery, so what are the differences that matter here? (Quality, more mAh, alkaline vs non-alkaline, ...?) My knowledge regarding batteries is still very poor, so I've put three images at the bottom that I would like