Go Down

Topic: How to increase resolution of analog input (Problem Solved - Thanks) (Read 4569 times) previous topic - next topic


Hi everyone

I am measuring a signal with very low resolution. The sensor is a resistor with chaning resistance. I have it hooked up to a voltage divider. The minimum value I read is about 940 and the maximum value about 960.

Signal Path: +5v ---> Sensor \---> Resistor ---> Ground
                                         \----> Analog Input

(so the signal is split after the sensor)

The resistors seem to act as a konstant i.e. a different resistor would give values from 980 to 1000 or 690 to 720 or whatever, depending on resistance...

Is there any smarter way of doing this? Is there any way to increase the resolution of my recorded signal? If not on the hardware, is there some trick I can do on the software side to record with higher resolution?

It would be cool if someone could help me




What is the resistance of the sensor itself, and how much current can it tolerate?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


That's like only 100mv range. Best bet would be a opamp(s) to offset the bottom of range to 0vdc and gain set to X50 should then give you a 0-5vdc operating range to wire to a Arduino analog input pin. It would be good if you could provide a link to the sensor, as maybe some other method would become apparent.


Swap the position of sensor and resistor so that your readings are all small numbers. Then switch to the 1v1 reference signal,you will then get a greater range of numbers.


Agree- using the internal voltage reference gives you better resolution for small voltages.

Code: [Select]
// setup

int reading = analogRead(0);
int millivolts = ((reading/1023.0) * 1.1) * 1000.0;


Never catch a falling soldering iron

I did this once, only once mind you. I was about 14 at the time.  :smiley-eek-blue:


I would posit that the number of times that an engineer catches a falling soldering iron can be represented by one bit.  You either never do it, or you do it once.


Feb 23, 2011, 05:59 pm Last Edit: Feb 23, 2011, 06:06 pm by fkeel Reason: 1
@ retrolefty:  I was just searching digikey for opamps, but I am a bit overwhelmed by the sheer magnitude of selection. My knowledge of electronics is really limited, so could you pointme to an opamp which might fit my needs, or tell me what I should be looking for?

@ crossroads & everyone else: Sorry that I was not more specific in my first post. The resistors are my own homebrewn things, they are all different, as they are all custom made for slightly different measurements. In theory the one I was testing yesterday should have a nominal resistance of ~ 3000 ohm which should increase to up to about ~ 5000 ohm when subject to maximum force. I dont really have the equipment to test that with me (well, I am sure I could somehow use my arduino, but I dont know how). Somehow nothing makes sense though ... I should be able to get more than a 100mV difference out of that... and I know I had a setup that worked much better... but I dont have that circuit with me...

Current: I dont know. I would not want to overdue that, I assume the material would just melt when heated by too much current. However I have sent 1.6 amps at 9.6volt through it at some point for about a minute and it was fine.

the material I am using: http://www.imagesco.com/sensors/stretch-sensor.html
an image of some readings I got a couple of months ago: http://4.bp.blogspot.com/_GuU3n3DqPBc/TLjQ0yGuFkI/AAAAAAAAAGE/kFxogpc3478/s1600/stretch7.png
(ok, that graph isnt all that informative, but you can see, the resolution is a lot better than the ~20 points which I am getting now.)
Some earlyer results: http://fkeel.blogspot.com/2010/10/getting-better-aquainted-with-stretch.html

I am just really confused and irritated, because I was counting on this to work and cant figure out what I am doing wrong.

Any other ideas would be really appreceated. I will try the millivolts thing now, and I think I will try the opamp as well eventually ... but there must be some other thing I am missing... (ohhh... the idea of combining opamp millivolts and fixing the actual problem suggests a very, very high-res sensor and makes me very happy :-D ..)


about catching soldering irons... I actually did that yesterday. however I did not burn myself badly enough to guarantee that I wont do it again ... but then .. I would not consider myself an engeneer...

Anyway. Thanks for the ideas so far. And if anything else comes to mind I would like to hear it.




There is a whole lot of stuff you are not telling us. Remember you have the system we can only go on what you tell us.
We need a schematic, that ASCII thing at the start is not good enough if as you say you have sent 1.6 amps at 9.6volt through it. How?
What is wrong with what I suggested, don't you understand what I am telling you?
It really helps if you describe what you are doing, why and what you have done. The quality of help is only as good as the quality of this information.


Feb 23, 2011, 06:25 pm Last Edit: Feb 23, 2011, 06:34 pm by fkeel Reason: 1
nothing is wrong with what you have suggested. Actually, it is very good advice, exactly what I was hoping for. Thank you for that.
(edit: I thought I already said that in my original reply)

however, I am doing something else wrong and would like to figure that out so as to then combine your advice of using the millivolts with the fix to the actual problem.

(forget the 1.6 amps thing - that was only an experiment to see what happens [I sort of work this way. I try things, to see what happens, and then I think about why. Instead of thinking what will happen and then trying whether I was right. And yes, that has gotten me in trouble])


Anyway, I guess I already got all the advice I will get from the information I have provided. I will mess around with it a little bit more and then draw a schematic.




Try a circuit like this. Adjust Vin so that the lower resistance maxes your output vloltage up around 5V, and your lower voltage will be around 3/5 of that.


Use a single supply op amp such as this
Add 0.1uF & 1uF caps on the VCC pin to keep noise out.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


(Ok, I have no idea why my circuit acted the way it did yesterday (and I wont start speculating). Today the resolution is about 10x higher ... no idea what changed...)

Anyway in case someone else stumbles upon this with a similar problem and also to get some feedback whether I am doing this the right way:

This is my setup:

R1 is my sensor - it has an approximate nominal resistance of about 4000 Ohm and a maximum resistance of about 6000 Ohm.
R2 For my setup a resistor with 1100 Ohm gives me a range from about 400 (when resistance of sensor is ~ 4000 Ohm) to about 170 (when resistance of sensor is about ~ 6000 Ohm).

If you have any ideas on how to finetune this, I would apreceate it, however, at the moment it works exactly as expected and together with changing the internal reference voltage, as was suggested earlyer in this thread, I should get some super nice readings...

Cheers & Thanks


edit: thanks for the additional info on the opamp. while I wont be using this now, its a good thing to know as I mess around with analog sensors a lot.


Went from 3K to 5K down to 4 ohm to 6 ohm?
So with 5V you've got nearly 1AMP going thru those?
5V/5.1ohm = 1AMP
Power dissipation, P=IV, I = V/R => P=V*2/R = 5 Watts. Those parts are gonna be smoking.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


edit 1: I fixed all the values in my last post. Got my units confused

edit 2: I tried the internal reference voltage, but was not able to get a better signal. I experimented around a bit and found that the closer resister two is to the nominal resistance of the sensor, the better the resolution. So thats what my final solution is. However while in theory this does give me nice results, in practice my readings still have a very low resolution, so I will probably have to go with the opamps.

If I do, I will post back here with my results.


@ crossroads

Just to make sure I understand your scematic:

R3 and R4 are a regular voltage divider, so that that only a fraction of the 5 volt is actually sent into the opamp.
R1 is my sensor. Together with R2 it regulates the gain.

So in that set up the input is constant and the sensor modifies the gain. I could also use the Sensor for R3 or R4 and have constant gain, and simply vary the singal, right?

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131