Read State of Contactors

Thread Starter

danicklin

Joined Dec 5, 2021
8
Background
Previously I posted a thread about controlling 24V relays with an ESP32. With the help of this forum I now have the control section working correctly.
Unfortunately I am not in the same country as the controller but still need to continue designing even though I am temporarily unable to test.

The purpose of this project is to control a medium sized heating system from a IOT controller. The system is over 30 years and the original controller is no longer working.

There are 4 main pumps that circulate water through the two boilers and around the house. These are running on 200V and are controlled by contactors. They can be placed in auto (controller)/manual (controlled by push buttons)/off mode. The contactors are Mitsubishu UA-AX4.

2022-05-23 18.15.31.jpg


When in auto mode, the contactors are controllers by 24V relays (Omron MY-2). There are two relays per contactor, one to turn it on and the other for off. These are then connected to the main control board in the house.

2021-04-30 09.51.30.jpg


Control System
Using an PC817 optocoupler, PNP transistor and Omron MY-2 relays.

Untitled.png

Feedback System
In order to know the state of the pumps and additional devices in the system, I need to check whether the contactors or switches are closed.
Distance between the contactors and relays in the boiler room and the controller is roughly 30 meters, single-strand copper around 16/18 gauge.

Previous System
I assume that this is the feedback part of the original controller, using 1 capactor, 2 diodes and 3 resistors for each switch input. But it doesn't power on so I can not test the voltage.

2022-05-11 20.33.39.jpg

Option 1
Similar to the design I used for the control side, I thought about using 24V controlled with optocouplers. This would then provide some isolation to the micro-controller but I am not sure if it is necessary. TP will be connected either directly to an ESP32 or an IO expander such as MCP23017.

circuit-20220606-1648.png

However this would result in the LED either being permanently on or off, with no change based on the actual state of the contactor.

This then lead me to believe that there was either a connection issue or I have selected the wrong type of optocoupler for this purpose. Possibily need either a different CTR value or need to change the resistor values.

Option 2
This option is based on another thread from this forum after researching. 24V with potential divider and/or diodes. But changing the values to be compatible with 3V for the ESP32.

Untitled (2).png
Untitled (1).png

Option 3
3V direct from ESP32 throught contactor to a digital input pin. Digital pin set to input and 10K internal pull-up resistor.
circuit-20220607-1524.png


This seems like the simplest solution but is it susceptible to noise or voltage drop? What kind of protection is needed (if any)

Conclusion
Please let me know if anyone has designed a controller for a similar system and which, if any, of the options seem the most suitable
 

Attachments

panic mode

Joined Oct 10, 2011
2,167
if you want to know the state of contactors, monitor contactors. do not monitor interposing relays (MY2N) or driving optocouplers.

just use one of the contactor contacts as an input. if they are all used, add aux contacts.
 

panic mode

Joined Oct 10, 2011
2,167
btw, i find it insane to draw 105mA from 24V circuit just to sense if it is powered or not. that is a lot of heat... but i guess first circuit in Option 2 was meant as a crude PSU. even if you want to light an LED, 5mA will do nicely. your second image in Option 2 is without LED but much more like it.
but R1 in that case still need to be sized correctly or removed.
 
Last edited:

Thread Starter

danicklin

Joined Dec 5, 2021
8
if you want to know the state of contactors, monitor contactors. do not monitor interposing relays (MY2N) or driving optocouplers.

just use one of the contactor contacts as an input. if they are all used, add aux contacts.
I am monitoring the state of the contactors.

Feedback section of the system is contactors -> Optocouplers/Potential Divider/Other Options etc...

The control side of the system is optocouplers -> Transistor -> Interposing Relays -> Contactors

These are two separate systems that will be validated in the code to ensure that everything is working correctly
 

Thread Starter

danicklin

Joined Dec 5, 2021
8
btw, i find it insane to draw 105mA from 24V circuit just to sense if it is powered or not. that is a lot of heat... but i guess first circuit in Option 2 was meant as a crude PSU. even if you want to light an LED, 5mA will do nicely. your second image in Option 2 is without LED but much more like it.
but R1 in that case still need to be sized correctly or removed.
I agree that it does seem particularly wasteful to draw 105mA to check the state of each contactor. Even with a higher value resistor.

Therefore do you think it would be best to use a lower voltage than 24V?

The system will be powered by a 24V power supply, the controlling relays require this to operate. But this will be dropped down to power the ESP32 at 3V. Is 3V enough to reliably measure the state of each contactor?
 

eetech00

Joined Jun 8, 2013
3,206
Seems that "option 1", with the PC817 at the MCU location, and the 30 meter 24v run with twisted wires to the opto, creating a simple current loop, should have worked nicely (assuming the PC817 input is connected thru a monitored contactor). It would offer some noise and transient protection.
 

panic mode

Joined Oct 10, 2011
2,167
exactly. and since contact is galvanically isolated you can connect it to anything, regardless of voltage used by circuit (it can go directly to Arduino or ESP).

i am guessing that all the contactors are in one place. if there is several of them it would make sense to monitor them right there and only transmit data to remote location. why not put ESP32 right there and avoid running 30m cable?
 
Last edited:

Ian0

Joined Aug 7, 2020
5,504
I'm with @MaxHeadRoom on this - just add some auxiliary contacts. That's what they are for - monitoring the state of the contactors. The white peg visible in the centre of the contactor operates the aux contact.
 

MisterBill2

Joined Jan 23, 2018
12,399
I have seen, in plastic molding machines, small current transformers used to verify that heaters are working. A similar device could work very well in this application.
 
Top