Open Source Hydroponic with smart aquarium

Open Source Hydroponic with smart aquarium

thingiverse

This project was living for long time in my head, then I made some part of it, and tested it for whole summer. It consists of aquarium where I monitor temperature,water level, control lights, and pumps, then there are 2 vertical gardens, one which you can see in photos is hydroponics, second is filled with soil and I can controll irrigation by small pump. Vertical tower is built from 50mm PVC tubes used for house waste. I printed ends, which I secured and sealed by silicone, then mounted it to 2 wooden boards. There are holes of 35mm drilled with big crown drill, where baskets fits. I originally ordered baskets for hydropony from aliexpress, problem was that as the tube is round, there was so much space between tube and basket. I had to design my most complicated 3D model so far, the basket itself. there are 2 files, one is with generated tree supports which works nice with this type of object. As grow material I used small cubes of mineral wool found at IKEA for few euros for pack. I pump water to the most top tube, and by cascades it flows with nutrients from aquarium produced by fish, and coming back down to aquarium. At the end of this outlet hose there is diffuser for preventing swirling of water in bottom of aquarium. There is small motor pump from aliexpress which pumps the water, second motor irrigates second tower with soil. For light I use red and blue grow strip, brightness is controlled by n-mosfet transistor, the same applies for both motors. There is also white light for fish. For temperature reading there is simple DS18b12 sensor with "waterproof" housing. Water level is measured with simple [floater like this](https://www.aliexpress.com/item/32949612847.html?spm=a2g0s.9042311.0.0.27424c4dRaM9Kv) There is box for housing all electronics, it is based on wemos d1 mini. You can find my other project [Mini Fish Feeder](https://www.thingiverse.com/thing:3729421) which you can connect to this controller. I use automation for running hydroponic pump every half hour for 3 minutes, this cycle the water in tubes and bring new nutrients. As firmware I use ESPhome, for HomeAssistant, here is my code: ``` esphome: name: smart_aquarium platform: ESP8266 board: d1_mini on_boot: priority: 600 then: - servo.write: id: servo1 level: '-10%' - delay: 1s - servo.detach: servo1 wifi: ssid: "Wifi" password: "pass" #manual_ip: # static_ip: 192.168.3.122 # gateway: 192.168.3.1 # subnet: 255.255.255.0 # dns1: 192.168.3.1 # Enable logging logger: # level: debug # Enable Home Assistant API api: password: 'pass' # services: # - service: control_servo # variables: # level: float # then: # - servo.write: # id: servo1 # level: !lambda 'return level / 100.0;' # - sensor.template.publish: # id: aktualnyUhol # state: !lambda 'return level;' # - delay: 3s # - servo.detach: servo1 ota: password: 'pass' i2c: sda: D2 scl: D4 scan: True frequency: 800kHz #ads1115: #- address: 0x48 switch: - platform: restart name: "Smart aquarium restart" - platform: template id: cerpadloRajcinySwitch name: "Pump second tower" icon: "mdi:engine-outline" turn_on_action: then: - switch.template.publish: id: cerpadloRajcinySwitch state: ON - output.turn_on: pwm_obeh_rajciny - output.set_level: id: pwm_obeh_rajciny level: 90% - delay: 15s - output.turn_off: pwm_obeh_rajciny - switch.template.publish: id: cerpadloRajcinySwitch state: OFF turn_off_action: then: - output.turn_off: pwm_obeh_rajciny - switch.template.publish: id: cerpadloRajcinySwitch state: OFF - platform: template id: krmenieServoSwitch name: "Feed fish" icon: "mdi:fish" turn_on_action: then: - switch.template.publish: id: krmenieServoSwitch state: ON - servo.write: id: servo1 level: '-60%' - delay: 1s - servo.write: id: servo1 level: '-10%' - delay: 1s - servo.detach: servo1 - switch.template.publish: id: krmenieServoSwitch state: OFF turn_off_action: then: - servo.write: id: servo1 level: '-10%' - delay: 1s - servo.detach: servo1 - switch.template.publish: id: krmenieServoSwitch state: OFF text_sensor: - platform: template name: "Smart aquarium uptime" lambda: |- uint32_t dur = id(uptime_s).state; int dys = 0; int hrs = 0; int mnts = 0; if (dur > 86399) { dys = trunc(dur / 86400); dur = dur - (dys * 86400); } if (dur > 3599) { hrs = trunc(dur / 3600); dur = dur - (hrs * 3600); } if (dur > 59) { mnts = trunc(dur / 60); dur = dur - (mnts * 60); } char buffer[17]; sprintf(buffer, "%ud %02uh %02um %02us", dys, hrs, mnts, dur); return {buffer}; icon: mdi:clock-start update_interval: 30s sensor: - platform: uptime id: uptime_s update_interval: 30s - platform: wifi_signal name: "Smart aquarium WiFi Signal" update_interval: 60s - platform: dallas address: 0x6C0302977937FA28 name: "Water temperature aquarium" dallas: - pin: D3 update_interval: 30s binary_sensor: - platform: gpio pin: number: D7 inverted: no mode: INPUT_PULLUP name: "Low water level aquarium" filters: - delayed_on: 200ms - delayed_off: 200ms device_class: moisture output: - platform: esp8266_pwm pin: D0 frequency: 1000 Hz id: pwm_obeh_hydroponia - platform: esp8266_pwm pin: D8 frequency: 1000 Hz id: pwm_svetla_hydroponia - platform: esp8266_pwm pin: D5 frequency: 1000 Hz id: pwm_svetla_akvarium - platform: esp8266_pwm pin: D6 frequency: 1000 Hz id: pwm_obeh_rajciny - platform: esp8266_pwm id: pwm_servo_krmenie pin: D1 frequency: 50 Hz servo: - id: servo1 output: pwm_servo_krmenie light: - platform: monochromatic output: pwm_svetla_hydroponia name: "Lights hydropony" - platform: monochromatic output: pwm_svetla_akvarium name: "Lights aquarium" fan: - platform: speed output: pwm_obeh_hydroponia name: "Pump hydropony" speed: low: 0.25 medium: 0.35 high: 0.35 ``` ### If You liked my work, You can buy me a coffee :) <a class="" target="_blank" href="https://www.buymeacoffee.com/luc3as"><img src="https://lukasporubcan.sk/images/buymeacoffee.png" alt="Buy Me A Coffee" style="max-width: 217px !important;"></a> ### Or send some crypto <a class="" target="_blank" href="https://lukasporubcan.sk/donate"><img src="https://lukasporubcan.sk/images/donatebitcoin.png" alt="Donate Bitcoin" style="max-width: 217px !important;"></a>

Download Model from thingiverse

With this file you will be able to print Open Source Hydroponic with smart aquarium with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Open Source Hydroponic with smart aquarium.