Read high dc voltage

Hey, I need to read the voltage that is being sent to a dc motor by an external piece of hardware.

Essentially, I want to tap into the positive/negative wires that connect the motor and the third party circuit board and use the Arduino to measure the voltage that is being sent to that motor from the third party board. I do know that this board sends voltage between a range of 9V DC - 100V DC to the motor.

I have very little experience with electrical engineering so please keep that in mind with your explanation.

I need someone to please provide an explanation on how I can create a circuit and code that would allow me to calculate the voltage using the Arduino. I currently have no code or circuit in place. Thanks in advance!

A voltage divider using 82k and 4.3k will "convert" 9-100V to about 0.45-4.98V which you can read on any of the analogue pins. This combination is pretty high series resistance to the source so you can get away with using 1/4W resistors which are fairly cheap too.

board sends voltage between a range of 9V DC - 100V DC to the motor.

I have very little experience with electrical engineering so please keep that in mind with your explanation.

That could be dangerous to you and the Arduino, especially when you're connecting to an unknown circuit... Anything about 50V is considered dangerous.

Do you have a multimeter?

Is there a ground for that DC voltage?

If there's a ground and the voltage is measured with reference to ground, it can be done. Connect the Arduino's ground to the "unknown" circuit's ground, and then measure the voltage through a [u]voltage divider[/u] (2 resistors). The maximum voltage to the Arduino is +5, so you'll need about a 1:20 voltage divider. (Choose resistors that sum to about 100K or more.)

Note that connecting the Arduino's ground to a point in the unknown circuit that's not grounded could result in damage to the Arduino or the other circuit or even smoke & fire!

Do you have a recommendation on a voltage divider? All of the voltage dividers I see online are rated for less than 25VDC.

Thanks for the help!

All of the voltage dividers I see online are rated for less than 25VDC.

I think you must be misunderstanding what a voltage divider is. It is simply two resistors. Saying that is rated at 25V DC makes no sense at all.

http://www.ebay.com/itm/DC-Voltage-Sensor-Module-Voltage-Detector-Divider-for-Arduino-DG-New-/281832678907?_trksid=p2352135.m2548.l4275

I believe I understand that the resistor is reducing the voltage to a voltage that I can read with the arduino. How that is calculated I do not understand. However, the voltage divider I supplied in the link above indicates < 25VDC which would make me think that the maximum voltage I can run through this divider is 24.99 volts. Is this correct? I need to run up to 100 VDC through this voltage divider/sensor and then read the voltage on the 5v analog pin on the arduino board.

How that is calculated I do not understand.

Well I hadn't see that link when I said that. Now I understand what you are not understanding.
I can't believe that someone is selling two resistors on a board for $1.34, what a rip off. The cost of those resistors are less than $0.001 each.

That is not rated for 25V at all, you can use any voltage you like on it. What that board has is two resistors that cut 25V down to 5V. It would also cut 12.5V down to 2.5V. So in that respect the vendor is telling you it will give you 5V out for 25V in. This is not a rating, it is an operating condition.

I need to run up to 100 VDC through this voltage divider/sensor and then read the voltage on the 5v analog pin on the arduino board.

so you need a different ratio of resistors. This is quite easy to calculate. Lets say the bottom resistor is 10K, to have 5V across 10K you need 5/10000 = 0.0005 A or 0.5mA through it.
If you have 100V, to get 0.5mA to flow you need a resistor of 100/0.0005 = 200,000 ohms or 200K. You already have 10K in the bottom resistor so your top resistor is 200 - 10 = 190K

You buy the resistors, or buy that board if you must and replace the resistors.

Resistors do have a voltage rating, its based on the problem of leakage/tracking and corona discharge
between the terminals. Tiny SMT resistors may well be specified as 25V max if they have sharp edges
a fraction of a mm apart.

For potentially lethal voltages like 100V you should be careful to understand the risks and take good
precautions (ie assume any one component will fail short-circuit). So string 2 resistors in series for the
high voltage leg of the divider, extra voltage handling, extra safety (people do drop screws into cases,
insects do walk across circuit boards, neither should be life threatening!)

Keep the impedance high to reduce heating and power wastage ((1M+1M)/100k dividier will divide
by 21 and take a few mW of power - just add a 100nF cap across the lower leg of the divider to make
it low impedance for accurate analogRead() - though the bandwidth is limited to a few dozen Hz)

Tiny SMT resistors may well be specified as 25V max if they have sharp edges
a fraction of a mm apart.

Not resistors that big they won't.

cannonmoyer:
. I do know that this board sends voltage between a range of 9V DC - 100V DC to the motor.

That is rather a large range , how do you know this ?

Sounds like a treadmill or similar

Hi,
What is controlling the motor?
If it is a drive unit, then both wires to the motor maybe above gnd.

Can you post a pic or reference the apparatus that you want to measure?

What are you going to do with the arduino when you have it measuring the motor voltage?

Thanks.. Tom.. :slight_smile:

I really appreciate all of the comments. I majored in computer science so I'm unfortunately oblivious to some of the electrical engineering terms that are being used.

The device I am tying into is a treadmill controller board and the running motor. I need to read that voltage that the treadmill controller board is putting out to the running motor.

I know my circuit that I attached is incorrect on all levels, but this is just a visualization of what I have imagined in my mind!

It would be very helpful if someone could draw a circuit for reading the voltage along with the resistors because I don't yet understand where the resistors should be placed in the circuit and the size resistor I actually need. Thanks!

Just to makes things clear..

see appended cicuit. The capacitor is there because a brushed motor generates a fair bit of noise, and is also probably driven by a PWM circuit - the cap smooths out these variations and gives you an average.

regards

Allan.

potdiv.pdf (18.1 KB)

I'm in late, since allanhurst has already reply with his schematic, but I publish my reply anyway :

volt_div.jpg

Good catch to use a cap to filter the input, I missed that one. This circuit read 5V with 105V in input.

Ciao, Ale.

It is a good job those diodes are there or you would have destroyed your arduino , that is assuming you have not already.

With that divider, 105 v in is about 35 v at the arduino input.

Don't follow - ilguargua's circuit divides the input voltage by 1 + (100+100)/10 - ie 21 times. - where do you gets the 35 volts from?

regards

Allan

ps still think a capacitor would be useful

sorry i read them as 10 k.

I really need my pc with accessibility turned on these days.

However with 100 K how did he read 5 V with a 105 V input.

I think it's over range.
and he needs a 120 K or so to keep it in range

Dear me!

a simple potential divider gives you 1+ (R1/R2) : 1 ratio where R2 is the lower resistor..

Vilguargua's circuit has 200k as R1, 10k as R2........ie 21:1

so the junction volts is 1/21 times the input...........so 100v in gives you 4.76 v

120k as R1 would give you 13:1, so 100v would give you 7.69 v - too much.

What's the problem ? - you don't need a PC for that.

regards

Allan

ps the catch diodes are a good idea - and I'd still use a capacitor to smooth the noise and pulses.

allanhurst:
Dear me!

a simple potential divider gives you 1+ (R1/R2) : 1 ratio where R2 is the lower resistor..

Vilguargua's circuit has 200k as R1, 10k as R2........ie 21:1

so the junction volts is 1/21 times the input...........so 100v in gives you 4.76 v

120k as R1 would give you 13:1, so 100v would give you 7.69 v - too much.

What's the problem ? - you don't need a PC for that.

regards

Allan

ps the catch diodes are a good idea - and I'd still use a capacitor to smooth the noise and pulses.

Poor explanation on my part

He used 2X 100 K ohm resistors.

Using 2 X 120 or 100 +120 K OHM would bring things into a better range.