Maker Pro
Maker Pro

How to detect actuator feedback voltage using Arduino/esp32?

MrNams

Aug 28, 2021
10
Joined
Aug 28, 2021
Messages
10
Hello,
I am operating motorized ball valve using ESP32 and relay module, ball valve has two feedback voltage to detect close and open position of valve, there are two output wires one to detect close state and one to detect open state of valve. see below image.

My question is how to collect feedback using Arduino/ESP32 to detect open/close state of valve ?
Open state voltage between "R1(BLUE) and Negative(BLACK) will be 24v DC
Close state voltage between "R2(YELLOW) and Negative(BLACK) will be 24v DC
Sa502-24vdc-5-wire-with-feedback.png ‎- Photos.png
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
Connect two resistors (in series) between the blue wire and ground. 'Top' resistor should be five times the value of the lower resistor (i.e. if you use 10k for the bottom resistor, use 50k (or 47k as the nearest standard value) for the top resistor).

The voltage between the junction of the two resistors and ground will be either 5V (thereabouts) or 0V depending on the state of the valve. Do the same for the yellow wire.

You will need to use both the blue and yellow as there is no reliable way to determine that the valve is DEFINITELY open (or closed) due to a possible indeterminate state i.e. half way open/closed. in this case both the blue and yellow voltages will be 'indeterminate' (tell us!).

Check that the blue and yellow wires actually do produce a 0V signal before attempting to connect this to your Arduino.
 

MrNams

Aug 28, 2021
10
Joined
Aug 28, 2021
Messages
10
As per supplier of this valve feedback voltage will be either 0 or 24v i.e. no intermediate value,in case valv at mid then both will show 0v
 

MrNams

Aug 28, 2021
10
Joined
Aug 28, 2021
Messages
10
As per supplier of this valve feedback voltage will be either 0 or 24v i.e. no intermediate value,in case valv at mid then both will show 0v
 

MrNams

Aug 28, 2021
10
Joined
Aug 28, 2021
Messages
10
How to measure 24v DC in ESP32?
1) using voltage sensor.
Interfacing-diagram-of-the-voltage-sensor-with-ESP32.jpg
2) Using Optocoupler Isolation
PC817-Optocoupler-Isolation-3.jpg
3) Using voltage divider resisters
ca0433a6920db19d900cdbacc4a2123f5f6a939c.gif
Which is most efficient to detect 24v dc?
 
Top