Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. Solar Pannel and LiOn or Lipo

Solar Pannel and LiOn or Lipo

Scheduled Pinned Locked Moved Hardware
52 Posts 5 Posters 44.9k Views 9 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • epierreE Offline
    epierreE Offline
    epierre
    Hero Member
    wrote on last edited by
    #1

    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 ?

    z-wave - Vera -> Domoticz
    rfx - Domoticz <- MyDomoAtHome <- Imperihome
    mysensors -> mysensors-gw -> Domoticz

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ceech
      Hardware Contributor
      wrote on last edited by ceech
      #2

      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-monitoring

      or 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

      1 Reply Last reply
      0
      • epierreE Offline
        epierreE Offline
        epierre
        Hero Member
        wrote on last edited by
        #3

        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

        z-wave - Vera -> Domoticz
        rfx - Domoticz <- MyDomoAtHome <- Imperihome
        mysensors -> mysensors-gw -> Domoticz

        1 Reply Last reply
        0
        • C Offline
          C Offline
          ceech
          Hardware Contributor
          wrote on last edited by ceech
          #4

          @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:
          https://www.youtube.com/watch?v=Qw4psECqpwI

          Now, 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.

          1 Reply Last reply
          0
          • epierreE Offline
            epierreE Offline
            epierre
            Hero Member
            wrote on last edited by
            #5

            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 ?

            z-wave - Vera -> Domoticz
            rfx - Domoticz <- MyDomoAtHome <- Imperihome
            mysensors -> mysensors-gw -> Domoticz

            1 Reply Last reply
            0
            • C Offline
              C Offline
              ceech
              Hardware Contributor
              wrote on last edited by
              #6

              Don't worry about protection. This charging board has it already. Give me some time, I'll sketch up something...

              1 Reply Last reply
              0
              • epierreE Offline
                epierreE Offline
                epierre
                Hero Member
                wrote on last edited by
                #7

                thanks, BTW i have 5V arduini too ;-)

                z-wave - Vera -> Domoticz
                rfx - Domoticz <- MyDomoAtHome <- Imperihome
                mysensors -> mysensors-gw -> Domoticz

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  ceech
                  Hardware Contributor
                  wrote on last edited by ceech
                  #8

                  Here, this is how you connect things:
                  Untitled.png
                  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.

                  epierreE 1 Reply Last reply
                  0
                  • epierreE Offline
                    epierreE Offline
                    epierre
                    Hero Member
                    wrote on last edited by
                    #9

                    @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 ?

                    z-wave - Vera -> Domoticz
                    rfx - Domoticz <- MyDomoAtHome <- Imperihome
                    mysensors -> mysensors-gw -> Domoticz

                    C 1 Reply Last reply
                    0
                    • epierreE epierre

                      @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 ?

                      C Offline
                      C Offline
                      ceech
                      Hardware Contributor
                      wrote on last edited by ceech
                      #10

                      @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.l2649

                      The voltage protection IS used in the above configuration and a 3V3 Arduino would work.

                      1 Reply Last reply
                      0
                      • epierreE Offline
                        epierreE Offline
                        epierre
                        Hero Member
                        wrote on last edited by
                        #11

                        @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 !

                        z-wave - Vera -> Domoticz
                        rfx - Domoticz <- MyDomoAtHome <- Imperihome
                        mysensors -> mysensors-gw -> Domoticz

                        C 1 Reply Last reply
                        0
                        • epierreE epierre

                          @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 !

                          C Offline
                          C Offline
                          ceech
                          Hardware Contributor
                          wrote on last edited by
                          #12

                          @epierre
                          I'm sorry, I don't understand your question.

                          1 Reply Last reply
                          0
                          • epierreE Offline
                            epierreE Offline
                            epierre
                            Hero Member
                            wrote on last edited by
                            #13

                            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.

                            1. 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 = 130mAh

                            Solar 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=200mAh

                            From 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 ~ 18V

                            Note : It is not the strict rule for choosing the exact rating solar panel, rather it is approximate rating .I write as per my experience"

                            z-wave - Vera -> Domoticz
                            rfx - Domoticz <- MyDomoAtHome <- Imperihome
                            mysensors -> mysensors-gw -> Domoticz

                            1 Reply Last reply
                            0
                            • C ceech

                              Here, this is how you connect things:
                              Untitled.png
                              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.

                              epierreE Offline
                              epierreE Offline
                              epierre
                              Hero Member
                              wrote on last edited by
                              #14

                              @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 ?

                              z-wave - Vera -> Domoticz
                              rfx - Domoticz <- MyDomoAtHome <- Imperihome
                              mysensors -> mysensors-gw -> Domoticz

                              C 1 Reply Last reply
                              0
                              • epierreE epierre

                                @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 ?

                                C Offline
                                C Offline
                                ceech
                                Hardware Contributor
                                wrote on last edited by
                                #15

                                @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.

                                1 Reply Last reply
                                0
                                • epierreE Offline
                                  epierreE Offline
                                  epierre
                                  Hero Member
                                  wrote on last edited by
                                  #16

                                  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...

                                  z-wave - Vera -> Domoticz
                                  rfx - Domoticz <- MyDomoAtHome <- Imperihome
                                  mysensors -> mysensors-gw -> Domoticz

                                  1 Reply Last reply
                                  0
                                  • epierreE Offline
                                    epierreE Offline
                                    epierre
                                    Hero Member
                                    wrote on last edited by
                                    #17

                                    @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...

                                    z-wave - Vera -> Domoticz
                                    rfx - Domoticz <- MyDomoAtHome <- Imperihome
                                    mysensors -> mysensors-gw -> Domoticz

                                    1 Reply Last reply
                                    0
                                    • C Offline
                                      C Offline
                                      ceech
                                      Hardware Contributor
                                      wrote on last edited by ceech
                                      #18

                                      @epierre
                                      Does the basic functionality work? Do you receive any data from LTC4067?

                                      $_57.JPG

                                      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 )

                                      1 Reply Last reply
                                      0
                                      • epierreE Offline
                                        epierreE Offline
                                        epierre
                                        Hero Member
                                        wrote on last edited by
                                        #19

                                        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);
                                        }
                                        

                                        z-wave - Vera -&gt; Domoticz
                                        rfx - Domoticz &lt;- MyDomoAtHome &lt;- Imperihome
                                        mysensors -&gt; mysensors-gw -&gt; Domoticz

                                        1 Reply Last reply
                                        0
                                        • epierreE Offline
                                          epierreE Offline
                                          epierre
                                          Hero Member
                                          wrote on last edited by epierre
                                          #20

                                          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%

                                          z-wave - Vera -&gt; Domoticz
                                          rfx - Domoticz &lt;- MyDomoAtHome &lt;- Imperihome
                                          mysensors -&gt; mysensors-gw -&gt; Domoticz

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          18

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular