Over the weekend, I wanted to implement a back porch lighting system powered by my solar setup. The solar setup has 3 foot by 5 foot 240 Watt 24VDC panel, 100Ah Lithium Iron Phosphate battery, and a Rover 20 Amp charge controller. Here’s my panel:

Solar Panel

The charge controller and battery are both inside a Rubbermaid container to protect from the elements. The porch overhang keeps it mostly dry, but some storms blow the rain in sideways. I’ve audited the dryness of the container after a few wicked storms and never seen a drop of moisture inside. Here’s the box and controller:

Box Overview

Here’s a detail shot of the wiring and box location:

Box and wires

As you can see, the charge controller is pretty fancy, loads of features and great display:

Rover Charge Controller

Onto story time and how the KISS principle slapped me in the face: I hooked up 4 12VDC LED lights that are also IP67 rated for moisture and dust ingress. I wired these to the load side of the charge controller, added a dimmer switch inline:

Upside-Down View of the LEDsDimmer on the charge controller

Now I started to trying to implement my back porch lighting project. I started with a Pi Pico W, added a Mosfet to control the lighting without burning out the Pico, and wrote some code that would go online, find the current time, compare it to the Open Meteo API for sunrise/sunset times, then turn on/off the lighting depending on the time. This seems like it would be relatively simple, but I couldn’t get it to work. I pulled out the multimeter and started verifying voltages. The outputs were firing at the correct time, so the code was working correctly. I think the shared ground I used on the Pico was too small a wire gauge to function properly. But this is when it hit me:

Keep it simple silly!!! I checked the manual for the charge controller, it has a feature that will turn on/off the output terminals on the load connections, and keep them on for a parametric number of hours after sunset. It makes so much more sense than my original idea, the charge controller connected to the panel knows when the sun isn’t shining anymore. I set it for 10 hours of “ON” time after sunset, may have to change it in the winter, but so far it works really well. Check out my back porch at night now:

This was a positive lesson learned, why involve 2 APIs, extra microcontroller, Mosfet and more wiring when the existing hardware can already do what I want? Always look for the simplest solution to a problem, it is usually the most elegant too.