Inspiration

We wanted to build a project for plant owners going on vacation, people who are forgetful, people who are disabled, or just people who want to keep their plant healthy while they are gone.

What it does

Built in temperature and soil moisture sensors give plant owners live updates on how warm the plant is and how moist the soil is. Along with a built in camera pointed at the plant, owners can see their plant and water it with one tap, no matter where they are.

The planter runs its own Wi-Fi network, so it works anywhere with no router setup and no cloud account. You connect your phone or laptop to the planter, open the app, and everything is live: a moisture ring, the temperature, the camera view, and a Water button. The app also keeps a journal of every watering and every day the soil got dry, and shows the plant as a little sprout character whose mood follows the soil, so you can tell at a glance if it is thirsty.

How we built it

The planter was 3D modeled in SolidWorks during the first day of the hackathon, and was custom designed to fit all the electronics. It was 3D printed overnight and soldered and assembled on Sunday morning.

On the electronics side, one ESP32-S3 CAM board does everything: it reads a capacitive soil moisture probe and a waterproof DS18B20 temperature probe, drives a relay for a small submersible pump, captures frames from the onboard camera, and hosts a Wi-Fi access point with a web server.

The firmware is written in C++ with PlatformIO and the Arduino framework. It is split into small modules, one each for sensors, pump, camera and the web server, that only talk to each other through a few function calls. The camera runs in its own task so a slow frame can never freeze the server, the temperature probe is read without blocking, and the pump has three layers of protection: a cooldown between runs, a daily limit, and a hardware timer that turns the relay off even if the software hangs.

The app is built with Expo and React Native, so the same code runs on iOS, Android and in the browser. It talks to the planter through a tiny JSON API with just three calls: get the status, water the plant, and grab a camera frame. Having that contract written down early let one of us build the hardware while the other built the app, and a demo mode with fake data meant the app could be designed before the planter was even wired.

Challenges we ran into

There were a few hardware issues such as faulty wires and drivers, but we dissected the electronics and diagnosed the issues. We fixed them by resoldering the wires or replacing drivers if needed.

The software had its share too. The temperature tile stayed empty for a long time until we realized the code was written for a DHT sensor while our kit shipped a DS18B20, which speaks a completely different protocol, so we swapped the driver. The camera came out upside down and had to be flipped in the sensor itself. And on a locked-down laptop the firewall blocked the phone from loading the app during development, which pushed us to make the planter more self-contained.

Accomplishments that we're proud of

We finished it with time and we all worked efficiently. We were proud to create a product that we would use ourselves.

We are also proud that the whole thing works offline on a single board, that the pump cannot get stuck on, and that the firmware builds, the app typechecks, and the unit tests pass automatically on every push.

What we learned

We learned how to work better as a team and collaborate, we also learned how relays worked and how to diagnose issues.

We learned to read a serial log before guessing, to check what sensor is actually in the box before writing code for it, and that agreeing on a small API early makes two people twice as fast.

What's next for Smart Planter

Install a higher quality camera for the Smart Planter, a model with a bigger reservoir for less time having to refill, and automated watering so you do not have to press the button yourself. We would also like to add an air humidity sensor, let the planter join your home Wi-Fi so you can check on it from anywhere, and send a notification when the plant gets thirsty.

Built With

Share this project:

Updates

Submission history