I'm wanting to take a frequency reading from one leg of a three leg AC generator to find its rpm. Many rpm counter projects I found were Hall effect or IR. The gen has test points for AC voltage that banana clips can plug into.
I was planning to use a transformer from inside a cell phone charger, one diode and resistor. Use that half rectified circuit to turn on a BJT in a 3.3v circuit to make a square wave for the controller to use.
You don't get mains transformers inside phone chargers these days, all switchmode (some will have a small
ferrite transformer that will not work at mains frequency - never ever connect these direct to the mains)
If the generator speed isn't varying much use an series cap+resistor dropper into an opto-isolator perhaps?
You need a back-to-back diode across the opto isolator input as the reverse voltage rating is small for all LEDs.
Well that's only a 3:1 range in voltage to handle, not as bad as 10:1. I think opto-isolator is worth trying,
simple and safe, smaller than using a transformer too. However a large ratio in voltage and frequency suggests
a purely resistive dropper might be a better contender.
No specific opto, there's no special requirements. Just a standard one with a backwards connected diode to protect the LED inside the opto coupler.
At 240V the resistive dropper needs to be something like 22k 5W, the high dissipation can be reduced if you
are prepared to run the opto-coupler at lower current, so 47k 2W perhaps.
At the receiving side there should be well defined 1/2 cycle conduction pulses which ought to be pretty simple to deal with - experiment with load resistance of the output and you may find you get fairly clean signal from
a digital pin (some debouncing is probably needed, but only on short timescale).