Do it yourself (2)

This second part of the DIY explains the electrial and software parts of the project.


Electrical Instructions

This circult will be constructed on a protoboard. Use the schematic as a guide

0. Solder header pins into the holes of the MPU-9150 board.

1. Solder the MPU-9150 board into the protoboard. Also solder the 9V battery holder, and 4 AA (6V) battery holder into the board so that the power and ground wires of both holders are all part of their own row (in order to prevent a "short"); both ground wires should be part of the same row.

2. Follow the schematic shown below as a wiring guide:

- On the MPU-9150, connect the GND pin to the "Ground" row of the protoboard, connect the VCC pin to the 3.3V pin of the Arduino, connect the SDA pin to the Analog 4 pin of the Arduino, and connect the SCL pin to the Analog 5 pin of the Arduino.



















- On the Arduino board, connect the GND pin to the "Ground" row of the protoboard and connect the Vin pin to the "9V Power" row of the protoboard

-  With the motors, connect the power lines to te "6V power" row and the ground lines to the "Ground" row of the protoboard.

    - If the motors are already mounted on the frame, find the motor which has another motor across the frame from it; this is the           y-axis. Wire the pulse wires of these motors with the Digital  9 and 10 pins of the Arduino respectively. With the remaining motor,         wire the pluse wire with the Digital 8 pin of the Arduino 


   3. Attach protoboard and Arduino to the platform (assuming the structure has already been built)

Schematic of Circuit



IMPORTANT NOTE: Make sure the protoboard with the soldered circuit is oriented on the platform so that the motors of the X and Y axis turn opposite to the direction you tilt the protoboard.

Software Instructions

The Arduino IDE was used for this project, and the source code can be downloaded by the link below (the code uses a library for the MPU6050 board). To use it, open the file in the folder named "MPU6050.ino", then click the upload button in order to upload the program into the Arduino.

Click Here to Download File