I bought the Sparkfun inventors kit for the Arduino and I recently completed the third tutorial where I was supplying power to a small DC motor. My question(s) centers on this exercise. (See schematic in link below)
The circuit in this exercise uses a simple transistor. On one end of the circuit, I was supplying my motor with 5v and from Pin 9 (I/O) on the Arduino I was “attached” to the “base” of the transistor. My question is: If there is a 5v and a 3.3v supply from the headers on the Arduino, what voltage is being produced from the assorted IO pins?
With two voltage entry points, and the transistor receiving one of them, is the transistor essentially permitting power to be sent to the motor based on the signal/voltage that is being sent to it from Pin 9 (or whatever other pin)?
_isaiahNelson:
… is the transistor essentially permitting power to be sent to the motor based on the signal/voltage that is being sent to it from Pin 9 (or whatever other pin)?
That’s pretty much it in a nutshell. The motor is getting 5V on one of it’s terminals but the other terminal is connected to the collector of the transistor. The transistor is acting as a switch between that terminal and ground. When there’s little or no current supplied to the base of the transistor this switch is “off”, or more properly presents a high resistance to the motor terminal. When enough current is supplied to the base the transistor presents a low resistance to the motor and current can then flow through the motor (and transistor) from 5V to ground.
How does current flow into the base of the transistor ? When the Arduino output pin (9) is in a high state it will supply current through the resistor to the base. The voltage at pin 9 will depend on which Arduino you have and it’s supply voltage and the amount of current flowing but in this case it’ll be perhaps 0.1V less than the supply voltage on the ATmega328 itself (3.3 or 5 V). The base of the transistor is like a diode to ground and so will drop somewhere between 0.6 and 0.65 V, almost independant of the base current amount. The voltage difference between pin 9 and the ~0.6V, divided by the resistor value (Ohms law), will determine the base current. The resistor value is choosen to allow enough current to flow but not so much that the transistor is damaged.
_isaiahNelson:
Can you clarify what you meant by “high-state”? Is this when the signal is high (1) and not low (0) coming from one of the digital signal pins?
Mee_n_Mac:
The voltage at pin 9 will depend on which Arduino you have and it’s supply voltage and the amount of current flowing but in this case it’ll be perhaps 0.1V less than the supply voltage on the ATmega328 itself (3.3 or 5 V). The base of the transistor is like a diode to ground and so will drop somewhere between 0.6 and 0.65 V, almost independant of the base current amount. The voltage difference between pin 9 and the ~0.6V, divided by the resistor value (Ohms law), will determine the base current. The resistor value is choosen to allow enough current to flow but not so much that the transistor is damaged.
I have the inventors kits and just completed CIRC-03. At first I could not get the motor to work. I went over and over the circuit and could not figure out where I had err’ed. Eventually I ended up on the website and on the circuit diagram there is showed a 2.2K resistor instead of the 10K one that was in the instructions and printed on the paper circuit card in my kit. My kit also contains only 10K and 330 ohm resistors. To get the motor to work I swapped out the 10K with a 330 ohm resistor (hope I did not wreck the transistor).
I started to look at the previous circuits on the website and discovered that while the ones in my booklet and kit call for 330 ohm resistors, the diagrams on the web call for 500 ohm? I assume that the voltages in the newer Arduino’s is different requiring different resistors? If that is the case then why did my kit come with the (Uno) Arduino and an assortment of resistors that are wrong? I guess I will have to run down to Radio Shack and get the correct resistors but it kind of annoys me.
What is going on? Did I just get a bunch of parts for an older kit and the newer Arduino? Or/ FWIW, I bought the kit from Amazon just last week. Maybe I should have just bought it directly from SparkFun. :-/
I don’t know what’s going on with the SIK and those resistors. You might want to e-mail SF tech support and say “WTH ?”. Other’s have noted this problem as well. See this thread …