Skip to content
Lithium Ion Charge Controller Performance. Adafruit solar charger

Lithium Ion Charge Controller Performance. Adafruit solar charger

    Solar Powered Weather Station with Adafruit IO

    A solar powered weather station that reports all recorded data with Wi-Fi to Adafruit IO for easy viewing anywhere.

    Things used in this project

    Story

    This project is the culmination of my first project getting me into hobby electronics when for reasons I have long forgotten I decided to try making an IoT enabled weather station. After recently getting some new components, purchasing a 3d printer and discovering Adafruit IO I pushed to finish and document this project, my solar powered, Adafruit IO powered weather station.

    Overview

    • The Feather M0 micro-controller taking the weather readings and uploading them to Adafruit IO
    • Sensors:The BME280 sensor for temperature, pressure and humidity readingsThe SparkFun Weather Meters for wind and rain readings
    • The power system consisting of the Sunny Buddy along with the solar cell and battery

    The electronics are relatively simple in this project. There is:

    • The main Feather board hooked up to a reset button, weather gauges and the BME280.
    • The Sunny Buddy hooked up to the solar cell, battery, and power switch.
    • The connection from the Sunny Buddy to the Feather providing power.

    Reset Button This is the easiest connection. The reset button connects to the Reset and Ground pins on the feather. Solder the button to each pin with a small piece of wire.

    BME280 The BME280 hooks up via I2C. It requires connections to the Feathers 3.3V, Ground, SDA and SLC pins. There are different options for this connection individual wires or a 4-wire ribbon cable both work. I suggest using a JST or similar connector near the feather so you can plug and unplug the BME280 for easier setup as the sensor will reside in the radiation shield.

    lithium, charge, controller, performance, adafruit, solar

    In my case the Feather was seated on a small circuit board I made that had holes to wire out to the BME280. A small breadboard or protoboard would work just as well.

    Remember to keep the total wire length for the BME280 under 1m (shorter the better).

    Weather Gauges The weather gauge has two connection points both are RJ-11. I suggest buying RJ-11 female connectors to plug these into so you can disconnect them when required. You may also cut the end of the connector to connect the wires directly.

    One connector is for the rain gauge. The RJ-11 connector must connect to Ground and Feather pin 11.

    The other connector handles the wind speed and direction. The wind speed wires connect to Ground and Feather pin 6. The wind direction requires an analog measurement as the value changes based on the direction the gauge is pointing to. To properly measure this value a voltage divider is required.

    The wind direction gauge consists of one pin to ground, the other to a 10K resistor that also ties into Feather pin A2. The other side of the resistor goes to the Feather 3.3V pin.

    For more information on hooking up the Sparkfun Weather Gauges see the tutorial on the Sparkfun page.

    Sunny BuddySolar Charger The Sunny Buddy requires some setup described in its own setup guide. You will have to solder on the connector for the solar panel and configure the potentiometer for the optimal solar charging. Please see the Sparkfun guide to set yours up.

    The battery will plug into the battery connector on the Sunny Buddy.

    The power switch is connected to one of the load terminals on the Sunny Buddy, soldered by a small wire. The other side of the power switch and the wire from the other load terminal end in a 2 pin JST connector. This connector will plug into the Feather battery connector.

    IMPORTANT NOTE ON POWER Do NOT plug the Feather into USB power while the load wires are connected. The Feather has a build in LiPo charger that will attempt to charge the attached battery when it has USB power. But in this setup there is no battery, instead there is the load wires going to the Sunny Buddy. If you need to hook up the USB to for any reason disconnect the JST power connector going to the Feather.

    lithium, charge, controller, performance, adafruit, solar

    Waterproofing While the enclosures should prevent most water from getting on any of the electronics it is still possible. As an extra layer of protection I applied CorrosionX to the electronics. It is used in marine applications to help prevent water damage and had good online reviews to protect electronics.

    Adafruit IO is an excellent platform to connect IoT projects to allowing you to easily send data to a service that lets you visualize it and retrieve it later from other devices.

    Adafruit has many tutorials on setting up and using the service below is a what is required for this project.

    Your first step will be to sign up for an account. After sign-up you will have access to your Adafruit IO Key and Username. You will add these to the config.h file in

    #define IO_USERNAME YOUR USERNAME HERE#define IO_KEY YOUR IO KEY HERE

    The weather station requires creating 9 feeds. They are:

    • Battery Voltage
    • Humidity
    • Pressure
    • Rain
    • Start
    • Temperature
    • Wind Direction
    • Wind Gust
    • Wind Speed

    The names are self-explanatory except Start. Start records the processor reason for a power up/reset. This may be a first power on, or a watch-dog reset. I added it to monitor any exceptions that are happening.

    You can view these feeds live as data arrives to them.

    You may also create a dashboard. Dashboards allows you to display many feeds in many formats all at once. I created a dashboard showing the feeds in a convenient way for myself.

    The code consists of two main tasks: setup and taking measurements. Most of the included code will work with no changes though some setup is required.

    Edit config.h The config file holds you Adafruit IO username and key, as well as the SSID and password for the Wi-Fi router you will connect to.

    Set Your Altitude

    // Set this to your location’s altitude above sea level in meters#define ALTITUDE 235

    You will have to set your own location’s altitude here in meters above sea level. Google maps and other tools can help you determine this value.

    Check The Pins

    // Pins for the weather gauages. Wind/Rain are digital, Wind direction must be analog#define VBAT_PIN A7#define LED_PIN 5#define WIND_PIN 6#define RAIN_PIN 11#define WIND_DIR_PIN A2

    If you connected any of the gauges to different pins then I mentioned you will have to change the pin number here.

    Setup As expected the setup function, sets the weather station up to run. The main tasks are:

    • Setting pin modes and interrupts on the weather gauge pins
    • Setting up and connecting to Adafruit IO
    • Initializing the BME280 sensor
    • Sending the last reset reason to Adafruit IO
    • Resetting the real time clock (RTC) and setting an alarm to wake up in 60 seconds

    Loop The first thing the main loop does is. go to sleep. This allows the station to sit in low power mode until a interrupt goes off, either from a gauge registering a reading or the alarm goes off singling time to take weather measurements.

    The next section only runs when the the alarm has gone off. Any other interrupts will skip it and the Feather will go back to sleep.

    Every minute when the alarm triggers the following happens:

    • Flash the LED (optional this could be turned off)
    • Call the io.run to ensure data flow to Adafruit IO. This is called several times over the course of the loop or the WINC1500 buffers get full. If you ever notice the Wi-Fi transmit light stuck on this may have occurred.
    • Take measurements that happen once a minute
    • Check the time and take measurements that happen every two minutes
    • Check the time and take measurements that happen every five minutes
    • Reset the alarm to trigger at the next minute mark

    The timing of the measurements can be easily changed by moving them from one time block to another.

    The measure functions read one or more sensor values (or variables that were set by interrupts), optionally does some basic processing and sends the final value to Adafruit IO.

    Some values are saved up over a few measurement intervals to get an average value that makes more sense then an instantaneous measurement.

    Interrupts The interrupts allow the Feather to wake up for low power mode when the weather gauges register a reading. They also allow the RTC alarm to trigger every 60 seconds allowing the Feather to wake up from sleeping to take readings.

    Any interrupt needs to be written to do a very fast task as nothing else can execute while the interrupt is executing. In the weather station the interrupts either increase a variable or set a flag and exit immediately.

    The Weather Meters come on a 3/4 metal pole so the idea is to mount the other parts to the same pole.

    Radiation Shield

    The BME280 is protected by a radiation shield (also referred to as a Stevenson screen). The shield consists of several layers and a bottom piece to protect the sensor from direct sunlight and rain while allowing it to still sense the weather. It was designed to use neodymium magnets to hold sections together to allow future access. I added a handle piece that can be put on the top and bottom to allow the shield to clip to the metal pole of the weather gauges.

    Each layer of the shield is printed separately. You will need one of each piece except for two of the middle piece and two of the handles (optional).

    The bottom piece is epoxied to one of the middle pieces. And the top piece of epoxied to the other middle piece.

    Neodymium magnets are epoxied to the pegs and holes of the holder piece layer. Also attach magnets to the pegs of the top layer (to fit in the sensor layer holes) and to the holes of the bottom section (to attach to the pegs of the sensor layer).

    Finally two clips were printed and epoxied to the top and bottom of the shield to attach to the metal pole of the Weather Meters.

    The BME280 will attach to the holder piece with a M2.5 screw and nut.

    Electronics Box

    The electronics box holds all the other components that must be protected from the elements. This includes the Feather M0, Sunny Buddy, battery and switches.

    The box was designed for the PCB I had for the Feather. That space could fit a small protoboard cut to size as well. There are mounting holes for the Sunny Buddy that take 3.5mm screws.

    The bottom of the box has several holes to pass the sensor wires in as well as mounting points for a power switch and reset button.

    The top part of the box will slide over the case and snap in place. It was designed with overhangs to help keep out water from rain and snow but it is not waterproof.

    Fusion 360 Files You can get a copy of the original Fusion 360 files here:

    Your final location for assembly will depend on where you want to measure the weather. The more space around your project the less other objects may affect your readings such as a building blocking the wind or a surface holding heat and raising the temperature.

    In this project I chose to mount all the parts to the metal pole that comes with the SparkFun weather gauges. The wind gauges are at the top, followed by the radiation shield, the electronics box and then the rain gauge.

    The solar panel is mounted to the other side of the electronics box. It should go without saying that this needs to be pointed towards the area that gets the most sun, preferably angled upwards. By aware the position of the sun can change through-out the year so try to pick an optimal position (or change it as the seasons change).

    This has been a long running project that started me deeper into electronics. I am sure that as time goes on I will continue to update and improve on parts of this project. Below is a list of some ideas I had. Feel free to try any of them yourself:

    • Detect light levels (day/night detection, clear/cloudy)
    • Lightning detector
    • Sync the time to the actual time
    • Build a separate device to display the weather data inside on a small eInk display
    • Aggregate data to more human usable formats
    • Experiment with AI for short term weather prediction

    I hope you enjoyed the project. Please let me know any feedback, concerns, or errors you see.

    Update : I have written up how I built a desktop eInk display to show the weather from the station. https://www.hackster.io/markkomus/weather-station-monitor-with-adafruit-io-e338bd

    Custom parts and enclosures

    Schematics

    Code

    Weather_Station.ino

    / The MIT License (MIT) Copyright (c) 2020 Mark Komus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. / #include #include SparkFunBME280.h #include Wire.h #include config.h #include RTCZero.h #include ArduinoLowPower.h // Pins for the weather gauages. Wind/Rain are digital, Wind direction must be analog #define VBAT_PIN A7 #define LED_PIN 5 #define WIND_PIN 6 #define RAIN_PIN 11 #define WIND_DIR_PIN A2 // Set this to your location’s altitude above sea level in meters #define ALTITUDE 235 // Our temperature/pressure/humidity sensor BME280 bmeSensor; // All the Adafruit IO Feeds we measure AdafruitIO_Feed batVoltageFeed = io.feed(Battery Voltage); AdafruitIO_Feed temperatureFeed = io.feed(Temperature); AdafruitIO_Feed humidityFeed = io.feed(Humidity); AdafruitIO_Feed pressureFeed = io.feed(Pressure); AdafruitIO_Feed rainFeed = io.feed(Rain); AdafruitIO_Feed windDirFeed = io.feed(Wind Direction); AdafruitIO_Feed windSpeedFeed = io.feed(Wind Speed); AdafruitIO_Feed windGustFeed = io.feed(Wind Gust); AdafruitIO_Feed startFeed = io.feed(Start); // Interrupts will increase any measurements of rain and wind speed volatile unsigned int rainTicks = 0; volatile unsigned int windTicks = 0; volatile unsigned int minuteWindTicks = 0; // used to track wind direction to get an average every 2 minutes byte windDirArray[12]; byte windDirArrayCount = 0; // highest wind gust we see float highGust = 0.0; // Set if our RTC alarm goes volatile bool alarmWent = false; volatile unsigned long alarmCount = 0; int alarmMinute = 0; // Keeps track of when our next alarm will be (every 10 seconds) byte nextAlarmSecond = 0; RTCZero rtc; void setup Serial.begin(115200); //while (!Serial) // uncomment to wait for the code to run until you connect serial. Don’t do this if its installed! Serial.println(Starting up. ); pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, HIGH); // Show we’re awake Serial.print(Previous reset cause: ); // Used for debugging if the watchdog triggered there is a record of it Serial.println(PM-RCAUSE.reg); // This is SAMD21 specific (may work on SAMD51) // Set input pins up for wind and rain pinMode(WIND_PIN, INPUT_PULLUP); pinMode(RAIN_PIN, INPUT_PULLUP); pinMode(WIND_DIR_PIN, INPUT); // Ensure we wake up from sleep to register the interrupts LowPower.attachInterruptWakeup(WIND_PIN, windIRQ, FALLING); LowPower.attachInterruptWakeup(RAIN_PIN, rainIRQ, FALLING); // Setup connection to Adafruit IO Serial.print(Connecting to Adafruit IO); io.connect; // wait for a connection while (io.status AIO_CONNECTED) Serial.print(.); Serial.println(io.statusText); delay(500); // we are connected Serial.println(io.statusText); // Ensure Wi-Fi adapter is working on low power mode. Had issues with maxLowPowerMode Wi-Fi.lowPowerMode; // Setup BME280 sensor, settings based on recommendation for weather station in BME280 specification sheet bmeSensor.settings.commInterface = I2C_MODE; bmeSensor.settings.I2CAddress = 0x77; bmeSensor.settings.runMode = 2; // Forced mode bmeSensor.settings.tStandby = 0; // 4, 500ms bmeSensor.settings.filter = 0; // off bmeSensor.settings.tempOverSample = 1; bmeSensor.settings.pressOverSample = 1; bmeSensor.settings.humidOverSample = 1; delay(20); //Make sure sensor had enough time to turn on. BME280 requires 2ms to start up. digitalWrite(LED_BUILTIN, LOW); // Show we’re awake delay(100); digitalWrite(LED_BUILTIN, HIGH); // Show we’re awake bmeSensor.begin; delay(20); bmeSensor.reset; // reset the sensor like after a power on (in case the reset button was pressed) delay(100); // not sure how long this takes just to make sure uint8_t bmeStart = bmeSensor.begin; Serial.println(bmeStart, HEX); Serial.print(ctrl_meas(0xF4): 0x); Serial.println(bmeSensor.readRegister(BME280_CTRL_MEAS_REG), HEX); bmeSensor.setMode(MODE_SLEEP); digitalWrite(LED_BUILTIN, LOW); // Show we’re awake delay(100); digitalWrite(LED_BUILTIN, HIGH); // Show we’re awake // Save our reason for startup to Adafruit IO startFeed-save(PM-RCAUSE.reg); // Turn on the watchdog timer for 16 seconds // The code wakes up every 10 seconds so this should never be reached int countdownMS = Watchdog.enable(16000); // Start the RTC to wake us up. Only clock that is running while sleeping rtc.begin; rtc.attachInterrupt(alarmIRQ); rtc.setTime(0,0,0); // Set our first alarm nextAlarmSecond = 10; // Our first alarm will be 10 seconds in rtc.setAlarmTime(0, 0, nextAlarmSecond); nextAlarmSecond = (nextAlarmSecond 10) % 60; rtc.enableAlarm(rtc.MATCH_SS); void loop // At the start of the loop go to lower power sleep Serial.end; digitalWrite(LED_BUILTIN, LOW); LowPower.sleep; // put the controller to sleep until an interrupt (including alarm) wakes us // Anything after this is when we have been woken up due to the timer or sensor interupt Serial.begin(115200); Serial.println(Awakened); // Every 10 seconds we get woke up to pet the watchdog // Need this as an interrupt from wind/rain will also re-awaken us if (alarmWent) Watchdog.reset; // pet the watchdog so it does not trigger measureWindGusts; // do this every 10 seconds measureWindDirection; // to get average over 2 min // 60 seconds have passed if (alarmCount 5) digitalWrite(LED_BUILTIN, HIGH); // Turn the LED on so we know we ran the main loop, can be disabled alarmCount = 0; alarmMinute; aio_status_t ioStatus = io.run; // needed to keep Adafruit IO connected // take our 1 minute weather measurements measure; measureRain; // run every 2 minutes if ((alarmMinute % 2) 0) int windDir = calculateWindDirection; bool result = windDirFeed-save(windDir); aio_status_t ioStatus = io.run; windDirArrayCount = 0; // run every 5 minutes if ((alarmMinute % 5) 0) // measure the top wind gust every 5 minutes bool result = windGustFeed-save(highGust); aio_status_t ioStatus = io.run; highGust = 0.0; // run every 60 minutes if ((alarmMinute % 60) 0) alarmMinute = 0; // set the alarm for another 10 seconds rtc.setAlarmTime(0, 0, nextAlarmSecond); nextAlarmSecond = (nextAlarmSecond 10) % 60; rtc.enableAlarm(rtc.MATCH_SS); // Reset our flag that the alarm went alarmWent = false; // Ran every minute to measure most sensors and the battery void measure bool result = false; aio_status_t ioStatus; // Measure the battery voltage float measuredvbat = analogRead(VBAT_PIN); measuredvbat = 2; // we divided by 2, so multiply back measuredvbat = 3.3; // Multiply by 3.3V, our reference voltage measuredvbat /= 1024; // convert to voltage result = batVoltageFeed-save(measuredvbat); // Wake up the bme280 bmeSensor.writeRegister(BME280_CTRL_MEAS_REG, 0x26); delay(20); // give the sensor time to read float temperature = bmeSensor.readTempC; result = temperatureFeed-save(temperature); float pressure = bmeSensor.readFloatPressure; // convert the local presure to sea level presure in kPa float seaPressure = ((pressure/100) pow(1. (0.0065 ALTITUDE / (temperature 0.0065 ALTITUDE 273.15)).5.257)) / 10; result = pressureFeed-save(seaPressure); ioStatus = io.run; result = humidityFeed-save(bmeSensor.readFloatHumidity); ioStatus = io.run; float wind = (float)minuteWindTicks / (float)60; //60 seconds minuteWindTicks = 0; wind = 2.4; // 2.4 km/h result = windSpeedFeed-save(wind); //Serial.println(bmeSensor.readRegister(BME280_CTRL_MEAS_REG), HEX); //Serial.println(io.statusText); // Every 10 seconds see how fast the wind was to measure wind gusts // Track the highest gust every 5 minutes void measureWindGusts float wind = (float)windTicks / (float)10; //10 seconds windTicks = 0; wind = 2.4; // 2.4 km/h if (highGust wind) highGust = wind; // Measure rain, called less often so separated void measureRain float rainAmount = rainTicks 0.2794; rainTicks = 0; bool result = rainFeed-save(rainAmount); aio_status_t ioStatus = io.run; // Record the wind direction every ten seconds void measureWindDirection windDirArray[windDirArrayCount] = getWindDirection; // Take wind direction measurements over two minutes and average them // Code based on the SparkFun weather station that shows a method for mean of circular quantities int calculateWindDirection int windDirAverage = 0; long sum = windDirArray[0]; int D = windDirArray[0]; for(int i = 1 ; i 12 ; i) int delta = windDirArray[i]. D; if(delta 180) D = delta 360; else if(delta 180) D = delta. 360; else D = delta; sum = D; windDirAverage = sum / 12; if(windDirAverage = 360) windDirAverage.= 360; if(windDirAverage 0) windDirAverage = 360; return windDirAverage; // Get and measure the wind direction int getWindDirection unsigned int windDir = analogRead(WIND_DIR_PIN); if (windDir 74) return 113; // ESE if (windDir 88) return 67; // ENE if (windDir 110) return 90; // E if (windDir 150) return 158;// SSE if (windDir 210) return 135;// SS if (windDir 260) return 203;// SSW if (windDir 340) return 180;// S if (windDir 430) return 23; // NNE if (windDir 530) return 45; // NE if (windDir 615) return 248;// WSW if (windDir 660) return 225;// SW if (windDir 740) return 338;// NNW if (windDir 800) return 0; // N if (windDir 860) return 293;// WNW if (windDir 960) return 270;// W if (windDir 1010) return 315;// NW return.1; // Called whenever we receive one tick from the anemometer void windIRQ windTicks; minuteWindTicks; // Called whenever we receive on tick from the rain gauge void rainIRQ rainTicks; // Called whenever our RTC alarm triggers (should be every 10 seconds) void alarmIRQ alarmWent = true; alarmCount;

    config.h

    / Adafruit IO Config / // visit io.adafruit.com if you need to create an account, // or if you need your Adafruit IO key. #define IO_USERNAME your_username #define IO_KEY your_key #define WIFI_SSID your_ssuid #define WIFI_PASS your_pass // uncomment the following line if you are using winc1500 #define USE_WINC1500 // comment out the following lines if you are using fona or ethernet #include AdafruitIO_WiFi.h AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

    Credits

    Mark Komus

    Hobbyist tinkerer with all things related to technology as a break from my day job. @MarkKomus on or @markkomus@mastodon.social

    Lithium Ion Charge Controller Performance

    In this article we evaluate three popular lithium ion solar charge controllers, with and without MPPT, and compare their performance with a variety of different size panels in different lighting conditions.

    Evaluation of Three Lithium Ion Solar Charge Controllers

    Charging batteries or powering devices through a solar panel is very different than having a continuous supply of DC current, such as through an AC adapter. Solar panels’ power output (Voltage X Current) vary based on the amount of solar intensity and temperature. We visualize this characteristic of each solar panel through something called an IV curve, which shows how much current a solar panel can provide at a specific voltage and specific solar intensity (irradiance). Take the graphic below for example:

    This is a generic set of IV curves for one panel, where the colored lines are the different solar intensities. From an IV curve, we can derive the power output (since P = IV) and the maximum power of a solar panel is right at the bend in the IV curve, marked by a star on the graph. This is the point where the system should operate to get the most out of the solar panel. MPPT stands for maximum power point tracker and as the name suggests, its goal is to track the MPP in all light conditions because it shifts with irradiance – the black line.

    Adafruit vs. Sparkfun Sunny Buddy vs. TI MPPT

    The Adafruit Solar Lipoly Charger doesn’t have MPPT, while both the other charge controllers tested do. Adafruit’s design notes give some documentation on why: higher cost, comparable efficiency, etc. Here is a comparison chart of some of their relevant specifications:

    Test Setup for Lithium Solar Charge Controllers

    The experiment has two variables: irradiance and panel size. Voltaic’s 1, 2, 3.5. 6, and 9 Watt panels were used. Each panel is connected through a USB multimeter (we used the YZX ZY1270 and ZY1266) into the solar charge controller, then through another USB multimeter and into a 3.7V lithium polymer cell. We measured the current and voltage in each setup to see how each solar charge controller performs with a specific panel size and under a specific light condition. From these measurements, we can calculate the power output and the efficiency of the module.

    Voltaic has a full range of solar panels for prototyping and deployment.

    Results

    In the tests in bright light, the TI module outperforms the rest. However, it is important to keep in mind that past the 3½W panel, the Adafruit Over the Shelf (OTS) and Sunny Buddy hit their programmed current limits and cannot provide any more power. Similarly, the modified Adafruit board hits its 1A limit with the 9W panel. If the current limit for the Adafruit is enhanced to 1A, its power output is doubled at the 9W panel. It’s important to keep in mind the limitations embedded into these boards when comparing them to one another.

    In medium light, the TI module still performs well, but it’s interesting to note how the two different Adafruit chargers vary in these two situations. In bright light, the modified version (1A max) beats the off-the-shelf (500mA max), while in lower light it’s reversed. The current limit is no longer a factor and so this is a fair light condition to test the controllers in. The Adafruit and Sunny Buddy have comparable performance.

    In both situations, note how the trend among the panels remains consistent, with all the power outputs varying in consistent ratios from panel to panel.

    The 1, 2, and 3½ Watt panel results from the dim-light graph are unreliable because the power output was so low that the USB multimeter readings were out of their accuracy range. Although current is likely flowing into the battery, the amount was hard to measure as the USB multimeters themselves draw current. We estimate that the input to the battery was less than 6 mA. In this additional low light condition, the Adafruit OTS continues to do well as the current limit never comes into play. The Sunny Buddy performed more poorly than expected, but it’s a possibility that the potentiometer should’ve been adjusted in the dim-light setting to account for the lower MPP voltage.

    Adafruit Solar Lipoly Charger

    The Adafruit is the cheapest, but it does have certain modifications you can make to improve the efficiency and power output. One limitation of the board is that it has a set battery float voltage, at 4.5 volts. This is certainly enough to charge most single-cell lithium-polymer batteries, but it isn’t optimal in all situations. Secondly, there is a current limit that is 500mA off the shelf, but modifiable up to 1A if a 2kΩ resistor is connected across the ‘PROG’ pins. Because of the current limitations, it restricts the power output and efficiency of the Adafruit board in situations with greater irradiance and/or larger panels. Yet at the same time, we see that modifying it reduces its power output in lower light conditions.

    Because of its low price, consistent power output, and clear documentation, the Adafruit Solar Lipoly charger is a strong choice for those looking for an easy off-the-shelf solar charge controller that needs little to no modifications and is an all-around performer.

    Sparkfun Sunny Buddy

    The Sunny Buddy has similar limitations to the Adafruit board. Its default current limit is at 450mA, but it can go up to 2A. The pro of the Sunny Buddy is that there is an adjustable voltage input regulation setting which can be changed by turning an on-board potentiometer. Essentially, the MPPT point is set manually beforehand and the hook-up guide shows how to do this. This customization is a form of MPPT tracking but as the Adafruit design notes stated, it didn’t result in an increase in performance, just in cost. It’s worth noting that also similar to the Adafruit design it has a 4.4V battery float voltage.

    The Sunny Buddy has a better power management and battery charging chip, the LT3652. The board is also mostly unpopulated, allowing for more custom connections beyond the barrel jack and JST connectors. For someone willing to delve into the LT3652 datasheet, this is a strong board because of its larger range of features, such as termination schemes and fault detection.

    TI bq24650EVM

    Finally we have the TI board, which allows modifications on both the input and output voltage sides. It has the most technical freedom since it is an evaluation module, though using it can be cumbersome. It requires diving into the datasheet to figure out which resistors to use for which panel voltage or battery float voltage, and then connecting them onto the evaluation module. However, the results are remarkable, with the highest power output in almost all situations. The benefit of this board, besides the obvious, is its flexibility, allowing a range of solar panels and the ability to charge many battery types, even multiple cells in series. It has a high efficiency and a whopping 8A maximum current.

    The bq24650EVM (evaluation module) is not for beginners. Despite its stellar power output and its ability to accommodate almost all solar charging combinations, it is both expensive and complex.

    Conclusion

    Powering outdoor electronics project through solar isn’t always easy, but with one of these solar charge controllers it’s definitely easier. Combined with a good panel, a strong solar-powered system could be optimized to achieve maximum power in a variety of light conditions and thus increase its longevity and reliability. We hope that this article has been informative to both newcomers and veterans of solar-powered projects, and good luck!

    If you want to talk to a Voltaic expert about continuously powering sensors or other IoT devices from solar power, schedule an IoT Consultation here.

    Solar USB Charger

    About: Making and sharing are my two biggest passions! In total I’ve published hundreds of tutorials about everything from microcontrollers to knitting. I’m a New York City motorcyclist and unrepentant dog mom. My wo… About bekathwia »

    Let’s make something super useful— your own solar powered USB backup battery! After some simple soldering, you’ll be ready to charge your phone and other portable electronics on the go while camping or during the next power outage. What follows is a basic recipe which you can follow exactly, or switch out the solar panel and battery size to match your desired capacity, charge speed, and budget.

    This project is part of my free Solar Class, where you can learn more ways to harness the sun’s energy through engraving and solar panels.

    To keep up with what I’m working on, follow me on YouTube, Instagram and subscribe to my newsletter.

    Step 1: What You’ll Need

    As an Amazon Associate I earn from qualifying purchases you make using my affiliate links.

    First soldering project? No problem! This is a great project for beginners, and you’ll get a variety of types of solder practice while building it. You can learn how in the soldering lesson of Randy’s free Instructables Electronics Class, then come back here to assemble your solar charger.

    Step 2: Circuit Diagram

    The solar charger circuit board comes with a USB port, DC jack for the solar panel, and two JST ports already attached to the board. The battery comes with a JST plug and will attach to the JST port labeled BATT. The solar charger comes with a JST pigtail cable which will connect to the LOAD port and be soldered directly to the PowerBoost input terminals.

    The power switch (at the top of the diagram above) should be attached to the PowerBoost pins labeled EN and GND. Flipping it will turn on and off the PowerBoost. This switch does not have to carry the circuit’s current load, so choose almost any on/off switch you like. I chose an illuminated on/off pushbutton, which also needs to be connected to the PowerBoost’s 5V and GND pins, with a 220ohm resistor in series. The illuminated portion of the switch is optional, but it is a nice indicator that the device is ready to charge your USB devices.

    Step 3: Test Fit Components

    You’ll want to pick an enclosure that fits all your components snugly, without too much squishing. I had an extra Moo business card box that fits the length of the battery and the height of the solar charger perfectly, and even has a little extra space left over for business cards still.

    It closes with magnets embedded in the layers of cardboard and paper. If you can’t find a stiff paper/cardboard box, you can choose an enclosure made from wood, plastic, or metal, however these harder materials will require different tools for creating port openings, such as a drill with a step bit.

    In addition to physically fitting inside, you must also plan out where to create the openings so that your device is useable. I chose to put the illuminated power button next to the USB port, since the light indicates it’s ready to charge. This area of the box is recessed, making the button less likely to get accidentally triggered while the device is in my bag. Opposite the button and USB A port (PowerBoost) are the solar panel DC port and USB mini B port (solar charger).

    Step 4: Solder Capacitor to Solar Charger

    The solar charger board comes with most of the components soldered to the board already, with the exception of the large filtering capacitor. Look for the large circle on the circuit board, with holes matching the capacitor’s lead spacing.

    The capacitor’s polarity is important! The negative side of the capacitor is labeled with a white stripe and minus symbol, and the negative lead is typically shorter. The positive side of the capacitor is not labeled, and the leg is typically longer.

    Line up the positive lead to the hole marked. and the negative lead to the hole marked

    If your enclosure doesn’t have enough space to fit the height of this large capacitor, you may bend it over slightly before soldering, or use wires (and heat shrink tubing) to move it to another part of your enclosure. According to the official assembly instructions, you should be careful to avoid contact with the hot chip in the center of the board.

    To learn how to solder, check out the soldering lesson in Randy’s free Instructables Electronics Class.

    Step 5: Assemble PowerBoost

    Install the USB port to the PowerBoost circuit board, and be sure it is seated completely and evenly before soldering the terminals to the board on the underside.

    The large clip joints connecting big areas of metal will require longer heating and more solder other solder joints. Allow to cool in your third hand tool for several minutes before attempting to handle the USB port, as it will get very hot.

    Although the PowerBoost comes with two different connectors for its input power and ground terminals, we’re going to leave those off and solder the JST pigtail wire directly to the circuit board.

    Heat up and tin the ends of the wires and the pads marked and Reheat the pad and wire as you bring them together: red to and black to

    Step 6: Mark Cut Port Openings

    Now that your circuit board elements have taken their final shapes, it’s time to mark and cut openings for the ports in your enclosure.

    Arrange the components inside your enclosure as you did during test-fit, and trace around the ports and power button using a pencil or marker.

    If you’re using double-stick foam tape instead of screws to secure your components, adjust the markings to accommodate for the width of the tape.

    Carefully cut the openings with a sharp craft knife. If you’re not using a paper box (for example plastic, metal, or wood), you may need a drill with a step bit, rotary tool with cutoff wheel accessory, small hacksaw, or other cutting tools appropriate for the material. If you’re using a metal enclosure, line the inside with adhesive vinyl, thick tape, or other insulating material, to prevent short circuits.

    lithium, charge, controller, performance, adafruit, solar

    Step 7: Connect Power Switch

    My switch has a threaded plastic ring that will secure it to the enclosure, so I removed that first.

    Tin and solder wires onto the leads of your power switch, and use heat shrink tubing to insulate the connections.

    Since my switch has an internal LED, I’m also wiring up a 220ohm resistor to one of the leads (doesn’t matter which), then a wire onto the opposite resistor lead. The LED is optional— you can leave it off or use any on/off switch you like (such as a toggle, slide switch, or tactile on/off button).

    This on/off switch must be installed from the exterior of the enclosure, and therefore must be installed before we can solder the other ends of the wires to anything.

    Insert the switch with wires through the opening in the enclosure, and thread the nut back onto the switch and tighten it against the inside of the enclosure.

    After the switch is in place, you can solder its wires to the various pins on the PowerBoost board as described in the circuit diagram. The LED is connected to 5V (LED ) and GND (LED.), and the switch leads are connected to EN and GND. To attach each wire, trim it a little longer than you think you’ll need, then strip off a bit of the insulation. Twist the wire strands together and lightly tin the wire so the strands stay together. Insert the tinned end into the hole on the circuit board, and apply heat and solder to connect. Trim the remaining wire end with flush snips, but be careful not to let bits of loose wire get stuck inside your enclosure.

    Step 8: Secure Components Within Enclosure

    Before securing the boards, let’s test out the circuit! Plug your PowerBoost’s JST pigtail cable into the LOAD port on the solar charger, and your battery into the BATT port.

    Toggle your power switch, and the PowerBoost’s onboard LED should light up, as well as your power switch LED if you have one. If yours doesn’t, toggle the power back off, disconnect the battery, and double check your wiring against the circuit diagram, as well as the integrity of your solder joints. Post a photo in the Комментарии и мнения владельцев if you still can’t get it to work after these troubleshooting steps.

    Further check that plugging in a USB cable to the solar charger triggers the battery to start charging, as indicated by the amber CHRG LED on the circuit board, as well as the red DCIN LED when power is connected. Verify that the battery keeps charging even when you toggle off the PowerBoost’s switch. Rechargeable batteries usually ship charged, but if you’re using a battery from a previous project or unknown origin, you may need to let it charge for a while before use. When it’s finished charging, the green LED on the solar charging board will light up.

    It’s better to find any wiring mistakes or cold solder joints now, before attaching everything inside the enclosure. After you’re sure the circuit is working properly, use screws or double stick foam tape to secure the circuit boards to the enclosure. I used double stick foam tape to hold the battery in place, too.

    Step 9: Power Up!

    Close up your enclosure and take it outside on a sunny day! Plug in your solar panel with a DC barrel jack adapter. The panel will charge up the battery and power the LOAD port at the same time, if it is getting enough direct sunlight.

    You can put it into charge-only mode by powering down the PowerBoost. Later when your phone’s battery is getting low, you can plug in and power it up.

    Consider mounting your solar panel on your backpack to charge the battery while you’re outside, or find a sunny spot outside a window at home. Be careful if you decide to mount a solar panel to the roof of your car (and consult a professional if you need help to mount it safely).

    Step 10: Make It Your Own

    You may wish to extend or change the connector on your solar panel’s wire. After all the soldering you already did to get this far, splicing the cable is no big deal. If you have the extra time, go for it! There’s a step-by-step guide in the Solar Panels lesson.

    You can expand the capacity of this charger by using a bigger battery, and speed up its charge rate with a bigger 6V solar panel.

    If your battery is above 1000mAh and you’re using a big panel, you can increase the max charge rate of the board by soldering a 2.2K resistor across PROG, as detailed in the official product guide.

    If you want to charge your battery unattended, it’s Smart to install the solar charger’s optional thermistor. First clip off the surface mount resistor inside the marking labeled THERM.

    Trim the probe wires to an appropriate length to reach your battery inside your enclosure, then strip, tin, and solder the wires to the holes marked THERM on the solar charger board.

    Use tape to connect the probe to the surface of your battery. This prevents the device from charging while the battery is too hot or too cold.

    I’d love to see your finished USB charger in the Комментарии и мнения владельцев! Are you taking it to the beach? Adding it to your hurricane kit? Tell us about your version and enclosure. Thanks for following along!

    This project is part of my free Solar Class, where you can find another backyard project and several lessons on working with solar panels. Check it out and enroll so you can post photos of your builds!

    Person Made This Project!

    Did you make this project? Share it with us!

    USB / DC / Solar Lithium Ion/Polymer Charger. v2 info

    Make your projects to go green with USB / DC / Solar Lithium Ion/Polymer Charger. v2. This charger is a very unique design, perfect for outdoor projects, or DIY iPod chargers.

    USB / DC / Solar Lithium Ion/Polymer Charger. v2 is very easy to use. Pick up any 3.7V/4.2V Li-Ion batteries, and a 6V solar panel. Plug the battery into the BATT port using a 2-pin JST cable and the solar panel into the DC jack using a 2.1mm terminal block adapter. Put the solar panel outside to start charging. You can power another project like a Mintyboost at the same time by connecting to the LOAD output port.

    The carefully designed charger is designed specifically for solar charging and will automatically draw the most current possible from the panel in any light condition. Even thought it isn’t a ‘true’ MPPT (max power point tracker), it has near-identical performance without the additional cost of a buck-converter.

    Note: USB / DC / Solar Lithium Ion/Polymer Charger. v2 is for use with Adafruit Lipoly/LiIon batteries only! Other batteries may have different voltage, chemistry, polarity or pinout.

    USB / DC / Solar Lithium Ion/Polymer Charger. v2. Technical Specifications

    References

    Adafruit Web Site: https://www.adafruit.com/products/390

    Write a review Your Name:

    Your Review: Note: HTML is not translated!

    Enter the code in the box below:

    Leave a Reply

    Your email address will not be published. Required fields are marked *