Making Your Own Composter

Make your own composter, add my code from github, and register for this app

Supplies


Ordering parts



  1. To start this project it is best if you think about breaking up the composter into pieces. To begin with I will walk you through ordering and setting up the appropriate devices. Again, no need to worry about code because if you order the correct parts you can use my exact code
  2. Order soil moisture sensor sht10 it is part of the sht1x series and although it is a little more expense then other soil moisture sensors it offered a water proof cover and tracks temperature and humidity.https://www.adafruit.com/product/1298
  3. Order a relay. I used an 8 prong relay because we need multiple sections of this relay and it is cheaper then buying multiple relays. There are a few additional features that may be added some day that would also use the relay. http://www.hobbytronics.co.uk/8-channel-relay-board To set up the relay you can watch this You Tube video https://www.youtube.com/watch?v=oaf_zQcrg7g The video is good for setup but the code is not what we need so when he gets to the code you can stop the video or try it out for practice and understanding but know that we won't be using that code.
  4. 12v drill that you can ruin. The specifics of the drill are less important as long as it is 12v and you know you are going to take it apart. I bought the cheapest 12v drill they offered at Harbor Freight. I bought a cordless, took off the battery, and hooked the wires directly to my wiring system
  5. A compost bin can be made or bought but if you want to set it up how I set it up (which I recommend so wires do not get tangled) then you will need to have a bin that rotates around a secure center post.http://www.ebay.com/itm/like/182206259455?lpid=82&chn=ps&ul_noapp=true this is the composter I used.
  6. Raspberry Pi. I used a model B but you can use any. If you use the one I used then you also need a wireless dongle. If you do not use the one I used you may need to look up pin configuration because some Raspberry Pi's are built with extra pins and the numbering may be different.
  7. 12volt water valve to use for the watering system https://www.adafruit.com/products/997?gclid=Cj0KEQjwsai_BRC30KH347fjksoBEiQAoiaqsQmReRZKJox_INCFEuEkslj2iodzXp6orYL3OyX0T7UaAq8W8P8HAQ
  8. 12v to 5v step down converter https://www.amazon.com/Nextrox-Converter-Power-Supply-Module/dp/B00A71CMDU

Making Circuits

    Prior to starting I am not going to walk through setting up the Raspberry Pi so if you are new to Raspberry Pi I suggest you look at the documentation on the Raspberry Pi site or
    https://www.raspberrypi.org/help/
  1. Set the relay up as demonstrated in this video https://www.youtube.com/watch?v=oaf_zQcrg7g This connects the relay to the raspberry pi. The ground pin recommended for the relay is already used for the sensor so you can choose to (pin 6), however pin 9 is also a ground pin so you can either plug the relay into ground pin 9 or connect both pins to an external circuit board that is hooked to the pin.
  2. Congratulations if you made it here your circuit is totally set up and ready to go! Now would be a good time to get the code off git hub onto your raspberry pi. Depending on how much you have used or set up your raspberry pi you may need to set up git in order to clone the repository https://github.com/Jayme-T/AmalgamateBackEnd

    At this point you should be able to run your relay by either logging into your raspberry pi or sshing into your pi and typing the following in the command line

    python relay.py


    this code will open one relay, pause, open a second relay, pause, and then turn them both off. You will hear loud clicks and this is just the switches in the relay being flipped. You should also be able to run

    python app.py


    this will start a server on port 5000. If these are not working see the trouble shooting section at the bottom of this page. Otherwise if everything is working we will start putting things together.

Building the Compost

    The relay is working but how do we make it work in our favor?
  1. To begin with you will need to decide how you want to power your compost. You can use any power source you feel comfortable with so long as it is 12v, able to be waterproofed (even in a plastic container if needed), and has or you can implement a current regulator.
  2. Once you know what your power source is, use thick wire to connect your power supply to the 12v to 5v converter and plug this in to your Raspberry Pi (I used a typical mini usb plug that I cut off the wall plug part and hooked to my battery system to easily still plug in my pi from my converter).
  3. Once your pi is plugged into your power system you should hook the water valve up to relay two. This will keep the valve closed unless the relay is open then the electricity will move a magnet that will open the valve and let water flow through the compost. I chose to put my water supply in a 5 gallon bucket above the composter which let me use gravity as the source of water flow. If you water supply is below the compost then you will also need to hook up a water pump.
  4. You will also need to buy and set up tubing. Make sure it fits securely and you use rings to tighten it to prevent leaking
  5. Hook the drill to the first relay in a similar manner. For this part depending on the drill, the current that goes through may be too high and short your relay. This is where you may want to put a current regulator between your battery and your relay. This will limit the amount of current that is able to flow to your relay and ultimately to the drill. For the drill I used this was a needed feature but it may not be for all drills.
  6. On the end of the drill hook a wheel. This wheel will push against the compost on a board (counter weighted by bricks in my case to press the wheel against the compost). This wheel will turn when the drill turns and press agains the compost it will cause the compost to turn as well. It is important the the wheel is not too small and that it is not wearing on the compost bin over time. Another possibility for this is a belt but that is not how I set mine up.
  7. Now that all the pieces are together the final step is to put it together. For my compost I put it on a platform that is one wheels because I knew I would be moving it a lot. This is not something that would be needed for a backyard compost bin. It is important that all wires, electronics, batteries, and so fourth are covered from exposure to the elements. I achieved this by placing everything in plastic containers with holes cut out for one wire tube (which held all the wires) then I used an epoxy like agent to seal the edges.
  8. Final composter
  9. Final composter back