This mini-project is an Arduino-based system that controls a servo-operated claw using an Ultrasonic Sensor. The design of this claw is intended for carrying objects the size of a can or smaller. However, the code written is interchangeable with other claw control systems, as long as the sensor is kept perpendicular to the ground floor at all times.
- Ultrasonic Distance Sensing: Utilizes an HC-SR04 Ultrasonic Sensor to measure the distance of objects.
- Customizable Triggers: Adjustable triggers for height and timing delays for release actions.
- Servo-Controlled Claw: The expansion and contraction rely on the torque provided by the servo motor.
- Arduino Kit (must include a servo motor, HC-SR04 Ultrasonic Sensor, and jumper wires).
- Power Supply (preferably a mini battery to install on the claw).
- Framework Material: Any suitable material can work for the framework of the claw (aluminum sheets are recommended).
- The ultrasonic sensor continuously measures the distance of the object in front of it.
- If the object is detected within the trigger parameters set on the sensor, the claw closes.
- The claw will naturally release when it reaches another trigger height.
The system uses a state machine to manage its behavior, split into four states: open, closing, closed, and opening.
- Upload the Code: Run it through the Arduino IDE using a
.inofile, and upload it onto the Arduino board. (Quick Tutorial). - Connect the Hardware: Wire the components as described in the Pin Connections section (this can be adjusted in the code).
- Power Source: Attach the Arduino board to a power device.
- Monitor Outputs: Outputs can be used to troubleshoot less reliable hardware, such as the servo motor.
This project is licensed under the MIT License.
