Garden light controller

Hi All,

Sam suggested I post in here for some advice.

I am planning to build a controller for my LED garden lights. This is nothing fancy, just so it turns on at dusk and off after a variable amount of time that i have not yet decided on.

The setup will be:

Power Source: 2 x 220W (30V@7.8A each) Solar panel -> MPPT charge controller -> Battery bank
Raspberry Pi (powered from battery bank) using a TSL2561 Lux module for light sensing.


LED Light string 16 x 2.3W 12V LED + 1 x 10W 12V LED.

The FUZZY BIT is where I am not yet sure what I will do. The LED string pulls about 5A combined but I am not sure if I can run this using a LM2596S Switching power supply or if I need to use a relay board.

Also, can I use another LM2596S board to supply power to the Pi itself ? While it is in my house, I don’t actually want to use any 240V supply in this at all if I can avoid it.

The high voltage on the solar panels means I will probably be using 24V battery power and have to drop it down using either a transformer or maybe the switching power supply.

Thoughts ?


Hi Chris,

I’m not sure exactly which board you’re using with the LM2596S, however, I used this one as a reference and i states that the max current is 3A, so you’d want to use a different power supply for that one. I’d think that the easiest way to do this would be to use the LM2596S to power the Pi, and then use a separate regulator to power the LEDs with an adequate current rating. Take a look at our maker favourite regulators for one that will suit:

Hi Sam,

The regulators and converters in that link all seem to top out at about 12V and seem to be limited to <1A.

I think what I need is a relay that will switch 12V at up to 10A that can be controlled bi the Pi’s 5V GPIO pin.

This will act as a On/Off switch and I’ll need to use a 24V->12V step down transformer to drop the voltage down to the required level.

I was looking to avoid using a relay/transformer, as apparantley they are considered “old school”.


I’m a bit confused sorry Chris, I thought you still need to find a power supply to step your voltage down to 12V for the lights? A relay won’t help that, it will just act like an on/off switch. As far as using relays, there’s no reason not to use one if it does the job. They’re still commonly used in designs for a number of reasons.

So just to clarify what your question is, what components do you still need help finding? It sounds like you’ve got power for your Pi sorted, and now power for your lights worked out.

As far as a relay to control the power to the lights, I’d recommend one of these:

Hi Sam,

As I said, I could not find a PSU that would take in 12-24V @ 5-10A input and output 12V @ 5-10A, they all seem to top out at about 3A.

Yes, I know the relay will act as a On/Off switch. The one you have indicated appears suitable.

So, my question is… do you have a 24V/12V stepdown transformer capable of handling 5-10A ? I have not been able to locate one in your online shop.



Ah, I’m with you now. We don’t have a regulator which can handle that much current unfortunately. Once you start getting into regulators designed for several hundred Watts, it’s getting a bit specialized. I’m not sure I can help with that one sorry. Of course, the best option would be to use a mains powered supply, we’ve got a 12V 10A supply which is perfect, but I understand that you’re trying to avoid mains power.

So this is what I think it will end up like:

Happy to accept criticism or idea’s on how this could be improved.


Hey Chris, sorry for the delay in getting back to you, I was away for a bit of the holiday period. The flow of that looks good to me, just make sure that everything is adequately rated for each stage.