Electrical

Electrical Component Overview & Plan

The Raspberry Pi

The raspberry pi takes pictures of the plants using a pi camera module and uploads it to firebase where it can be fetched by the app. We run the Python script controlling the cameras on startup to ensure that the Smart Garden still works when disconnected from power without any additional set up.

Materials

  • The Raspberry Pi 3 B+
  • Boost Module
  • Power Supply Adapter
  • Raspberry Pi Extender
  • Raspberry Pi Camera Module
  • External Power Supply
The Arduino

The arduino draws data from the database to check when the plants were last watered and then via a relay turns the pumps on or off when the elapsed interval between watering has passed. Similarly with the lights, it uses a library to control and set the color and turn lights on and off for certain time periods. It also reads input from the water sensor and writes to the database when the time comes to refill the tank. We use the digital output pins to control specific compononets.

Materials

  • Arduino Uno Rev 3
  • Breadboard
  • Breadboard Jumper Wires
  • 12.0V AC Adapter
  • 5.0V Power Supply
  • CQRobot Ocean Water Sensor
  • ESP8266 module
WiFi Module

We use the ESP8266 to receive data from the database, however we can not control the output pins of the Arduino through the ESP8266. Instead, we use serial communication to tell the arduino what to output.

Water Pumps

The pumps connect to a 5V relay which receives inputs from a digital pin on the Arduino. When the Arduino receives a command from the ESP8266 telling it to turn on watering, the digital pin for the corresponding water pump will turn on causing the relay to send power to the pump.

Light System

The LED strips are controlled by the Adafruit Neopixel library allowing us to set the color of the individual lights. When we receive a command from the app the ESP8266 writes to the arduino and the arduino utilizes the library to turn the lights on.

Water Sensor

The water sensor connects directly from the tank to the ESP8266. This will prohibit any watering commands to be sent when the tank is empty. We also update the database when the water sensors senses no water in the tank.

Electrical Set Up