OK. This is going to sound wierd and no one is going to understand why I need to do this, but here goes:
I need to be able to measure the time at which AC power is lost from an AC/AC power supply. Specifcally, I am using a Doble power power supply (in this case the F6150sv) to provide an output AC signal. This is not being used to power anything. At some point the power from the Doble will be turned off. I need to be able to determine at exactly what time that happens. The reason for this is that I must begin timing and signal the loss of power at exactly (or as close as possible to) 8mS. This is being done to verify the Doble timing circuit. I am using a PIC 16F1519 to produce the output signal and I can get that to occur within 0.0125% of 8mS (reliably) given an interrupt on portb (probably don't need to know that, but there it is anyway). The circuit is like this: Doble supplies ac power signal to controller which monitors (this is what I don't have yet) the signal. when the signal is lost, the Doble timer starts and waits for a signal on its relay contacts. The controller waits 8mS and generates an output to the Doble relay contacts. This will stop the Doble timer. The times are then compared to determine if the Doble timer is reading accurately (I hope that's clear).
The problem is this: I have not found a way to capture the loss of AC voltage out from the Doble. I have tried simple RC networks with a known tau, fast ac relays so far and have not had any real success. The time delay between actual power loss and the time when the microcontroller can sense the loss is far too long. I have not yet tried to use the A/D converter in a loop, but even then I think I may wind up way off.
Can anyone think of a way to capture this? I'm really at a loss at this point?
I need to be able to measure the time at which AC power is lost from an AC/AC power supply. Specifcally, I am using a Doble power power supply (in this case the F6150sv) to provide an output AC signal. This is not being used to power anything. At some point the power from the Doble will be turned off. I need to be able to determine at exactly what time that happens. The reason for this is that I must begin timing and signal the loss of power at exactly (or as close as possible to) 8mS. This is being done to verify the Doble timing circuit. I am using a PIC 16F1519 to produce the output signal and I can get that to occur within 0.0125% of 8mS (reliably) given an interrupt on portb (probably don't need to know that, but there it is anyway). The circuit is like this: Doble supplies ac power signal to controller which monitors (this is what I don't have yet) the signal. when the signal is lost, the Doble timer starts and waits for a signal on its relay contacts. The controller waits 8mS and generates an output to the Doble relay contacts. This will stop the Doble timer. The times are then compared to determine if the Doble timer is reading accurately (I hope that's clear).
The problem is this: I have not found a way to capture the loss of AC voltage out from the Doble. I have tried simple RC networks with a known tau, fast ac relays so far and have not had any real success. The time delay between actual power loss and the time when the microcontroller can sense the loss is far too long. I have not yet tried to use the A/D converter in a loop, but even then I think I may wind up way off.
Can anyone think of a way to capture this? I'm really at a loss at this point?