User avatar
labboy
Posts: 19
Joined: Sun Sep 25, 2016 8:07 pm

Dim LEDS...many options

Fri Sep 30, 2016 2:23 pm

Hi all,


I am about to start a small project to dim/control the leds of my aquariums using the raspberry. I did a lot of reading, but I am quite inexperienced, therefore i want to make sure before i start playing with the circuits...

So, I have this power supply : http://www.meanwell.com/mw_search/LPF-2 ... D-spec.pdf, LPF-25D-36.
In the fourth page of the pdf you can see that it can be dimmed with any of the three methods, 1-10VDC, 10V-PWM signal or resistance.
It turns out of course that the raspberry can only produce 3.3V in the GPIOs so....there must be something between the pi and the Dim-/+. I read about MOSFETs, but i can seem to find what that suits my needs. (volts?resistance?ampere?)

I also found this http://www.ebay.com/itm/New-MOSFET-Butt ... SwCGVX7S~~, which aparently needs additional supply. (how many volts?).

Do you have any easy alternatives?
thank you!!
Last edited by labboy on Sat Oct 01, 2016 1:04 pm, edited 1 time in total.
fear nothing, hope nothing, be free

User avatar
labboy
Posts: 19
Joined: Sun Sep 25, 2016 8:07 pm

Re: Dim LEDS...many options

Sat Oct 01, 2016 12:24 pm

noone????
fear nothing, hope nothing, be free

User avatar
rpdom
Posts: 17158
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Dim LEDS...many options

Sat Oct 01, 2016 12:34 pm

labboy wrote:In the fourth page of the pdf you can see that it can be dimmed with any of the three methods, 1-10VDC, 1V-PWM signal or resistance.
Looking at the PDF shows that it is a 10V-PWM, not 1V. If it was 1V you could probably drive it using the PWM from the Pi (software or hardware) with just a simple resistor divider. For 10V you would need to boost the 3.3V output of the Pi somehow.

User avatar
labboy
Posts: 19
Joined: Sun Sep 25, 2016 8:07 pm

Re: Dim LEDS...many options

Sat Oct 01, 2016 1:05 pm

thank you rpdom for the reply. you are right, it was a typo. I corrected it. thats my question...how to boost it? is there such thing as variable resistance that the raspberry could control?
fear nothing, hope nothing, be free

User avatar
labboy
Posts: 19
Joined: Sun Sep 25, 2016 8:07 pm

Re: Dim LEDS...many options

Sat Oct 08, 2016 5:54 pm

Ok, i continue...eventually someone will answer me (i hope...)

i came across this http://nano-reef.pl/uploads/gallery/alb ... _78007.jpg which shows how to configure a 2n2222 with 10V supply and adruino to get 10V PWM.

Given that I have a optoisolator 4n33 which i basically a led and a light sensor together with a "2n2222-like" BJT with emitter-collector-base. (http://www.bristolwatch.com/ele/img/opto2.png).

Is there a way to connect my raspberry with the optoisolator. The optoisolator will be then connected to an 10V external supply AND the +/- PWM of my LED power supply?

thank you
fear nothing, hope nothing, be free

gordon77
Posts: 5033
Joined: Sun Aug 05, 2012 3:12 pm

Re: Dim LEDS...many options

Sat Oct 08, 2016 6:40 pm

Connect pi gpio output to pin 1 of the opto through a resistor, try about 300 ohms, and gnd to pin 2.

Here's what l did, il74 similar to 4 n25..

Gordon
Attachments
ST-4_interface IL74.jpg
Interface
ST-4_interface IL74.jpg (47.95 KiB) Viewed 1622 times

User avatar
labboy
Posts: 19
Joined: Sun Sep 25, 2016 8:07 pm

Re: Dim LEDS...many options

Sat Oct 08, 2016 10:01 pm

great thanks! so pin 1-2 go to gpio. the question is, can I connect at pin6 external 10V source?
fear nothing, hope nothing, be free

gordon77
Posts: 5033
Joined: Sun Aug 05, 2012 3:12 pm

Re: Dim LEDS...many options

Sun Oct 09, 2016 7:15 am

Not pin 6. Look here at the output circuit..

http://electronics.stackexchange.com/qu ... ptocoupler

And use pins 5 and 4. Don't exceed 50mA. If you need more than that you old use an opto relay like the LCA710

http://uk.farnell.com/clare/lca710/rela ... eated=true

Or a transistor or mosfet...

User avatar
labboy
Posts: 19
Joined: Sun Sep 25, 2016 8:07 pm

Re: Dim LEDS...many options

Mon Oct 10, 2016 6:35 am

Ok got it. So pins 4and5 go out to whatever i want to control. Say I have a PCA9685 module that i want to control with 10V PWM. Now, correct me if i am wrong, i will connect the I2C pins of the raspberry to the optocoupler and then to the SCL and SDA inputs of PCA9685. Now the tricky part, can i connect the ground and the Vcc of the module to an 10V supply in order to finally get 10V PWM?
fear nothing, hope nothing, be free

Return to “Beginners”