How to increase resolution of analog input (Problem Solved - Thanks)

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

cheers

p.

What is the resistance of the sensor itself, and how much current can it tolerate?

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.

// setup
analogReference(INTERNAL);
...

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

@nootropic

Never catch a falling soldering iron

I did this once, only once mind you. I was about 14 at the time. :fearful:

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.

@ 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: Flexible Stretch Sensor
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: Building Stuff: Getting better aquainted with the Stretch Sensors

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 :smiley: ..)

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.

Cheers

P.

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.

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.

cheers

P.

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.

http://www.eecs.tufts.edu/~dsculley/tutorial/opamps/opamps5.html

Use a single supply op amp such as this

Add 0.1uF & 1uF caps on the VCC pin to keep noise out.

(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

P.

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.

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?

R3/R4 - yes, this just sets a DC signal for you to multiply.
R1 sensor
R2 - gain control.

Could also put your part in place of R4, use R3 of 100K and set R1/R2 for gain of ~20 (10K, 200K)
Vin then = 5V*(3k/103K) = .145mV, Vout = 2.912
Vin = 5V*(5K/105) = .238mV, Vout = 4.76

Math is straightforward, find a combination that works with the parts you have.

while I will be needing thos opamps ... I still ended up doing some fun things with my sensors :smiley: ...
check it out: http://arduino.cc/forum/index.php/topic,53357.0.html

In that case, take the voltage out from the original ciruit, offset it down in DC level and then add some more gain for wider response.
What you need is a non-inverting summing amplifier
http://masteringelectronicsdesign.com/how-to-derive-the-summing-amplifier-transfer-function/
but you need a -2.5v source to add in.

maybe something like this

Hey CrossRoads

I only saw your last reply right now... I dont understand what your saying - What case are you referring to?

Ok, I sort of understand the content of the first link, however I dont quite understand what benefit that has over this first circuit you suggested. The second link points to an elaborate "voltage inverter"?

Why would I want to do it this way?


Anyway, I got myself some of the opamps & capacitors you originally suggested. I hope to get around testing this soon, though I am sort of swamped with university stuff at the moment. The capacitors are just add in parellel between Voltage in & Ground, correct? Their function is basically a low pass filter and the 0.1mf capacitor filters higher frequency signals, while the 1mf prevents noise with slightly lower frequency?

(sorry if I'm asking really simple/silly questions I just have no knowledge of electronics whatsoever, and I just want to double check that I actually understand what I am doing.)

Thanks for your help so far, and any additional help you can offer.

Cheers

P.

I don't know anymore, been too long, need to review what it was you were doing.
I think I was suggesting a way to change the DC level so your ac signal could be amplified more so the ADC could take samples over a wider range.