Plant Emoji - borq79/cs.edu GitHub Wiki

Plant Emoji

Parts List

Instructions

There are two sets of instructions for this project. It is a good idea to first mock up the project to ensure everything works before moving on to the final assembly that involves soldering parts together.

Mock up the project

Programming the Arudino Uno

  1. Download the code here
  2. Open the Arduino IDE
  3. Compile the Source
  4. Send the Program to the Arduino. Instructions here on how to do this.

Wire mockup

  1. Run a red male-male wire from the 5V pin on the Arduino into the red positive row of the breadboard located beside row j.

  2. Run a green male-male wire from the GND pin on the Arduino to the blue negative row on the breadboard located beside the red positive row.

  3. Locate the soil sensor and the soil sensor board

  4. Connect the two parts using female-female wires. Note that the sensor board has a + and - on the pins. See the image below for an example. Note the color of the wires and the orientation of the parts. The + leads to the gray wire, and the - leads to the purple wire. In later steps these pins are going to be soldered together rather than using the two female-female wires.

  1. Wire up the sensor board according to the schematic. NOTE Your part may have 4 pins. The D0 is not used. Just use Vcc, GND, and A0. The schematic diagram is wiring up A0 using the grey wire.

  2. Wire up the display matrix according to the schematic. NOTE The pins may be in a different order on the part then what is described here or what is in the diagram. The diagram, for example, has the CS and CLK lines in a different order.

  3. Place the Piezo so that one leg goes into the GND (blue) row of the breadboard and the other leg is connected via a female-male wire that goes to pin 6 of the Arduino.

You should now be able to power up the board either using the USB cable plugged into the PC or using a 9V battery and adapter. NOTE Don't plug the USB and the 9V battery in at the same time.

To test your setup, grab a moist paper towel and place it across the two legs of the soil sensor. When the towel is on the sensor the face on the display should be happy. When it is removed it should be sad. It will be sad when the board first powers on.

Final Assembly

These steps are used to create a setup that will sit in the potted plant. It can be tricky, and there is no 'right' way. The goal is to keep the part as compact as possible and to keep the wires short and out of the way. It is recommended that you leave your mock up together as a reference and move only one part at a time to the expansion board.

  1. The expansion board has two sides. The side with the pin headers (black rectangles with holes in them) is the top. The Arduino will go under the board so that the pins from the underside of the expansion board will to into the Arduino's headers. Make sure the pin names line up (for example the A0 pin on the expansion board fits into the A0 pin of the Arduino). They should all line up evenly. Don't push the board all the way in yet, this is just to test that things fit.
  1. Put the Arduino over the side for the next few steps

  2. Cut several ~2" wires that match the colors in the schematic and strip both ends of each wire

  3. Solder the wires to the corresponding pins on both the matrix

  1. Solder the soil sensor and the soil sensor board together and attach the wires to the sensor board
  1. Pick up one of the blue wires and loop one end of the wire and place it over the respective pin of the expansion board where the Arduino pin A0 will sit. For example, in this image the A0 pin is being wired up. Note that the non-hooked end will go into one of the pads on the expansion board that has 3 pins connected. Solder the hooked end to the pin on the expansion board. Solder the other end into the expansion board with the 3-wide pin. NOTE When soldering the side with the hook, make sure it is as close to the board as possible so the Arduino can fit on top of the pin when assembly is finished
  1. The parts should start to look like this before proceeding to the next step
  1. Repeat the above step for remaining 4 wires that go into the Arduino. Hook each end, solder to the respective pin and then run to a pin with 3 connected. Their colors will be yellow (2x), blue, and white. Blue goes to pin 2, yellow to pin 3 and another to pin 6. The white goes to pin 4.

  2. Turn the part over and secure any remaining wires and trim them.

  1. Run the Vcc and GND wires from the parts to the vertical running 5V and GND lines on the expansion board

  2. Solder them in place

  3. Run the wires to their respective 3-wide holes with the corresponding color (on the underside) and pin.

  4. Solder them in place

  1. Plug the Arduino into the expansion board
  1. Test the board using a 9V battery and the wet paper towel

  2. Secure the matrix and soil sensor to the part using hot glue

  3. Secure a 9V battery to the back of the Arduino with hot glue

Schematic

Code

Arduino Source