Week 4: Peanut Sweeper

From Wires to Commands



Click on the dropdown arrows to read more about each stage of this peanut sweeper project!
Idea for the Project:
My final project is a peanut crusher. A special feature this peanut crusher will have is that if peanuts start to move from the crushing space to the sides of the mortar during the crushing phase, there will be a scraper that scrapes the sides of the mortar to return the peanuts to the ideal space where the pestle will be exerting direct force.

Now that I know how to program a microcontroller, I want to see if my Arduino will be able to detect peanuts coming up the side. To do that, I will need to download and install a library called CapacitiveSensor. Capacitive sensors can be programmed to detect even the slightest interruption in the electric field in the air. For my project though, I don’t need the sensors to be that sensitive, or else, the mortar will keep on scraping the sides even when no peanuts are coming up into the space.

Therefore, it is important to classify thresholds. Even if the sides of the mortar detect peanuts, I don’t want it to be scraping with one or two peanuts stuck on the side. That is still a waste of power and energy. I want it to wait a little longer until “enough”, whatever we designate as “enough”, has accumulated before scraping the side.


Starter Code/Circuit Design:

From the Arduino project book, I found my starting point in designing a capacitive sensor.

https://www.arduino.cc/reference/en/libraries/capacitivesensor/



This is the starter code:
  
#include <CapacitiveSensor.h>

CapacitiveSensor capSensor = CapacitiveSensor(4,2); int threshold = 1000; const int ledPin = 12; void setup() { Serial.begin(9600); pinMode(ledPin, OUTPUT); } void loop() { long sensorValue = capSensor.capacitiveSensor(30); Serial.println(sensorValue); if(sensorValue > threshold) { digitalWrite(ledPin, HIGH); } else { digitalWrite(ledPin, LOW); } delay(10); }
A visual of the set up


Identifying the Threshold:
  1. First, I picked a YouTube video tutorial on how to make the planetary gearbox. The YouTube video tutorial that I followed is linked below:




  2. Before jumping into making the gearbox, I decided on some things to make sure that the gears in my gearbox will turn out to be compatible.

  3. Next, I did some math to know how to design my individual gears.

  4. I used the handy spur gear add-in to speed up the process of designing my gears.


  5. Design of the gears in Autodesk Fusion 360

  6. Creating the Carrier

  7. Design of the carrier in Autodesk Fusion 360

  8. I then laser-cut my prototype onto a mat board. I used 5 mm x 20 bolts and 5 mm lock nuts. My initial impressions are that this is so cool. This is my first-ever GEARBOX creation! Upon inspection, however, the flimsy cardboard makes it so that the gears keep on catching on each others’ teeth. So… we will now print on wood.

  9. Initial laser print of the gears and carrier

  10. I laser cut on a 6 mm general medium wood piece. The pieces fit much better together and the gears turn without catching. However, because of the head of the bolts attaching the carrier to the various gears, the inner gears do not fit with the thickness of the ring gear. The inner gears are currently at a taller height than the ring gear, making it hard for the inner gears to gain traction on the ring gear since half of it is not attached to the ring gear. To troubleshoot this problem, we printed another ring gear from a piece of wood of similar properties.

  11. I then glued the two ring gears together with wood glue, but no matter how I tried to align the pieces, they were not quite aligned. The wood glue also filled in spaces in the teeth crevices, preventing the orbiting items gears from being able to rotate effectively. The glue was occupying the spot. Therefore, I found a thicker piece of wood, 12 mm to make a 12 mm with just one piece of wood instead of two pieces.

Attaching the Motor:
Test Run with Peanuts: The peanuts are still getting shipped to me via Amazon :-) But when it comes, it will be a peanuts galore

Connecting the Orbiting Items to the Gearbox:
  1. I found 2 balls in the classroom to use as my Earth and Moon.
  2. To get my rocket and satellite, I searched up their PNGs on the internet → opened Inkscape → Path → Trace BitMap → Apply → Delete the original image → Save As → DXF 14 → Go onto Autodesk Fusion → Insert → From DXF → Select appropriate file I laser cut my images, cutting the edges, and scoring the rest.
  3. I used these bendable gold poles to nest my orbiting items on them and hot gluing the base onto the top of the spinning gears.