Fast Autorange Ohmmeter DIY (Speedyohmalez) - Page 1
Forum section: electronics / projects

author: pedake
author_rank: Contributor
timestamp: September 26, 2015, 01:21:55 am
content: When carrying my small part drawers around, it slipped....That means: sorting resistors. (happy that the caps were in another box)This is the second time this happens. First time I used a multimeter / color codes -> really really slow. Optical scanners really did not work.So I decided to try and make something of my own and came up with an Arduino Ohmmeter. and I'd like it to be fast. So I call it:SpeedyOhmalezThere are a few examples out there. But I decided to do it myself from scratch.My requirements:really fast measurement10R - 10M range2-3 % accuracySome contraption that lets me quickly, reliably and firmly put the resistor in place (1/4 W - 1 W)later (maybe): more accuracy with ref. voltage and fancier resistorsAttached the Arduino Sketch & the schematic for the resistor array + 4148 diodes. I'll replace them with Schottkys,I got it running at ~ 500 Hz max. Then I got lots of misreadings form the ADC. No idea why yet and it's late :-)You can see that the sketch already includes the display library. I'll add the functionality later.Next steps:autorangecalibrationthink about the contraptionadd displayQuestionDo you think this is good enough to make shunt resistors? I know there are other ways to do it. But I am curious :-)Let me have your thoughts

author: pedake
author_rank: Contributor
timestamp: September 27, 2015, 11:22:02 am
content: Looks like this was a bad idea.Autorage works really well.Veryfast.But I pretty get bad readings when the reference (R_ref) is much smaller or larger than the unknown resistor (R_unkn)It seems the voltage divider has a non-linear behavior. But I cannot find any literature, or better maths, on this.can anyone point me to the right direction?PS: an updated sketch for arduino attached.PPS: I will look into the constant current draw.. But my idea was really to try and do it without.

author: Aleksandar B.
author_rank: Contributor
timestamp: September 27, 2015, 01:32:49 pm
content: Quote from: pedake on September 27, 2015, 11:22:02 amDiodes are basically non-linear resistors.You can check out this link:http://www.electronics-tutorials.ws/blog/i-v-characteristic-curves.htmlA resistor I-V characteristic is linear. The slope of the line is determined by the resistance.A diode acts like a resistor from the aspect of the I-V characteristic but is non-linear. This is why diodes "don't" conduct under the threshold voltage (resistance is ~infinite), and when you pass the threshold voltage it starts to conduct (the resistance lowers). The higher the voltage is over a diode the lower the resistance is, this is why diodes have a maximum forward voltage.There is a mathematical formula describing the non-linearity, but I don't know it off-hand, but you can find it easily.

author: pedake
author_rank: Contributor
timestamp: September 27, 2015, 01:37:30 pm
content: duh... haha...that was dumb of me. I kept looking only at the resistors...well. thanks. that probably saved me some time :-)

author: Marco
author_rank: Super Contributor
timestamp: September 27, 2015, 02:07:48 pm
content: You don't need the diodes, the arduino outputs can go high impedance (just configure them as input I think).That said, the output resistance of the output is ~50 Ohm so it will create a large error as well for the lower resistances. If you have enough ADC inputs you could read the voltage at the output pins in addition to the voltage at the load to correct for this.

author: pedake
author_rank: Contributor
timestamp: September 27, 2015, 02:16:23 pm
content: Aleksandar - Thanks. I did actually look into that when I had the problem that the 1M and 100k references were doing what they were supposed to (too little current, of course).I will try and just turn the whole thing around. I am using an ATmega 328. I have 6 analog inputs anyway.Quick question: If I hook up a V-reference to the ARef pin, how will the ADC work: Still 5.0 / 1023 or 1.1 (or whatever VRef) / 1023? Meaning: Do I just reduce my range or does it scale down to the reference?hvala vam puno!

author: Aleksandar B.
author_rank: Contributor
timestamp: September 27, 2015, 02:40:56 pm
content: I have never worked with arduino (we are a dying breed), but what you normally do is set the ADC reference to external (or AVref, or similar).The input value is then calculated as ADC = Vin*1024/Vref. You can find more on this in the atmega328completedatasheet (http://www.atmel.com/images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet_Complete.pdf), page 247 section 24.7.You need to reduce the input, so it is not higher than the reference.

author: linux-works
author_rank: Super Contributor
timestamp: September 27, 2015, 03:37:34 pm
content: if you want 'switches' that are not mechanical relays and don't have junctions to get in the way, consider ldr's (light dependant resistors). a light and photocell in a black sealed tube (they come premade but you could make your own).usually they are high z when dark and when you throw light into them they go low-R. not zero though, but maybe low enough or maybe you can even parallel them; they're just simple photoresistors.