Hello all, for Pixmusix, John,
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

