Maker Pro
Maker Pro

Controlling high power LEDs with a Raspberry Pi

Hi everyone !

I'm looking for help to design a circuit. I don't know a lot about electronics so I'm having trouble with basic concepts.

I want to be able to control 10 high power leds (700mA, 3V) , using this LED driver .

I want to be able to turn on one LED for 10-15 sec, then turn it off, turn another one on, 10-15 sec, turn it off, etc.
I don't need to have more than one LED at a time (although it could be great, but totally optional).


I have made some researches, and asked a few questions, and here is where I am right now (there is only three LEDs for clarity) :

SchematicMOSFET.PNG



I was told that a MOSFET was better option than a transistor, and that a IRLR/U2703PbF would be great.


Do you think something like that could work ?

Someone points me out that if all the lights are off there is nowhere for the current to go. How can I fix this issue ? Should I make a switch between the power supply and the buckpuck ? Is there a better solution ?

I plan on using this power supply , is that good ?

I'm trying to figure out the parts I need to order, but I'm still unsure of what I need, and I don't want to make mistakes, so any advice would be greatly appreciated.

Thanks !
 
This page is really great, there is a lot of information in there.

However there is still a few things I'm not sure I understand.

As you said the circuit at the end of the section 3 seems to be what I need, for a single light.
The section 4 said that placing the LED in parrallel might not be a good solution, but in my case, as I don't want to have them on at the same time, it should be ok, right ?

I modify my circuit to use the one at the end of the section 3, but I'm not sur I got it right:


Circuit.png


For R1 it says to choose a value corresponding to a 0.7v drop to the LED current (700mA), so 1Ω is correct ?

I'm also unsure how I should choose the transistor and MOSFET, I usually struggle with the datasheet, and in this case I don't fully understand their usage.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Yes 1 ohm is correct. This resistor will dissipate around half a watt so use a 1W resistor.

The mosfet needs to be a logic level N channel mosfet able to dissipate a watt or so. Something in a TO-220 package will not require a heat sink. Given the low current and voltage no other specifications are likely to be important.

The bjt can be pretty much any small signal NPN transistor, 2N2222, BC548, etc. You'll probably find it will come in a TO-92 case.
 
Thank you very much !

For example a IRF3205OBF would be fine ?

I just notice that on my circuit the Raspberry Pi GPIO line are linked to the LED - but it was a mistake, they are supposed to go to the Raspberry Pi.

So I can power this circuit with a power supply like this one ?

I had another question, regarding the heatsinks. As I don't need to have the LEDs on all the time (actually only for short periods, like 30sec, 1min max), I thougth that cheap heatsinks like this ones would be enough. Should I look for better heatsinks ?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
That mosfet isn't a logic level mosfet. There is a possibility (albeit small) that you may not be able to provide sufficient gate drive to turn it on sufficiently.

For a reasonable list of suitable devices, do as follows:
  1. go to http://www.digikey.com
  2. type "logic level mosfet" in the search box and hit enter.
  3. from the small list you get, click on "FETs - single"
  4. In the "FET Type" box, select all the "N-Channel" options
  5. scroll across to the "Package/Case" box and select all those starting with "TO-220"
  6. scroll back to the left again and hit "Apply Filters"
  7. type "1" in the "Quantity" box, and hit "Submit"
  8. Go to the "Unit Price" column and click on the triangle that is small at the top and large at the bottom.
  9. You now have a list of suitable devices (just verify that the Vdss is greater than 10V, but in my search none under 20V were returned)
See if your supplier has any of these (they go on for pages and pages, but the cheapest ones are listed first.

That power supply is 12V -- Your circuit diagram suggests you're powering your circuit from 5V. You can use that power supply to power the LEDs, but you will need a small heatsink on the mosfet(s) which will now be dissipating around 5W. If you are using a separate 5V power supply for the rpi, ensure the -ve leads of both power supplies are connected together.

Those heatsinks should be fine for both the LEDs and the mosfets. Beware that the heatsink will be connected to one pin of the mosfet (unless you get a full "plastic" case or insulated tab mosfet) and they should not be allowed to touch anything that they can possibly short to. For the LEDs, attaching the star to these should be fine. I recommend the use of heatsink compound in both cases.
 
This is really usefull, I didn'd knew how to research for a transistor/MOSFET, it will help me a lot.

It may be something I got wrong again, but as I undersand it, the LED driver I'm going to use (this one) needs 2.5V more than the voltage drop of the LED, and one LED is 2.9V, so 5V won't be enough, right ? It would have been simpler for me to plug the power supply directly in the Raspberry Pi as shown in this tutorial but I though that 5V would not be enough, and 12V would be too much for the Pi.

That's why I thought I need two power supplies, one 5V for the Pi, one 12V for the LEDs.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
That circuit is a LED driver and it needs only about 1V more than the LED voltage.
 
Oh, ok, so I can get rid of the BuckPuck and just connect that circuit directly to the pi and use a 5V 2A power supply.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Probably. Beware that if you're turning the LEDs on and off very quickly you could cause interference for the poor rpi. Give it a go though.

And of course, 3 x 0.7 exceeds the capability of the power supply, so perhaps use a reduced current (higher value current sense resistor) during testing until you are sure you don't have some state which has them all illuminated.
 
Top