Initial setup<\/h2>\n It would be best to do some initial software setup before I start hooking up water pumps and making a big ol mess of my house.<\/p>\n
First I will make sure that the grow-python software is not running as a service and thus I can manually stop the program when things start going wrong.<\/p>\n
$ ssh -p 8204 pi@growpi.local\npi@growpi:~ $ sudo systemctl stop grow-monitor.service\npi@growpi:~ $ sudo systemctl disable grow-monitor.service\n<\/code><\/pre>\nNext I only want to attach 1x soil moisture sensor and 1x water pump to the system.<\/p>\n
pi@growpi:~ $ cd ~\/Pimoroni\/growhat\/examples\npi@growpi:...$ ls -la\ntotal 64\ndrwxr-xr-x 5 root root 4096 Apr 9 20:10 .\ndrwxr-xr-x 3 root root 4096 Apr 4 20:26 ..\n-rw-r--r-- 1 root root 2936 Apr 4 20:26 README.md\ndrwxr-xr-x 2 root root 4096 Apr 5 12:34 advanced\ndrwxr-xr-x 2 root root 4096 Apr 4 20:26 icons\n-rw-r--r-- 1 root root 33473 Apr 4 20:26 monitor.py\n-rw-r--r-- 1 root root 488 Apr 9 22:48 settings.yml\ndrwxr-xr-x 2 root root 4096 Apr 4 20:26 tools\n\npi@growpi:...$ sudo nano settings.yml\n<\/code><\/pre>\nDisabled Channels 2 & 3 and saved the settings.yml file.<\/p>\n
Note that I have left the auto_water<\/code> setting to false. We can turn this on using the LCD menu.<\/p>\nchannel1: {auto_water: false, dry_point: 27, enabled: true, pump_speed: 0.5, pump_time: 0.5,\n warn_level: 0.25, watering_delay: 60, wet_point: 3}\nchannel2: {auto_water: false, dry_point: 27, enabled: false, pump_speed: 0.5, pump_time: 0.5,\n warn_level: 0.5, watering_delay: 60, wet_point: 3}\nchannel3: {auto_water: false, dry_point: 27, enabled: false, pump_speed: 0.5, pump_time: 0.5,\n warn_level: 0.4, watering_delay: 60, wet_point: 3}\ngeneral: {alarm_enable: true, alarm_interval: 2}\n<\/code><\/pre>\nLearned along the way<\/strong>: You can actually change all these settings using only the LCD and buttons. However I am not sure if this works when you are running the example software directly.<\/p>\nUpdate:<\/strong> When running the monitor.py example file it does indeed make changes to the ~\/Pimoroni\/growhat\/examples\/settings.yml file. If you run grow-python as a service then the settings are store at: \/etc\/default\/grow<\/code><\/p>\nWater testing rig<\/h2>\n In order to test the pumps I decided to use one of my 20 litre food safe buckets (for a future hydroponic project) and place the pump and tube inside while attaching the Raspberry Pi + Grow HAT on the outside of the bucket using a clothes peg.<\/p>\n
Just like before I will simulate as if the soil moisture sensor is inside soil by just holding the sensor in my hand (like holding a fork between your thumb and index finger).<\/p>\n
<\/p>\n
<\/p>\n
I did some initial config from the LCD menu and did manage to get the pump to push some water through the tube and back into the bucket. However I want to tweak the settings so that I can test the pump + Grow HAT combo and then test the other 2 pumps as well.<\/p>\n
NOTE: Do not use<\/strong> these settings in your actual setup. I will be using settings for testing the pump + system in a controlled and monitored way.<\/p>\npi@growpi:~ $ cd ~\/Pimoroni\/growhat\/examples\npi@growpi:...$ sudo cp settings.yml settings.yml.bak\npi@growpi:...$ sudo nano settings.yml\n\nchannel1: {auto_water: true, dry_point: 27, enabled: true, pump_speed: 0.5, pump_time: 5.0,\n warn_level: 0.25, watering_delay: 7, wet_point: 3}\n<\/code><\/pre>\nWater will be pumped for 5 seconds (pump_time<\/code>) at half the power (pump_speed<\/code>) whenever the soil moisture sensor indicates that it is to dry. After the 5 seconds the system will wait for about 2 seconds (watering_delay<\/code>: 7 – pump_time<\/code>: 5 = 2 seconds) and if the soil is still dry it will start pumping water again.<\/p>\nBrace for impact!<\/h3>\n I am holding the moisture sensor in my one hand and the other one is typing on my laptop to start the Grow monitor.py program.<\/p>\n
pi@growpi:...$ sudo python3 monitor.py\n\nChannels:\nChannel: 1\nEnabled: True\nAlarm level: 0.25\nAuto water: True\nWater level: 0.5\nPump speed: 0.5\nPump time: 5.0\nDelay: 7\nWet point: 3\nDry point: 27\n...\n<\/code><\/pre>\nOk it does pump water, but not very well. Time to bump up the power (pump_speed<\/code>). I have set the speed to be the max = 1.0<\/p>\nAmazing it works!<\/strong><\/p>\nTesting the remaining 2x pumps<\/h3>\n Now that I have a working test rig I can move onto testing the other 2x pumps as well.<\/p>\n
I am not going to test the system with all 3x pumps and sensors attached. For that I will wait until I have my pots and reservoir system setup and then take it in baby steps to dial in the required settings.<\/p>\n
To be extra safe here, I powered down the Raspberry Pi and unplugged the power supply before removing the pump cable and pump from the system and the connect the pump under test to the system.<\/p>\n
\n✅ Pump 1 works<\/li>\n ✅ Pump 2 works<\/li>\n ✅ Pump 3 works<\/li>\n<\/ul>\nNotes for the future<\/h2>\n Note to self: The settings used by the grow-python running as a service is located at \/etc\/default\/grow<\/code><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":" […]<\/p>\n
Read more →<\/a><\/p>\n","protected":false},"author":2,"featured_media":378,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[37],"tags":[41,31],"yoast_head":"\n100 Days of Learning: Day 33 \u2013 Pumping water with the Pimoroni Grow HAT Mini - Andr\u00e9 Jacobs<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n \n \n\t \n\t \n\t \n