Introduction: Talking Resistor Calculator

Even at 40, I still think of myself as a young guy, but my eyes... not so much anymore.  From my electronic microscope to my Aladdin Rainbow reading machine, I've taken every step to make sure that vision isn't an issue, but sometimes reading the bands on a simple resistor is still a big pain.  Is that an orange stripe or a red one?

Talking Resistor Calculator speaks to tell you what the value of your resistors.



Parts list:
  • Your favorite Propeller board. (I'm using a Quickstart w/Protoboard)
  • An Amplified Speaker
  • An Alligator clip wire
  • A MCP3208 ADC Chip (and possible socket)
  • A 10K resistor
  • A 3,3K resistor
  • A bunch of resistors that you don't want to try to read.

Step 1: The Schematics

If you've got a Propeller board with an established audio circuit, then you'll only need the ADC circuit.

We'll be using Propeller pins P21, P23, and P24 with the MCP3208.  
This ADC is capable of 8 channels of input, but we'll only need CH0

If you need to create and audio circuit, refer to the second photo.  We'll be using Propeller P11

Step 2:

I've got the QuickProto board from Gadget Gangster, so I've included a simple visual instruction for making the connections as well.

Here are the connections for the top row of the MCP3208 chip.
  1. Jumper ADC pin 16 to V3.3
  2. Jumper ADC pin 16 to pin 15
  3. Jumper ADC pin 14 to Vss (Ground)
  4. Jumper ADC pin 13 to P21
  5. Jumper ADC pin 12 to ADC pin 12
  6. Insert a 3.3K resistor between ADC pin 12 and ADC pin 11
  7. Jumper ADC pin 11 to P23
  8. Jumper ADC pin 10 to P24
  9. Jumper ADC pin 9 to Vss (Ground)
Here are the connections for the bottom row of the MCP3208 chip.
  1. Insert a 10k resistor between ADC pin 1 and Vss (Ground)
  2. Add an alligator clip jumper to ADC pin 1 (CH0) 
  3. Add an alligator clip jumper to V3.3
Build the audio circuit to P10 as indicated by the QuickProto instructions.

Step 3: About the Software

You'll need a couple files to setup the Talking Resistor Calculator.

Download the source code as well as the Propeller Tool.

Using the Propeller Tool, send the file speakresistor.spin to the Propeller using F11 to install it on the EEPROM.

If you look at the speakresistor.spin code, you'll see three objects being loaded.
  1. The MCP3208 object handles communication between the ADC chip and the Propeller
  2. The Parallax Serial Terminal object (We'll talk about that in the next step)
  3. The Phonemic Voice Synthesizer object written by Philip C. Pilgrim
The Phonemic Voice Synthesizer speaks phonetically, meaning that when you read the source code, some of the words appear to be misspelled.  This is done intentionally to make the voice speak each word as clearly as possible.    This program is a great example of the Propeller's multi-core ability to handle several jobs at the same time.


Step 4: Add More Functionally to Talking Resistor Calculator

My version of the Talking Resistor Calculator has several of the common resistors I use all the time on my workbench.
You may want to add a few more.  

Here's how to do it.

The Propeller Tool included the program, Parallax Serial Terminal.  Start the serial terminal with a baud setting of 115200.

Connect an unknown resistor to the test leads and the program will display the detected ADC level in the terminal.

Add the following IF statement to your program to plug in a new value...

if sample > {detected value} and sample < {detected value +10}
         t.say(string("whatever oahm resistor")) 
         repeat 5000


Change the {detected value} to what was reported in PST as well as the {detected value +around 10}  You'll probably see some variation in the returned number, so set your value to the lowest detected then add 10 or so for the second value.  (In my example photo I would have chosen "4064" as my lowest value and then "4078" as the high value.)

Also change the "whatever to your resistor value.   Save and reload the program to your EEPROM and it should now detect and speak the new value.   

There you have it!  A Talking Resistor Calculator for your desk!