Offline
God Member
Karma: 2
Posts: 635
a, b = b, a+b
|
 |
« on: February 23, 2011, 02:11:53 am » |
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.
|
|
|
|
« Last Edit: February 23, 2011, 01:22:17 pm by fkeel »
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 269
Posts: 17031
Available for Design & Build services
|
 |
« Reply #1 on: February 23, 2011, 02:14:22 am » |
What is the resistance of the sensor itself, and how much current can it tolerate?
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 282
Posts: 15435
Measurement changes behavior
|
 |
« Reply #2 on: February 23, 2011, 02:29:31 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Online
Brattain Member
Karma: 296
Posts: 26023
Solder is electric glue
|
 |
« Reply #3 on: February 23, 2011, 10:16:10 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Minneapolis, MN USA
Offline
Full Member
Karma: 2
Posts: 151
Never catch a falling soldering iron...
|
 |
« Reply #4 on: February 23, 2011, 10:34:54 am » |
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;
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Online
Brattain Member
Karma: 296
Posts: 26023
Solder is electric glue
|
 |
« Reply #5 on: February 23, 2011, 10:37:49 am » |
@nootropic Never catch a falling soldering iron I did this once, only once mind you. I was about 14 at the time.
|
|
|
|
|
Logged
|
|
|
|
|
Minneapolis, MN USA
Offline
Full Member
Karma: 2
Posts: 151
Never catch a falling soldering iron...
|
 |
« Reply #6 on: February 23, 2011, 10:42:48 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 2
Posts: 635
a, b = b, a+b
|
 |
« Reply #7 on: February 23, 2011, 11:59:50 am » |
@ 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.htmlan 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.htmlI 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. Cheers P.
|
|
|
|
« Last Edit: February 23, 2011, 12:06:32 pm by fkeel »
|
Logged
|
|
|
|
|
Manchester (England England)
Online
Brattain Member
Karma: 296
Posts: 26023
Solder is electric glue
|
 |
« Reply #8 on: February 23, 2011, 12:12:58 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 2
Posts: 635
a, b = b, a+b
|
 |
« Reply #9 on: February 23, 2011, 12:25:13 pm » |
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.
|
|
|
|
« Last Edit: February 23, 2011, 12:34:59 pm by fkeel »
|
Logged
|
|
|
|
|
|
|
Offline
God Member
Karma: 2
Posts: 635
a, b = b, a+b
|
 |
« Reply #11 on: February 23, 2011, 01:37:35 pm » |
(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.
|
|
|
|
« Last Edit: February 23, 2011, 03:00:06 pm by fkeel »
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 269
Posts: 17031
Available for Design & Build services
|
 |
« Reply #12 on: February 23, 2011, 01:49:04 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 2
Posts: 635
a, b = b, a+b
|
 |
« Reply #13 on: February 23, 2011, 02:11:09 pm » |
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.
|
|
|
|
« Last Edit: February 23, 2011, 03:34:05 pm by fkeel »
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 2
Posts: 635
a, b = b, a+b
|
 |
« Reply #14 on: February 23, 2011, 03:47:45 pm » |
@ 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?
|
|
|
|
|
Logged
|
|
|
|
|
|