transistors and basic stamp
I want to connect the base of a PNP transistor to a pin of the BSII.· The positive pin of the transistor then goes to a positive port of a 9v battery and the negative pin to the negative 9v.· If I bring the i/o pin high, 5v, will current still flow from the 9v battery activating the transistor?
Comments
·· Your question is a little confusing.· A PNP transistor requires a LOW on the base to switch it on.· You should always use a resistor between the Stamp I/O pin and the base.· And finally, if you connected the other two ends of the transistor to the battery poles as you suggested, you would short circuit the battery/transistor and let out the magic smoke from the transistor.· The other pins on the transistor would be the Emitter and Collector.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
The most common use of controlling a transistor with a BASIC Stamp I/O pin is to make the transistor drive current loads that the BASIC Stamp cannot. Small motors, relays, and heating elements are common examples of circuits that you can drive with the BASIC Stamp through a transistor, but not directly with the BASIC Stamp. You can find other examples of BASIC Stamp - transistor - device control in these Stamps in Class texts:
Industrial Control - Experiments #3 and #4
Applied Sensors - Chapter 6
All the texts in this post are available for download from www.parallax.com -> Downloads -> Stamps in Class Tutorials.
Post Edited (Andy Lindsay (Parallax)) : 6/8/2005 3:40:06 PM GMT
A pnp conducts current when the base's voltage < (emitter's voltage - Vbeon), Vbeon is ussually between 0.6V and 1.0V depending on the exact trnsistor you are using. When the base voltage is high the transistor should be off, when it is low the transistor will conduct. If your Vin is 7.4V and you are operating the stamp @ 5V, the base will be at 5V and the emitter is at 7.4V, this 2.4V difference is enough to turn on the transistor, even though this is not what we want to happen.
To nutshell, you cannot use a pnp transistor with the emitter voltage higher than the maximum voltage at the base. You can use an npn transistor with a higher Vin than 5V since the transistor turns off and on depending upon the voltage at the base in reference to ground. IOW a pnp conducts when Vbase < (Vemitter - Vbeon), and an npn conducts when Vbase > (Vemitter - Vbeon). With a bipolar transistor the emitter is on the supply side (Vdd for pnp, Gnd for npn) and the collector is on the load side.
hmm, seems Andy discovered this point and edited his post. Ive left this post up since it has some useful information on bipolar transistor operation.
At this point, the Stamps in Class examples use either NPN transistors or N-channel MOSFETS.