Solar Pannel and LiOn or Lipo
-
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
-
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("% "); } -
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 -
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 -
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.
-
@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.
-
@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 ?
-
@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 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.
-
@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 ?
-
@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 ?
@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 -
@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