following on from my previous question: Trying to design a switchable LED circuit with no experience or skill - please send help

I have an update - a mix of good and bad news...

Good news is the LEDs and correct driver arrived. Soldering went pretty well considering I haven't done that since high school, but a you tube tutorial and some trial and error got me there. Further good news, the driver works - I soldered an LED to just the driver with none of the micro-controller stuff and it worked fine. Pleasingly when the driver was plugged into the mains and the LED circuit wasn't closed, nothing happened and the driver didn't catch fire which makes me think a suitable 'on-off' logic switch should deliver the desired circuit I'm trying to build.

I also validated the python code and circuit with some normal LED pins and PNP S85550 transistors and it worked perfectly. I've pasted in a rough schematic of that validation circuit below:

enter image description here

So with all GPIO outputs set to LOW - nothing happened, and then using a python script I could selectively turn on one of the LEDs for a defined period of time and then the program ended, which is exactly what I want for now.

So then I tried to validate whether the external driver would work the same way using this circuit and just one LED to start:

enter image description here

As you can probably guess from the title of this post - this didn't go so well. These were the following issues:

  1. The driver had 3 pins rather than 2 which I wasn't expecting - I just ignored the middle pin and it seemed to work anyway so that was fine.

  2. when I connected everything together, the LED wasn't lit, but it was flickering a lot faintly (this is withthe GPIO set to LOW). I ran the script to see what would happen, and basically nothing it just stayed the same. When I disconnected the GPIO the light turned off so it seems that some current is still flowing through the transistor, regardless of if the GPIO being high or low.

  3. I had read that if the LED was flickering I might have the polarity the wrong way round - so I swapped the positions of the collector and the emitter cables to see what would happen...

The transistor started smoking almost immediately so I pulled out a cable and got it to stop - I can't even remember if the LED lit up or not because I was busy panicking.

Fortunately the RPi is still alive and doesn't seem to have sustained any damage - the transistor is more than likely dead so I've thrown that away.

In summary:

  1. I'm starting to wonder if BJTs are going to work, maybe I need relays or MOSFETs? Relays look ideal for this scenario (I think) but I was getting confused because they seem to be for much higher Watt circuits than what the LED driver is providing?

  2. maybe the problem is also that the current needs somewhere else to go if none of the LEDs are on? it is important that this system has an 'off state' in which none of the LEDs are lit (the application is for a UV-Vis spectrometer + fluorimeter)

Thanks again for any help and happy to provide more info on request!

  • \$\begingroup\$ It seems you didn't really follow the answer at your previous question, and are still trying to use some sort of "LED driver" instead of a voltage mode power supply. This also makes the question an off topic product usage one. It would seem you cannot use an undocumented LED driver with a custom multiplexor, and given the lack.of documentation no one can explain precisely why. \$\endgroup\$ Commented Jun 22, 2020 at 12:08
  • \$\begingroup\$ Sorry I thought I did follow the answer I got last time :( this is the driver I bought amazon.co.uk/gp/product/B07CZGV832/… \$\endgroup\$ Commented Jun 22, 2020 at 12:12
  • 3
    \$\begingroup\$ My advise would be to stop trying to design something that you're clearly not ready for. You want too much without having the skills nor experience. No wonder this ends up in smoke and tears. So do yourself a favor and do what successful beginners do: just copy an existing project. Go on instructables for example and find a project that's similar to what you want. Build it and make it work. Don't change the design in any way, you can only do that after you understand how it works. To be able to design your own thing you need skills and experience and those take time to master. \$\endgroup\$ Commented Jun 22, 2020 at 12:17
  • 3
    \$\begingroup\$ so I swapped the positions of the collector and the emitter cables to see what would happen That's exactly what you should not be doing unless you know what you're doing (which you are not), transistors need to be used in certain specific ways and "just trying" almost never works and often results in damaged transistors. How to switch a LED using a transistor is shown in many places, why would you try that your own way? Why PNP transistors (nearly everyone else uses NPNs or NMOS)? You're not helping yourself by just trying this and trying that. Educate yourself first. \$\endgroup\$ Commented Jun 22, 2020 at 12:23
  • 1
    \$\begingroup\$ In your second diagram, your positive and negative are the wrong way round. \$\endgroup\$
    – Simon B
    Commented Jun 22, 2020 at 15:25

1 Answer 1


I have solved the problem!! it totally works and I am STOKED

The guy who answered this previously and deleted his comment was totally right - all that was missing was a ground connection from the emitter pin to the RPi (See Scheme):

enter image description here

I also swapped to an NPN transistor (S8050) and followed a wiring diagram from a tutorial I have for an active buzzer so I was sure all the current and components were the correct way round.

I've had everything plugged into the mains now for like 10 minutes and no transistor fires so I think I'm all set :) here's a photo of everything together:

enter image description here

Next step is to put more LEDs in parallel with more transistors so I can selectively activate the different wavelengths I want for my experiments.

Special shout out to this guy: https://www.youtube.com/watch?v=IG5vw6P9iY4

This video pretty much pointed out the only difference between my circuit and his (besides the power supply) was my lack of a ground connection, and low-and-behold apparently that was all I needed.

Sorry to anyone that I annoyed with my question, I'm very new to this and just trying to learn. Thanks for all the pointers and tips anyway, especially to the guy who gave me the right answer (but deleted it), I just didn't understand your comments.


Not the answer you're looking for? Browse other questions tagged or ask your own question.