Transistor Circuit Needed

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
ElectronJunky
Posts: 2
Joined: Thu Oct 02, 2003 1:01 am
Contact:

Transistor Circuit Needed

Post by ElectronJunky » Thu Oct 02, 2003 5:47 pm

I need a transistor circuit to run an led from a pic16F84. The led is rated at 3.2V and I want to be able to pulse it with 50ma.<p>Thanks,
Brian G. :confused:

Dimbulb
Posts: 324
Joined: Sun Oct 13, 2002 1:01 am

Re: Transistor Circuit Needed

Post by Dimbulb » Fri Oct 03, 2003 8:46 am

The circuit could be an extension of an existing pic project depending on what the application and the end use. I think maybe a 3.2 zener may be helpful, again depending on the application.<p>In an off/on case nominal 10mA switch activates a 50mA switch (transistor) using regulated supply.
A 2N2222A or simular may work. <p>If this is what you are concidering nuts n volts forum has some terrific folks that can explain in detail how to do this but they may need to know the requirements you want for the led output such as frequency and pulse shape.<p>Some very efficient pulse circuits use an inductor and low voltage to releases a pulse.
If you decide a AAA cell is what you would like to use maybe someone has had experience with upconverting to run both the pic and the pulser.<p>[ October 03, 2003: Message edited by: dimbulb ]</p>

russlk
Posts: 563
Joined: Thu Dec 06, 2001 1:01 am
Location: New Hampshire
Contact:

Re: Transistor Circuit Needed

Post by russlk » Fri Oct 03, 2003 5:23 pm

You will program the PIC for the pulse width and frequency that you want. Connect the 2N2222 (or any NPN) with emitter to ground. Connect the base to the PIC output with 620 ohms in series to limit the base current to 5 mA, connect the collector to the LED in series with 33 ohms to 5 volts.

ian
Posts: 251
Joined: Mon Feb 25, 2002 1:01 am
Location: toronto
Contact:

Re: Transistor Circuit Needed

Post by ian » Wed Oct 08, 2003 7:58 pm

Ummmmmmm, isn't it a bad idea to pulse a LED with a PIC? If the program locks up with the LED on, look for a short LED life.

wd5gnr
Posts: 104
Joined: Wed Dec 19, 2001 1:01 am
Contact:

Re: Transistor Circuit Needed

Post by wd5gnr » Thu Oct 09, 2003 7:03 am

I wonder if you need anything to drive the LED but the PIC. The PIC can drive a good bit by itself (maybe 20mA if memory serves -- as high as 30mA on some). Check the data sheet. I wonder if you could parallel two or more output to draw higher current? I haven't tried it, but it should work as long as your software always flips the bits at the exact same time. In fact, I would probably set the TRIS register to set the bits as inputs when I wanted them off and then just leave them as 0 outputs. That way if you accidentially toggled one TRIS bit and not the others, you wouldn't damage the part. Ideally, you'd toggle all the related TRIS bits in one instruction. Make the pins outputs to turn the LED on and inputs to turn the LED off.<p>Keep in mind too that some PICs have a total maximum limit on current per port. So while you might be able to drive 1 50mA LED, you might not be able to drive 2 50mA LEDs at the same time (100mA) on the same port. There are ways around that (turning them on and off very rapidly or using a transistor as you suggest).<p>If you do go the transistor route, it should be easy enough. Put a small (say 220 ohm) resistor from the PIC output to the base of a 2N2222. Ground the emitter. Put the LED (and a suitable dropping resistor) between +V and the collector. <p>When the transistor is on, you'll have about .2 or .3V at the collector, so you might want to adjust the LED dropping resistor to account for that.<p>If you want to read more about LED dropping resistors, have a look at ]this page<p>Hope that helps!<p>[ October 09, 2003: Message edited by: wd5gnr ]<p>[ October 09, 2003: Message edited by: wd5gnr ]</p>

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests