1

I have a portable generator I am going to use with an interlock system, which prevents back current to the grid, to power the house during outages. Knowing I would need a power return alarm to notify me when the power is restored I made something similar to this with CT clamps (Yhdc Model SCT-013-000) and a Wemos D1 Mini running through Home Assistant.

I am getting close to finishing my box, which also has meters to measure the generator current so I can balance the two sides of the box, and everything is bench testing perfectly. Unfortunately, a thought occurred to me today. If the main breaker is off no current will register on the CT clamp when the power returns and I should have been looking at a voltage sensor solution all along.

A few questions and thoughts I would like to put out there for feedback.

  1. Would the house electrical meter draw enough current itself when the power returns to trigger the CT clamp?
  2. Testing the CT clamp itself with a multimeter and feeding 120VAC it registers 0.200 volts on the meter. Could I still use the CT clamp as a voltage sensor and feed it to a GPIO pin to register as on or off? The voltage seems low but maybe use an optocoupler?
  3. As another alternative would a DIY Non Contact Voltage Tester fed to a GPIO pin be a good idea? I would assume I could just wrap the antenna wire around one of the main lines coming into the electrical box? I did notice commercial versions meant for power restore have a ground line as well, I am not sure why, or maybe they use a different technology than a non contact voltage tester?
Hartman9
  • 57
  • 1
  • 6

1 Answers1

0

Something like this should do the trick. What is in the box is a optocoupler with transistor detector. (CircuitLab does not have a symbol for such.)

schematic

simulate this circuit – Schematic created using CircuitLab

Be careful with your wiring. 120 V can be fatal. If you are inexperienced or unsure how to proceed, you should use a "no-contact" voltage detector. However, make certain the circuit cannot drive the GPIO pin too high or too negative.

A google search for "mains voltage detector" brings up many ads for pre-built circuits similar to the one above, although slightly more complex. These pre-built circuits are quite inexpensive, but one still needs to be adequately skilled in mains voltages to work with one.


A "no-contact" mains voltage detector might be implemented as follows.

schematic

simulate this circuit

The coil symbol in this schematic is an actual coil of (insulated) wire, wrapped around the mains cable whose voltage you want to detect. However, it is not really an inductor, but forms a capacitor with the mains cable. Note that the mains cable needs to be an unshielded (but insulated) cable. The number of turns needs to be determined experimentally. The gauge of the wire is not critical, so if you have something at hand, you may use it. Be sure to test to see if you have the right number of turns. The GPIO pin will be brought LOW if there is sufficient voltage picked up by the coil. If there is not sufficient voltage, the GPIO pin will be HIGH.

Math Keeps Me Busy
  • 18,947
  • 3
  • 19
  • 65
  • So I am clear you are saying to run the Yhdc Model SCT-013-000 clamp through an optocoupler and use the other side of the optocoupler to drive a transistor which will trigger the GPIO? So this means the optocoupler can pick up the 0.200VAC? – Hartman9 Nov 11 '21 at 20:23
  • No, don't use the clamp. The clamp detects current. You want to detect voltage. This circuit connects to mains line and neutral. However, it is perhaps not for you. Perhaps it would be best for you to use a no-contact voltage sensor. – Math Keeps Me Busy Nov 11 '21 at 20:27
  • Correct, I prefer a non contact solution. Would something like [this](https://www.electronicshub.org/non-contact-voltage-tester/) work and instead of driving the LED I could just drive 3.3VDC to a GPIO on the Wemos? I also assume the antenna could just be coiled physically around one of the hot poles coming into the service box? – Hartman9 Nov 11 '21 at 21:01
  • I have added a non-contact circuit. The output will be _LOW_ when there is voltage present. You will need to determine the number of turns experimentally. It will depend upon the insulation thickness of the mains wire. – Math Keeps Me Busy Nov 11 '21 at 21:47
  • Thank you so much I will definitely give this a go and let you know. Does the length of the antenna wire matter? I would have to run it into the service box from the outside and then coil it around the mains wire. This could be a few feet, will this be an issue? – Hartman9 Nov 11 '21 at 22:08
  • 1
    Note depending on where you live, you might have two "hots" at the panel - 120V+120V=240V. If so, you may want to sense *both* of those, on the rare chance that only one is working. – rdtsc Nov 11 '21 at 22:15
  • @Hartman9, a long wire could be a problem if it goes near a wire powered by your generator. The generator voltage could cause the circuit to activate even though the mains is off. Other than that, the length of the wire should not be a problem. – Math Keeps Me Busy Nov 11 '21 at 22:22
  • The generator breaker and wires will be at the left middle of the box, this wire will be going to the top right of the service box so I think I am ok. Thanks again so much for your help. – Hartman9 Nov 12 '21 at 00:30