I'm working on a zero crossing detector using an optocoupler, and to reduce the voltage from the mains (240v 50Hz), I took a little transformer from a 23 Watts CFL:

Transformer from a CFL

As I measured it, the secondary gives out 20-25V when open, but only 0.003V when connected to a 1K resistor.

The transformer have markings:


simulate this circuit – Schematic created using CircuitLab

Did I misidentify the component? It's broken?


I looked at the PCB and the unmarked pin in the "primary" side is unconnected to anything. The pin just sit in a hole in the plastic (no solder, no traces).

  • \$\begingroup\$ Are you sure about the resistor value? \$\endgroup\$
    – Eugene Sh.
    Oct 3, 2017 at 19:16
  • \$\begingroup\$ I read the bands and measured it with a meter. It's 1K Ohm. \$\endgroup\$
    – user83628
    Oct 3, 2017 at 19:19
  • 6
    \$\begingroup\$ This most likely is a flyback transformer. Which is a storage coil with a secondary winding. You cannot use it as a transformer. \$\endgroup\$
    – Janka
    Oct 3, 2017 at 19:22
  • 6
    \$\begingroup\$ And, in addition, for a "normal" transformer, you have to reduce the primary voltage as you reduce the frequency. E.g if the transformer is designed for 300V/3000Hz and you connect it to 50Hz only, you had to reduce the primary voltage to 5V to avoid core saturation. \$\endgroup\$
    – Janka
    Oct 3, 2017 at 19:29
  • 1
    \$\begingroup\$ That transformer cant be used on 50Hz. It's designed to operate under tens of kHz. By the way, CFLs need hunreds of volts, so measuring 25V across secondary while the input is 220V tells that the transformer is not working as it should. That is because the frequency is quite low. \$\endgroup\$ Oct 4, 2017 at 3:01

1 Answer 1


You can still use it as an isolation transformer. Keep the resistor on the secondary and use an opamp to detect the small +ve swing. Make sure that the opamp input can handle the -ve swing. Otherwise clamp that with a diode. You may need to go to 10k to increase the voltage. As said above, watchout for core saturation that will heat it up. This is a flyback transformer used to generate high voltage for the lamp.

Alternatively, salvage a transformer from a AC to DC adapter (not switch mode type). Keep the bridge but remove the filtering capacitor to get full wave rectified waveform. Reduce the output voltage further by using a voltage divider if needed.

An optocoupler will signal zero crossing around 2 volts (secondary voltage) earlier than the actual crossing. Better use an opamp with inverting input at a threshold voltage close to zero (ground) and keep the max input voltage (bridge peak output) much less than the absolute rating of the non inverting input.

Even in the case of a bridge there are two diodes in series to drop the voltage and the output will reach zero prematurely when secondary voltage is less than 1.4V. To go further, schottky diodes can be used or MOSFETs to do active rectification. https://en.m.wikipedia.org/wiki/Active_rectification

  • 1
    \$\begingroup\$ Please state that the AC to DC adapter must be of LF type, not SMPS. \$\endgroup\$
    – winny
    Oct 4, 2017 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.