Using Arduino to measure high (100v) DC voltages and control external contactors - please check my approach

Hi all,

I have four manual switches in a ~100vDC circuit and I would love to automate them with Arduino. They need to be switched in a certain sequence, and I need to measure and compare the voltage at two points in the circuit to drive some of the logic.

Edit: This is ALL DC voltage only, no AC.

The logic side I think I'm ok with, but there's a couple of details which I could really use
some advice on.

I've tentatively got an Espressif ESP32-S3-DevKitC-1-N8R8 board in mind, though I'm seeing the ADC unit on this board is not very fast/accurate. Which may factor in to the voltage measurement.

I've posted the pseudocode of my logic at the end.

The questions I have are:

Three of the devices I'm switching are normally open DC contactors. They use 12v for the actuator coil and see an inrush current of 3.8A. Holding current drops to 0.2A via a built-in coil economizer. I've been looking at TIP120 transistors and also at some solid state relays as a possible way to switch higher voltages and current using the Arduino's output pins.

  1. Is a transistor like a TIP120 the best way to go for this? Will it generate significant heat if it's 'on' the whole time? I don't want to use a mechanical relay.

  2. Is a solid state relay basically a transistor switch? I see they also can require heatsinks.

  3. For either of these options, how do I calculate the type and value of the resistor needed on the Arduino's digital output pin that connects to the transistor?

  4. I've read that the espressif ESP-32 board's ADC is not very fast nor precise. What's the ideal way to accurately measure voltage at two points in the circuit? We'd be looking at around 90-130v DC range and a significant amount of current. I would also need two of the measurement devices and need them to be accurate enough to compare readings within about 0.1v or better. Are there shields or any external board I could use to 'feed' the Arduino the measured value? Or what's my best option here?

  5. additional info for Q4 - the battery is 100vdc, 60Ah, 400A cont. current/700A peak. If I had to use voltage divider circuits to measure, will I be making some large resistors very hot? I'd like to minimize heat wastage where possible.

  6. I'm definitely not married to the Espressif ESP-32 board if a more suitable option exists. Reliability and accuracy are the two important factors.

  7. I'm using a solid state relay for the last switching output. This one sees full voltage (~100vdc) but very low current. How do I calculate the arduino output pin resistor I'd need please? Panasonic AQZ107D
    https://industry.panasonic.com/global/en/products/control/relay/photomos/number/aqz107d

Thanks ever so much for any guidance on this.

Psuedocode logic for the program:

function 1 (boot up)

power applied
write 'waiting' to screen
momentary switch pressed once
switches device 1 on
short delay
switches device 2 on
reads voltage 1
reads voltage 2
while loop: voltage 2 is less than 90% of voltage 1
switch on device 3
short delay
switch device 2 off
switch solid state relay 4 on
write 'ready' to screen
leave device 1 and device 3 switched on the entire time it's running.

function 2 (shutdown)

momentary switch pressed
switch solid state relay 4 off
switch device 1 off
short delay
switch device 3 off
write 'power off' to screen

A solid state relay is the easiest and most foolproof way. I assume it's DC so make sure to get a relay rated to switch DC. AC & DC solid state relays are not (usually) interchangeable.

A TIP120 can work too. Or, here is a MOSFET driver circuit. (A transistor driver is similar but not identical.)

I've read that the espressif ESP-32 board's ADC is not very fast nor precise. What's the ideal way to accurately measure voltage at two points in the circuit? We'd be looking at around 90-130v DC range and a significant amount of current. I would also need two of the measurement devices and need them to be accurate enough to compare readings within about 0.1v or better.

The current doesn't flow into the microcontroller. (Ohm's Law) For example, a car battery is capable of hundreds of amps but the clock in your car only "pulls" a few milliamps. The car stereo might take a couple of Amps and it usually has a 10 or 20A fuse... Etc.

The microcontroller can't handle 100V so you'll need a Voltage Divider. Calculate the resistor values so that they don't dissipate too much power so you can use regular-small resistors.

It would also be "good practice" to add a diode or two as an Over-Voltage Protection Circuit.

It still may not "pass" safety regulations. Generally anything over 50V is considered dangerous and it needs to be insulated/isolated.

0.1V out of 100 is 0.1% or about 10-bits of resolution and should be feasible. But maybe not 'easy". Most multimeters are spec'd at around 1% of full scale.

You didn't say what your speed requirements are but any microcontroller is way faster than an electro-mechanical relay or contactor.

to measure voltage and current have a look at PZEM-004T-V3.0-Datasheet

to measure using an ADC would require sampling over several cycles to get the RMS voltage/current

Thank you - very interesting looking item. Would it handle DC do you know please? I'm sorry I should have specified. Just edited my original post to include DC

The TIP120 was a great device 45 years ago (just looked it up in my 1980 data book). Now, as has been noted above, a MOSFET or solid state relay would be a much more reasonable choice .

Are you measuring between the 100 volts and a ground point that can also be the ground for your Arduino project?

Thank you - Ideally I'd like to keep them separated, but in theory I think they could be a shared ground.

it's a 96 v battery, running through a 12v step down converter. I'm driving the contactors off this 12v and then stepping it down further to 3.3v to power the Arduino.

If my limited understanding of shared grounds is correct, I could join the Arduino's power supply ground to the main battery ground.

The voltage I need to measure is going to be across the full 96v or thereabouts.

Do all your converters share the same ground? If not, can they all share the 96 battery negative if it can be connected to ground? A schematic/block diagram would certainly help understand what you are doing.