The crab has a very simple circuit, utilizing only pins 9-11 and A0-A2, along with the 5V and GND power pins. The photo-sensor is connected to pin A2, and detects the brightness of the environment. The value for the brightness is directly translated into a speed and direction for the servo, connected at pin A0, to rotate.
The RGB LED eyes (A and B) light up when the Arduino board is connected to a power supply, and the LEDs change color depending on the brightness to indicate which direction the crab is moving. When the crab is moving left, the LED eyes are green. When the crab is moving right, the LED eyes are blue.The flex sensor (C) was originally incorporated to provide a method to stop the servo to remove the power supply easier, but it was quickly determined that a kill switch (shown below) would be a much simpler method, especially in terms of coding.
In order to prevent the wires to get tangled in the legs, a short frame (I) had to be constructed on the undercarriage to hold the wires in place. The undercarriage itself is held in place via pins, which can be observed much clearer at the top of the image below.
The continuous servo (K) is the crab's only mechanical power supply. It is mounted at the bottom of the crab, and the servo arm is attached to a 40-tooth gear (J) which drives the gear train that rotates the leg linkages. The top 36-tooth gear (J) provides structural support, but it also allowed easy access for calibrating the legs during construction before the servo was engaged.
No comments:
Post a Comment