• Solar Charger - First Prototype

    tiefpunkt04/14/2021 at 21:58 0 comments

    After digging through more and more parts bags, I finally found 2 P-channel MOSFETs, so I can actually start prototyping the circuit for the solar charger. The instructable the charger is based on uses a normal 16x2 LCD, but that's too bulky for the lamp. I instead wanted to use a much smaller OLED screen, controlled via I2C.

    The particular display I have seems to use a non-standard I2C address, so it wouldn't show anything at all at first. Luckily, there's an example in the Arduino IDE which can scan the I2C bus for devices and show their addresses, so this was not too troubling.

    The Arduino libraries for the 16x2 LCD and the OLED seemed mostly compatible, so this was a fairly easy replacement. One interesting issue is that the "setCursor" function of the LCD library thinks in lines, while the OLED library thinks in pixels, so instead of printing something to the second line, I initially wrote the second line almost completely above the first, offset only by a single pixel. This as a bit irritating and took me a second to figure out, but the fix was quite easy, just multiplying line values by 8, column values by 6 (the font is 6x8 including borders).

    For my first try, I skipped the load switching MOSFET completely, and used a beatup lead acid battery instead of my Li-Ion pack, as to not blow stuff up right away. And surprisingly I actually got it to charge a little bit.

    In the full sun however, the algorithm responsible for switching the charging MOSFET went a bit crazy, and I had to add a PID controller lib to smooth things out. I used the Serial Plotter in the Arduino IDE to quickly display some values from the Charge Controller, and that worked wonderfully. Seems like there's little documentation on that Plotter functionality, maybe I need to write a separate blog post on that.

    So we have a working charge controller now. Next steps will be putting the code up somewhere, adding the rest of the circuit onto the proto board and sketching the changes in the circuit. Let's see when I find the time to do that.

  • The battery pack

    tiefpunkt04/14/2021 at 21:25 0 comments

    The plan for energy storage in my power station is to use recycled 18650 batteries. I don't have the means to build a normal battery pack with welded metal straps and all that, so I'm building something using these battery holders you can see in the Getting Started log.

    I'm aiming for roughly 12V in the setup. With Li-Ion batteries, you cannot really reach that exactly, so I'm going a bit below, with a 3S2P battery setup, meaning 3 batteries in series, and 2 in parallel, which comes out to a nominal voltage of 11.1V (3.7V * 3). Here's a picture of what that looks like electrically:

    Read more »

  • Solar Charger - The Circuit

    tiefpunkt04/07/2021 at 22:08 0 comments

    I'm planning to use a 3S Li-Ion setup, which results in a 11.1V nominal voltage. I wanted to be close to 12V to be able to use stuff made for cars with it without having to deal with DC-DC conversion.

    There are many cheap solar chargers out there, which have adjustable cut-off voltages, but unfortunately, none of the ones I tested so far allow to be adjusted enough to deal with 3S Li-Ion packs. So I'll have to build my own.

    I decided to use a https://www.instructables.com/ARDUINO-SOLAR-CHARGE-CONTROLLER-PWM/ as a reference for the solar charger, but decided to make some changes to it. It's originally designed for 6V, so some of the protection circuitry needs to be adjusted, and I want to use a smaller OLED screen instead of the regular LCD. On top, I'll have to change the firmware quite a bit. I started drawing up my changes right onto a printout of the circuit.

    Next step will be prototyping this. I thought I had all the parts around, but seems like I don't have any P-MOSFETs around, so I'll have to wait until the next big parts order, or find something in the bottom of my parts piles.

  • Getting started

    tiefpunkt04/05/2021 at 22:09 0 comments

    This roadwork warning lamp has been with me for years, and after not having done anything fun with it since then, I decided to try to convert it into a portable power station with some Li-Ion batteries, a solar charge controller, a proper lamp, and whatever else I can fit in there.

    These lamps normally run on big chunky 6V batteries, but I'll try to replace them with 18650 Li-Ion batteries, in a 3S configuration (11.1 V nominal).

    Read more »