Attempting to put up a shelf over the weekend to create my own lab, I couldn’t find my mains power tracer. These things are used to detect buried mains cables in walls; the detectors are low cost, and available at DIY stores. The more wiring that is stuck into homes the more important such a tool becomes.


With the local stores being shut on a Sunday, I figured it was time to either borrow one or build one.


This post documents an AC mains power tracer that can be built in a couple of hours. It has benefits over some store-bought models; it is ultra-sensitive, and requires no adjustment/calibration.



As usual, be careful with mains voltages. The circuit described here is not intended to be exposed close to uninsulated wires or open enclosures. It is an aid to locate live wiring behind walls.


Design Detail

Typical mains power line detectors are often integrated with metal detection capability too. The design I implemented only detects AC mains power.


Anyone who has experimented with field effect transistors will not have failed to notice that the extremely high input impedance allows you to have lots of fun with electrostatics. Charging up a comb or balloon and then bringing it close to the gate provides sufficient charge to control the FET. There are lots of classic circuits that can be googled based around the popular 2N3819 or MPF102 junction FET (JFET) devices to construct electronic equivalents of the old ‘gold-leaf electroscopes’, usually using not much more than a JFET, an LED and a battery.


It was time to try different things! There are some nice op amps available, so it was decided to construct an op amp based circuit and see how well it works.

If this was to be a low-cost design for DIY store, then a JFET or low-cost op amp circuit would be designed, perhaps with some nulling capability at switch-on, and an LED indicator.


For this design, some nicer parts are used. An analog meter is used to display the measured field. This is far better than an LED for this use-case in my opinion. As you drag the device across a wall, you can easily watch for the peak on an analog meter. I used a random meter from a junk box, but there are lots of options such as an edge mount panel meteredge mount panel meter or my favorite - a round meterround meter - both would work fine.



Furthermore, an interesting op amp from Texas Instruments was used for converting the tiny current from the electric field into a measurable quantity. The selected device, LMP7721LMP7721, is ideal for building a transimpedance amplifier to perform the current to voltage conversion.

The circuit diagram is shown below.



The photo here shows how it was constructed. The orange blob on top of the op amp is an axial 100nF capacitor100nF capacitor C1. The resistor you can see to the left of it is R1.



The op amp is available in an SO8 package, so a small SMD adapter board from TISMD adapter board from TI was used - the adapter board is great value, it comes with the terminal strips too, all ready to solder.

There is a 100 Mohm resistor100 Mohm resistor in the op amp feedback, and it was soldered in the air – the inverting input of the op amp was not soldered to the adapter board, but was carefully bent so that all soldering was in the air. Also, finger contact with the resistor and C2 and C3 was avoided to prevent grease (use tweezers).


Resistor R3 is a small, non-critical value (I used a trimmer resistor but it is not needed). I used a 200uA meter. R3 just provides some protection for the op amp and the meter. In a similar vein, R2 and C2 are an attempt to provide some protection from spikes. I’m not sure how effective it is, these values were not calculated nor tested.


The entire circuit is driven from a non-critical supply voltage of around 3V (I tested with a 3.3V supply). The non-inverting input is at the same voltage as the most negative supply. This is not usually good for an AC input, however it means that no rectifier is needed at the output. It was found the circuit as-is performs well. It is extremely sensitive, from the needle deflection you can sense mains power lines from a foot away (30cm).


The oscilloscope trace below shows the output when the circuit is held close to the mains supply cable to my desk lamp. It is quite a large output (20msec spaced peaks corresponding to 50Hz mains supply).



The circuit worked very well although I still have not fitted the shelf : ) As a reminder, don’t rely on the circuit – it is just an aid. I can’t guarantee its reliability or safety. It is an experimental circuit, not for DIY enthusiasts.


To make the circuit more usable/practical, I drilled out a hole for it in a Hammond enclosure Hammond enclosure (not got round to finishing that either!). I may power it from two N-sized batteries if they fit. A larger case and AAA batteries would be better.