Homemade waterproof digital thermometer
Jan 13, 2010 Uncategorized, arduino, electronics, thermometer, waterproof
Now I am playing with hydroponics in my grow box I want to monitor the temperature of my nutrient tank. This is important too hot it can bread disease too cold it can shock your plants. I also want to use the data to identify how ebb/flow cycles affect ambient and solution temperature (for my own nerd curiosity)
I have been thoroughly impressed with the Dallas DS18S20 temperature sensor so decided this would be a great component to use for this project and this is how you can make your own.
Materials:
- DS18S20 temperature sensor
- 1/2 inch plastic tubing (could go smaller but had some lying around)
- Aquarium/food grade silicone
- 18 gauge solid core wire (long enough to get from arduino to what you want to measure)
- Glue gun with glue
- Soldering iron with solder
Construction
Step 1: Solder the two wires to pins 1 and 2 of the DS18S20 and apply a little dab of hot glue to all of the exposed metal. This is not entirely necessary but a small safety precaution so you don’t discover you shorted the connection during assembly.
Step 2: Cut approximately 1 inch length of plastic tubing using a utility knife
Step 3: Apply liberal amount of silicone to one end of the tubing cut in step 2.
Step 4: Allow silicone to set for 15 minutes and do a visual inspection for leaks. You may also try blowing very gently into the tube to check for leaks, though not too hard to create a hole in the process.
Step 5: Attach the DS18S20 to the tube using a drop of hot glue. This is not entirely necessary but when trying to get a perfect watertight seal the less moving parts the better.
Step 6: Again apply a liberal amount of silicone to seal the top paying special attention to the area around the wires
Step 7: Give the silicone at least 24 hours to completely set.
Step 8: Testing. First off the sensor may be buoyant, if this is the case carefully attach a 1/2 hose clamp or something else to help tether it down. Next suspend in a glass of water (preferably clear) and watch for a few minutes for leaks and or bubbles. If you see bubbles try to get an much water as you can out and apply a more silicone and let set for another 24 hours
Hooking it up
This part is pretty straightforward. Pin 1 is your ground and pin 2 is your DQ which for most people doesn’t make much sense but it is a combination power source and bus output. To get this to work you hook up your ground (black wire) to your ground on your arduino and the red wire to digital in and 5v with 4.7K resistor between. Sure that is very confusing so hopefully the breadboard visual below is much more helpful.
Writing the Code
Since I am planning on using this with my grow box controller, I will show how to use this with arduino to get some numbers. You could look at my arduino code in the grow box controller post to get the values but in my case I need to get values from two DS18S20 temperature sensors so I found a great OneWire library which helps make your arduino code very simply. Simple extract the two folders in the zip archive to [ArduinoPath]\hardware\libraries and enter the following code into the arduino UI:
#include <OneWire.h> #include <DallasTemperature.h> OneWire oneWire(8); // on pin 8 DallasTemperature sensors(&oneWire); void setup() { Serial.begin(9600); // Initialize sensors sensors.begin(); } void loop() { sensors.requestTemperatures(); Serial.print(“Sensor #0: “); Serial.println(sensors.getTempCByIndex(0)); Serial.print(“Sensor #1: “); Serial.println(sensors.getTempCByIndex(1)) delay(100); // wait a little time }
If all goes well you should see output similar to the following (values in Celsius):
Sensor #0: 20.3 Sensor #1: 30.4 Sensor #0: 20.3 Sensor #1: 30.4 Sensor #0: 20.3 Sensor #1: 30.4
For people like me who are used to Fahrenheit you can simply use the following equation to convert Celsius to Fahrenheit:
°F = °C x 9/5 + 32
Though I am using this for my grow box controller there are many other uses you could use this for:
- Aquarium temperature monitoring
- Brewing temperature monitoring
- Weather station
- Soil thermometer
Tags: grow box components
How to make a cheap soil moisture sensor – Heavy Duty Version
Nov 8, 2009 cheap, electronics, moisture sensor, water
My original version of my moisture sensor has worked great for me but it did have a couple flaws. The first issue was construction, though I had great luck on my first attempt though after trying to recreate additional sensors given the small amount of gypsum between the sensor and the probes were so thin it was extremely easy to crack the sensor and I normally have about a 25% success rate on later creations (must have had beginners luck on the first one.
The second issue was durability. Given we are playing with gypsum and as it is suspended in water it will eventually breakdown and there is very little we can do about it. Though with my latest changes to my automated grow box which includes automated watering based on moisture content I want to ensure my measurements stay accurate throughout the season. To help with this I have decided to increase the sensors size and also am using galvanized nails to prevent rusting. After a few attempts I have come up what I feel is a pretty foolproof method of creating a moisture sensor.
How it works:
There were many questions in the comments in the previous post so hopefully I can clear this up a little here.
Technically a gypsum block measures soil water tension. When the gypsum block is dry it is not possible for electricity to pass between the probes, essentially making the probe an insulator with infinite resistance.
As water is added to the problem more electrons can pass between the probes effectively reducing the amount of resistance between the problem to the point when it is fully saturated where the probe has virtually zero resistance. By using this range of values you can determine the amount of water than exists in your soil.
Parts:
- Plaster of Paris
- 2 Galvanized Finish Nails
- 1/2 inch plastic tubing
- utility knife
Construction:
Take your utility knife and cut the tubing slightly longer than your galvanized finishing nails. Try to make the cut as straight as possible though it doesn’t have to be completely perfect.
Use your utility knife to cut the smaller plastic tube lengthwise, this will allow easier removal of your soil sensor after the mold cures.
Optional: Make the cut diagonally to prevent a potential vertical fracture line.
If you were very careful on you vertical cuts you can avoid this step, but to completely avoid spilling plaster onto my workbench I drilled four holes slightly larger than your tubing. I used these holes for support but also to catch any of the plaster in the gaps from you less than accurate vertical cuts.
Being careful that the tubing fits together where you split the tubing vertically, insert the tubes into the holes (or carefully on a flat surface) Mix Plaster of Paris and carefully fill with to the top. The friction between the tubing should keep a water tight seal where you made the cut, though if the plaster is a little thin and it appears to be leaking through wait a couple minute for the plaster to setup some and try again, at that time it should not have the viscosity to seep through the very small gap that may be causing the leak.
Take your two galvanized nails and push them through a small piece of wax paper. You may also allow the plaster to setup for a few minutes and then float the nails in the the plaster. I like the first method since gravity will help ensure they fall straight down and parallel to each other. As for spacing, I have done some experimentation with the gaps between the probes and my conclusion was, it doesn’t make much difference. As long as there is a gap (they are not touching) you should get reliable results.
After allowing the sensor to cure for about and hour remove it from the holes you drilled in the wood.
Gently pull back the plastic tubing and you have a nice clean soil sensor.
Lay them out to dry for 24 hours to cure completely and their construction is complete.
For attaching the wires there are a couple options. The best would be to solder them to the probes though to do this you need to heat up the nail hot enough to enable a strong solder connection. My little 15W soldering iron just can’t produce the heat for this so I am option for the wire wrap method. I take about an inch of wire and strip off about an inch of insulation and tightly wrap around the probe. Given copper will rust and could be a point of failure you will want to insulate this connection and the probes from the moisture. A few dabs of hot glue works pretty well. I am planning on trying liquid plastic, though I am currently out and when I have some on hand I will update with how it went.
How to use it
You can simply hook up a multi-meter and check the resistance though if you want to create anything automated you would need to use an integrated circuit (IC) or a electronics prototyping platform such as Arduino. By applying voltage to one side of the sensor and using a voltage splitting circuit connected to ground and an analog input you can then measure the voltage making it through the probe. The higher the voltage, the higher the moisture content of the soil.
![[SoilSensorDiagram[3].png]](http://lh3.ggpht.com/_Xcv0VbxbRcc/SqbDHOFko6I/AAAAAAAABRI/e37AOb37rPI/s1600/SoilSensorDiagram%5B3%5D.png)
Conclusion
The above should give you everything you need to know to create your own soil sensor and how to use it. This can be used as a soil sensor for watering your indoor plants like I am using it. This same sensor could be for monitoring your outside soil moisture content to trigger (or preempt your irrigation system) to save some money on your water bill and/or maintain consistent moisture levels in your plants which could drastically improve water sensitive crops such as tomatoes.
Harnessing power from trees
Sep 10, 2009 electronics
Some UW researchers have determined that if you add a couple of similar metals in a tree it produces electricity. Though only 200 mV so we won’t be moving to tree power anytime soon. Though the articles mentions some applications such as detecting environmental conditions or forest fires.
To me the most interesting part is they don’t exactly know the cause of this voltage, though they theorize that “there seems to be some signaling in trees, similar to what happens in the human body but with slower speed.”
Gadget to make time lapsed videos in your garden
Mar 28, 2009 electronics, gadget
If you liked my time lapsed videos in my how box like the ones below. Here is an easy way to do the same in your garden. For just the mere price of $159.95 this weatherproof camera will take 1280×1024 resolution photos at an interval of 5 seconds to 24 hours.
Via Hammacher Schlemmer, Via Oh Gizmo
Hardening off plants in the grow box
Mar 22, 2009 computer, computer power control, cucumbers, electronics, indoor grow box, tomato
When you have seedlings growing indoors or a greenhouse during their life they have had the opportunity spending it in a near perfect environment with controlled temperatures, consistent lighting, no wind, etc. If you take this happy plant and move it directly into the wild (your garden) it can, and probably will, go into shock leading to its sudden death. The solution to this problem is to hardening off the plant. This is a process of slowly getting the plant accustomed to the real world environment a couple hours at a time.
You start by bringing the plant outside for two hours in the late evening or early morning hours. If the plant begins to wilt let it recover indoors until it appears healthy again. Each day increasing the amount of time it is exposed to the outdoors over 1-2 weeks period, or until the plant can survive a full day/night outside. At this time it is ready to get its permanent home in your garden.
This process takes a lot of patience, which as they say is a virtue. Unfortunately I believe I am missing this virtue. My history of hardening off plants follows a similar pattern; bring out a plant in the evening with the full intentions of bringing it back in after a few hours, unfortunately I forget and it spends its first day out in the cold all night which normally the demise of my summer plants.
This year I am using my grow box to harden off my plants. Normally the grow box runs at about 68-72 degrees which is a great environment for my seedlings. By allowing some hot air to vent and lowering the maximum temperature setting in the software I am able to bump the temperature down to a range of 57-65 degrees. After a few days I will drop the temperature a few degrees until it has similar low temperature to the outdoors, while still staying at a safe temperature for the plants.
Given today using an unknown neighbor’s weather station we had a high of 48.2F and low of 35.1F I still have some time before I can safely bring my tomatoes/cucumbers outside but they should be toughened (hardening) up and ready to go when it is.
Tending your garden with am army of robots
Mar 21, 2009 computer, electronics, garden maintenance
I must say gardening and robotics are a couple of non relating interests, well at least until now. Fortunately some smart students at MIT have joined these two areas into one. I am a little skeptical about the real world implementation of this, I guess if production cost was low enough and you had a large enough green house; a little army of plant tending robots would be a cool site to see.
Either way, this a really cool academic project. See the video below for the robots watering and harvesting some tomatoes.
“The idea for the project came from work done by Nikolaus Correll, a postdoctoral assistant working in Professor Daniela Rus’ Distributed Robotics Lab. Correll, who came to CSAIL in 2007, saw the possible applications of swarm robotics to an agricultural environment. In the long view, the researchers hope to develop a fully autonomous greenhouse, complete with robots, pots and plants connected via computation, sensing and communication. Each robot is outfitted with a robotic arm and a watering pump, while the plants themselves are equipped with local soil sensing, networking, and computation. This affords them the ability to communicate: plants can request water or nutrients and keep track of their conditions, including fruit produced; robots are able to minister to their charges, locate and pick a specific tomato, and even pollinate the plants.”


