Measuring resitance with microcontroller - Page 1
Forum section: electronics / beginners

author: DroneBuster
author_rank: Contributor
timestamp: January 20, 2016, 08:05:47 pm
content: Hello,I'm working on board which should measure gas concentration. I'm going to use this sensor:http://www.sgxsensortech.com/content/uploads/2014/08/0278_Datasheet-MiCS-4514-rev-16.pdfThe problem I have is how to measure resistance with microcontroller. Rs (sense resistance) swings from 100ohms to 15Mohms. I found this circuithttp://www.circuitstoday.com/ohmmeter-using-arduinobut I don't know if voltage divider will work with high resistor values...Also how should I multiplex sensors? Because there will be total of 3 sensors (maybe more), so I don't want to make separate circuits for measuring. I think I will use analog switches (TS3A24157DGSR). Is there any better ways?Thanks for any help

author: bitslice
author_rank: Frequent Contributor
timestamp: January 20, 2016, 08:27:09 pm
content: Or you could charge a capacitor(s) to a set voltage, measure the time it took and derive the resistance from that. Good for high values of R.

author: andre_teprom
author_rank: Regular Contributor
timestamp: January 20, 2016, 09:33:30 pm
content: Analog switches are quite enough for that sensores whose resistences lies on the range near or bellow to Kohms.

author: KL27x
author_rank: Super Contributor
timestamp: January 20, 2016, 11:51:41 pm
content: QuoteThe conventional method would be to make the high impedance resistor ladder and then run the output through an opamp to buffer the output (lower the impedance). The opamp takes the weak signal and makes it strong enough to feed into the ADC of your micro. Plus you can tweak the gain to get the voltages in the right range for your ADC to maximize the resolution.The datasheet will show the maximum recommended signal impedance for your ADC. At 15Mohm resistance of your sensor leg of the ladder, yeah, you will mostly likely need to buffer the output.Bitslice's suggestion has some pros and cons. The tolerance range of capacitors is a major con, if you plan to make more than one of these.

author: DroneBuster
author_rank: Contributor
timestamp: January 25, 2016, 10:16:27 am
content: Could you provide article or something. Because only resistor ladders I can find is for ADC and DAC. Do you think my provided method would work if i buffer output with op-amp?

author: DroneBuster
author_rank: Contributor
timestamp: January 28, 2016, 01:46:55 pm
content: Anyone?

author: MrSlack
author_rank: Frequent Contributor
timestamp: January 28, 2016, 01:56:52 pm
content: How I'd do it:1. Build an RC square wave oscillator with the controlling R being the gas sensor. Use an op amp/555 or something as the generator.2. Use the counter/prescaler in the microcontroller to scale / count the pulses.3. Maths. Calibration curve/LUT/algebra depending on how clever your compiler is.The only pain is finding highly stable accurate capacitors for the RC osc but you can compensate for this with highly stable capacitors and a calibration curve.

author: matseng
author_rank: Frequent Contributor
timestamp: January 28, 2016, 02:01:06 pm
content: Quote from: DroneBuster on January 20, 2016, 08:05:47 pmI had a peek at the datasheet. The range is 100K (not 100ohm) to 1500K. That will make the measurement easier.

author: DroneBuster
author_rank: Contributor
timestamp: January 28, 2016, 07:19:42 pm
content: Quote from: matseng on January 28, 2016, 02:01:06 pmDatasheet define R0 range not RS. RS/R0 is defined in charts.