Need to measure 20kV on the adc pin of a micro controller

Thread Starter

robotDR

Joined Mar 17, 2020
71
Is a transformer the way to go with a 20kV signal that I want to measure? a transformer to some bridge rectifier and then to some power converter to power a micro controller which will read the stepped down voltage from 20kV?

i can't find any transformers with a google search. I keep seeing indutrual stuff but I need this to be small, like consumer grade stuff.
Thanks for any insight
 

dendad

Joined Feb 20, 2016
4,268
What is the 20KV? DC or AC?
More info is needed.
For instance, is it an isolated voltage or mains.
A lot will depend on the detail. And what is the micro you want to us? Arduino or....?
Then, the resolution needed.
 

Thread Starter

robotDR

Joined Mar 17, 2020
71
Hi thank you for looking into this.

It's AC, resolution would be about 1kv. It's an electric fence so sourced from mains but most likely isolated via it's own transformer.

i would be using an atmega I think. I would need it to be around 3.3v.
 

dendad

Joined Feb 20, 2016
4,268
An electric fence will be a quick pulse so a rectifier may be the way to go.
If you can get a rectifier stack from an old CRT TV or monitor, an a 30KV capacitor of maybe 100nF that may work.
then, add 10 x 1M Ohm 1Watt resistors (or more) in series with a 2K pot to gnd, then you may be able to read the voltage.
First try with a meter on the pot wiper to gnd and see what the reading is.
All this is just an untested idea.
I'd add a series 10K from the pot wiper to ADC in, with clamp diodes at the ADC input.
Another way is to add the rectifier after the voltage divider. Small high voltage caps may need to be added across the voltage divider resistors too.
Set up a test unit n carefully try different arrangements.
 
Last edited:

dl324

Joined Mar 30, 2015
15,511
It's AC, resolution would be about 1kv.
Be careful about the voltage divider. Typical 1W resistors have a safe working voltage of 400-500V. You're going to need more than 10 in series to handle 28kV.

Rectifying 20kV is going to give you about 28kV. You'll need a stack of diodes to be able to handle a reverse breakdown voltage that high.

If you have to ask questions, this is probably something you shouldn't attempt. Component spacing might also be an issue to prevent issues with arcing.
 

crutschow

Joined Mar 14, 2008
31,580
Rectifying 20kV is going to give you about 28kV.
It's the pulse output of an electric fencer so the rectified voltage should be no greater than that peak.
If you have to ask questions, this is probably something you shouldn't attempt.
As long as he's measuring the output voltage of the electric fencer, I don't see a problem, since the output should not lethal.
If he does something wrong, he likely won't do it again. :rolleyes:
 

Alec_t

Joined Sep 17, 2013
13,337
If the turns ratio of the transformer is known (or measurable), couldn't you measure the transformer input voltage instead?
 

MisterBill2

Joined Jan 23, 2018
14,280
I am confused because first the statement is about measuring the voltage of an electric fence, while later the comment is about AC power on the fence. An electric fence with 20,000 volts of AC is a serious hazard.. But I have seen constant voltage electric fences. They keep trespassers out.
So the very first question is about the voltage, is it pulses or is it steady AC??
To read either voltage will require a resistive voltage divider able to with stand 20 Kilovolts. THat will require quite a string of resistors. At least a string of 20 one megohm resistors to the sample point and then a 10K ohm resistor to ground. If my math is right that will give ten volts out for 10,000 volts in. But we still do not know if it is pulses or solid AC. That does matter.
 

MaxHeadRoom

Joined Jul 18, 2013
26,706
Hi thank you for looking into this.

It's AC, resolution would be about 1kv. It's an electric fence so sourced from mains but most likely isolated via it's own transformer.
I used a simple auto HV coil for mine, the common ones now are the wasted-spark versions, there are 3 on 6cyl auto and any wrecker should have them cheap.
It is triggered using a 8 pin Picmicro.
I use one pulse/sec interval.
 

MisterBill2

Joined Jan 23, 2018
14,280
My uncle had a fence charger that would hold a half inch arc to ground. We were seriously warned that it was very dangerous. The normal fence chargers just made that pop-pop spark every second or so. And the most recent charger I repaired the sparks went "POW" every half second. it was quite a different charger, used for about a half mile of fence.
 

MaxHeadRoom

Joined Jul 18, 2013
26,706
My uncle had a fence charger that would hold a half inch arc to ground. We were seriously warned that it was very dangerous.
Probably contravened local regulations! He could be charged if anyone injured.
Mine is just a momentary pulse 1/sec, less than you would get from a spark-plug lead.
BTW mine is silent! :p
 

MisterBill2

Joined Jan 23, 2018
14,280
That powerful pulser was nearly silent, just a faint "grump, grump, grump" from the power transformer, right after the BIG SCR fired. It was that big SCR that had failed, I think the replacement was almost $25, but it was either ten or 12 amps and 1000 volts so it was in a demanding position. I think that the capacitor charged up to almost 700 volts. There was a smaller SCR to trigger the larger one. It was quite a serious fence charger by any standard.
The fence my uncle had was far from the edges of the farm. It was to keep something out of the barn, never did get the full story on that. But I think it was protecting calves and cows. Rural Minnesota in 1964, a half hour south of Canada.
 

georgf

Joined Aug 12, 2021
6
Is a transformer the way to go with a 20kV signal that I want to measure? a transformer to some bridge rectifier and then to some power converter to power a micro controller which will read the stepped down voltage from 20kV?

i can't find any transformers with a google search. I keep seeing indutrual stuff but I need this to be small, like consumer grade stuff.
Thanks for any insight
 

georgf

Joined Aug 12, 2021
6
High there, I think it would be a lot easier and more efficient to measure the current at the footpoint, better the resolution and you avoid al the high voltage and ionization problems you will have with measuring directly those 20kV, but if you insist, make a decoupling device, you don't have to make direct contact you may put some wire into a heavy type plastic tube, this bind to the high voltage cable, connect it to an optocoupler using 10 or more resistors 1M or higher in series if you don't have to ground, protect the diode of the optocoupler with a zener and antiparallel, than measure the output of the optocoupler, you get the picture? Stay save, have fun
 

MisterBill2

Joined Jan 23, 2018
14,280
What is the purpose of trying to measure the actual voltage on the electric fence? For verifying that the fence is actually charged at some location a far simpler scheme can work. That could possibly be as simple as leaning a florescent light tube against the fence.
Harvesting enough (some) "power converter to power a micro controller which will read the stepped down voltage from 20kV?" will also reduce the actual voltage and effectiveness of the fence.
So describing the actual goal will help to get some suggestions that can actually be useful.
 
Top