Hello, I just received a 12" eTape liquid measurement sensor and am attempting to use it with an Arduino Mega. While monitoring the raw voltage output via an analogRead, the results are in a curve, as opposed to being linear like the documentation states.
Inches Voltage Percent full
0 804 0.00%
2 794 3.33%
4 770 11.33%
6 738 22.00%
8 696 36.00%
10 609 65.00%
12 504 100.00%
I'm using the supplied resistor, on the 2 pin, with one side of the resistor going to 5v power and the other side of the resistor going to Analog In A0. Pin 3 is going to Ground.
Am I doing something wrong, or could I have a defective eTape sensor?
Regards,
Steve Chapman
eTape not working as spec'd
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: eTape not working as spec'd
Could you post a photo of your hardware and connections please?
Your data plots out on the kind of curve you get when a potentiometer sits in parallel with some other resistance.
Your data plots out on the kind of curve you get when a potentiometer sits in parallel with some other resistance.
- Capthappy
- Posts: 5
- Joined: Tue Mar 03, 2015 4:40 am
Re: eTape not working as spec'd
See attached. Pin 2 of the eTape goes to one end of the resistor which sits between the green and the black wire on the breadboard which goes to ground, the other end of the resistor goes to the red wire on the breadboard, which goes to 5v (actually 3.3v in this picture, but the numbers I sent were from when it was in 5v). Pin 3 of the eTape ends up going to A0.
- Attachments
-
- image.jpg (538.38 KiB) Viewed 282 times
- Capthappy
- Posts: 5
- Joined: Tue Mar 03, 2015 4:40 am
Re: eTape not working as spec'd
Here's a diagram of how I have it connected.
- Attachments
-
- image.jpg (52.54 KiB) Viewed 273 times
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: eTape not working as spec'd
Not sure quite how that parses, but I don't see a ground connection on the resistor in your diagram. Your diagram looks correct, but there seem to be too many wires in the photo, and I can't see where they all go.Pin 2 of the eTape goes to one end of the resistor which sits between the green and the black wire on the breadboard which goes to ground
- Capthappy
- Posts: 5
- Joined: Tue Mar 03, 2015 4:40 am
Re: eTape not working as spec'd
Sorry about the confusing picture. I cleaned up the wires and took another shot with all of them in frame. Does my actual wiring match the diagram?
Pin 3 to Black to ground
Red goes to 5v and the resistor
Pin 2 goes to the resistor then another Green goes to A0
Pin 3 to Black to ground
Red goes to 5v and the resistor
Pin 2 goes to the resistor then another Green goes to A0
- Attachments
-
- image.jpg (539.15 KiB) Viewed 270 times
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: eTape not working as spec'd
OK. That looks right. Now, given the voltage across the sensor, you need to solve for the resistance of the sensor.
The equation for that is here: http://en.wikipedia.org/wiki/Voltage_divider
Given a fixed resistance of 560 ohms, that would be:
560 * (1023/raw_reading - 1)
The equation for that is here: http://en.wikipedia.org/wiki/Voltage_divider
Given a fixed resistance of 560 ohms, that would be:
560 * (1023/raw_reading - 1)
- Capthappy
- Posts: 5
- Joined: Tue Mar 03, 2015 4:40 am
Re: eTape not working as spec'd
Thank you for working with me, but I'm still seeing data come back in a curve instead of linear:
Inches Resistance Voltage Percent full
0 0.27 804 0.00%
2 0.29 795 2.53%
4 0.33 770 7.59%
6 0.39 734 15.19%
8 0.49 685 27.85%
10 0.69 609 53.16%
12 1.06 495 100.00%
I'm using the script found here:
http://www.ryanbyrd.net/2013/02/22/8-et ... ter-level/
He did this app for an 8" eTape, I have a 12", so the number of inches is off, ranging from -2.57" (0" for the 12") and 8" (8"), but even these results are in a curve.
Inches Resistance 8" Calc Percent full Percent change
0 0.27 -2.57 0.00% 0.00%
2 0.29 -1.8 7.28% 7.28%
4 0.33 0 24.31% 17.03%
6 0.39 1.7 40.40% 16.08%
8 0.49 3.74 59.70% 19.30%
10 0.69 5.8 79.19% 19.49%
12 1.06 8 100.00% 20.81%
It's solving for resistance, but it's results are still in a curve.
I've been careful not to submerge the vent hole above the Max line.
Are you sure I don't have a defective eTape? Is there something else I could be doing wrong?
It seems to me that I should be getting results back in a linear fashion like the data sheet shows.
Inches Resistance Voltage Percent full
0 0.27 804 0.00%
2 0.29 795 2.53%
4 0.33 770 7.59%
6 0.39 734 15.19%
8 0.49 685 27.85%
10 0.69 609 53.16%
12 1.06 495 100.00%
I'm using the script found here:
http://www.ryanbyrd.net/2013/02/22/8-et ... ter-level/
He did this app for an 8" eTape, I have a 12", so the number of inches is off, ranging from -2.57" (0" for the 12") and 8" (8"), but even these results are in a curve.
Inches Resistance 8" Calc Percent full Percent change
0 0.27 -2.57 0.00% 0.00%
2 0.29 -1.8 7.28% 7.28%
4 0.33 0 24.31% 17.03%
6 0.39 1.7 40.40% 16.08%
8 0.49 3.74 59.70% 19.30%
10 0.69 5.8 79.19% 19.49%
12 1.06 8 100.00% 20.81%
It's solving for resistance, but it's results are still in a curve.
I've been careful not to submerge the vent hole above the Max line.
Are you sure I don't have a defective eTape? Is there something else I could be doing wrong?
It seems to me that I should be getting results back in a linear fashion like the data sheet shows.
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: eTape not working as spec'd
I'm not sure what units you are using for the resistance calculations. Try measuring the resistance directly with a multimeter.
With a 12" sensor, it should be about 700 ohms empty and 85 ohms full - with a resistance gradient of approximately 55 ohms/inch.
With a 12" sensor, it should be about 700 ohms empty and 85 ohms full - with a resistance gradient of approximately 55 ohms/inch.
Please be positive and constructive with your questions and comments.