Search Results for "label/moisture sensor"

How to make a grow box controller

IMG_3777
While my existing system was working I decided to make an upgrade to the electronics on my old system for several reasons: 

  • I needed to add more automated external controls (heater, fans, water pump) with my existing design this was entirely possible though was starting to get a little clunky. 
  • The existing controller (PS2 Controller, parallel port with various wires to control relays) worked but was not exactly compact. 
  • Wanted a modular design so if I needed to debug some issue I could simply unplug the USB and power and bring it out of the box in the garage for needed work
  • Ability for others to create so I can share my software without forcing people to hack PS2 controllers to get to work
  • Ability to use components like 1Wire temperature sensors (others to come) and Arduino
  • Just for the fun of it

Read More …

How to make a cheap soil moisture sensor – Heavy Duty Version

IMG_4590

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.

imageTechnically 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:

IMG_4578 

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.

IMG_4579

Use your utility knife to cut the smaller plastic tube lengthwise, this will allow easier removal of your soil sensor after the mold cures.

IMG_4580

Optional: Make the cut diagonally to prevent a potential vertical fracture line.

IMG_4581 

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.

IMG_4582

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.

IMG_4584

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.

IMG_4586 

After allowing the sensor to cure for about and hour remove it from the holes you drilled in the wood.

IMG_4587 

Gently pull back the plastic tubing and you have a nice clean soil sensor.

IMG_4588 

Lay them out to dry for 24 hours to cure completely and their construction is complete.

img title=”IMG_4590″ src=”http://lh3.ggpht.com/_Xcv0VbxbRcc/Svd1RbUmfqI/AAAAAAAABWo/GpYqC3woNuw/IMG_4590_thumb.jpg?imgmax=800″ border=”0″ alt=”IMG_4590″ width=”400″ height=”267″ />

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]

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.

Homemade waterproof digital thermometer

057

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.

image

052

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.

053

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.

055

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.

056

Step 6: Again apply a liberal amount of silicone to seal the top paying special attention to the area around the wires

058

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.

image

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

How to make a cheap soil moisture sensor

020

UPDATE: Though this still a great sensor, check this post for the latest version of a more heavy duty soil moisture sensor.

I mentioned in a previous post that my previous soil moisture sensor did not hold up in my automated grow box update, so I needed to make a new one.  After a little research there was the classic science class method of creating a homemade sensor by simply putting two galvanized nails in the soil and measuring the resistance between them.  A major problem with this solution is the soil composition can significantly vary the resistance and keeping the spacing between the nails could be troublesome.

After a little more research I came across the method that has been working well for over 50 years.  This method includes taking two metal probes and inserting them into a gypsum block and measuring the resistance between them.  The gypsum absorbs the water and provides a decent range of resistance and moisture measurement.

Unfortunately I was fresh out of gypsum (sort of), so I looked around the garage and found a good substitute, Plaster of Paris.  Plaster of Paris is created by heating gypsum to around 150 degrees where it becomes calcium sulfate hemihydrate.  After adding water and allowing to dry it magically turns back into gypsum with the added bonus it also has the ability to mold to any shape I could come up with .  On to construction…..

001

Material required:

  • 1 tsp Plaster of Paris
  • 1/2 tsp cold water
  • Disposable cup for mixing
  • wide straw (I used one from McDonalds, but most fast food straws should work)
  • 2 small pieces of metal (I used wall hangers, but nails, paper clips, etc will work as long as they can fit inside the straw with room for plaster to form around)

image

I straightened out one end of both wall hangers the best I could with some needle nose pliers.  I then carefully positioned them approximated 15mm apart, the exact measurement is less important though if you are creating multiple sensors I would recommend making them the same gap to ensure consistency of measurements without having to individually calibrating each sensor.  I then used some hot glue (insulator) liberally at the top and at the bottom just enough to keep it in place during while pouring the plaster and while the mold solidifies.

005

Now insert your secured metal probes into the straw, ensuring that both metal probes are equal distant from the sides of the straw.  The great thing about the wall hangers is they do this automatically due to their wedge shape at the top.  Once you have them centered apply gobs of glue to keep the probe in place but also to seal any gaps between the straw and the bottom of the straw.  This needs to be water tight since this will be the bottom our your mold.

image

Prepare the Plaster of Paris according to the instructions on the box.  On my box it said 2 parts mix to 1 part colder water.  Given the small size of the mold 1 tsp of mix and 1/2 tsp of water which gave you more than enough to make one sensor.  I used a bamboo skewer to stir since I would have gotten in trouble for trying to use our new silverware.

015

Now it is time to pour your mold, depending on how steady your hands are you should be able to pour the plaster right into the top of the straw.  Fill about 1/4 of the length then tap the probe gently to help the plaster settle between the gaps.  Repeat the previous step until the straw is full.  If you have problems pouring you can also dip the skewer into the plaster and scrape it against the top edge of the straw.  This step is optionally but I wanted to give my sensor a little point so I carefully added plaster beyond the end of the straw to provide a sharp point.  Once you are done filling the straw, use your glue gun to secure the probe onto the paper you are working on and allow at least 1 hour to set.

019

After about an hour you can remove the bottom part of the probe.  Do this by carefully cutting around the diameter of the bottom 3/4 of the straw, along with a lengthwise cut as shown in the lines marked above using a utility knife.  You must be very careful in your cutting going too deep can result in cracking the plaster and you need to start all over.

Allow the plaster to dry for 24 hours and it should be ready for testing.  With my probe it is essentially an insulator dry (beyond what my ohmmeter can measure) and a reading of 957 ohms when slightly damp which was a great range for measuring moisture level in my computerized grow box.

023

Finally, I attached attach wires to my analog measuring device (in my case a PS2 Controller) and I started getting readings.  At this point you should calibrate the sensor by getting a reading with the probe dry then again when it is full saturated in water.  Ironically, the probe I made was almost exactly specifications as the one I repurposed from a cheap commercial soil moisture sensor so I didn’t even have to modify the constants on the automated computerized grow box software.

Given you can make hundreds of these things with a regular sized box of Plaster of Paris, box of paper clips and a few trips to your favorite fast food restaurant.  The cost of each of these things would be pennies and given the cost of buying a commercial product seems like a very economical alternative.

How to use Vegetronix soil moisture sensor (VG400) on Arduino

With the summer starting to come to a close it has been time for me to start thinking back to the computerized grow box.  I have been doing some considerable work on the electronics and software over the summer.  Better to break stuff while the plants are outside and not while killing them inside.

Though I have been happy with my homemade gypsum soil sensors I decided to try out a commercial option hoping for better accuracy and longer life.  This is important with my current plans to include automatic watering to the latest version of my grow box.  Don’t want to wake up to a flood in the garage due to a broken sensor.  After some looking I came across the Vegetronix VG400 which measures the dielectric constant of the soil using transmission line techniques.  Which I have no idea what that means but sounds impressive.

The hookup couldn’t be simpler, red wire to 3V, bare wire to ground, and black wire to an analog input.  As you can see below in my completely not to scale diagram below.

image

From here it all comes down to some simple code to write on the Arduino to get some values.

void setup()
{
  // Setup serial
  Serial.begin(9600);
}void loop()
{
   Serial.println(analogRead(0));
 �
   delay(200);  // wait 200 milliseconds
}

Upload the code to the Arduino and now I can get a moisture value from the analog input between 0 and 614 (0-3 volts) depending on the degree of water saturation. 

image

Though not as hacky as my PS2 controller moisture sensor solution definitely more elegant and reliable.  Stay tuned for more details of other improvements to the computer controlled grow box.

Gardening Gadget – EasyBloom review

image 

I will admit, I have a weakness for electronic gadgets, when I got wind of the EasyBloom I just had to try it out.  The EasyBloom is a device that has built-in sensors to measure light intensity, humidity, temperature, and moisture content in your soil.  It has three basic modes: Recommend, Monitor, and Water.

With the Recommend setting you place the EasyBloom into a location you want to grow something, let it sit there for at least 24 hours, plug it into your computer, and it will provide a detailed analysis of your planting area and provide a list of plants that would thrive in that location.

The Monitor setting allows you to diagnose problems with a particular plant.  You first define the type of plant you want to monitor, turn on the device and place it next to the not so healthy plant, water, return 24 hours later, and plug it again into your computer.  It will use the data stored in the sensors to give you a diagnosis to what the plant’s ailment might be..  Of course, this will not diagnose various pest or disease issue but can let you know if you have planted a little too early, in the wrong location, or are not watering enough (or too much) based on your soil structure.

Finally it has the water setting which the name should imply, will notify you when you need to water your plants.

To test this thing out I had three locations in mind to take measurements, each of which would provide a huge diversity of readings.

First, I put the EasyBloom in my grow box in the Recommend mode.  I have complete control over the temperature and lighting I definitely could confirm the devices accuracy and I expected to see decent diversity of plants recommended.  After placing the device in my grow box for almost 24 hours (see missing results below)

image 

Overall the readings were nearly exactly what I expected though I was hoping to get a full sun rating, guess I may need to add an extra bulb to the box.  Even with my conditions it did recommend 176 plants that I could grow inside it to maturity, though I am going to demand a rematch after adding a little more light

  • 026

    Second, I brought the sensor and set it up next to my office window.  Currently I am growing Lemon Verbena I transplanted from my garden.  I wasn’t concerned about moisture content so for this reading I didn’t include the moisture sensor and here were the results that were returned.

  • image

    After this result I felt a little better about my grow box since it at least it was beating of an eastern facing window sill.  With this result the program recommended 92 shade loving plants with Lemon Verbena not being one of them, though I have been providing some supplemental light to the plants.

    Finally, I used the EasyBloom on my southern facing fence line plot (where I normally grow my cucumbers and tomatoes)  This is where I wondered of the usefulness of EasyBloom to actually give good information about planning a garden in the offseason.  Though I can not grow tomatoes outside right now due to cold, would it still let me know that it was still possible.  Well here are the readings:

    image

    When I put the sensor outside it was raining pretty hard so passed the “weather proof” test.  Though it did clear up the next day which is reflected in the “Full Sun” light reading.  This was the obvious winner with 3458 plants recommended with the over 5000 in their database.

    In conclusion, I will be the first to admit that the EasyBloom would not be on the necessity list for gardening tools, but for a beginning gardener it could provide some valuable incites to help your first few years be much more successful.  For nerds/geeks like me it is a pretty cool toy, that I will be sure to be using in testing new lighting and grow box designs in the future.