RPI3 controlling LEDs

Thread Starter

mike l_1514050483

Joined Dec 23, 2017
6
Hi everyone. Nice to find somewhere hopefully that can help me.

Now I am a bit of a hacker. I have an idea how something works and then when it doesn't I sort it out. well this latest one has been sorting out for about a month and half now.

I've already built a FDM 3d printer and decided an SLA would be fun so using a RPI3 I plugged it all in.

It all works. except I cant get the lights to turn on when the Pi says so.

RPI light control_wth LLS.jpg

as in the schematic, I have the pi connecting on GPIO 22. The first thing it goes to is a adafruit level shifter, due to the mosfet needing 5v to fully open. this then opens the power to the buck down shifter and hey presto on come the 3w leds.

only it doesn't. as the image shows 3.3v one side, 5v on the other side and going to the mosfet however when I connect the wires up it then shows 2.5v and the leds doesn't power up fully. I take it the mosfet is proportional to the V it receives but the should be 5v.

If I just connect the 5v wire from the Pi then full brightness.

sorry for going on but I thought a full run down of the issue was best. hope someone knows what is going on and how I can fix it.

Mike
 
Last edited by a moderator:

eetech00

Joined Jun 8, 2013
1,995
Hi everyone. Nice to find somewhere hopefully that can help me.

Now I am a bit of a hacker. I have an idea how something works and then when it doesn't I sort it out. well this latest one has been sorting out for about a month and half now.

I've already built a FDM 3d printer and decided an SLA would be fun so using a RPI3 I plugged it all in.

It all works. except I cant get the lights to turn on when the Pi says so.

View attachment 142350

as in the schematic, I have the pi connecting on GPIO 22. The first thing it goes to is a adafruit level shifter, due to the mosfet needing 5v to fully open. this then opens the power to the buck down shifter and hey presto on come the 3w leds.

only it doesn't. as the image shows 3.3v one side, 5v on the other side and going to the mosfet however when I connect the wires up it then shows 2.5v and the leds doesn't power up fully. I take it the mosfet is proportional to the V it receives but the should be 5v.

If I just connect the 5v wire from the Pi then full brightness.

sorry for going on but I thought a full run down of the issue was best. hope someone knows what is going on and how I can fix it.

Mike
hi

What is the part number for the buck converter?

You should use a high side mosfet load switch configuration with a (mosfet) enable control to power the converter.
Use P-channel for load switch and N-channel for control.

Something like this:

LoadSwitch.png

With the right choice of logic level mosfet, you could control directly from Pi.

eT
 
Last edited:

be80be

Joined Jul 5, 2008
2,049
The adafruit level shifter is not made to drive a gate eetech00 way would work or a optocoupler doing the same would work.
The adafruit level shifter can't turn on the gate.
designed it for use with I2C, this works as well for TTL Serial
 

Thread Starter

mike l_1514050483

Joined Dec 23, 2017
6
Hi eetech00

this is the converter, amazon dont quote the part number

GEREE 200W DC DC Constant Current Voltage Step Down Buck Power Converter Module 7-32V 9V 12V 24V to 0.8-28V 5V 9V 12V 12A MAX

guess I need some more bits ordering then. whats the RELOAD 2 on the schematic, do you have a BOM for it


Be80be, thank you for the reply. is it the power through the shifter that isnt enough that stops it from driving the gate
 

Thread Starter

mike l_1514050483

Joined Dec 23, 2017
6
just thinking about this and looking into optocoupler modules.

They seem to need 3.3v or more to trigger.

This is the issue I have had all along, I got the mosfet module to control the light/led from the Pi, but the bloody thing needed 3.3 or more to trigger. This is fine the Pi PWM is supposedly 3.3v.
But no, not quite, mine is 3.28v and doesnt trigger full flow.
so thats how I ended up with the level shift to get 5v to trigger the mosfet to power the LEDs

seems a long winded way of doing it to me.
Any other ways??
 

eetech00

Joined Jun 8, 2013
1,995
Hi

I was referring to the module shown as a "buck" converter in your diagram. The part number you've provided is a 2.5v to 5v@1A "boost' converter. Is this boost module supposed to provide power to the LEDs? You might not even need that module.

What is the part number of the LEDs and how many are you using? Or is that really a single 3W LED?

Is the 12v power supply used for the LEDs?

What is an LRF520 module? Is this really an IRF520 mosfet?

Your diagram is confusing.

eT
 
Last edited:

Thread Starter

mike l_1514050483

Joined Dec 23, 2017
6
Hi

I was referring to the module shown as a "buck" converter in your diagram. The part number you've provided is a 2.5v to 5v@1A "boost' converter. Is this boost module supposed to provide power to the LEDs? You might not even need that module.

What is the part number of the LEDs and how many are you using? Or is that really a single 3W LED?

Is the 12v power supply used for the LEDs?

What is an LRF520 module? Is this really an IRF520 mosfet?

Your diagram is confusing.

eT
12 leds, 3 in series then 4 rows in parallel
power supply is 12v 20A
the buck is 200W, 7v to 32

buck convertor

lfr 520 module as linked above

12x 3W Bright Blue LED (EPILED 460nm)

I cant put the links as it just says not allowed content
 

eetech00

Joined Jun 8, 2013
1,995
Hi

As Bertus mentioned, Its not wise to run the LEDs in Parallel.
They are not manufactured exactly the same and the current requirement for each will vary.
If you burn one LED out, chances are they will ALL burn up. :eek:

You should be using a constant current LED driver boost converter with the LEDs wired in series.
Using 12 each of that LED requires a LED driver that can supply about 60v@600ma.
Some have a control input to enable,disable or dim the output.

eT
 
Last edited:
Top