NFT moisture sensor / pump controller...

Go To Last Post
18 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey ppl...

I've built an NFT type hydroponic garden to grow tomatoes. 25 plants of various varieties.

I'm currently working on the controller which will take into consideration a number of factors when deciding on the frequency/duration of running the pump which wets the roots.

The controller PCB sports a ds1307 RTC, an SHT11 temp and humidity sensor, 4 ADC inputs (CDS for sunlight intensity, pressure sensor for reservoir level, 2 extra for trough moisture sensors)..

There are also 2 relays, one for a 24vac valve for filling and one for the circulation pump, a 2x16 LCD, RF for future upload to network/internet and some Mega32 glue to hold it all together...

Anyhoo, the focus of this post is the 2 extra ADC inputs I have included on the board.
Figuring that while sunlight, time of day, time of month and temperature would be pretty good factors for controlling the pump duration to keep the roots wet, a sensor in the trough where the roots grow would prolly be most ideal in determining when to wet the roots.

So, I have be playing around with the idea of using a cleaning sponge sandwiched between 2 parallel PCB rectangles to form a capacitive moisture sensor.
Somewhat similar to the concept of a stud finder.
The idea is that the sensor will sit in the trough amongst the roots.
When the pump runs, the sensor will saturate and this will be used as a calibration point.
When the pump stops and as the roots absorb the remaining water the sensor will dry out indicating that it's time to run the pump again.

So far I have constructed a prototype that ranges in capacitance from about 0.5nF to 0.8nF (dry & wet).
I have simulated a modified analog capacitance meter, the original sch is from here http://talkingelectronics.com/html/CapMeter.html.
The simulation is giving me about 42% delta on the duty cycle as the capacitance goes from dry thru wet.
I will low pass this pwm and then use the opamp on the controller to full range 0-5v for 10bit resolution.

Attached is the schematic, sensor, controller and garden.
Looking for any suggestions/etc, as I'm just making this up as I go along... lol

Michael

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It seems the garden pic didn't attach first time around..

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
hydroponic garden to grow tomatoes.
That's what they all say... :wink:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If I had a dime for every time I've heard that.... hehe

I've got another two hydroponic gardens growing a variety of peppers and spinach/kale...

Upon further interrogation of the previously posted circuit, I have decided to use an HEF4538 monostable multivibrator as a frequency to voltage converter...
I think it will give better results...

Michael

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Will something like a LM2907/LM2917 help at all? A friend builds racing cars fuel injection system and I'm pretty sure he uses (or did use) something like that.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The LM2907 would certainly work, however I'm trying to use what I have in stock...

The simulation results for the monostable multivibrator converter aren't very good either...
The resulting graph is stepped, time to try another approach...

This http://www.discovercircuits.com/DJ-Circuits/capgage.htm looks pretty good and I have the parts...

Michael

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Michael,

Are you aware of this approach?

http://www.cheapvegetablegardene...

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ross, that was the first approach I considered..

What I've read about the plaster of paris sensors is that they melt/dissolve over time due to rain...

Given that the pump I'm using is good for 20 gallons per minute and will prolly run for 1 min on, some duration off, maybe around 5 minutes...
I figure the plaster won't last very long...

My goal is something non-consumable and durable, the environment inside the trough can get pretty warm to quite hot.
The sensor needs to be capable of partial submersion as the slope is 50:1, the water depth is around half an inch.
When the roots grow and fill the trough, they will provide some hydraulic resistance causing the water level to rise further...

Michael

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Two thoughts...

I would drive the plates with an AC signal, with no DC component. Any DC component will result in electrolysis of the plates.

I would consider using a very thin slice of sponge as the capacitor dielectric.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You are correct Michael. I missed that this is a hydroponic system ... no soil. The plaster type is good in soil.

With your sponge idea ... I suspect that the sponge may become contaminated with a build up of nutrients which would then change your operating capacitance range. Why not simply use the two plates without the sponge?

In a former life I designed a tilt sensor for use on icebergs that used two pcb plates with a kerosene dielectric (water would freeze). The volume between the especially shaped copper sections were only partially filled with the kerosene. This variable capacitor formed the frequency dependent element of a simple 74C14 oscillator operating at around 40KHz. I didn't have any problems with electrolysis.

Have fun.

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey what's wrong with the good ol' way of gardening? Sooo relaxing.... :lol:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not if the neighbour's cats visit :lol:

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JC, electrolysis shouldn't be a problem once the plates are sealed.
They have tape on them now, after converging on a final solution I will spray them with a clear acrylic coating a few times.
Possibly I will use the same spray to adhere the plates to the sponge as well.

If I reduce the width of the sponge it may not drain/dry very well, I've been considering the capacitive arrangement found in stud finders which requires a single a pcb, that would open up another side of the sponge.
I may also try a more porous sponge, larger holes, better drainage.

Ross, I have though about removing the sponge and relying on the surface tension between two closely spaced plates.
It would require a screen to keep the roots from growing between the plates, but I think it should work as well.
I will prolly give that a try once I have a circuit that gives a decent analog output for change in capacitance.

As well as the previous link, there are two more that look suitable, http://www.discovercircuits.com/DJ-Circuits/Capmeter1C.htm & http://www.discovercircuits.com/DJ-Circuits/low-value-cap-meter.htm.

Michael

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hey,

I simulated the previously posted circuit and made some changes for my application.

Attached is the sch and pcb, I should have the board populated in a few hours...

Michael

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Michael,

Let us know how it performs compared to your simulation. And a photo.

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One mistake on the sch found so far...

The first flip flop that is buffering the clock doesn't output from Q, its output is !Q...

Oddly, I was under he impression that Q and !Q were just inverse of each other but the datasheet logic diagram says otherwise...

It's fixed now, I cut pin1 off the 4013 and blobbed some solder between the traces...

In hindsight I should have just used a Tiny13 to count the pulse length and either output a pwm or a one wire protocol...

Now to test the rest of the circuit...

Michael

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A few minor modifications and it seems to be working allright...

Now I'm thinking about eliminating the foam, using some plastic pcb standoffs to keep the plates at a known distance and letting the roots grow between the plates...

Unfortunately the tape on the plates seems to be letting some water thru and the resulting resistance is making it difficult to work with...
Tomorrow, I will remove the tape and spray the plates with some conformal coating...

Michael

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

An update...

I stopped working on the sensor for a while (had to make a father's day present, upgraded an old military flashlight from 1957 to a 1W LED with constant current boost drive)

Anyhow, testing showed numerous problems with the previous circuit and sensor.
The acrylic conformal coating on the sensor didn't prove to be water proof and there appeared to be some drift.

I've started over, this time with a Tiny2313.
The sensor charges until it triggers the analogue comparator, discharges and repeats.
The charge time is captured with the 16 bit timer.
The 8 bit timer is setup to output PWM to generate a 0-5 volt signal based on a section of the 16 bit timer.

Pretty much like the cap meter on ELM Chan's site.
It works very well and requires fewer parts than the previous...
I compensated for the scope probe by adding a 33pF and a 10Mohm in parallel.

Here is the sensor and another pic of the tomatoes...
There are 7 LEDs on the sensor acting as a bar graph.
The tomatoes have grown quite a bit since the last pic (less than a month).
The first 2 on the right are cherry then 6 celebrity, 6
big beef, 6 stella/roma and 5 carolina gold. Which accounts for the height difference.

I can post the eagle files, brd & sch and code if there is interest.

Michael

Attachment(s):