A transistor I am using refuses to complete a circuit I have after putting 5 volts into the base through an arduino digital pin. I have the transistor between the 2 positive leads of a motor and my battery pack (I have tried flipping the connections to make sure it was not backwards ). I have run out of possible solutions.
Heres a quick diagram of my current circuit i have drawn up. Im sorry about the bad handwriting haha. Question: Why do i need a 1k resistor on the base lead?
@Crossroads ya that makes sense, just some questions about it so i fully understand.
How many ohms is that resistor.
That Lead with the resistor is from the arduino digital pin right? What does LOW mean? Is that talking about the LOW parameter on the digitalWrite function?
Does the first diagram function the same as the second? I only ask cause it looks the same but the transistor and motor changed places and the arduino is "HIGH" rather than "LOW".
No it's not just that the transistor and motor swapped places: look at the transistor symbol.... one's an NPN (motor above it), the other os PNP (motor is below.)
NPN is "on" (= motor runs) when base is high, eg from Arduino. PNP is "on" when base is low, eg yes low as in digitalWrite. NPN and PNP have reversed logic.
I need to get my terminology straight CR..... is a PNP on or off when saturated? I'd call it "off" in the sense that the CE circuit is broken, but it's "on" in the sense that the transistor is active.
PNP - Low at base turns on the transistor.
NPN - High at base turns on the transistor.
When enough current flows (from the base for PNP, into the base for NPN) the transistor will saturate. The transistor spec will show Vbe (sat) to show you voltage from base to emitter when that happens and how much needs to flow.
What does "Saturated" mean with the transistor? Im also still trying to understand the resistor purpose, am i trying to drop the voltage to something specific for a reason?
Looking at my code i actually already set the output of the arduino to LOW for 5 seconds as well as HIGH but it still did not work. Will try to set it up like that diagram above after i figure out the resistors.
Sorry for all the questions but i really dont understand alot of the things its probably assumed i would already know
Resistor keeps Ardiuno output from sinking (when low) or sourcing (when high) to much current.
Base-emitter junction of transistor looks like a diode - when diode voltage reaches it's Forward Voltage (Vf) it turns on with low resistance - hence the need for external resistor.
h4344:
What does "Saturated" mean with the transistor? Im also still trying to understand the resistor purpose, am i trying to drop the voltage to something specific for a reason?
Saturated means the collector-emitter voltage drops to a low level, perhaps 0.2V,
allowing lots of current to flow without generating too much heat in the transistor.
Without a resistor on the base you will damage the transistor or Arduino or both since
far more than 40mA will flow. Use a 150 ohm resistor to get maximum "safe" current
from the Arduino at 5V, namely about 30mA. If 30mA isn't enough to saturate the
transistor you might be better off with a MOSFET.
Looking at my code i actually already set the output of the arduino to LOW for 5 seconds as well as HIGH but it still did not work. Will try to set it up like that diagram above after i figure out the resistors.
Sorry for all the questions but i really dont understand alot of the things its probably assumed i would already know
BTW you realize that the switching transistor must be wired collector to the load? Some
of the diagrams earlier in the thread are just wrong.