Solar Christmas Lights
by Giovanni Aggiustatutto in Circuits > LEDs
7950 Views, 66 Favorites, 0 Comments
Solar Christmas Lights
In this guide I will show you how I turned some battery-operated Christmas lights into solar-powered Christmas lights.
Usually if we want to put Christmas lights outdoors away from an outlet the only choice is to use the battery-powered ones. The huge problem with these lights is that after a short time the disposable batteries run out, essentially becoming e-waste that is harmful to the environment and expensive for us. So, I set out to find a more environmentally friendly solution. The first thing I thought was to integrate a rechargeable battery into the lights, so that I could then charge them from a USB port, kind of like a power bank. But then I thought, why not also add a solar panel to charge the battery, to make the lights completely autonomous?
And so this project was born, some solar-powered Christmas lights with even an automatic on/off switch that makes them run only at night. The project is quite cheap and simple, and can also be a useful way of experimenting with solar energy for small electronics projects. Let's get started!
I've also made a video about this project, that you can find on my YouTube channel (it has English subtitles).
Supplies
To make this project, I used:
- Battery-operated Christmas lights string powered by 3 AA batteries
- 18V 5W solar panel (also 12V ones should work fine)
- CN3791 MPPT charge controller board for 12V solar panels
- 18650 lithium-ion 3,7V battery
- 1S battery protection circuit (BMS)
- DC jack
- 2-core 18 AWG cable
- M3 threaded insert
- M3x12 mm screw
- Spring and flat pads for battery connection (recovered from old battery holders)
- Wires
- Zip ties
- 20x10 mm aluminum profile
- 4 M6x35 mm bolts
- 1 M5x40 mm bolt
- 4 M6 nuts
- 1 M5 nut
- 8 M6 washers
- 2 M5 washers
- ⌀25 mm plastic conduit or wooden pole
Tools:
- Soldering iron
- Hot glue
- 3D printer with PLA filament of your choice (I used green and grey)
- Basic tools (screwdrivers, pliers...)
Christmas Lights
The first thing we need to do it to choose the Christmas lights string that we are going to modify to run on solar power. For this specific project, I recommend choosing one that runs on three AA batteries. This is important because the voltage of the three batteries in series is 4.5V, which is close to the 4.2V of a fully charged li-ion battery, so we can connect the lights directly to the battery without any voltage regulator. The lights I chose also have a built-in timer function, which, after they are turned on for the first time, switches the lights off after 6 hours and back on after 18 hours, and then repeats the cycle the next day. This feature will come in very handy for this project.
Components
In addition to the lights, we need a solar panel. The panel should be able to produce more energy during the day than what the lights consume at night, especially considering cloudy days. The panel I chose is rated for 5W and 18V, but feel free to experiment with different solar panels to see which one works best for you.
Next we need a battery to store the energy produced by the solar panel during the day and use it to power the lights at night. Here I chose a 3.7V 18650 lithium-ion battery, which is rated for 3000 mAh.
Unless we want to see fireworks before New Year's Eve, we should never connect the battery to the solar panel directly. To charge the battery with the energy produced by the solar panel we need a charge controller. For this purpose I chose a CN3791 module, which is cheap, compact and even promises to be an MPPT charge controller, which means it always runs the solar panel at maximum efficiency to get as much energy as possible. On the PCB we have the main IC and four connectors, two for the battery and two for the solar panel.
The solar charge controller I chose does not have a built-in battery protection circuit, so we need an external one designed for 1S batteries (usually called BMS). This circuit protects the battery from over-discharging and from short circuits.
Note: Since this project includes a lithium-ion battery, it is very important important to remind that lithium-ion batteries can explode or catch fire in case of short-circuit or overcharge, so we should always be very careful when using them.
Solar Panel Support
Before testing the solar panel outdoors, we need to create a support on which to mount it. To make the stand, I first designed and 3D printed a few parts: two spacers and a joint. While the printer was making the parts, I cut a rectangular 20x10 mm aluminum profile to the size of the width of the solar panel. Into the aluminum profile I drilled four 6 mm holes: two on the two sides to match the holes in the solar panel frame, and two at the center to match the holes on the 3D-printed "joint" part. At this point I assembled the stand using M6 bolts to secure the different parts. First I put the 3D-printed spacers onto the holes on the solar panel frame, then I put on the aluminum profile on them and lastly I secured the 3D-printed joint part at the centre of the aluminum profile, as you can see in the picture. As a last thing I inserted into the center joint part a 25 mm plastic conduit that will be used as a pole to hold up the solar panel. To secure the conduit to the joint I used an M5x40 mm bolt and nut.
3D Printed Parts
In order to turn the initial idea into something that looks more like a finished product, we need a case to house house the battery, the charge controller and the BMS. So I designed the case in Fusion360, and 3D printed it. The case is composed of two parts: an enclosure and an inner part on which we will mount the electronics components and the battery. My idea is to have the inner part that can slide inside the box, and that can then be secured with a screw. In this way, by mounting the box with the opening pointing down, we can protect the electronics from rain, which is very important since the solar panel will obviously be placed outdoors. In order to be able to secure it to a pole, the box has two thin spaces on the back to pass some zip ties. For 3D printing, I chose some green PLA for the outer enclosure and some gray PLA for the inner part.
I started assembling the project by putting an M3 threaded insert in the hole on the back the inner part of the case, using the soldering iron set to about 230°C. This threaded insert will be used to attach the inner part to the enclosure with an M3 screw.
Assembly
The 3D-printed inner part of the enclosure has a space to fit a 18650 battery. To install it, I salvaged two metal contacts from an old battery holder; one is flat and the other one has a spring on it. After cleaning a small portion of the flat part of each contact with sandpaper, I soldered a wire to each one of them. Then I glued the two contacts on the two short sides of the space for the battery, and passed the wires through the small opening on one side.
With double-sided tape, I also mounted the charge controller PCB on the flat portion near the space for the battery.
Lastly, I soldered two wires to the positive and negative of a DC jack, and glued it into the opening in the front panel of the 3D-printed part. This connector will be used to connect the Christmas lights string to the battery.
Electronics
The circuit for this project is very simple. First, I soldered the positive and negative wires from the battery holder to the B- and B+ contacts of the BMS battery protection circuit. Then I connected the two wires from the output connector and the two wires from the battery connector of the charge controller together, negative with negative and positive with positive, and soldered them to the center output terminals (P- and P+) of the BMS.
Lastly I secured the BMS, with some hot glue. Now, we are left to connect the solar panel cable to the input of the charge controller, running it through the hole on the front panel of the 3D-printed part.
And so, the electronic circuit is finished! After checking the connections, we can finally insert the battery into the battery holder. The last thing to do is inserting the part with the electronics into the enclosure. To secure the inner part into the enclosure, I screwed an M3 bolt into the threaded insert we have installed before.
Downloads
Modifying the Lights
Now that the main electronic circuit is ready, we need to think about how to power our lights from the rechargeable battery. As I said before, the lights I have chosen are designed to run on three AA batteries. In the battery holder the batteries are connected in series, and since each battery produces around 1.5V, by multiplying 1.5V by three times the lights receive a voltage of about 4.5V. This voltage is very close to the one of a lithium-ion battery, which reaches 4.2V when fully charged. So, we can connect the Christmas lights string directly to the battery, without the need for any voltage regulators.
First, I opened the battery holder of the lights, and located on the PCB the positive and negative pads to which the batteries were originally connected. Then I drilled a hole in one of the sides of the battery holder, through which I inserted a two-core cable. I soldered the negative and positive of the cable to the positive and negative pads to which the batteries were originally connected. Between the positive and negative wires I also added a 22µF capacitor, because, according to the tests I did, without the capacitor the IC that controls the lights would sometimes get stuck.
Lastly, I soldered a DC jack to the positive and negative wires coming from the battery holder of the lights string. With this connector, we are able to power our lights from the battery, as we have installed a matching connector onto the 3D-printed box.
Now it was time to connect the DC jack to the battery, press the button on the lights controller and... the lights turned on wonderfully!
Final Install
At this point, we just need to install everything outdoors. For my test, I secured the piece of conduit that holds the solar panel to the railing of a sunny roof balcony. Then I secured the battery enclosure on the pole with some zip ties. I placed the Christmas lights string onto the railing of the balcony.
At this point, I waited for the sun to set and connected the Christmas lights string to the battery with the DC jack. This way, thanks to the built-in timer, the lights will automatically turn on at the same time each day and then turn off six hours later. Since I hooked them up, the lights have been running on solar power for about two weeks now without any problems, so I'd say they work great!
Before concluding this article, I think it is important to answer the question "will the solar panel be able to charge the battery enough to provide the energy to run the lights?" with some numbers. With a multimeter in current measure mode, I measured the current flowing from the charge controller of the solar panel to the battery; on a sunny day, the current reached slightly less than 500 mA, while on a cloudy day it was only about 40 mA. The lights I used draw about 40 mA from the battery when on, but of course this value depends on the lights you chose. Considering that the lights stay on for 6 hours a day, in my case they will consume 240 mAh per day. So, on a sunny day, the solar panel is able to charge the battery in less than an hour, while on a cloudy day it may need the whole day or it may even not be able to fully charge the battery. However, the lights can run for multiple days off the battery without sun, and when the sun comes the battery will be quickly recharged. So, this system should be able to run autonomously without any problems, although to say this for sure the system needs to be tested on a long period.
Overall, I'm very happy of how this project turned out, and I think it could be perfect for replacing battery-powered Christmas lights making your holidays a bit more eco-friendly. I hope you found this guide interesting and maybe useful. To see more details about this project, watch the video on my YouTube channel. Bye!