Talking Resistor Calculator
by Gadget Gangster in Circuits > Microcontrollers
4601 Views, 15 Favorites, 0 Comments
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:
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.
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
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
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.
Here are the connections for the top row of the MCP3208 chip.
- Jumper ADC pin 16 to V3.3
- Jumper ADC pin 16 to pin 15
- Jumper ADC pin 14 to Vss (Ground)
- Jumper ADC pin 13 to P21
- Jumper ADC pin 12 to ADC pin 12
- Insert a 3.3K resistor between ADC pin 12 and ADC pin 11
- Jumper ADC pin 11 to P23
- Jumper ADC pin 10 to P24
- Jumper ADC pin 9 to Vss (Ground)
- Insert a 10k resistor between ADC pin 1 and Vss (Ground)
- Add an alligator clip jumper to ADC pin 1 (CH0)
- Add an alligator clip jumper to V3.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.
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.
- The MCP3208 object handles communication between the ADC chip and the Propeller
- The Parallax Serial Terminal object (We'll talk about that in the next step)
- The Phonemic Voice Synthesizer object written by Philip C. Pilgrim
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!
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!