1

I recently started tinkering with ESP-12F thus I am a novice here. As a standard novice project, I am making a standalone weather station for my living room. I want to use solar panels to charge the batteries which power up the ESP-12F via USB. I am using ESP-12F as a controller and sending data to Rpi using MQTT.

I am using the following items:

  1. ESP-12 F powered by USB
  2. 2.5W 5V solar panel ( I want to connected two in parallel but for now using only one )
  3. RPi 3B
  4. INA219A to measure voltage and current generated by solar panel.
  5. IN4001 diode as blocking
  6. DHT11 sensor for temp and humidity values
  7. Battery pack to charge 2 x 2500mAh batteries ( This is not done yet )

I am quite confused by the connections to INA219 and the data its providing. Thus, ESP-12F is still connected to independent usb power source and my goal is for now to understand and monitor the voltage and current generated by solar panel.

The INA219 Vcc, GND, SDA, SCL are connected to ESP-12F. I can read the values and observe them on serial monitor or mqtt panel.

1. Below is the breadboard connection when INA219 Vin+ is NOT connected.

INA219 Vin(+) Vin(-) not connected

The voltage measurement sent via MQTT is as below:

Ignore graph, I was pluging in/out Vin wire too many times thus very bizzare lines.

When INA219 Vin not connected

Current connections are as below:

Solar Panel (-) --> INA219 Vin (-) and breadboard to power LED

Solar Panel (+) --> Only to breadboard to power LED [INA219 Vin+ NOT connected]

ESP-12F 3V --> INA219 Vcc

ESP-12F GND --> INA219 GND

ESP-12F D1 --> INA219 SCL

ESP-12F D2 --> INA219 SDA

ESP-12F is powered by separated USB power source

Code using which the values are computed: I have used Adafruit_INA219 library.

  shuntvoltage = ina219.getShuntVoltage_mV();
  busvoltage = ina219.getBusVoltage_V();
  current_mA = ina219.getCurrent_mA();
  power_mW = ina219.getPower_mW();
  loadvoltage = busvoltage + (shuntvoltage / 1000);

I dont understand the values sent by INA219 and have no idea how to interpret them. At this point, INA219 is connected to ESP-12F 3V power (Vcc) and GND. It does not have any Vin. Why there is a load voltage of -1.9 and current?

2. When INA219 has Vin(+) and Vin(-) connected

INA219 Vin is connected

When I connect the Vin+ and Vin- of INA219 I dont have any voltage/current on the breadboard. You can see the LED if OFF. I dont understand why this happens. The whole circuit on breadboard is redundant once I connect INA219 Vin pins to solar panel output pins.

Current connections are as below:

Solar Panel (-) --> INA219 Vin (-) and breadboard to power LED

Solar Panel (+) --> INA219 Vin(+) and breadboard to power LED

ESP-12F 3V --> INA219 Vcc

ESP-12F GND --> INA219 GND

ESP-12F D1 --> INA219 SCL

ESP-12F D2 --> INA219 SDA

ESP-12F is powered by separated USB power source

The voltage and current values at this point is shown below:

Voltage after INA219 Vin connected

The load voltage increases and the difference which is approx 2.1V. This delta voltage matches the voltage values from solar panel when measured by multimeter at this point. Thus, I would assume load voltage = current voltage generated by solar panel. But, current is unchanged and LED on breadboard if OFF the moment I connect INA219 Vin. Thus, I assume I have done wrong connections.

It will be great if you can point out my mistakes and make suggestions!

Thank you!

2
  • You had a long post, but yet missing a lot of critical information for diagnosis. It will be better to provide a schematic than the breadboard picture, as it doesn't even show the IN219 on it. Where is your current shunt? and do you have the pull-up resistors for the I2C? does your I2C works? simply your post and focus on one question that you want to ask or the thing that you need help. – hcheung Jan 3 at 14:09
  • Vshunt = Vin+ - Vin- and typically < 50mV or just a few mV, Vbus = Vin - GND and therefore should be around 5V in your case, Load Voltage should be very close to VBus. So all your data doesn't make any sense. For the current, the value return is integer for mA, so it need to divided by 1000. So it is better to show your schematic/connection diagram and your Arduino sketch. – hcheung Jan 3 at 14:28
3

You connected the V- and V+ probes of the INA module direct to the V- and V+ of the solar panel. That means you connect V+ with V- from solar panel over a 0.1 Ohm resistor. That is like a short. The Solar panel gets overloaded and the voltage breaks down. Lucky you, the solar panel can not provide more current. If it could, then the shunt resistor would be grilled. RIP ;-). Try put the v+ and V- in series with the LED and LED_Resistor. e.g.

Solar+ --> IN4001 --> INA+ |no connection| INA- --> LED --> R(LED) --> Solar-

That would make more sense. It'll show you how much current is drawn by the LED.

If you want to know how much current the panel can deliver, you would have to build a circuit with a potentiometer and measure the Voltage between V+ and V- of the Panel. You can also use the INA to mesasure the current through the potentiometer. Begin with a high resistancy, then turn the poti towards lower resistance and check when the voltage breaks down. The INA shows you the current. But be aware that, the max current depent on the amount of light the panel is exposed to and on the age of the panel itselves. So the values will change as these conditions change.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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