Zero-crossing PIC style?
K2
Posts: 693
If this has already been addressed, I couldn't find it using the forum search feature.
For zero-crossing detection of AC mains using a PIC processor, a simple method sometimes used is to connect an input pin of a PIC through a 20M resistor directly to 120VAC, relying on the input protection diodes of the pin to prevent latch-up. Can the Propeller can be used in this manner?
Obviously there are other ways to do this. And obviously there are other issues that arise when no dc isolation is present. But my question today deals just with the feasibility of a high-value resistor between the hot lead of an AC outlet and a Propeller pin.
If the pin isn't guaranteed against latch-up when used in this manner, I suppose I could use two Schottky diodes to protect the input. But I'd rather avoid the expense and the additional junction capacitance, albeit small.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The early bird gets the worm but the second mouse gets the cheese.
For zero-crossing detection of AC mains using a PIC processor, a simple method sometimes used is to connect an input pin of a PIC through a 20M resistor directly to 120VAC, relying on the input protection diodes of the pin to prevent latch-up. Can the Propeller can be used in this manner?
Obviously there are other ways to do this. And obviously there are other issues that arise when no dc isolation is present. But my question today deals just with the feasibility of a high-value resistor between the hot lead of an AC outlet and a Propeller pin.
If the pin isn't guaranteed against latch-up when used in this manner, I suppose I could use two Schottky diodes to protect the input. But I'd rather avoid the expense and the additional junction capacitance, albeit small.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The early bird gets the worm but the second mouse gets the cheese.
Comments
Two resistors were going to be used, but you have me thinking that possibly more might be in order.
I certainly agree with your assessment of the need for isolation inasmuch as the circuit will be riding on the neutral leg.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The early bird gets the worm but the second mouse gets the cheese.