npn transistor
tijmen
Posts: 1
hello everybody,
for a school project i'm building a robot using the basis stamp bs2
i have some trouble using the npn 2n3904 transistor.
on one side i have a wire going to the Vdd ports
on the other side i have a wire contect to another system
on the third (midle) pin i have a wire going to the left right side of the board( don't know the correct name)
i thought i could use the transistor using the simple code "high 0" but it doesn't work
however when i connect the wire connect to the base of the transistor to the Vdd side it does work en my system runs.
what code or other components do i have to use to make it work?
for a school project i'm building a robot using the basis stamp bs2
i have some trouble using the npn 2n3904 transistor.
on one side i have a wire going to the Vdd ports
on the other side i have a wire contect to another system
on the third (midle) pin i have a wire going to the left right side of the board( don't know the correct name)
i thought i could use the transistor using the simple code "high 0" but it doesn't work
however when i connect the wire connect to the base of the transistor to the Vdd side it does work en my system runs.
what code or other components do i have to use to make it work?
Comments
Use Vdd instead of +12 volts, and instead of +5 or 0 volts use a pin from the Basic Stamp. I generally use a 10K resistor between the Basic Stamp and the transistor, and a 220 ohm resistor between the LED and the collector of the transistor.
Also, read this page to get the PBasic code to flash the LED.
http://www.dummies.com/how-to/content/electronics-projects-how-to-flash-an-led-with-a-ba.html