Jump to content

Total Noob Q'n, Need Help Controlling a Transistor

Recommended Posts

I've just started playing around with my msp430 ez-2013 that my uncle gave me a while back (I've been too busy with school and whatnot until now  :smile: ) and am trying to use the ez-2013 to control a transistor that will flash an externally powered LED. So far I've had no luck with it. I'm using a 2n222 transistor with a 10k ohm resistor from P1.0 on the ez-2013 to the base  and a 10k ohm resistor on the emitter, with the anode of the LED attatched to the collector and the cathode attached to +6V. The resistor on the emitter is attached to ground. The led is powered seperately from the microcontroller (the MC is powered by USB) and the led/transistor is powered by 4 AA batteries. The transistor does work (the LED lights up when i connect the base to +6V) but does not turn on when attatched to the MC. I am just using the "Flashing the LED" program to eliminate the possibility of coding error. Is there something that I've done wrong, something I'm missing/have overlooked? Does the MC have to be powered by the same source as the LED or something in order for it to work? Would appreciate some help with my noob problem! Thanks in advance! 



PS I attatched a photo of the setup, might provide some help in figuring out what I've done (wrong)


Link to post
Share on other sites

You're nearly there, your main problem is the 10k resistor in the emitter line. This reduces the current that can flow through the led to a minuscule amount. The correct configuration is to put the current limiting resistor in the collector line. Hopefully the following sketch will show how.



The value of the collector resistor will vary depending on the forward voltage of the led (typically around 3v) and the current of the led (typically around 20mA). The value is determined by (Vs -Vf)/If, where Vs is the supply voltage, Vf is the led forward voltage and If is the led forward current. Using typical values we get (6-3)/.02 = 150ohm.




Sent from my iPad using Tapatalk

Link to post
Share on other sites

At least you are smart enough to use transistors from the start ... i once blew a pin on the launchpad trying to drive some leds in tri-state mode ... :D

I could just drive the leds without transistors (I've done it) but I thought that I should challenge myself to do it with transistors so that way I know that I'm able to do it and it'll make it easier troubleshooting larger projects that I'm controlling with transistors as I know (more) what I'm doing :smile:  

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...