Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!
Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.
Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!
Check if an 24VAC ouput is powered
December 13, 2020 3:41 AM
Maybe it is a stupid question but I didn't found the answer.
I need to check with an Arduino if an output of my garage door motor is powered.
It is a 24VAC output, usualy to connect an additionnal light.
I can change the tension with a 24VAC-5VDC module. But I dont know if I can use this directly on an input of the Arduino.
For information I can't use this output to powered my Arduino. I need it to be powered at other times.
Could you explain to me how to do this please ?
December 13, 2020 5:39 AM
As you already figured out, straight 24V would be bad and a 24v-5V module could bring this down to 5V.
Arduino analog inputs can be used to measure DC voltage between 0 and 5V.
I did find this little project that may be helpful for this approach.
However, I'd considering something easier, like for example a 24V relay.
You'd only need to connect the switching part of the relay to the arduino.
When the motor is switched on then the relay will switch to ON. When power is dropped, it will go back to OFF.
So you can get away with something like the Arduino Button example to read if the motor is powered or not.
December 13, 2020 7:05 AM
I wanted to use a relay but I didn't find one with a 24VAC input except power relay. I will keep looking for one.
Alternatively I will use the little project that you found.
December 13, 2020 7:15 AM
Another, maybe cheaper and more compact option to explore would be an optocoupler. 😊
(I'm not a fan of anything mechanical, especially when I can replace it with something non-mechanical)
December 13, 2020 7:37 AM
I didn't know this component so I have to do some research but it seems it is a much better solution than mine and I think I will try it.
Thank you very much.