Monday, June 20, 2016

Consider the Continuity Tester

It has been argued that the continuity tester is one of the most essential pieces of equipment for a blind electronics maker. It is a device which provides accessible feedback when current flows in a circuit -- basically an Ohmmeter or resistance meter. A continuity tester with audio or tactile output provides an accessible way of testing and even identifying components, leads, and connections, tracing paths on circuit boards, checking solder joints, and even making other simple measurement tools such as light detectors and thermometers. While the sighted person finds occasional uses for an Ohmmeter, the continuity tester is an indispensable and pervasive tool for the blind maker. I cannot over emphasize the importance of having one.

They come in a variety of flavors, from simple circuits which buzz below a specified resistance threshold to oscillators that vary the pitch of an audible tone depending on the amount of resistance in the circuit. The classic continuity tester described in the following section, as well as many other awesome accessible continuity tester circuits and their uses, are fully documented in the Fall, 1982 issue of the Smith-Kettlewell Technical File. Advanced makers should definitely study these for insight into some old-school accessible test equipment.

The Classic Continuity Tester

The classic Smith-Kettlewell continuity tester is an elegantly simple circuit which makes for an excellent first soldering project (read the Soldering Series in the Smith-Kettlewell Technical File for all the information you need on blind soldering techniques). If you're planning to build electronics, make stuff with Arduino, or otherwise make a habit of messing around with wires and components, I strongly recommend building one. It's reliable, versatile, and extremely nice to have around.

Building the Classic Continuity Tester

The continuity tester's oscillator consists of an audio output transformer and a PNP transistor. An 8 Ohm speaker is connected across the leads of the low-impedance secondary of the transformer. The primary of the transformer has a center tap which connects to the emitter of the transistor. One end of the transformer's primary connects to the Positive terminal of a 9-volt battery. The other primary lead connects through a 0.022 uF capacitor to the base of the transistor. Across the entire primary is another 0.022 uF capacitor. The base of the transistor connects through a 22K resistor to the positive test terminal. The negative test terminal connects to the collector of the transistor and the negative terminal of the battery (ground). That's it!

A Simple Arduino-Based Continuity Tester

While the continuity tester described above is extremely simple and reliable, you may not have these capacitors, transformers, or transistors readily at hand. Possibly you aren't yet confident enough with a soldering iron to build it. Sometimes you may want to slap a continuity tester together using an Arduino and a couple of resistors. The following sketch makes a reasonably handy audible continuity tester, although the classic continuity tester described above is superior in most ways.

Building the Arduino Continuity Tester

Connect a 1 mega Ohm resistor and a 1 kilo Ohm resistor to analog pin 0 of the Arduino board. Connect the other end of the 1 mega Ohm resistor to ground and the other end of the 1 kilo Ohm resistor to +5v. Connect a piezoelectric buzzer to digital pin 9 and ground, (or you can substitute a speaker in series with a 100 Ohm resistor). Connect the positive test lead to analog pin 0 and the negative test lead to ground.

Programming the Arduino Continuity Tester

Copy and paste the following sketch into your development environment, make any desired modifications, and upload it to your Arduino. You can also download the continuity tester sketch here.

/*
Simple Audio Continuity Tester

Wiring Description
Parts: 
Resistors -- 1Meg, 1K, 100 Ohm.
8 Ohm speaker or piezo buzzer
jumper cables and test leads
Arduino...

Connect buzzer to pin 9 and ground.
If using a speaker, connect one side to pin 9. 
The other side of the speaker goes to 100 Ohm res, which goes to ground.

Connect 1K to +5V. The other end connects to a junction which includes the positive test lead, analog pin 0, and  the 1M. 
The other end of the 1M goes to ground. 

The negative test lead also connects to ground.

When there is no connection between the test leads, the speaker is silent. It begins to click when there is some conductivity, and produces a 500 Hz tone when there is no resistance.

Play with resistor values and the mapping of reading to ici to optimize for the range of sensitivity you need.

By Josh Miele
The Blind Arduino Project, June 17, 2016.
http://bit.ly/blarct01
*/

int sensorPin = 0; //the pin connected to +test lead
int speakerPin = 9;  //connected to speaker or buzzer
int thresh = 1000;   //above this sensor val no sound is played
int reading = 0;  //analog input value somewhere between 0 and 1023;
int ici = 0;   //inter-click interval in ms. Shorter for lower resistance values.

void setup() {
 pinMode(speakerPin, OUTPUT);    //speaker (or buzzer) pin 
 pinMode(sensorPin, INPUT);   //connected to +test lead
}   //end of setup

void loop() {
 reading = analogRead(sensorPin);  //measure voltage across 1Meg Ohm
 if (reading < thresh) {
  //if reading is less than threshold then speaker clicks
  //play a 500 Hz click 5 mS long
  tone(speakerPin, 500, 5);   
  //scale reading val to delay value in mS
  ici = map(reading, thresh, 0, 200, 0);  
  delay(ici);   //wait before playing next click
 }   //end of if
}   //end of loop