enter image description here First the battery is not connected directly but over protection IC logic.

  1. Question:

Current circuit works as follows:

  • When solar cell voltage is higher than 0.7V , LED is OFF (sort off day/night sensor). When solar voltage is lower than 0,7V, LED is shining with low intensity

What is the the correct way to connect arduino pin D2 to take control over above described default behavior? (disconnect SW4 and remove R9)?

  1. Question:
    • Which voltage measurement technique (internal reference or reference to regulated Vcc voltage) should i use to meassure Lipo voltage?
    • What are correct/recommended resistor value for optimal battery utilization.

Should this reference be used: https://github.com/rlogiacco/BatterySense


  • Is arduino pin D2 connect properly? It control two level LED intensity:

    • pin HIGH - LED glows with HIGH intensity (between led+ and led- is ~4V) pin LOW LED glows with LOW intensity (between led+ and led- is ~2,5V)

Thanks for help and recommendations


1 Answer 1


You have an incredibly complex piece of programmable logic at your disposal, utilize it! The way I understand your question is that you are simply using the LEDs for indication of various states, and your only required sensing is fairly simple voltage measurements.

1) Use the analog inputs on your Arduino to monitor the solar cell voltage and use the Arduino to turn on and off your LEDs.

2) You could feed your battery voltage through a voltage divider and use the regulated 3V supply voltage as a reference. Set up your voltage divider so that when the battery is at maximum voltage, the output of the voltage divider is at or slightly below 3V. This will give you the most efficient use of the range of the ADC in the Arduino, because you are taking advantage of the full scale range. The voltage divider is necessary to scale the battery voltage down because obviously the battery voltage can be greater than 3V.

3) As I said in answer to question 1, you should use the Arduino to control the LEDs. Take advantage of the analog pins to make your voltage measurements.

One final note: You may want to try using a buck-boost regulator for the 3V supply from the battery. That linear regulator has a huge dropout for the current range you'll need (if you must use a linear, pick a better one). The issue is that when your battery voltage goes below about 3.2V, the "3V" rail will start to droop and your measurements will be wrong. You should be able to find an appropriate buck-boost for your current range that has the necessary components integrated in package(switch, inductor).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.