I created this instructable to show my development of a modular arduino robot project for the MAKEcourse at the University of South Florida (makecourse.com).
This robot uses a 3d printed case designed in SolidWorks that uses trays and slots to hold all of the components.
It is designed to be modular and upgradable through software and hardware changes that can easily be incorporated. The first stage it a Bluetooth controlled three wheeled rover.
The project is controlled by an Arduino Nano, which was chosen for its compact size as compared to the Uno which has the same capabilities.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Step 1: Components Used
3D printed parts:
- Main body case
- 2 wheels
- 2 motor mounts
Laser cut parts:
- 3 component slide in trays
- Arduino Nano
- Radio shack 276-150 PCB proto-board
- HC-05 or HC-06 Bluetooth module
- MPU-6050 6DOF Gyroscope+Accelerometer Module
- 16x2 I2C LCD display
- L298D Dual H-Bridge Motor Controller
12 volt LiPo battery
2 x 12volt 300:1 gear motors
- Ribbon cables to connect components
- Rubber bands for tires
- 3D printer
Step 2: Step 2: 3D Printed Parts
This project uses several custom designed 3D printed parts. The University of South Florida has several types of 3D printers available to students and that is what I used to print these parts with. There are 6 parts that I designed for the robot. The main body has slots that the motor mounts slide into and also 1/8 inch slots running up both interior sides with 1/8 spacing to hold the electronics trays. With the interior slotting the trays can be repositioned up or down to accommodate different size components and to move the weight up or down for a better CG as needed. In the picture of the 3D printed main body you can see some warping due to the fact that I had the part in my car on a hot Florida day and because it was printed with PLA it has a lower melting temperature that ABS does. ABS would be a better choice if the part is going to see some higher temps. I have included all the STL files in a zip file for 3D printing if you want to replicate the parts.
Step 3: Step 3: the Electrical Components
The first stage of the robot was the create a robot that I could drive with my Bluetooth on my cell phone. This can be done on a bread board using the Arduino, HC-05 Bluetooth module and the L298D motor controller. I have included a wire connection sheet indicating which wires go to which pins. The Arduino, Bluetooth module and the MPU6050(only needed to add self balancing capabilities) all fit onto the same component tray that slides into the main body. The motor controller fits onto a second tray and a third tray locks the LCD display into the top compartment.
The second phase of this build will add the ability to balance to 2 wheels. The original layout was done on a bread board, but during the testing of the balancing phase of the project the ribbon cables and MPU6050 would vibrate too much and come loose when the robot fell over.
I used hand made custom length ribbon cables that run along the back wall for a cleaner installation.
Lastly the motors are screwed to the motor mounts and simply slide into their respective c-channels at the bottom of the case. All of the trays and motor mounts are held in their locations by the lid.
Step 4: Step 4: the Arduino Code
There are two files of code for this project the BlueTooth_Rover.zip file contains the code needed to use the robot as a 3 wheeled rover and the second file Balancing_Rover.zip contains my code so far, but it is still being tweaked the get the robot to balance for my than a few seconds. I will continue to refine the balancing code and update this instructable once the code is finished. Feel free to use the code as a head start in getting the rover to balance on just two wheels.
Step 5: Step 5: Assembly
The First step in assembly is to mount your Arduino, Bluetooth and optional MPU6050 onto a bread board or proto board, then mount the board onto one of the trays. Use the wiring diagrams from step 3 for the assembly connections. The next step is to glue or screw the 2 piece motor mount together then attach the motor to the mount with screws. The wheels are 3D printed with slightly undersized motor shaft holes and drilled to there final size of just under 6mm for a press fit before gluing rubber bands to the perimeter of the wheels for grip. For the motor controller I unsoldered the out put terminal blocks from the motor controller and solder the motor wires directly to the module because the wires need clearance in the case that the terminal blocks don't have. Install nylon stand-offs onto the LCD screen as shown in the pictures. Solder 3 10k potentiometers on to a small piece of proto board with common 5v and grounds on the outside pins of each potentiometer and the center pin wires are the PID outputs. Mount the PID module to the side of the LCD. The LCD/PID assembly slides into the top hole of the case from the inside after dremeling a slot above the side that has the potentiometers on it and a tray under it locks it in place. Connect all of the boards to the Arduino master board with ribbon cables and slide them into the case as shown in the pictures. For the three wheeled rover a small caster wheel from Lowes is simply attached to the under side of the case with velcro. Install a charged battery, upload the code, link the bluetooth and have fun.
Step 6: Step 6: Final Thoughts and Video
I started this project for the Make engineering class at University of
South Florida. I really enjoyed this class and learned a lot from Dr R. Schlaf and the TAs. Dr R. Schlaf was in Awesome teacher. Making this project was the first time I used Autodesk Inventor, a 3D printer and laser cutter. This is also my first Instructable. While the semester might be over I really liked the direction this project is heading and I plan on continuing to develop this project and expand its capabilities. As soon as the code is sorted out for the balancing I have some ideas for allowing the robot to right itself if it falls over and I will make that phase 3 for the rover.
Thanks for the great learning opportunity.