12vac to 5vdc interrupt

Hi, I have a 12vac, 2Amp output that I would like to interrupt a pin on an Arduino to give me a 5vdc signal.

What would be the best way to achieve this, pls?

Where in the AC signal do you want the interrupt to occur?

Oops

Anywhere really, but I am minded for a high 5vdc input on an arduino sense pin. I was wondering if I could get away with a diode half wave rectifier and then a resistor voltage divider to get the 5vdc?

https://www.mouser.com/datasheet/2/149/HCPL3700M-837969.pdf

Use an opto isolator or a relay

That would work with the addition of a capacitor to hold up during the non-positive cycles. Seems to me that your proposal is simple, low cost and effective.

What is the purpose of the interrupt? When power goes off or when power goes on?

Don't do it. The cap will charge to over 7 volts and kill your 5 volt Arduino pin.

Nah, the capacitor will not increase the voltage as you imply. It all depend on the voltage divider.

Try it. The cap charges to the peak of the AC voltage pulses.

Exactly, the peak is there irrespective if a capacitor is fitted on not.

Of course the cap forms a low pass filter with the voltage divider resistors and this way it decreases the peak.
(Imagine very large cap and very large resistors - you will get average voltage without any peak.)

The diode and the cap form a peak detector. (A crude sample and hold circuit.) A low-pass filter will tend to remove distortion products and harmonics, but will not simply just act on the peak.

image
I've ignored diode volt drop and cap value can be calculated by 'knoba'

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.