Let's Make Robots!

Office Plant Baby Sitter (contest entry)

Keeps my office plant healthy, wins a contest

This is my entry into the Tech Week Europe Office Gadget Challenge.

Office Plant Baby Sitter (OPBS)

        I have a nice plant in my office.  As plants do it requires a certain amount of attention or it will not thrive.  The main thing it needs is water: not too much, not too little, but just the right amount.  However, I can be away from my office for days at a time, sometimes unexpectedly. I have also been known to neglect my plant even when in the office due to extreme focus on an important project.  This is hard on the plant.

        What I need is an office gadget that will baby-sit my plant. It will automatically keep my plant at the appropriate level of moisture.  It will measure the moisture content of the soil in the pot, and when it gets too dry, move water from a resevoir into the pot.

        However, this only postpones the problem. What if I forget to fill up the resevoir when it is empty, or I am absent from the office for a few days just as it goes dry?  If I am in the office, I want it to signal me, visually and audibly, to refill the resevoir.  If I am not in the office, I want it to email (or otherwise notify) me, so I can get a co-worker to refill it for me, or make a special trip to the office to take care of it.

        In order for the Office Plant Baby Sitter to do all this, it will need a fairly sophisticated 'brain', several sensors, internet access and at least one actuator.  The sensors will include one for soil moisture, a detector to tell when the water resevoir is empty, and a light and motion detector to know when I (or someone) is in the office.  Outputs will include a multi-color LED for showing how desparately water is needed, an audible alarm to accompany it and connection to the internet for sending email and other electronic alerts.  The brain should have room for expanding the duties of the OPBS in case I get more plants, or need to add other abilities to the gadget.


  • measure the moisture of the soil of a potted plant
  • move a set/limited amount of water between a resevoir and the pot
  • detect when the resevoir is empty
  • detect when the office is occupied
  • display a visual alert graded by color
  • sound an audible alert of varying patterns
  • send email, tweet, or other electronic communication via internet
  • allow future expansion of project to include multiple plants
  • use RS Components as primary parts supplier
  • submit design to @TechWeekEurope #OfficeGadget by June 3rd, 2013.
  • do not exceed £250 in costs, minimize costs when possible

Hardware design:
        The central component of the OPBS will be a microcontroller for the brain. For this project the BeagleBone Black was chosen, due to its room for expanding the project, price (lower than some Arduino models), built in ethernet connection and sophisticated on-board software with a full set of communication and development tools (ie a full Linux distribution). The only drawback of using the BeaglBone Black is that it is a 3.3V device and not 5v compatible. However, level-shifters can be used as a general solution to this problem.  The board can be run off of a common (cheap) 5V, 2A "wall-wart" power supply.

        Office occupation detection requires two sensors: a light sensor to detect that the office lights are on, and a PIR sensor to detect when a person is present. Two light sensors will be used be used for better detection. The PIR sensor will be a simple low cost unit with digital output. If both the light sensor and the PIR sensor show activity then the office is deemed occupied.

        The most difficult sensor is the soil moisture sensor.  In concept is it simply a device that signals when the soil is dry, and the plant needs water. However, this turns out not to be so simple.  While there are many off the shelf soil moisture meters, the affordable ones are not reliable or robust, or are not compatible with a microcontroller.  The few sensors made for a microcontroller also have problems in terms of reliability over time. Simple resisitive sensors, the cheapest kind, are subject to corrosion and
accuracy problems.  A capacitive sensor with AC signal provides the most reliable and robust sensor, but is harder to interface with.

        In the end, none of the pre-made units met the requirements of accuracy, price and ease of interfacing. A fully custom solution would take a lot of parts and effort to assemble.  A compromise solution was selected, consisting of a kit for a simple moisture sensor combined with a couple of custom external circuits. The water sensor kit provides the basic sensor parts and circuit board.  The sensor requires an AC signal input and outputs an analog signal, making it somewhat difficult to interface to a microcontroller.
The requirements are that a simple digital or power input from the micro-controller will enable the sensor, and a digital output will signal it when the plant needs water.  It would also be nice to be able to adjust the threshold for different types of plants and soil.  Therefore, in addition to the kit, a 555-timer ciruit will be added to create the input signal, and a comparator circuit with a potentiometer will be added to create the output signal. The potentiometer can be used to adjust the sensitivity of the sensor.  These extra parts will be put on a perf board wired to the brain and the sensors.

        The sensor requires probes.  The probes will be constructed from copper clad PCB pieces coated with an insulating layer of paint.  The probes will be connected to the sensor boards via a pair of wires, so that the electronics can be placed away from the plant where they will not get wet.

        The water resevoir will consist of 3 parts: the tank, the dispenser and the actuator.  The tank will simply be a recycled 2-liter bottle from either soda or water.  The dispenser will hold the bottle in an upright, inverted position higher than the plant soil.  It will have a lever that lets water flow when pressed.  Several off the shelf dispensers are available for good prices. For refilling, the bottle is unscrewed from the dispenser and filled, then the bottle is screwed into the dispenser and reinverted.  The sensor wire and tubing must be long enough to allow easy refilling.

        A simple resistive sensor will determine if the water tank is empty or full.  Two wires with bare ends will be placed in the dispenser just above the outlet.  When water is present, current will flow between them and indicate that the resevoir is not empty.  With no water, the resisitance between the wires is much higher.  By using another comparator circuit, a digital output can be created to interface with the microcontroller. The sensor will only be activated for brief pulses every minute or so, avoiding
issues with corrosion.

        The tubing will extend from the outlet of the dispenser to the plant soil.  No pump is necessary, since gravity will pull the water from the dispenser down the tube to the soil.  The servo will be connected to the dispenser lever.  The servo-motor will allow the microcontroller to press the lever to water the plant. Since the lever is spring-loaded, the servo can be turned off when watering is not needed.  Since speed is not an issue but strength may be, a geared servo will be used.  To keep the design simple, the servo will be powered from the same 5V supply as the brain. The control signal for the servo will be connected to the microcontroller.

        For appearance and safety, the entire project will be enclosed in a plastic project box.  The box will contain the brain (BeagleBone Black), the soil moisture assembly, the resevoir sensor assembly, the display light, the signal buzzer, the two light sensors and the PIR sensor. There will be openings for connector for a power supply, the two light sensors, the PIR
sensor, the ethernet cable plug, the display light and the buzzer. There will also be connectors for the soil moisture sensor, the resevoir sensor and the servo control.  An optional opening that will allow setting the sensitivity of the soil moisture sensor may be included as well.  The wires to the sensors and servo should be long enough so that the case is in no danger of getting wet when the plants are watered or the resevoir is refilled.

Software design:
        All the software will run on the brain: the BeagleBone Black. Since it is a full linux distribution all of the development tools should be freely available.

        The main program will consist of a daemon that runs in the background.  Every 60 seconds the daemon will wake up and perform a series of tasks.

  • read soil moisture
    • enable soil moisture sensor
    • wait for sensor to stabilize
    • record status of sensor (wet or dry)
  • read water resevoir status
    • record status of water resevoir sensor (empty/not empty)
  • read office occupation sensors
    • read light sensor 1
    • read light sensor 2
    • if both sensor 1 and sensor 2 detect light
      • set office lights status to lights on
    • read PIR proximity sensor
    • if sensor shows human presence
      • set office presence status to in office
    • if lights on and in office
      • set office occupied to yes
    • else
      • set office occupied to no
  • if resevoir is not empty
    • reset urgency to 0
    • if plants are dry
      • activate servo to open resevoir
      • wait WATER_TIME seconds
      • deactivate servo to close resevoir
  • else (resevoir empty)
    • if office is occupied and haven't signaled in over an hour
      • activate led signal (color determined by urgency)
      • activate buzzer signal (pattern determined by urgency)
    • else if haven't emailed in over a day
      • send email (subject contains urgency)
    • increase urgency
  • go back to sleep

        Each action and sensor reading of the daemon will be logged to a file for analysis and debugging purposes. Programming, monitoring and debugging of the BeagleBone can be done via an internet connection, or using the built-in serial port as a terminal.

        The tasks of setting up the BeagleBone Black, connecting to the internet, starting the daemon and sending email will all be done by the operating system and support programs.  Only the daemon itself needs to be custom written.  It can be written in a low-level language such as C/C++ or Java, or as a script in Python or Perl.

  Physical Layout


Parts list:

partQtycurrencycostsourcePart #
------- ----------------
BeagleBone Black1£31.65RS components775-3805
power supply1$8.99Mouser533-WSU050-2000
level shifter chips10£11.50RS components709-4639
TSSOP socket5£26.40RS components158-2929
soil sensor kit15.95Tuxgraphicsadd-on parts eth flower care
555 timer IC2£0.86RS components709-4639
potentiometer2£1.64RS components691-7658
comparator chip2£0.56RS components810-267
light sensor2£2.50RS components609-9090
PIR sensor1£20.09RS components327-7326
copper clad board1£2.71RS components219-2139
flexible tubing1£5.40RS components293-1990
3-color LED1$1.19Mouser604-WP154A4SUREQBFZW
buzzer1£1.24RS components754-1993
servomotor1$4.00Deal Extreme35764
dispenser1$7.80Deal Extreme174397
perf board1$3.00Deal Extreme130926
project case1£3.99RS components502-657
straight connector1£0.44RS components547-3166
90 deg connector1£1.03RS components547-3223
capacitors 10nF5£1.00RS components538-1411
capacitors 10uF10£1.80RS components538-1203
resistorslots$5.70Deal Extreme151155
 subtotalshppingtaxtotalsEquiv £
Subtotal £112.810.0022.56135.37135.37
Subtotal €5.951.960.007.916.76
Subtotal $21.694.991.7928.4718.93
TOTAL    161.06

Equiv US $242.30

To add a second plant sensor:

soil sensor kit1€ 5.95Tuxgraphics
555 timer IC1£ 0.43RScomponents
potentiometer1£ 0.82RS components
comparator chip1£ 0.28RS components

total with shipping and tax = £ 9.93



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

BBB overkill?