Author Topic: Measure 150V with Microcontroller  (Read 679 times)

0 Members and 1 Guest are viewing this topic.

Offline FlyingHacker

  • Frequent Contributor
  • **
  • Posts: 799
  • Country: us
  • You're Doing it Wrong
Measure 150V with Microcontroller
« on: October 17, 2018, 06:37:30 am »
Hi,

I am working on a project where I need to tell if an incoming line is 150V or less than 10V. I figured I would use a high impedance voltage divider to get it down into a readble range, and put a 5V Zener on the input line as well.

FWIW, the lines I am "sensing" come out of an old tube based Amateur Radio.

Any other suggestions? Do you think this provides sufficient safe isolation? Thanks.
--73
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 2183
  • Country: fi
Re: Measure 150V with Microcontroller
« Reply #1 on: October 17, 2018, 06:51:31 am »
This doesn't provide any isolation.

The "grounds" are shared. If this is OK, i.e., if the radio ground is something you could touch anyway, then no problem. The voltage referenced to this ground is safe thanks to the resistor divider, as long as you use resistors properly rated for the job (worst case peak voltage). I'd suggest using two resistors both specified for 300V in series as a minimum.

Note that you need low impedance source for the ADC to work with. If your sample rate is small, a 10n to 100n ceramic capacitor right next to the ADC input pin works just fine (between the input and GND). With large sample rates, it's going to cause an offset due to ADC DC loading the divided high-impedance node.
 

Offline FlyingHacker

  • Frequent Contributor
  • **
  • Posts: 799
  • Country: us
  • You're Doing it Wrong
Re: Measure 150V with Microcontroller
« Reply #2 on: October 17, 2018, 07:20:12 am »
Yeah, no real isolation if the resistors fail short the board is toast after the Zener fails. I guess I could drive an optocoupler with the voltage divided value. Then I wouldn't need the Zener at all. However, not sure the cost of the optocoupler. I have some around here, though. This is a one-off.

The ground of the radios is 0V DC ground, connected to the mains Earth ground.

The 150V from the radio is regulated by an OA2 vacuum tube (kinda like a 150V Zener).
--73
 

Offline Ice-Tea

  • Super Contributor
  • ***
  • Posts: 1587
  • Country: be
    • Freelance Hardware Engineer
Re: Measure 150V with Microcontroller
« Reply #3 on: October 17, 2018, 07:22:34 am »
Have you considered going through an optocoupler for added isolation & protection?

Offline ahbushnell

  • Frequent Contributor
  • **
  • Posts: 479
  • Country: us
Re: Measure 150V with Microcontroller
« Reply #4 on: October 17, 2018, 02:21:44 pm »
Hi,

I am working on a project where I need to tell if an incoming line is 150V or less than 10V. I figured I would use a high impedance voltage divider to get it down into a readble range, and put a 5V Zener on the input line as well.

FWIW, the lines I am "sensing" come out of an old tube based Amateur Radio.

Any other suggestions? Do you think this provides sufficient safe isolation? Thanks.
If your concerned on grounds use a differential probe.  You can build a difference amp with an opamp.  Use identical resistors to ground and the HV.  Zener is good but watch out for leakage. It can cause problems.

Sent from my SM-G930V using Tapatalk

 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 13439
  • Country: gb
  • 0999
Re: Measure 150V with Microcontroller
« Reply #5 on: October 17, 2018, 02:38:07 pm »
How critical are the voltage sensing thresholds?

How much current can be taken from the 150V supply?

If it's not important, an opto-coupler and potential divider can be used to pull an MCU input high/low when the a fraction of the voltage exceeds the forward voltage of the diode.

A more sophisticated solution is to use the TL431 to sense the exact voltage via a potential divider and switch on the opto-coupler's emitter, when the threshold is exceeded.  Note that it has a maximum voltage rating of 36V, so some trickery will be required to enable it to work from 150V, but it's easily doable. If low current operation is desired, then a lower current alternative to the TL431, such as the ATL431 will be required, as the TL431 requires 1mA or so to work properly.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf