Solar Pannel and LiOn or Lipo
-
Hello,
I have bought the recommended solar pannel and the regulator from the store but... how to use it both for the sensor powering up and to charge a LiOn or Lipo ?
Also, are there recommendation to have the solar pannel outdoor ?
-
You can use one of those:
http://forum.mysensors.org/topic/1027/sensor-board-w-lipo-charger-and-fuel-gauge-bmp180-htu21/30
and this project is courtesy of @AWI:
http://forum.mysensors.org/topic/1331/solar-temperature-humidiy-pressure-board-with-charge-monitoringor you can... Just let me find it BRB. You can make this:
http://forum.mysensors.org/topic/843/another-possible-board-atmega328-nrf-socket-dht22-socket-mosfet-uno-pinout/29
-
Hello,
I already had a look but found it confusing to understand if I need a dedicated board or not.
I already have :
- list itemTP4056 USB Battery 18650 Charging Board
- DC-DC step-down module USB charging module, 12V switch 5V buck module, 18V solar panel buck 5V3A
- 1 W solar panel
- 18650 and CR123
Emmanuel
-
@epierre said:
TP4056 USB Battery
I'm not going to try and explain, because here is a wonderful video explaining the charger board. Take a look:
New TP4056 Lithium Cell Charger Module with Battery Protection – 12:55
— Julian IlettNow, I don't know what your setup is, but the output voltage from this board can vary with the battery voltage. So if you are using 3V3 sensors, then there is a need for additional voltage regulation at the out terminals.
And as far as the input side is concerned, I would recommend to just use a 5V solar cell otherwise you need to regulate input voltage as well since this board only tolerates 5V5 on the input side.
-
Yes, hopefully I have 18650 with protection
But my question is more on how to wire the solar pannel, the battery, the arduino 3V3 and the charging board ?
-
Don't worry about protection. This charging board has it already. Give me some time, I'll sketch up something...
-
thanks, BTW i have 5V arduini too
-
Here, this is how you connect things:
The second item from the left is a DC-DC converter. It is used when the solar panel voltage exceeds 5V. Otherwise it is not needed.
The red board is battery charger. Note that the battery is connected to Batt connections and the Arduino is connected to Out connections, so that the battery protection circuit can do its job.
Arduino is there as an example, I do not think that UNO will even work with such low voltage.
-
@ceech thanks a lot for this clear view on how to do it ! So bad there is not one module to make it all.
For the solar panel, I guess it is a security to use the DC-C converter.
For the battery charger, the voltage protection on it is not used in this configuration, right ?What arduino would work here, some 3V3 @ 8Mhz ?
-
@epierre
But there is a module that can do all that. This is it:
http://www.ebay.com/itm/331601644681?ssPageName=STRK:MESOX:IT&_trksid=p3984.m1587.l2649The voltage protection IS used in the above configuration and a 3V3 Arduino would work.
-
@ceech yes I saw this one, but I have some hardware to use yet
do you have an idea of the power of the pannel and the load duration for a CR123 or 18650 that we could consider on making a project ? that would be a good knowledge base for all !
I am also searching for a casing that would be related to the panel size !
-
@epierre
I'm sorry, I don't understand your question.
-
In fact I've found my answer
"Facts on Battery Charging :
The thumb rule for charging Ni Mh batteries is 1/10th (commonly known as C/10). To charge the battery pack at 1/10th its rated current requires 16 hours of charge time( You can see the picture).The solar panel receives optimal sunlight for only four hours per day, from 10 a.m. to 2 p.m. Thus, a totally ideal system would require four days to fully charge the battery pack.
What is C/10 ?
For example we have a 2xAA–sized 1300mAh battery pack that is rated at 1.2 volts per cell. With cells in series, our pack outputs 2.4 volts and 1300mAh.
Here capacity C =1300mAh
C/10 means 1300/10 =130mAh
So to charge the above battery pack we need a higher voltage ( 2.4 to 3 V) with a maximum current of 130mAh.As per C/10 rule it requires 16 hours to fully charge the battery pack.
You must be ask,what will happen if we increase the current (>130mAh) ?No doubt your battery will charge faster.But the life of the battery will be reduce.So my advice is to keep the current bellow the C/10 value."
Choosing a panel:
"The main source for powering the sensor module is solar panel.So it must be able to provide current for powering the arduino as well as current to charge the battery pack during the day.As per my experience it is the most challenging part for a novice user.
Don't worry these are the following tricks which can help you to buy a right solar panel.
- Voltage : Choose 1.5 times the battery pack voltage
2.Current : Current taken by the Arduino + current for charging (should be
Example :
A battery pack is made of 2 AA Ni Mh battery.
Battery voltage = 1.2 x 2= 2.4V
So required voltage for solar panel =2.4 x 1.5 = 3.6V
By taking some margin we can choose a 4V solar panel for it.
The sensor module along with arduino taking 100mAh current.Battery capacity is 1300mAh
C/10 = 130mAhSolar panel have to provide current 100mAh for arduino along with a current not more than 130mAh.
Lets take 100 mAh for charging the battery
Total current required = 100+100=200mAhFrom the above calculation it is clear that we need a solar panel of 4V and 200mAh.
The following table shows the solar system configuration relationship between storage batteries and mini solar panels.
Battery ----> Solar Panel
1.2V ------> 2V ~ 2.5V
2.4V ------> 3.5V ~ 4V
3.6V ------> 5V ~ 6V
6V ------> 7.5V ~ 9V
12V ------>15V ~ 18VNote : It is not the strict rule for choosing the exact rating solar panel, rather it is approximate rating .I write as per my experience"
- Voltage : Choose 1.5 times the battery pack voltage
-
@ceech said:
The second item from the left is a DC-DC converter. It is used when the solar panel voltage exceeds 5V. Otherwise it is not needed.
The red board is battery charger. Note that the battery is connected to Batt connections and the Arduino is connected to Out connections, so that the battery protection circuit can do its job.Hello,
Now I have the item, so:
- B+/B- connected to the voltage regulator of the pannel.- usb port connected to the 18650 / CR123
- +/- near the usb port to the input voltage of the arduino ? or is that out+/out- ?
subsidiary question: what would be the device to use to load a LiFePO4 ?
-
@epierre -B/+B to the battery, USB port is NOT connected. + and - near the USB port are inputs from the solar cell. out+/out- is for Arduino.
-
so bad, none worked for a long even with a 6800mAh... it was arduino mini pro ith a 1 W solar panel...
I've moed to your boards to see if I can do better...
-
@ceech same issue ith your solar / battery board... sleep time is 300 * 1000, it starts up and then nothing anymore even with a fully charged 18650 6800mAh LIOn...
-
@epierre
Does the basic functionality work? Do you receive any data from LTC4067?Here is an example of RAW analogRead data from LTC4067.
Notice the /CHRG change from High to Low. That indicates charging.analog input A1 on ATmega 328 is /CHRG signal from LTC4067
analog input A0 on ATmega328 is battery voltage
analog input A2 is solar cell voltage
analog input A6 is input current ( I=V/R x 1000 )
analog input A7 is battery charge current ( I=V/Rprog x 1000 )
-
Here is the code based on the other around:
/* Vera Arduino BH1750FVI Light sensor communicate using I2C Protocol this library enable 2 slave device addresses Main address 0x23 secondary address 0x5C connect the sensor as follows : VCC >>> 5V Gnd >>> Gnd ADDR >>> NC or GND SCL >>> A5 SDA >>> A4 Contribution: idefix/epierre for ceech */ #include <SPI.h> #include <MySensor.h> #include <Wire.h> // I2C #include <BH1750.h> #define LTC4067_CHRG_PIN A1 //analog input A1 on ATmega 328 is /CHRG signal from LTC4067 #define batteryVoltage_PIN A0 //analog input A0 on ATmega328 is battery voltage ( /2) #define solarVoltage_PIN A2 //analog input A2 is solar cell voltage (/ 2) #define solarCurrent_PIN A6 //analog input A6 is input current ( I=V/Rclprog x 1000 ) #define batteryChargeCurrent_PIN A7 //analog input A7 is battery charge current ( I=V/Rprog x 1000 ) #define LTC4067_SUSPEND_PIN 9 //digital output D9 - drive it high to put LTC4067 in SUSPEND mode const float VccMin = 1.0*3.5; // Minimum expected Vcc level, in Volts. Example for 1 rechargeable lithium-ion. const float VccMax = 1.0*4.2; // Maximum expected Vcc level, in Volts. #define LIGHT_SENSOR_ANALOG_PIN 3 // Digital input did you attach your soil sensor. #define CHILD_ID_LIGHT 0 // Id of the sensor child #define BATT_CHILD_ID 10 #define SOLAR_CHILD_ID 11 // PIN Radio #define RADIO_CE_PIN 7 // radio chip enable #define RADIO_SS_PIN 8 // CS SS serial select float lastBattVoltage; float lastBattCurrent; float lastSolarVoltage; float lastSolarCurrent; int lastBattPct = 0; uint16_t lastlux; float VccReference = 3.3 ; // voltage reference for measurement, definitive init in setup BH1750 lightSensor; MySensor gw(RADIO_CE_PIN, RADIO_SS_PIN);; unsigned long SLEEP_TIME = 300*1000; // sleep time between reads (seconds * 1000 milliseconds) MyMessage msg(CHILD_ID_LIGHT, V_LIGHT_LEVEL); MyMessage batteryVoltageMsg(BATT_CHILD_ID, V_VOLTAGE); // Battery voltage (V) MyMessage batteryCurrentMsg(BATT_CHILD_ID, V_CURRENT); // Battery current (A) MyMessage solarVoltageMsg(SOLAR_CHILD_ID, V_VOLTAGE); // Solar voltage (V) MyMessage solarCurrentMsg(SOLAR_CHILD_ID, V_CURRENT); // Solar current (A) int lastSoilValue = -1; void setup() { gw.begin(); // Send the sketch version information to the gateway and Controller gw.sendSketchInfo("Light Lux Sensor", "1.0"); // Register all sensors to gw (they will be created as child devices) gw.present(CHILD_ID_LIGHT, S_LIGHT_LEVEL); gw.present(BATT_CHILD_ID, S_POWER); // Battery parameters gw.present(SOLAR_CHILD_ID, S_POWER); // Solar parameters // use VCC (3.3V) reference analogReference(DEFAULT); // default external reference = 3.3v for Ceech board VccReference = 3.323 ; // measured Vcc input (on board LDO) pinMode(LTC4067_SUSPEND_PIN, OUTPUT); // suspend of Lion charger set digitalWrite(LTC4067_SUSPEND_PIN,LOW); // active (non suspend) at start lightSensor.begin(); } void loop() { sendVoltage(); uint16_t lux = lightSensor.readLightLevel();// Get Lux value Serial.println(lux); if (lux != lastlux) { gw.send(msg.set(lux)); lastlux = lux; } // Power down the radio gw.sleep(SLEEP_TIME); } void sendVoltage(void) // battery and charging values { // get Battery Voltage & charge current float batteryVoltage = ((float)analogRead(batteryVoltage_PIN)* VccReference/1024) * 2; // actual voltage is double Serial.print("Batt: "); Serial.print(batteryVoltage); Serial.print("V ; "); float batteryChargeCurrent = ((float)analogRead(batteryChargeCurrent_PIN) * VccReference/1024)/ 2.5 ; // current(A) = V/Rprog(kohm) Serial.print(batteryChargeCurrent); Serial.println("A "); // get Solar Voltage & charge current float solarVoltage = ((float)analogRead(solarVoltage_PIN)/1024 * VccReference) * 2 ; // actual voltage is double Serial.print("Solar: "); Serial.print(solarVoltage); Serial.print("V ; "); // get Solar Current float solarCurrent = ((float)analogRead(solarCurrent_PIN)/1024 * VccReference)/ 2.5; // current(A) = V/Rclprog(kohm) Serial.print(solarCurrent); Serial.print(" A; charge: "); Serial.println(digitalRead(LTC4067_CHRG_PIN)?"No":"Yes"); // send battery percentage for node int battPct = 1 ; if (batteryVoltage > VccMin){ battPct = 100.0*(batteryVoltage - VccMin)/(VccMax - VccMin); } Serial.print("BattPct: "); Serial.print(battPct); Serial.println("% "); gw.send(batteryVoltageMsg.set(batteryVoltage, 3)); // Send (V) gw.send(batteryCurrentMsg.set(batteryChargeCurrent, 6)); // Send (Amps) gw.send(solarVoltageMsg.set(solarVoltage, 3)); // Send (V) gw.send(solarCurrentMsg.set(solarCurrent, 6)); // Send (Amps) gw.sendBatteryLevel(battPct); }
-
Batt: 3.94V ; 0.00A
Solar: 0.18V ; 0.00 A; charge: No
BattPct: 62%Batt: 4.10V ; 0.00A
Solar: 0.55V ; 0.00 A; charge: No
BattPct: 85%
-
an idea maytbe, if I put sleep at 30 * 1000 it works, at 60 * 1000 infinite sleep... any idea ?
(I observed that on both units). It also loas the battery ...
Batt: 3.96V ; 0.00A
Solar: 0.55V ; 0.00 A; charge: No
BattPct: 65%
send: 14-14-0-0 s=10,c=1,t=38,pt=7,l=5,st=ok:3.959
send: 14-14-0-0 s=10,c=1,t=39,pt=7,l=5,st=ok:0.000000
send: 14-14-0-0 s=11,c=1,t=38,pt=7,l=5,st=ok:0.545
send: 14-14-0-0 s=11,c=1,t=39,pt=7,l=5,st=ok:0.000000
send: 14-14-0-0 s=255,c=3,t=0,pt=1,l=1,st=ok:65
22
send: 14-14-0-0 s=0,c=1,t=23,pt=3,l=2,st=ok:22
Batt: 3.97V ; 0.00A
Solar: 0.48V ; 0.00 A; charge: No
BattPct: 66%
send: 14-14-0-0 s=10,c=1,t=38,pt=7,l=5,st=ok:3.966
send: 14-14-0-0 s=10,c=1,t=39,pt=7,l=5,st=ok:0.000000
send: 14-14-0-0 s=11,c=1,t=38,pt=7,l=5,st=ok:0.480
send: 14-14-0-0 s=11,c=1,t=39,pt=7,l=5,st=ok:0.000000
send: 14-14-0-0 s=255,c=3,t=0,pt=1,l=1,st=ok:66
21
send: 14-14-0-0 s=0,c=1,t=23,pt=3,l=2,st=ok:21
-
@epierre
Solar voltage seems a bit low. Can you raise it? And see if the charging takes place?
-
sleep is the problem, it loads at 30s never above...
Batt: 4.06V ; 0.00A Solar: 2.56V ; 0.00 A; charge: No BattPct: 79% Batt: 4.05V ; 0.00A Solar: 3.38V ; 0.00 A; charge: No BattPct: 78%
on the other:
2015-07-05 20:32:40 14 10 1 0 38 4.024 2015-07-05 20:32:40 14 10 1 0 39 0.001298 2015-07-05 20:32:41 14 11 1 0 38 3.991 2015-07-05 20:32:42 14 11 1 0 39 0.000000 2015-07-05 20:32:42 14 255 3 0 0 74 2015-07-05 16:24:08 14 10 1 0 38 3.953 2015-07-05 16:24:08 14 10 1 0 39 0.001298 2015-07-05 16:24:09 14 11 1 0 38 4.731 2015-07-05 16:24:10 14 11 1 0 39 0.015577 2015-07-05 16:24:10 14 255 3 0 0 64 2015-07-05 18:55:40 14 10 1 0 38 4.050 2015-07-05 18:55:40 14 10 1 0 39 0.061008 2015-07-05 18:55:40 14 11 1 0 38 4.212 2015-07-05 18:55:42 14 11 1 0 39 0.066200 2015-07-05 18:55:42 14 255 3 0 0 78
One one of the two units I have issues on radio:
Batt: 4.05V ; 0.00A Solar: 1.80V ; 0.00 A; charge: No BattPct: 78% send: 15-15-0-0 s=10,c=1,t=38,pt=7,l=5,st=fail:4.050 send: 15-15-0-0 s=10,c=1,t=39,pt=7,l=5,st=fail:0.001298 send: 15-15-0-0 s=11,c=1,t=38,pt=7,l=5,st=ok:1.804 send: 15-15-0-0 s=11,c=1,t=39,pt=7,l=5,st=fail:0.000000 send: 15-15-0-0 s=255,c=3,t=0,pt=1,l=1,st=fail:78
-
-
Your circuit seems to be working correctly. I cannot figure out why the sleep time should influence the metering. I suggest you first test it with a minimal sketch to figure out this sleep issue.
-
@AWI What should I keep as minimal ? also any idea about the radio hazard ? I've changed several antennae and it is either half wrong or "check wire"
-
@epierre in a minimal sketch I would remove have it only send one message and give it enough println's to debug via serial. Check the voltages with a meter and let it run with an increasing sleep time. It could be one of those 'bad radios' which are discussed here on the forum.
For the charging part: it only charges a partly empty cell and the charge voltage should be high enough to let it happen.
Debugging is where the fun starts (if you are able to solve it)..
-
so the same without sensor nor mysensors... 30 secs fine 40 secs dead...
I've removed the radio chipset, same behavior...
/* #include <SPI.h> #include <Wire.h> // I2C #define LTC4067_CHRG_PIN A1 //analog input A1 on ATmega 328 is /CHRG signal from LTC4067 #define batteryVoltage_PIN A0 //analog input A0 on ATmega328 is battery voltage ( /2) #define solarVoltage_PIN A2 //analog input A2 is solar cell voltage (/ 2) #define solarCurrent_PIN A6 //analog input A6 is input current ( I=V/Rclprog x 1000 ) #define batteryChargeCurrent_PIN A7 //analog input A7 is battery charge current ( I=V/Rprog x 1000 ) #define LTC4067_SUSPEND_PIN 9 //digital output D9 - drive it high to put LTC4067 in SUSPEND mode const float VccMin = 1.0*3.5; // Minimum expected Vcc level, in Volts. Example for 1 rechargeable lithium-ion. const float VccMax = 1.0*4.2; // Maximum expected Vcc level, in Volts. #define LIGHT_SENSOR_ANALOG_PIN 3 // Digital input did you attach your soil sensor. #define CHILD_ID_LIGHT 0 // Id of the sensor child #define BATT_CHILD_ID 10 #define SOLAR_CHILD_ID 11 // PIN Radio #define RADIO_CE_PIN 7 // radio chip enable #define RADIO_SS_PIN 8 // CS SS serial select float lastBattVoltage; float lastBattCurrent; float lastSolarVoltage; float lastSolarCurrent; int lastBattPct = 0; uint16_t lastlux; float VccReference = 3.3 ; // voltage reference for measurement, definitive init in setup unsigned long SLEEP_TIME = 40*1000; // sleep time between reads (seconds * 1000 milliseconds) int lastSoilValue = -1; void setup() { Serial.begin(115200); // use VCC (3.3V) reference analogReference(DEFAULT); // default external reference = 3.3v for Ceech board VccReference = 3.323 ; // measured Vcc input (on board LDO) pinMode(LTC4067_SUSPEND_PIN, OUTPUT); // suspend of Lion charger set digitalWrite(LTC4067_SUSPEND_PIN,LOW); // active (non suspend) at start } void loop() { sendVoltage(); // Power down the radio delay(SLEEP_TIME); } void sendVoltage(void) // battery and charging values { // get Battery Voltage & charge current float batteryVoltage = ((float)analogRead(batteryVoltage_PIN)* VccReference/1024) * 2; // actual voltage is double Serial.print("Batt: "); Serial.print(batteryVoltage); Serial.print("V ; "); float batteryChargeCurrent = ((float)analogRead(batteryChargeCurrent_PIN) * VccReference/1024)/ 2.5 ; // current(A) = V/Rprog(kohm) Serial.print(batteryChargeCurrent); Serial.println("A "); // get Solar Voltage & charge current float solarVoltage = ((float)analogRead(solarVoltage_PIN)/1024 * VccReference) * 2 ; // actual voltage is double Serial.print("Solar: "); Serial.print(solarVoltage); Serial.print("V ; "); // get Solar Current float solarCurrent = ((float)analogRead(solarCurrent_PIN)/1024 * VccReference)/ 2.5; // current(A) = V/Rclprog(kohm) Serial.print(solarCurrent); Serial.print(" A; charge: "); Serial.println(digitalRead(LTC4067_CHRG_PIN)?"No":"Yes"); // send battery percentage for node int battPct = 1 ; if (batteryVoltage > VccMin){ battPct = 100.0*(batteryVoltage - VccMin)/(VccMax - VccMin); } Serial.print("BattPct: "); Serial.print(battPct); Serial.println("% "); }
-
I've received a string of 10 radio chipset tonight and changing the component has no effect compared to the other board where radio is ok.
are you sure the problem is softare for what I see here is not dependant of a sophisticated library ?
I've learned recently of IAQ (incomming assurance quality) because Photon (formerly Sark) has been hit by a suppliers problem: https://community.particle.io/t/photon-manufacturing-shipping-update/12275
-
@epierre this sounds really weird. The delay() you used in this sketch does not sleep anything but just takes an active break. Can you measure the supply voltage on vcc to determine what is happening?
-
voltage was made through the ftdi...
I'll check again, but an interresting result, the unit with sending problems works well when used with the amplified nrf24l !!! ??? !!!
I've plugged it too with a 4000mAh LiPo battery I just received. I'll try later to play with sleep or delay
2015-07-09 15:14:04 15 10 1 0 38 4.128 2015-07-09 15:14:04 15 10 1 0 39 0.001298 2015-07-09 15:14:05 15 11 1 0 38 4.524 2015-07-09 15:14:06 15 11 1 0 39 0.003894 2015-07-09 15:14:06 15 255 3 0 0 89
-
@epierre said:
voltage was made through the ftdi...
Are you powering or measuring the unit from ftdi? You should only use the on-board power supply.
-
Hello,
since I have 2 units, I have one on battery/solar panel and the other with issues on radio through ftdi else I couldn't see what it had to display...
I'm off for a week, I'll do further testing after.
Can you reproduce some part of the delay/speel issue ?
-
@awi @ceech what test should I do about those units:
- delay test: what kind? what to watch ?
- sleep test: what kind? what to watch ?
- radio issue on one of the boards working only with amplified board, not with small one.
The good news it although they pollute the radio by sending infos every 30s, they are still alive alone with the sun one week after.
-
@epierre Try comparing the two boards side by side. You'll get an idea where the problem is.
-
@ceech do you mean on SW or HW side ?
HW:
- I cannot plug the standard radio in one, only amplified works with it
- same solar pannel 1W
- different batteries, one is LiPo, the other is LiOn, but same behavior on delay/sleep seen on both
- same lux sensor
SW: they run the same software
any idea ?
-
@epierre Not enough power for the amplified radio, probably. Try adding bigger capacitor. In the hundreds of uF region.
-
@ceech are the radio 3.3V or not ? why should I need a capacitor and between what parts ?
-
@epierre I quess what @ceech meant is that the on board power supply is not equiped to power the amplified radio. I you put a large capacitor on the power lines (near to the radio) it will handle the power better.
I am still confused as to the problem you are having with the delay. I am able to reproduce your > 30second problem and it is driving me nuts. When I execute the 'original' sketch (including MySensors) it is working fine with gw.sleep() and times longer than 30 secs.
i will do some additional measurements...
-
@AWI @ceech I have tried this:
-I have removed the mysensor debug mode on the sensor- I have removed the 4 x gw.send in the sendVoltage
For a sleep time of 31-32 this is fine , start to fail at 33...
Batt: 4.07V ; 0.00A Solar: 0.84V ; 0.00 A; charge: No BattPct: 81%
@AWI the one with amplified has a 4000mAh Lipo and the radio is perfect. Anyway simple radio does not work with it.
-
@AWII @ceech any advancement on this ?
-
@epierre Nope, sorry.
-
@ceech I've ordered the wrong boards so without the solar panel... what should I do to complete the missing here ?
rq: your page https://www.mysensors.org/hardware/ceech is not present anymore in hardware @hek an error ?
-
I asked @ceech to add it to the openhardware.io site instead. Guess he hasn't had time to do it yet.
-
@epierre said:
@ceech I've ordered the wrong boards so without the solar panel... what should I do to complete the missing here ?
@ceech would adding these on the either ext or batt do the trick enough ?
http://www.ebay.com/itm/5pcs-5V-1A-USB-18650-Lithium-Battery-Charging-Board-Charger-Module-Protection/221533778016?_trksid=p2050601.c100085.m2372&_trkparms=aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D20140211132617%26meid%3D3aab1c92f1544168b6c5a3033e5d60fc%26pid%3D100085%26rk%3D2%26rkt%3D4%26mehot%3Dpp%26sd%3D300376371464%26clkid%3D3316748233453320960&_qi=RTM2247626
-
@ceech should I put the power on Vin / Gnd as I guess ?
I have started graphing the solar / lipo one here:
https://thingspeak.com/channels/89944
-
@epierre Yes, Vin is the right choice. Nice graphs
-
@ceech actually the Particle Photon is doing less well than yours: https://thingspeak.com/channels/88622
-
Hello guys,
I have a load of the 18650 charging boards with the protection circuit (from Aliexpress). I also have a few 18650 batteries and solar panels hanging around.... Can I use the code above to get readings (batt, solar, charge, pct) or do I need something else?
-
The code above is for dedicated boards with on-board charger IC. Like the one from the following page:
http://www.ebay.com/itm/331838940273?ssPageName=STRK:MESELX:IT&_trksid=p3984.m1586.l2649This board uses LTC4079 and has voltage dividers on battery and solar cell connectors. They allow for voltage readings. Current is measured on one of the LTC4079 pins.
-
HI @ceech
The boards look great, sadly I have a ton of spares around I need to use first. I wondered if the code could be adopted, or if there was perhaps a way to get the readings off the solar input and battery using the 18650 charge module alone...
-
Of course you can. Use voltage dividers to scale down voltages that you would like to measure if they are above your VCC. And you can also read the current from TP4056 charger board. Tap to Prog pin (pin 2) and measure its voltage. Here is the correlation between voltage and current:
Ibat = (Vprog /Rprog) x 1200
Adapt the above code with your hardware values, current formula and measure away.