Sensor Update

by jvetter 21. August 2008 17:25

In my last automation post I talked about some new sensors I had purchased for use with my arduino board. They arrive and I have had a chance to play with them all, so I thought I would describe the results.

Thermistor Probes

The thermistor probes I purchased were straight Ranco ETC replacement probes. I've had good success with these ETC's and they were relatively cheap, so it was worth a shot. The thermistors themselves seem to have a resistance on the order of 650-700 K ohms which is much higher than the 2.2Kohm probes from the love controllers. As you can see from the profile on the right, the temperature to resistance calculations are fairly linear when the temperature is above 30 degrees F.

To test the probes I took four samples:

  1. In a cup of ice: 32.7°F
  2. Room temp water: 72.8° F
  3. Hot tap water:  109° F
  4. Just boiled water: 178° F

For each sample I took a resistance reading using my Ohm meter and checked the corresponding Analog to Digital value (0-1023) from the arduino board. For all samples a used a 10K ohm resistor in the circuit. Results are in the below table. Essentially what I found that between the change of 145.2° F I saw a total change of 669 digital. That's approximately 4.6 digits per degree, or 1/4 degree resolution. These probes should be more than sufficient.

Raw Ohms A2D Temp
998 931 32.7°F
29.52 764 78.2°F
13 586 109°F
3.4 262 178°F

Ultrasonic Range Finder

The range finder is essentially sends out sound waves in a very narrow beam and detects how long it takes for a return ping. This allows you to tell how far away something is from the range finder. My plan is to use this for boil over prevention and maybe even tank level detection.

I played with these a bit and they definitely can detect an object fairly easily. There seemed to be a bit of noise, but I am writing most of this off to it not being held in a fixed position. The documentation proclaims that the device will change the analog voltage 10 millivolts per inch, and my tests show this holds well. The one downside is that anything 6 inches or closer always gets reported as 6 inches, so I will need to make sure the device is at least 6 inches above the level I want to detect.

One other potential downside is moisture and temperature. The documentation also states that changes in temperature can effect performance because the device will do calibration upon power up and any changes in temperature will effect the results. This may mean I need to reset the device every 10 degrees or something, which is promoted as an option in their documentation. I also, don't know what the moisture from steam will have on the device. My guess is it probably will break it, which doesn't help much...

 

Accelerometer

The goal with the accelerometer was to detect vibration from the airlock as a means for determining fermentation progress. To do this I bought a +/- 1.2g accelerometer and board that outputs X and Y values to analog. I soldered this one up yesterday and finished the testing today, with some interesting results.

What I found is that in a static environment the device will only deviate 1 point in either direction (+ or -) from a midpoint. This can be observed from figure 1, which shows a program I wrote to visualize the X and Y values across time.

Next I moved a computer into the laundry room to try and get some samples from an actual fermentation. Initially I found way too much noise coming from the device. I eventually isolated this to the USB cable of all things. For some reason the other USB cables I had must have been poorly shielded and were somehow making the A2D readings vary greatly. You can see what I mean from figure 2, which the only difference from figure 1 is the USB cable used.

Lastly, I moved the mead bucket into the main room, to test with the working short USB cable. What I found is generally the accelerometer did a good job. It detected most of the bubbles but not all. Maybe I need something more sensitive or maybe I can get most of the data out with some pattern analysis. I did find the raw sampling to be a bit noisy. You can observe this is figure 3. It shows obvious blips where bubbles occur, but detection is hard with all the +/- 1 noise. To clean this up a bit, I changed the program to only draw lines that had a change of 2 or more from the midpoint. This helped a lot as you can see from figure 4.

Next I think I will try sampling a little faster (currently about 9 times per second) to see if I am missing some bubbles due to the slow sampling, and work on some pattern analysis that gives me the best detection pattern.

Tags:

Automation

Comments (3) -

John
John United States
8/25/2008 12:23:48 PM #

That's a funny little bump there in the thermistor curve. Can calibrate around that I expect - though overall it looks good.

That bubble is a small signal! So long as you can distinguish it from noise your approach will be fine.

jvetter
jvetter United States
8/25/2008 5:24:08 PM #

The curve is funny, but it's real linear after 30-40 degrees F, which works fine. Basically what I will do is get the board setup the way I want, determine the voltage drop, then use their reference chart to calculate the values on the A2D. From there I can just do a linear translation between reference points.

The accelerometer bubble signal is weak, which mean me wonder if I need to sample faster or get a different sensor. The one I have is +- 1.2 g but they had 2 g ones. Maybe I could get something that is better at static vibration too.

Jan Ruzicka
Jan Ruzicka United States
8/29/2008 4:08:22 PM #

Wouldn't bubbles be easier measured with optical sensor?
Just a photo diode/transistor and a LED shining trough a hole in a piece of foil.
Or it can be a set of two photo transistors and a screen with lines going across working in a same manner as a computer mouse.

Add comment




  Country flag
biuquote
  • Comment
  • Preview
Loading


Calendar

<<  May 2012  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar

RecentComments

Comment RSS