Arduino Automated Compost (Documentation)

Project Black Gold:

(Manual Version)

Objectives:

  1. Construct an indoor compost able to maintain itself all year.

  2. Maintain compost heat to promote bacterial growth & breakdown of buried food items.

  3. Monitor soil moisture & hydrate it accordingly via RF signaling to water reservoir or alert user to dryness.

  4. Set automated timer that alert user to verify & replace soil moisture sensors as needed if corroded.

Financial Analysis

Item:

Price:

Ship:

Amnt:

Sub Total

Source:

Arduino Pro Mini

$1.61

$2.91

1

$4.52

Arduino Pro Mini

Relay

$0.47

$1.99

1

$2.46

Relay

Buzzer (Comes as 10)

$7.98

$0.00

1

$7.98

Buzzer

Soil Moisture Sensor

$0.54

$0.84

2

$2.76

Soil Moisture Sensor

Heat Lamp

$10.99

$0.00

2

$21.98

Heat Lamp

Light Fixture

$6.99

$0.00

2

$13.98

Light Fixture

DS18B20

$1.03

$2.32

2

$6.70

DS18B20

Buck Converter

$0.65

$0.42

1

$1.07

Buck Converter

DS3231 RTC

$1.04

$0.42

1

$1.46

DS3231 RTC

Soil

$2.00

$0.00

7

$14.00

Local Walmart

Coffee Grounds

$0.00

$0.00

$0.00

Local Starbucks

Bin

$5.00

$0.00

2

$10.00

Local Walmart

Total Price

$86.91

System Execution Overview

  1. System reads data from DS18B20 to determine temperature.

  2. If temperature is too low relays are activated which turn on heat lamps.

  • If temperature is too high, relays are deactivated to cool off compost.

  1. On a specified time (using the DS3231) the micro controller will activate the soil moisture sensors to determine the soil moisture. If too high, nothing happens. If too low a buzzer activates to tell the user to add water.

Analysis

Project black gold is one of my cheaper projects as most of them are well over one hundred dollars, which I find surprising. The genesis of this project occurred when I visited Walmart in search of gardening soil for a garden I intended to grow a while back. Pursing the selection came up with dirt cheap soil that contained little to no nutrients & name brand products that were very expensive & in smaller packages.

I thought to myself if there was a way I could buy the dirt cheap soil while also enriching it so that its nutrient density is similar if not surpassing that of the brand name expensive soil. From everything I’ve heard of online it seemed coffee grounds were the best “greens” for the compost being that they’re full of nitrogen & do well once broken down by the microbes. The biggest question was how to obtain some for cheap as their cost rises significantly & I needed a lot. Luckily Starbucks gives you used coffee grounds for free, so in my usual manner I went above & beyond by calling every Starbucks in the area to save as much as much coffee grounds as possible. After picking up enough to fill half of the backseat of my car I headed home to begin programming.

Programming The Black Gold Micro Controller

1. Considering this project would result in making an indoor garden, I wanted to pay special attention to the timing & verification of the compost’s hydration. With the entire program revolving around the DS3231 RTC- which is a clock/ calendar module- my main concern was what to do if there were some kind disconnection that would screw up the entire maintenance process. My solution was to find the default year value sent when the RTC (real time clock) was disconnected, which I found was 2165. I only needed the year since putting in the months & days will inevitably create a false alarm & with year 2165 a mere century & a half a way I needed to be careful.

2. Next is the DS18B20, which is vital to maintain the compost’s internal temperature. If it were to fail the arduino pro mini would receive a value of -196, sending the relay active & frying the compost. This too required an alarm by way of activating the buzzer, so both errors would immediately alert me that there’s a disconnection in the system.

3. Lastly are the soil moisture sensors, which caused the scrapping of my last compost project. Due to a programming error, the compost was flooded with water, requiring I take a break to regroup myself since I was a novice at that time. I was very disappointed in myself, so upon constructing this project I was extra careful. Despite it, there is a type of built in issue with all soil moisture sensors that cannot be fixed by programming. The issue is that inevitably the sensor will corrode due to it being metal & gradually decompose via rusting.

Prolonging its life requires it only turn on when its taking a reading & not powering it any time afterwards. This is as simple as setting a pin HIGH when a specified time has been reached & LOW when it hasn’t. Combining it with a sixty day (two month) alarm also helps as it reminds you to verify the moisture sensor’s operation.

4. After assembling, coding , & installing the project, I noticed that upon powering the board that it would constantly flash on & off for no apparent reason. I’m not an electrical hobbyist, but this was the critical issue that stopped Black Gold’s resurrection a few months prior. After a bit of brain racking I decided to install a buck converter, which got it working!

**In my next installment for Black Gold I will post the code & schematics in a master post for you guys to copy/ critique/ improve as you wish. After that I plan to connect it to an automatic watering system to make it fully automated, so stay tuned!