Low Power Continuity Tester

An extremely simple, dependable continuity tester

Similar projects worth following
Low-power feature-packed continuity tester designed for the square inch contest.


The design goals for this project are the following:

  • Small size: 1 square inch PCB area maximum.
  • Low power: Should run a decent amount on time on a single CR2032 cell.
  • Fully featured: Have at least:
    • Low voltage continuity test mode: Compliance voltage < 0.5v, low current.
    • Inverse continuity mode: Beep if continuity is broken.
    • Both modes with "latching" glitch capture: start beeping immediately and keep beeping for at least a split second.
    • Diode test mode: Short beep on forward voltage within diode drop (0.1-0.7v), continuous beep on short circuit.
  • Simple to use: no power switch, turn on by touching probes, mode switch with a single button.
  • Low cost


To achieve all those goals I decided to base my implementation around a microcontroller, namely the PIC12LF1571, which is a stunningly cheap and feature packed device. Digikey has it for 50 cents a piece at quantity 10! that's barely 17 cents more than what you'd pay for a humble 555! For your 50 cents you get quite a spread of peripherals: a fixed voltage reference, a 10 bit adc, a 5 bit DAC(!), 3 16-bit PWMs (!!), the standard 3 timers on top of that, analog comparator, 3.5k of flash and 256 bytes of SRAM. Truly remarkable.

Another remarkable thing about this chip which makes it suitable to achieve my goals is that it can be made to operate under very low voltages (down to 1.8v) and using very little power. As low as a few hundred nanowatts (that's less than a millionth of a watt) while sleeping, allowing standby times measured in years.


The analog part of the circuit is extremely simplistic, just 3 resistors. The design is inspired on elm-chan's tester, but with an additional IO pin on the negative side of the resistor divider. This extra pin provides additional control for the diode test feature and allows the tester to be turned on by touching probes.Schematic DiagramThe simplicity of the circuit is also it's Achiles Heel, it doesn't provide any input protection at all, relying instead on the built in protection diodes of the microcontroller. The reason why I didn't include any input protection is because I couldn't find any protection scheme that would afford enough protection without compromising power consumption or precision. For example, using a simple 3.3v zener diode on the input would leak an appreciable amount of current at 3V, so much in fact that the diode itself would consume more power than the pic does while asleep! This circuit should never be used on circuits under power, and certainly NOT anywhere near any mains/line power cables!


The firmware is written in C, using Microchip's MPLAB X and XC8 compiler in free mode. The code is configured as a simple state machine:

The CPU runs at the slowest internal oscillator speed (31kHz) to save power. On reset it jumps straight into sleep mode, where it lays dormant until a button press is detected or the leads are touched together. That is achieved by setting up an interrupt on pin change right before going to sleep, the interrupt hardware still works without a clock, which allows the processor to still be useful while only using less than a microwatt of power.

Once it's woken up, the microcontroller enters a loop where it continuously samples the ADC, detecting whether the resistance in between the probes is low enough to signal continuity or not. The ADC module and voltage references are turned on and off as necessary to use as little power as possible. While in this mode I've measured an average current consumption of around 150 to 200 microamps, which would allow the tester to have over 800 hours of battery life.

Each idle state blinks the led to signal which mode the tester is in, for continuity it's a single blink followed by a long pause, for inverse continuity it's 2, and for diodes it's 3 fast blinks followed by a long pause. The user can switch modes by pressing the button.

When the condition of continuity (or discontinuity) is detected, the beeper is turned on, using one of the PWM channels to output a square ...

Read more »

  • 1 × PIC12LF1571 8-Pin MCU
  • 3 × 22k 0805 Resistors
  • 2 × 4k7 0805 Resistors
  • 1 × 100nF 0603 Capacitor For decoupling
  • 1 × Linx BAT-HLD-001-THM CR2025/2032 battery retainer, through hole

View all 9 components

  • It works!

    Jose Ignacio Romero12/22/2015 at 22:30 0 comments

    I've made a short video showing the meter's features and power consumption:

    I intended to do a voice over but my voice is not cooperating, so I just uploaded the script as a subtitle file so you can read along.

  • Binary release on GitHub

    Jose Ignacio Romero12/07/2015 at 00:41 0 comments

    Released all firmware and board files on github, including gerbers and precompiled .hex file for loading on the microcontroller. Available at

  • Project files released on GitHub!

    Jose Ignacio Romero11/27/2015 at 04:57 0 comments

    Got all design and firmware files together and released on github at I'll update the repository as I keep working on the project.

  • Firmware design

    Jose Ignacio Romero11/21/2015 at 05:14 0 comments

    This is the basic state diagram for the continuity tester firmware. I opted to design it using a state machine since there are clear discrete states and transitions for each condition and mode the device can be in. Basically, there are 3 main groups of states, sleep, idle and beep, only the conditions that trigger the transitions change. The diode test mode has an additional "Diode OK" state which silences the beep after a quarter second if the voltage is within a diode drop.

  • Prototype 0

    Jose Ignacio Romero11/20/2015 at 17:58 0 comments

    To get the principles right before making PCBs I worked on a breadboard prototype using a PIC12F683 as the main processor, by using the slowest internal clock and sleep modes I managed to keep system-wide power consumption around 1µA while "off", 200µA when idle, and less than half a milliamp while beeping.

    This is the schematic, not shown are a 100Ω resistor and extra capacitance used to measure power consumption (can be seen in the back of the breadboard, hooked up to the probe.)

    The heart of the tester is the circuit formed by the GPIO pins GP0, GP1 and GP4, and resistors R3, R4 and R5. The PIC controls them to create 3 different circuit configurations:

    Read more »

View all 5 project logs

Enjoy this project?



sidsingh wrote 03/20/2018 at 04:37 point

Nice Project and well documented. I like these features and need to build one, but do not have PIC12LF1571. I have several PIC10LF322 (6 pin) controllers.  I am currently bread boarding my design and hope to roll out one by next week.

  Are you sure? yes | no

sidsingh wrote 03/22/2018 at 13:04 point

  Are you sure? yes | no

Brian wrote 12/23/2015 at 08:07 point

I like your project. Could you have the tone of the beep change with the resistance of the connection under test?

  Are you sure? yes | no

Jose Ignacio Romero wrote 12/23/2015 at 20:26 point

Been thinking about implementing that, it doesnt seem to be too hard. I'll do it when I have time :)

  Are you sure? yes | no

alpha_ninja wrote 12/21/2015 at 07:49 point

Please make sure to upload photographic or video proof of this project and its PCB working by the next deadline (in about two days!)

  Are you sure? yes | no

Jose Ignacio Romero wrote 12/22/2015 at 22:31 point

Whoops, been really busy but managed to make a short video showing it off, posted as update.

  Are you sure? yes | no

alpha_ninja wrote 12/22/2015 at 22:34 point

You're fine... the deadline has been pushed back anyway :)

  Are you sure? yes | no

alpha_ninja wrote 12/07/2015 at 01:19 point

[verified: no design files missing]

  Are you sure? yes | no

alpha_ninja wrote 12/02/2015 at 00:43 point

This is your one-week reminder to upload design documents:

  Are you sure? yes | no

Martin wrote 11/27/2015 at 09:00 point

You do not need to have too much fear about protection. The internal protection diodes are quite good. They are specified for a max. clamping current of 20mA. Your lowest resistor to a Pin is 4k7, so the microcontroller is safe up to 94V. But the resistor would get 1,88W of power, so it would burn open in about 2 seconds. Otherwise you would need something like a 2512 size.

  Are you sure? yes | no

Jose Ignacio Romero wrote 11/27/2015 at 23:19 point

I actually thought of that, but one thing that needs to be considered is the fact that the current has to go somewhere. Right now the CPU doesn't even consume a single milliamp. So, for positive overvoltages, practically all the current needs to be dumped back into the supply, I'll have to run experiments to see if it's safe to dump that power on the battery without the positive rail soaring above 4 volts (which would damage the part). If my gut is right this circuit should survive brief accidents with voltages around 10~24V, so it's perfectly suited for checking at the circuit board level (energies less than CAT I).

But yeah as you said, the circuit is perfectly usable without more robust protection. Just wanted to make clear this is not an electrician's tool (yet) :)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates