Particle Electron Voltage Input For Calculating Circuit Voltage

I am currently working on a project where I have my Electron reading the data of the energy produced by a small solar array I built. In order to bring the numbers I am receiving down, I have created a circuit that can be found here, with the green wire being positive and the black wire being negative. I set up this circuit because without it I was receiving a consistent analogue reading of 4095 in direct sunlight. I am using this equation to calculate my circuit voltage, but I cannot figure out what my input voltage would be in this case. Would it be the voltage on my LiPo battery, the USB running from my laptop that I was using to charge it, the VPM/VOC of my panels or something completely different?

You want to use one of these voltage/ current sensors to easily read voltage up to 26v and you can read current also.

Is there any other way I can get it without this? I’ve already gathered my data and need to convert it within the next two days.

Yes you can use the voltage divider your have created but it will not be as accurate.

You need to make sure the voltage divider does not supply more than 3.3v to the Electron pins to prevent damage and then you need to scale the voltage divider output so it is close to your actual solar panel voltage.

If you have a power supply then supply 10v to the resistor divider and see what the Analog reading is on the Electron. Then supply it 20v and see what the reading is. Once you know the numbers you can scale the Analog readings of 0-5v and to the actual solar voltage readings.

The INA219 just supplies you with the voltage and current readings without needing to do any of this.

@RWB, the max on an analog pin is 3.3v, not 5v :wink:


Do you also know what the max amps are on an analog pin (if there is one)?

@BaxterEllard, an analog input on the photon present an impedance of 40K ohms or so to an external circuit. So, current INTO the input is minimal. There is no such measure as “max input current on an analog pin”. The thing to watch for is exceeding 3.3v to the input.

1 Like

Got it, thanks so much!