Professional Documents
Culture Documents
Parts List:
2x DC Motor with Wheels
2x Micro Servo Motor 9G SG92R
2x IR Proximity Sensor
2x Ultrasonic Sensor HC-SR04
1x Triple Axis Accelerometer and Gyro Breakout MPU6050
Wood Framework
Shrinking Tube
Wood glue
Recycled/Reused parts (cartons, newspapers, folder, paper cups, multipurpose
glue, varnish, paint, styro foam)
240p and 1000 sandpaper
L293D IC
Presensitized PCB
Ferric Chloride
Connecting Wires
Laptop
Arduino UNO
Double sided foam tape
Electrical tape
9V battery
Step 2: Building
We first made a prototype circuit using a breadboard. For the motor driver, we have
used L293D IC. We designed and fabricated our circuit in EagleCAD and print it out on
a presensitized PCB afterwards. Eventually, we drilled and soldered all the components
into our PCB.
Step 3: Making the Robot Frame
In making our frame, a thin type of wood is used. Everything that was made on the
chassis is recycled such as newspapers, used folder and paper cups. Hence, no money
was spent for the framework aside from the adhesives.The materials were bind together
using wood glue and/or multipurpose glue.
Step 4: Adding all the Electronics
We first test all the materials to be used if they are all working (like motors and sensors).
All the circuits, wires and components used were later attached to the framework.
Step 5: PID Tuning
Tuning the PID is the most important factor in balancing the robot. The increase P until
your bot starts oscillating. It may oscillate wildly or even swiftly. It should be between
these two. Increase D to reduce the oscillations. Increase I to increase its response.
Higher is the I value, quicker is the response time when it's out of balance. Larger the I
value, less is the inclination limits.
Step 6: Punch!
We have designed the punching mechanism of our robot which is upper cut. Initially, the
arms of the bot are both punching upward once it sensed an opponent. The arms are
made up of recycled carton while the fist is made from a reused styro foam. The fist was
painted yellow. The arms are therefore attached to the servo motors on each side of the
robot’s body.
Step 7: Source Code
void dmpDataReady()
{ // make sure it worked (returns
0 if so)
mpuInterrupt = true;
if (devStatus == 0)
}
{
// turn on the DMP, now that
it's ready
void setup() mpu.setDMPEnabled(true);
{
// join I2C bus (I2Cdev library // enable Arduino interrupt
doesn't do this automatically) detection
#if I2CDEV_IMPLEMENTATION == attachInterrupt(0,
I2CDEV_ARDUINO_WIRE dmpDataReady, RISING);
Wire.begin(); mpuIntStatus =
mpu.getIntStatus();
TWBR = 24; // 400kHz I2C clock
(200kHz if CPU is 8MHz)
#elif I2CDEV_IMPLEMENTATION == // set our DMP Ready flag so
I2CDEV_BUILTIN_FASTWIRE the main loop() function knows
it's okay to use it
Fastwire::setup(400, true);
dmpReady = true;
#endif
// get expected DMP packet size // wait for MPU interrupt or
for later comparison extra packet(s) available
packetSize = while (!mpuInterrupt &&
mpu.dmpGetFIFOPacketSize(); fifoCount < packetSize)
{
else
{ }
// ERROR!
// 1 = initial memory load // reset interrupt flag and get
failed INT_STATUS byte
mpu.dmpGetQuaternion(&q,
fifoBuffer);
mpu.dmpGetGravity(&gravity,
&q);
mpu.dmpGetYawPitchRoll(ypr, &q,
&gravity);
input = ypr[1] * 180/M_PI +
180;
}
}
Final Output