I have a mains cable buried in the wall. I would like to permanently place a small battery powered device on the wall over the cable's location and have the device be able to detect if the cable is live at any time. Direct access to the cable is not possible, it stays buried.

Local mains power is 230 V at 50 Hz. Distance from the cable to the device (drywall thickness) might be 4 inches or so, no more than that.

For safety, the device is completely disconnected from mains power (hence batteries).

I understand that an antenna designed for sensitivity at 50 Hz would have to be large. But can I get away with a small dipole antenna (perhaps a few inches long) and a fairly large amplification factor? I'm hoping to use a microcontroller to determine if the 50 Hz is present or not.

I'd need a some sort of 50 Hz band pass filter between the antenna and the amplifier.

My oscilloscope can detect the all-pervading 50 Hz hum when touching the probe with my finger. If my body picks up the mains hum, then perhaps a custom antenna might be able to as well.

Is this feasible? How might I construct a suitable antenna, and amplify it to the point where a microcontroller might detect the change?

  • 2
    \$\begingroup\$ You can buy wire finders that do this so no reason you can't make your own. Maybe start with a commercial device and see how it works. \$\endgroup\$ Commented Jun 3, 2023 at 13:38
  • 1
    \$\begingroup\$ By “power flowing in the cable” do you mean that current of some level is being drawn, or merely that voltage is present? Battery powered with a push button to tead? \$\endgroup\$ Commented Jun 3, 2023 at 13:45
  • \$\begingroup\$ @SpehroPefhany, I've edited the wording in the Q, thanks. To answer your question: voltage only would be nice, but voltage and current draw would be OK (something like a small refridgerator would be running on this cable). Battery power will run a microcontroller that waits for a power cut and logs the time and duration. \$\endgroup\$
    – Wossname
    Commented Jun 3, 2023 at 13:49
  • \$\begingroup\$ You pick to your oscilloscope a voltage through the capacitor which contains you and one or more live wires in the mains AC network around you. Mains AC cable detectors for carpenters and decorators use the same basic idea. They help to avoid drilling and nailing cables. measuring through a wall how much current flows in a certain cable and what voltage it carries is a tough problem. I do not claim it's impossible but much more knowledge is needed than "there's some cable inside a wall and it feeds something" \$\endgroup\$ Commented Jun 3, 2023 at 14:11
  • \$\begingroup\$ @EdHalfsunk, or it might feed nothing at all. Yeah it's hard. Might be impossible, that's why I ask. :) I'm a novice in the field of RF and antennas and analog electronics in general. Please bear with me. Sometimes I don't know what information is needed. \$\endgroup\$
    – Wossname
    Commented Jun 3, 2023 at 14:17

2 Answers 2


The classic circuit for non-contact voltage detection is just a high-impedance amplifier with some kind of signal conditioning (if necessary) to turn the AC into a sustained signal (eg. for a buzzer).

It may or may not work in your situation depending on the local wiring norms, how much may be picked up from capacitive coupling to other wires etc. I suggest giving it a try with a simple circuit such as this one (which uses a single 74HC14):

enter image description here

All you need for testing is one gate and three resistors R1, R2, R3. You can observe the output of U1a with an oscilloscope or just hang an LED with a few-KΩ resistor to ground on the output. You may need to ground the circuit in practice- hand-held devices may not work without the hand (and attached human body). If there is a usable signal there, you can use the rest of the circuit and take your output signal from U1d (if you want a visual indicator, replace Q1 with a 2N7000 to avoid loading it and increase R7 considerably for a 5V supply).

If it works, you may be able to use the output to wake an MCU to do the logging then return to sleep, with low enough power consumption to operate continuously from battery power.

  • \$\begingroup\$ I'll try this. I've got some 74HCT14s. My micro will be running from 3.3V or 5V. \$\endgroup\$
    – Wossname
    Commented Jun 3, 2023 at 14:58
  • \$\begingroup\$ Do you have an idea of what kind of antenna would be suitable? I've got some RG174 I can wrangle into some sort of dipole. Or perhaps some other type? \$\endgroup\$
    – Wossname
    Commented Jun 3, 2023 at 15:00
  • \$\begingroup\$ I would try some copper tape stuck to the wall. It's not really an antenna, more of a capacitor plate. \$\endgroup\$ Commented Jun 3, 2023 at 16:00

I've prototyped and smart device capable of energy harvesting and measure it. It is available on GitHub here: https://github.com/aeonSolutions/Aeonlabs-Home-Automation-Smart-EMF-Shield-Curtain-for-Windows-and-Balconies

I'm using the ADS1115 IC to do the measuring readings from the 2 capacitors after the diode bridge (see the circuit schematics below). It is a simple circuit and it can be made to detect all types and ranges of frequencies and send it to my home server or smartphone app.

enter image description here


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.