Author Topic: Measure >30VDC with Microcontroller  (Read 880 times)

0 Members and 1 Guest are viewing this topic.

Offline metrologistTopic starter

  • Super Contributor
  • ***
  • Posts: 2253
  • Country: 00
Measure >30VDC with Microcontroller
« on: March 05, 2018, 05:53:48 pm »
I want to use my Arduino to log my solar panel output voltage and current. To measure the panel voltage, I though of using a simple resistive divider, but I am not sure if my panel can peak above voltages that I've seen (~34VDC max). I guess I could set up the network to split 50V to 5V and 45V, but that decreases my resolution. That probably doesn't matter enough for this application though. I was thinking of a 4.7k/47k divider (or a 50k, 25 turn pot).

Any problems with that idea or a better solution?

The current will be measured using a hall effect type of current sensor, or I will build a current shunt and use an op amp.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11712
  • Country: my
  • reassessing directives...
Re: Measure >30VDC with Microcontroller
« Reply #1 on: March 05, 2018, 06:22:50 pm »
no problem with that. if you care about overvoltage you may try clamp diode from the divider to 5V rail. but sim it first because i sensed nonlinearity if using zener from gnd to the divider, but clamp diode maybe ok. losing resolution doesnt matter i would say 34V to 2.5V divider then you have room up to 68V overvoltage, unless you need precision greater than 66mV.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline MasterT

  • Frequent Contributor
  • **
  • Posts: 836
  • Country: ca
Re: Measure >30VDC with Microcontroller
« Reply #2 on: March 05, 2018, 07:32:47 pm »
AtMega has build-in current clamp diodes on all input, except reset pin, so you don't need an external one. As long as current is limited to < 1 mA you are safe, that would imply 34 V / 1mA = 34 kOHm minimum resistance in upper leg of the divider. To get better accuracy, you may put 0.1 uF capacitor between analog input and ground - in parallel to low side of the divider.
 

Offline metrologistTopic starter

  • Super Contributor
  • ***
  • Posts: 2253
  • Country: 00
Re: Measure >30VDC with Microcontroller
« Reply #3 on: March 05, 2018, 07:47:12 pm »
Really? I was just going to ask how to apply a clamping diode. I guess the current limit would be OK with a 47k leg.

I was considering the solar charge controller may be introducing voltage spikes on its input. I have not checked that yet.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf