I recently viewed your query and the following comment on using the PNP transistors. Interesting.
I have done a little playing around and the outcome is following.
I have used components I had on hand.
In this process I would always start with the item I need to control. In this case the lamp, which is to be lit at 4 different levels. I have a 24V 6.5W lamp so powered it at 12V, 9V 6V & 3V, resulting currents were 175mA, 150mA, 110mA & 75mA.
Looking at the PNP lamp section of the circuit below I initially connected the base through a resistance decade box to ground the resulting base resistance required to give the above collector currents to the lamp are, 2.2k, 22k, 47k & 68k.
To drive the arrangement with the 4 x GPIO you required (and assuming these to be 3.3V) I did use 4 x NPN BC548 transistors. With base current supplied from the 3.3V I applied 1M resistors to each , reducing the base current but allowing ON / OFF of the NPN’s.
The resulting PNP base resistors are 15k, 22k, 33k & 68k. The actual values of current and components are here and there but the resulting circuit is the output.
A couple of hours on a Good Friday afternoon.
I hope you find this of interest.
Bryan
Hi Bryan
Yes the idea is sound but I would have a couple of queries.
Firstly the NPN base resistors seem a bit high. That would only be a base current of about 2.7µA. Are you sure the NPNs are fully ON at that figure or as the through current even the 15k is somewhat less than 1mA it may not matter.
I am not sure it is a good idea to leave the transistor bases floating. Although if the driving logic PULLS them to ground when OFF, thus not floating, it would be OK.
Did you measure these voltages or calculate them. If the lamp is incandescent the resistance would change quite dramatically between cold (off) and hot (fully on).
You forgot the “k” for R4 (15k) in the schematic.
Cheers Bob
Thank you for your comments. The whole process was breadboard wired all currents measured.
I agree with the base currents and the 1M resistors however this was a quick assessment and the resulting ON/OFF operation fitted the purpose.
Yes, floating bases is not ideal however it would depend on the logic source equipment.
The missing k was a typo.
The original post was based on the function of PNP. I would suggest based on the +ve logic drive signal and available source current the process could be functioned as a 1 x NPN setup driving the lamp. One off power OR gate with 4 x base drive current values via the 4 base resistors.
All good fun.
Regards
Yes isn’t it.
As the PNP transistor is configured as an amplifier (Linear ???) with the lamp as collector load you could get really clever and convert a number to 4 bit binary and have 10 levels of illumination with the 4 resistors and NPN transistors.
I think this was something like Pix’s original set up except he had the lamp in the emitter side (Ground side) of the NPN transistor. This can’t work as the base has to be 0.6V above emitter so you would have needed a 12V drive signal which could get messy.
He then transferred the lamp to the collector side which I think he got working in some fashion. Speaking on a general note the down side of this is the low side of the lamp is always above ground and depending on lamp construction would not always be convenient.
I think we decided the PNP approach was more versatile.
Another problem. Most (could probably read “All”) logic device will provide none tenths of nothing whet is comes to current source. None of the ones proposed by Pix at the time would supply enough current to turn a transistor on.
Anyway I think Pix got something to work and has put that problem to bed.
Nothing wrong with further experiment though.
Cheers Bob
Cheers Bob
Just checking in to say thanks for your interest and research.
It looks really promising and I am intending to build it myself.
I haven’t had a chance yet, so watch this space.