Automatic Watering System With La COOL Board

1,185

16

Published

Introduction: Automatic Watering System With La COOL Board

Hello Everyone,
So this time we will start our Instructables by digging a bit deeper into La COOL Board. The Actor Output on our board activates the pump when the soil is dry. Firstly, I will explain how it works: La COOL Board has a 3,3 volt Output to control one actor through a transistor or a relay card. I would like to reiterate that we want to measure the soil moisture and activate the pump when the soil is too dry. Don't worry about the Arduino program since there is "no" programming, only some configuration files and uploading the software and configurations to the card. Our library is taking care of the rest so that you can concentrate on other stuff :)

Be sure to read our other instructables about La COOL Board :

Building a Outdoor Weather station

The total budget of this Instructables, without factoring in the price of La COOL Board was 0 € since I only used stuff I had laying around. If you have to buy everything it should cost less than 50€

You need:

  1. La COOL Board
  2. Some old USB Power Suply
  3. two old USB Cables (one with a good USB-A and one with a working Micro USB)
  4. some Wires
  5. Cheap 5-12V water pump
  6. A junction box
  7. some clear tubing
  8. Drip emitters
  9. some Wire
  10. some perfboard
  11. 1 x 1N4001 Diode
  12. 3 x Male Pinhead (if you use a SMD MOSFET like I do)
  13. 1 x VNN3NV04PTR-E OMNIFET (every MOSFET accepting 3V should do it)
  14. 1 x 220Ohm Resistor (optional)
  15. 1 x 3mm red Led (optional)
  16. The Outdoor Case we built in the last tutorial (optional)

Tools Needed:

  • Soldering Iron
  • different pliers
  • knife
  • Multimeter
  • hot glue
  • I think that's all..

Step 1: Programming the COOL Board

In this step, we will take a look at the configuration files and I will talk a little bit about how we use the metrics to start or stop our pump. At the end I will make some more example configurations.
You need to have installed Arduino and have uploaded all the code required for the Board to work (as described here) :

Getting Started with La COOL Board

Open Arduino, go to Files / Examples / CoolBoard / AutoSprinkle.

Go to Files / save as and save it in your Arduino directory (because you can't save in examples).

Now go to your new Arduino project on your computer. In the directory you see the .ino File and a data directory (photo 2), take a look at the data folder. As you can see there are 10 files named COOLsomething.json (photo 3). Open coolBoardActorConfig.json!

You can change the values if you want to, or you can just use them as they are. Well now I could say that everything is detailed in the Readme.md in the library, but since it's actually really easy I will explain it quickly :

{
	"actif":1,
	"inverted":0,
	"temporal":0,
	"low":[50,0,0,0],
	"high":[40,0,0,0],
	"type":["soilMoisture",""]
} 

actif : defines if we actually use the onboard actor, set it to 0 (zero) to deactivate.

inverted : Let me use a simple example. If you switch on a heater the temperature rises, but if you use a cooling element (like a fan or the cold side of a peltier) the temperature gets lower. So the actor with the cooling element reacts in a inverted manner on the metric we monitor. Got it? please comment if this is clear..

temporal : A actor that works with time, we speek later about that.

low : if the metric goes above that value the actor gets low. Watch out if you use the inverted flag!

high : if the metric goes below that value the actor gets high. Watch out if you use the inverted flag!

type : what metric is used to control our actor? in this case it's soilMoisture, but we don't know where he is coming from :(

Now take a look at coolBoardSensorConfig.json (photo 5). This is the configuration file for all sensors onboard. On the bottom you can find soilMoisture ;)

You can change the values if you want to, or you can use as them as they are.

All you have to do is upload the sketch and the SPIFFS and your COOL Board is ready.

Let' see another example, if the relative uniform temperature of a room is 33°C and we activate a fan and the temperature drops to 27°C. for this case the configuration is :

{
	"actif":1,
	"inverted":1,
	"temporal":0,
	"low":[27,0,0,0],
	"high":[33,0,0,0],
	"type":["Temperature",""]
}

Let's take a deeper look into the configuration:

It's the same for future extensions you want to plug on the board. Here I added a external C02 sensor and a fan in a experimental controlled environment for kombucha. This will be one of my next tutorials...

{
	"actif":1,
	"inverted":1,
	"temporal":0,
	"low":[500,0,0,0],
	"high":[900,0,0,0],
	"type":["C02",""]
}

But for now just get started with all that stuff.

The syntax of high and low is :

Act[i].low:[rangeLow,timeLow,hourLow,minuteLow]
Act[i].high:[rangeHigh,timeHigh,hourHigh,minuteHigh]

And here the syntax for type :

Act[i].type:["primaryType","secondaryType"]

OK, I hope this is not too confusing for you so let's modify our pump example so that the watering only takes place during the day when you are away from home at work :

{
	"actif":1,
	"inverted":0,
	"temporal":1,
	"low":[50,0,20,0],
	"high":[40,0,9,0],
	"type":["soilMoisture","hour"]
} 

Please take note of the fact that all Coolboards are working on GMT! For instance you have to add the hours for your time zone manually, but soon this will only be a preset in the COOL Menu...

Step 2: Solder the Driver Board

First cut the USB cables so that we have one Cable with a USB-A Connector for the power supply and a second cable with a micro-USB to power La COOL Board (Photo1). Then Strip of about 5cm of isolation from each cable. You should have at least 4 Wires (5 in my case : red, black, green, white and ground). Usually 5 Volt is red and ground is black, but please check with a Multimeter (photo 2). Cut-off the other wires, we only need power (red and black wires)!

Take a Look at my fritzing (photo 7), if you already done some electronics with transistors or FETs I am sure this is easy for you. If you have no clue what we are doing with a FET I highly suggest you taking a look over here and here. Please give it a try as this is the very foundation of electronics and it's essential to know if you want to do electronics...

First we solder the transistor. Here are some tricks for soldering some fancy Surface mount Driver on perfboard :

  • Take the 3 male pinheader and solder them on the prototype board (photo 3)
  • Put some solder on one pin (photo 4) do the same with the FET's pins
  • Solder just one Side and check for alignment (photo 5)
  • If it's ok solder the other two pins
  • Voila!

Now solder the resistor, Diode and Led. You can put some wires on the Led like I did or just solder it on the board like in the fritzing. At the end solder the USB cables and the wires for the pump.

Check for shorts, plug the power supply and the COOL Board and check if it's starting. If not unplug everything and use the multimeter to find the error!

Step 3: Put Everything in the Box

Glue everything in place with some hot glue (photo 1) this prevents the wires from breaking if you pull on the cables.

Now take your knife and cut a little bit the sealings of the junction box. push the cables through the sealings (photo 2).

At the end it should look like in photo 3 ;)

There is only one more thing to solder, the wire from the Output of the COOL Board. I usually solder pin headers on the board to easily plug and unplug (photo 4). You can directly solder the wire on the pad if you want to, I do so because I re-use the board for the upcoming tutorials.

Step 4: Connect Everything and Put It in Place

Plug the box with the cables to the power supply, COOLBoard and the pump (photo 1).

All our stock at La COOL Co is in standardized plastic boxes and we use them for growing systems. I found a box with little holes we used for filtration in a aquaponic system (photo 2) and a red 22l box (photo 3 & 4).

Make the hole a little bigger and plug the pump, hose and drip emitter. Put water in the lower box with the pump. Put the plant in the box and attach the hose and drip emitter to the pot, last thing to do is to put your COOL Board in the soil.

Plug the power supply and configure the WiFi as described in our getting started instructable.

Now check if everything works fine (photo 8 & 9) if you pull the COOL Board from the soil (to simulate dry soil) the pump starts some seconds later.

Once connected try if it works: Pull the Coolboard out of the soil, after maximum 5 seconds the pump will start working(photo 9). Put the Board back in the soil, the pump stops. Verify that the drip emitters don't sprinkle water on the board or use the Outdoor Case we built before (Unfortunately my pot was to small to use the case..).

Large plants fare better with this type of installation it is not as utile for plants of acute size.

Thank you all and I hope this shows you a concrete idea of what you can do with the COOL Board.

Share

    Recommendations

    • Clocks Contest

      Clocks Contest
    • Water Contest

      Water Contest
    • Oil Contest

      Oil Contest

    Discussions