Sriharsh and Sathwik 1
Sriharsh and Sathwik 1
Base Design
The base will house the microcontroller, motors, wheels, battery
pack, and sensors. The size should be within 8.5 x 11 inches.
Arm Design
The extendable arm will use telescoping sections or folding
mechanisms to increase its reach. The arm will be controlled by
servos.
Gripper Design
The gripper will use flexible fingers to hold various objects securely.
Force sensors will help adjust the grip.
Wiring and Electronics
Setup
Connect Motors to Microcontroller:
Connect the motor driver to the microcontroller.
Wire the motors to the motor driver outputs.
Sensor Connections:
Connect the MPU6050 to the I2C pins.
Wire the proximity sensor to the digital input pins.
Connect the force sensors to the analog input pins.
Power Connections:
Connect the battery pack to the power inputs on the microcontroller and motor driver.
Programming the Robot
#include <Servo.h>
#include <Wire.h>
#include "MPU6050.h"
MPU6050 mpu;
// Define servos
Servo armServo1;
Servo armServo2;
Servo gripperServo;
// Define pins
const int armServo1Pin = 9;
const int armServo2Pin = 10;
const int gripperPin = 11;
const int forceSensorPin = A0;
const int motorPins[] = {3, 5, 6, 9};
void setup() {
Wire.begin();
mpu.initialize();
armServo1.attach(armServo1Pin);
armServo2.attach(armServo2Pin);
gripperServo.attach(gripperPin);
for (int i = 0; i < 4; i++) {
pinMode(motorPins[i], OUTPUT);
}
Serial.begin(9600);
}
void loop() {
// Read IMU data
int16_t ax, ay, az;
mpu.getAcceleration(&ax, &ay, &az);
float tiltAngle = atan2(ay, az) * 180 / PI;
int forceValue = analogRead(forceSensorPin);
int gripperPosition = map(forceValue, 0, 1023, 0, 180);
gripperServo.write(gripperPosition);