Little 3D printed arduino SMARS (Screwless Modular Assembleable Robotic System) robot with UltraSonic attachment and code. This is a nice little project do due with your gild, or to give as a gift. It introduces to robotcs and the Arduino system quite entertainingly. Attachements are available from the creator's website (SMARS modular robot).
To program the Arduino Uno, you need the Arduino IDE, so download and install that. Once this is done, you need the Ultrasonic Library by Erick Simões. Below is a copy and past of his installation instructions:
- Click in
Sketch > Include Library > Manage Libraries...
; - In the search field type:
ultrasonic
; - In the list, look for
Ultrasonic by Erick Simões
; - Click on
Install
.
Once this is done, open the smars_us.ino
in the Arduino IDE. Don't forget to select the correct board in Tools -> Boards
. and hit Upload.
The default script makes the robot look if it is 5cm away from an obstacle. If not it moves forwards otherwise it rotates anticlockwise. You may easily modify the minimum distance, the forward delay (delay between the time the motors are brought to speed and the time they are stopped) and the rotation delay (similar to forward delay but with the rotation function).
#define minDistance 5
#define delayForwards 1000
#define delayRotate 5
#define delayLoop 100
They are a couple parts to print for this project. I used a CREALITY 10, but the choice is up to you. The print is quite long (> 1 full day). You should print them saperatly. I used PLA with a bed heated at 60°C and a extruder at 200°C.
- First the chassie.
- Layer Height: 0.16mm - Infill: 40% - Support (only from bottom) : ON - Adhesion layer : ON - Time: >6h
- Mechanical tracks (2 are in the file) & Holding boards x 20:
- Layer Height: 0.16mm - Infill: 60% - Support (only from bottom) : OFF - Adhesion layer : ON - Time: >6h
- Holding boards x 12:
- Layer Height: 0.16mm - Infill: 60% - Support (only from bottom) : OFF - Adhesion layer : ON - Time: >3h
- Slave and master wheels x2 (each): You need to rotate the master wheels upside down (That is with the part through which the motor goes ontop)
- Layer Height: 0.16mm - Infill: 40% - Support (only from bottom) : ON - Adhesion layer : ON - Time: >6h
- Ultrasonic connectors (3parts in total):
- Layer Height: 0.16mm - Infill: 40% - Support (only from bottom) : OFF - Adhesion layer : ON - Time: >4h
To connect the mechanical tracks together, just use the 3D printer's filament. To connect the DC motors to the wheels, insert them in the chassie, and use hot glue keeping in mind, you do not want to hot glue the wheel to the chassie, but only to the DC motor.
- This project is a light modification of the SMARS modular robot by tristomietitoredeituit. The only modification is the code and the added written instructions.
*affleliated links.