We bought some pot plants to keep alive and some cheap soil sensors; they're just two electrodes and you pass a current through the soil, measure the resistance and get a proxy for soil moisture. We left the sensor continuously logging on Friday, came back on Monday to find the plant very unhappy and the probe contacts almost completely corroded. Within a day or two it was a stump, never recovered.
Turns out you're not supposed to leave these things powered on 24/7 and capacitative sensors are a much better solution. TIL you can electrocute plants.
https://en.wikipedia.org/wiki/Time-domain_reflectometer#TDR_...
https://en.wikipedia.org/wiki/Measuring_moisture_content_usi...
Details above. Looks like you can get 3.5ps resolution with an off the shelf PIC after calibration which is pretty impressive!
So the price is..
3$ for the microcontroller, 3$ for the 4 ns comparator, and a few cents for the resistors, capacitors, and 7 GHz transistors (I couldn't find the exact model), and probably some dollars for the rest of the materials such as steel rods and tubes. All in all it looks doable for <50$ easily. That's pretty amazing!
On the PIC solution you posted, how do you get around the fact that the comparator is only good to 4ns (regardless of whether you can time down to 4ps)? Lots of measurements and look at the stdev?
Ones that worked eventually: http://imgur.com/a/EDdwR - note cable ties :)
What a lovely way to learn about the world ... by taking copious notes about all of the (surprising) things that don't work.
I'm slightly tempted to do a 4th attempt now inspired by the original poster :)
(you need to stick a transistor between the 555 and the relay anyway so you might as well just use a MOSFET)
Good tip: measure voltage between the output pin and gnd or Vcc in both states and then have a think.
Plus when you're not an idiot like I was, a MOSFET is cheaper.
I sometimes overestimate the ability of the average electronics hobbyist to properly understand a datasheet.
Looks like a cool project.
1. Seedlings need blowing around a bit when they pop out or they get all spindly. Cue wiring up two 80mm PC case fans to a chain of a single astable then two monostable 555's to generate an oscillating wind field that goes on for 5 seconds each direction after a delay of 10 minutes. Dried the compost out, blew most of it it away and then killed the plants dead. No tomatoes for me!
2. Watering robot version 1. Similar to above but with a 74hc390 dividing down the clock so it only ran once every day. Used an unprotected MOSFET to control a small water pump from ebay. Back EMF blew the MOSFET up and jammed it as a short. Emptied the entire water reservoir into the pot, down the wall and into the carpet.
3. Watering robot version 2. Same as above with problems fixed. Apart from I ran out of bipolar 555's so I used CMOS ones which are a little more tetchy about noise. Cue last 555 getting jammed in an on state and the same thing happening. This time, the tupperware box with the electronics ended up getting wet and the wall wart exploded.
Edit: meant to say to the OP - nice work. This is the spirit of all things interesting :)