Sunday, March 29, 2015

Wateringduino (again)

Though I have posts about wateringduino, I haven't show it on the field, so, here it is:
On top-right I have the TIP120 power circuit to drive the solenoid open/closed when strawberries dry, you can't drive the solenoid directly, it works on 12V, arduino uses 5V and the current it drains (about 800 mA) would blow up the ship even if it used 5V. On the left there's the RTC (Real-Time clock) which supplies the date/time for the logging purposes, with this I know exactly at what time it waters the strawberries and allows a more advanced logger (spreadsheet graphics allowed), as we saw in a previous post. The SD label is an SD shield with a 32 Mb (yes, it's more then enough, and I have to recycle things) microSD card in which the .csv data files are recorded. The "brain" is the arduino circuit, homemade as it gets cheaper than using a bought board, it has (as previous posts refer) 3 circuits only one is working now, just because the other 2 solenoids haven't arrived yet, it will water the trees and blueberries/raspberries/blackberries very soon. The item marked as power-source is as it is, a power-source, which receives 12V DC and generates 2 outputs, one of 5V for arduino and stuff and one of 3.3V for the SD card. IMPORTANT: never try to drive SD cards with 5V, you'll blow them up!
On the left, is a picture of the homemade probe which measures the moist in the soil, the pic was taken a couple weeks ago and the berries are quite bigger now. I must say that the dry-up problem they had last year no longer happens!
I'll get back to this as soon as I get the ordered solenoids, and I'll post the code also, which has changed since the last time, namely the .csv file format as I realized that the old format wasn't graphic friendly, it needed a lot of hammering to get it compliant with the needs.

Cheers!

Wednesday, March 18, 2015

Arduino ISP shield

Hi there! I finally managed to get the ISP shield on tracks, here you have some pictures, I just need some fresh ATmega328 to use it! :)

Initial circuit and pieces
Piezo soldered
Piezo and Leds in place
On top of the main board, quite nice ah?..
Downside, a little messy, but better hidden than at sight!!!

Tuesday, March 17, 2015

Nano drivers

Well... I bought a Chine Nano, and it turned out to be a replica with a ch340g cheap chip, I followed these guidelines after some hours trying to install updated arduino drivers with no success, hope this will help those who read this...

Thursday, March 12, 2015

Dallas DS1820

Well... I needed to use a long cable to acquire a couple of temperatures and I was having problems with the readings. The specs say that long cables can be used (something like 300 meters) and several devices, BUT reading some more I found out that these are supposed to have repeaters along the way. Nevertheless I found this information which I quote:
For short cable runs, unscreened two- or three-core cable, or single-core (parasite mode) or twin-core (normal mode) screened audio cable should be suitable. For longer cable runs, low capacitance cable such as rf aerial downlead (parasite mode) has been successfully used over a distance of 10 m. CAT 5 network cable has also been used with success over a distance of 30m, with data & ground using one twisted pair and power & ground using a second twisted pair. 
 I managed to put the DS1820 working with some cheating, and not using these recommendations, instead of the shielded cable and stuff, I used a pull-up resistor of 2000 Ohms, instead of the 4k7 which is usually recommended/used. It works, maybe the resolution is not the best, but in fact I'm not using all the cable I tested so, it's a cheaper way of doing what I wanted. The large distance was achieved in parasite mode, in regular mode the results would be even better.

Back to wateringduino!!

Well... The Summer is coming, we're almost at Spring time and I bought a solenoid and finally got the wateringduino on the field. This year I'll have fantastic strawberries I can assure!
I made some changes to the project, and I'm still adapting it to the needs I have, so, let's see:

- Circuit 1; Watering the strawberries based on data collected by the probe. I found out that it works fine but there's an adjustment needed to guarantee that the moist level doesn't change so drastically during daytime with the temperature change.
- Circuit 2; I intend to improve and change this circuit to water the raspberries and blueberries during daytime within the most warm hours in two small periods of time (4 minutes only), once before 12:00 and another afterwards, to keep the roots slightly wet but not too wet. A probe will not be used, I'll use the RTC instead to do the job.
- Circuit 3; Is to be changed, not using probes, using the RTC instead, as in circuit 2 but in this case watering the trees daily for 20 minutes, probably a couple hours before sunrise.

I leave some graphs I got from the SD logger that wateringduino has implemented.
The first one (on the left) is a temperature graph of an underground probe, about 0.5 meter beneath soil surface.

The second one (on the right side) is the moist values the system got, and as you can see it needs some adjustment because the moist values don't change that much during daytime, so, what's happening is that conductivity changes with the heat, and as the strawberry "vase" is hanged at about 1 meter height, it get's warmer with the sun rays during daytime, hence, the voltage gets higher within warmer conditions. The corrective formula (there are also corrective tables, but the application of an equation is easier to do) is this one:
I haven't decided yet if I'm going to use it, after all it's extra hard-work as a tradeoff of cleaner data, so... Nevertheless it means that the electric conductivity at 25 Celsius is equal to the obtained electric conductivity multiplied by an exponential factor which has the soil temperature within it, aimed to balance the data.
The orange spikes concern the moments that the system starts watering.
As you can see the system is working fine and I have now nicely wet strawberries! Cheers!