# Raspberry Pi LED light control - help/advice appreciated



## Niton (23 Jan 2019)

Hi all,
I am currently using a Raspberry Pi based tank controller, using reef-pi software (https://reef-pi.github.io/).  

I have been running a fairly simple setup for timers and temperature control for the last 3 months.  However, I have recently acquired a Twinstar 600 LED light and I was hoping that someone would be able to give me some assistance on using PWM over the raspberry pi GPIO to enable timer based dimming and brightening of the light (sunrise/sunset).

I have been reading around the official build guide for reef-pi (https://learn.adafruit.com/reef-pi-lighting-controller) and I'm comfortable enough with the concept but I am not sure how the suggested setup could be applied to the Twinstar.

I know there are a few posts covering DIY LED builds and logic controllers for tank automation but I can't see anything that helps me.

Thanks in advance,
Nick


----------



## lazybones51 (23 Jan 2019)

Nice to see another ReefPi user 

I currently only use mine for controlling LED lighting, I need to get round to auto-dosing, timers and temperature control at some point.

First things you need to find out are the voltage and amperage of the power supply for your TwinStar unit, once we know those we'll be able to find a PWM solution


----------



## Niton (23 Jan 2019)

@lazybones51 power supply is delivering 12v 3.0A. 

I've gone through the build page again and think that I've been confused by the kessil control board they have. They also describe a control board for an acintic (sp) led strip that seems more like the Twinstar i.e. only one channel.

Any advice greatly received.


----------



## Niton (23 Jan 2019)

Timers and temperature are simple if you've managed to get lighting sorted out. There was a bug with timers in earlier releases but happily sorted out now. 
I've been really impressed with the ease and stability of the app so far.


----------



## lazybones51 (23 Jan 2019)

So 12v 3a will be a constant voltage driver. 

I use a 5a version of this driver, which accepts a 10v PWM signal as an input and dims the output accordingly. At the time of my build, Reef-Pi didn't support the native Raspberry pi PWM output, so I used on of these instead. However I believe the later version now supports native PWM output.

Although as you've already got a power supply there may be a different way to achieve the same result, without buying the Meanwell driver I link to above.


----------



## Niton (24 Jan 2019)

@lazybones51 from my understanding I should be able to do it with native PWM on the raspberry PI.  The simplified circuit would look like this:


----------



## lazybones51 (24 Jan 2019)

@Niton certainly worth a try, looks like a nice simple circuit to make. My only concern would be how much load that npn transistor handle?


----------



## Harry H (24 Jan 2019)

@lazybones51, are you controlling a kessil?


----------



## Niton (24 Jan 2019)

@lazybones51 it looks like they are rated to 30v so should be OK. Will spend some time looking to make sure it is safe and reliable.

This is the component suggested.
https://www.adafruit.com/product/355


----------



## lazybones51 (24 Jan 2019)

Harry H said:


> @lazybones51, are you controlling a kessil?


No I was controlling an Arcadia Stretch, however i'm now controlling a custom build LED light. Reef-Pi is already capable of controlling a Kessil.


----------



## lazybones51 (24 Jan 2019)

Niton said:


> @lazybones51 it looks like they are rated to 30v so should be OK. Will spend some time looking to make sure it is safe and reliable.
> 
> This is the component suggested.
> https://www.adafruit.com/product/355


Ah they support 30V / 60A which gives you lots of spare capacity.


----------



## Harry H (24 Jan 2019)

lazybones51 said:


> No I was controlling an Arcadia Stretch, however i'm now controlling a custom build LED light. Reef-Pi is already capable of controlling a Kessil.



Yes, I am aware of that, I was hoping to ask some questions about building this circuit. https://reef-pi.github.io/build-guides/lighting/


----------



## lazybones51 (24 Jan 2019)

Harry H said:


> Yes, I am aware of that, I was hoping to ask some questions about building this circuit. https://reef-pi.github.io/build-guides/lighting/


I use a very similar circuit to power my custom light unit. What questions do you have?


----------



## Harry H (24 Jan 2019)

lazybones51 said:


> I use a very similar circuit to power my custom light unit. What questions do you have?


How did you connect DC power source and the jack? Could you share a photo of your setup?


----------



## lazybones51 (24 Jan 2019)

I used these pre-wired barrel jack connectors from eBay, instead of using surface mounted jacks. I'm at work currently so don't have access to the tank it's connected to.


----------

