MechaMaven: the Educational Robot Explorer

by earldanielph in Circuits > Robots

22696 Views, 122 Favorites, 0 Comments

MechaMaven: the Educational Robot Explorer

Thumbnail 1.jpg

Hi everyone! I'm Earl Daniel Villanueva, the founder of Evtech, and for today's project, we're going to build MechaMaven: The Educational Robot Explorer.

But hey, you might be wondering, Earl, how can you claim that this is an educational robot?

Well, I specifically designed this for educational purposes. It has 10 output pins to connect 10 sensors or an LCD. It also has 2 output pins for the I2C interface. It includes 4 motor drivers to operate 4 motors, with the option to add up to 6 servo motors. Also, it is equipped with a passive buzzer to play music, and much more! This robot can be controlled using a PS3 controller, a mobile phone, and a computer. But for today's video, we are going to focus on controlling this robot using a PS3 controller.

VIDEO TUTORIAL:


Supplies

1.png
2.png
3.png
4.png
5.png
6.png
7.png
8.png
9.png
10.png
11.png
12.png
13.png
14.png
15.png
16.png
17.png
18.png
19.png
20.png
21.png
22.png
23.png
24.png
25.png
26.png
27.png

Let's start with the things you will need: 4 pcs of DC geared motor, Mecanum left and right wheel pair, 4 pcs of 2-pin female JST connector, 4 pcs of 2-pin male JST connector, 2 pcs of 18650 battery, 1 pc of 18650 battery holder, a male header pin, 1 pc of slide switch, a female header pin, an ESP32 D1 Mini, 2 pcs of 4-pin female JST connector, 2 pcs of 3-pin female JST connector, a PS3 controller, a mini USB, a micro USB, the PCB, a PCB stencil, 8 pcs of 2.7mm x 29mm screws and their nuts, 4 pcs of 1.8mm x 10mm screws and their nuts, a 3D-printed spacer, and the 3D-printed body.

Components:

1. DC geared motor - 4 pcs

2. Mecanum left and right wheel pair - 1 pair

3. 2-pin female JST connector - 4 pcs

4. 2-pin male JST connector - 4 pcs

5. 18650 battery - 2 pcs

6. 18650 battery holder - 1 pc

7. Male header pin - 1 pc

8. Slide switch - 1 pc

9. Female header pin - 1 pc

10. ESP32 D1 Mini - 1 pc

11. 4-pin female JST connector - 2 pcs

12. 3-pin female JST connector - 2 pcs

13. PS3 controller - 1 pc

14. Mini USB - 1 pc

15. Micro USB - 1 pc

16. PCB - 1 pc

17. PCB stencil - 1 pc

18. 2.7mm x 29mm screws and their nuts - 8 pcs

19. 1.8mm x 10mm screws and their nuts - 4 pcs

20. 3D-printed spacer - 4 pc

21. 3D-printed body - 1 pc

Surface-Mount Device (SMD) Components:

1. L9110S IC - 4 pcs

2. 0.1 µF capacitor - 2 pc

3. 10k resistor - 2 pc

4. 22 µF capacitor - 2 pc

5. 10 µH inductor - 2 pc

6. 26.1k variable resistor - 2 pc

7. MP2307 IC - 2 pc

8. 10k resistor - 2 pc

9. 3.9 nF capacitor - 2 pc

10. 6.8k resistor - 2 pc

11. 0.1 µF capacitor - 2 pc

12. 100k resistor - 2 pc

13. 10 µF capacitor - 4 pc

14. LED indicator light - 1 pc

15. 1k resistor - 1 pc

For the hand tools and fabrication machines, you will need a soldering iron, a soldering pump, soldering wire, soldering lead, a hot air SMD rework station, solder paste, tweezers, and a 3D printer to print the body of the robot.

Hand Tools and Fabrication Machines:

1. Soldering iron

2. Soldering pump

3. Soldering wire

4. Soldering lead

5. Hot air SMD rework station

6. Solder paste

7. Tweezers

8. Phillips Screwdriver

9. Wire Splicer

10. 3D printer (to print the body of the robot)


If you are interested in the PCB Gerber file. You can find it in the GitHub file package link. You can buy 10 pieces of the board for $5 (be sure to input 10pcs. since 5pcs is set by default). I do appreciate it when you buy from my PCBway link, I use the commission to fund my other projects and tutorials, your support would be much appreciated.

GitHub Link: https://github.com/earldanielph/MechaMaven

PCBWay Link:

3D Print Some Parts

28.png
29.png
30.png

The first thing we need to do is print the body of this robot, followed by printing these 4 pieces of spacer.

Soldering Time!

31.png
32.png
33.png
34.png
35.png
36.png
37.png
38.png
39.png
40.png
41.png
42.png
43.png
45.png
46.png
47.png
48.png
49.png
50.png
51.png
52.png
53.png
54.png
55.png
56.png
57.png
58.png
59.png
60.png
61.png
62.png
63.png
64.png
65.png
66.png
67.png
69.png

First, we need to place the stencil on top of the PCB. Then, apply a decent amount of solder paste and spread it over the holes in the stencil. After doing that, remove the stencil from the PCB.

 

Next, place all the SMD components, starting with the L9110S IC, followed by the 0.1 uF capacitor, and the 10k resistor. From this point, I'll just list the names and values of the components based on their placement on the PCB: a 22uF capacitor, a 10 uH inductor, a 26.1K variable resistor, an MP2307 IC, a 10K resistor, a 3.9 nF capacitor, a 6.8K resistor, a 0.1 uF capacitor, a 100K resistor, and two 10 uF capacitors. Repeat this process on the other side of the PCB. Also, don't forget the LED indicator light and the 1K resistor. Look at that! It really looks awesome! Now, using a hot air rework station, melt the solder paste, which will effectively position the components correctly.

 

After that, it's time to solder all the THT components, starting with the 2-pin JST female connector, followed by the slide switch. Next, solder the 3-pin and 4-pin JST female connectors, the 18650 battery holder, the passive buzzer, and the female header pin for the ESP32.

 

And there you have it, we're done placing all the components on the PCB.

Yes, of course, I have provided the Gerber files and the schematic diagram for this project.

Now, it's time to solder the male header pins of the ESP32.

The 3D Printed Body

71.png
72.png
73.png
74.png
75.png
76.png
77.png

Now it's time to attach the PCB to the 3D-printed body. Start by inserting the 4 pieces of 1.8mm x 10mm screws into the PCB, making sure to place the spacers between the PCB and the 3D-printed body. After that, secure them with the nuts.

The Motor

78.png
79.png
80.png
81.png
82.png

Of course, this robot car will not work without the motors. We need to attach all 4 motors to the 3D-printed body first. Secure them in place using the 2.7mm x 29mm screws and their nuts.

Solder the Wires of the Motor

83.png
84.png
85.png
86.png
87.png
88.png
89.png
90.png
91.png
92.png
93.png
94.png
95.png
96.png
97.png

In this part of the tutorial, we need to do some soldering again. We need to solder wires from the PCB to the motors, and we will use the 4 pieces of 2-pin male JST connectors.

 

For the orientation of this robot, remember that this is the front part. If you look closely at the PCB, there are indicators showing where to connect the wires from the motors to the PCB. For instance, "MFR" stands for Motor Front Right, meaning this is where you will connect the wire from the front right motor of the robot to the PCB. So make sure to take note of that.

The Mecanum Wheel

98.png
99.png
100.png
101.png
102.png
103.png
104.png
105.png
106.png

Now, we need to attach the Mecanum wheels to the shafts of the motors. Before doing this, make sure you are placing the wheels in the correct orientation. The Mecanum wheel has a specific mechanism and will not work properly if it is not placed correctly.

 

If you look closely at the Mecanum wheel, there are labels indicating whether it is for the right or left side of the robot. So in this case, since these are the wheels for the right side, I'll attach these two wheels to the right side, and the other two to the left side of the robot.

Downloading the Arduino IDE

107.png
108.png
109.png
110.png
111.png
112.png
113.png
114.png
115.png
116.png
117.png
118.png

It's programming time! But before we can program the ESP32, we need to download the Arduino IDE. First, go to the Arduino website and download the Arduino IDE.

After clicking the download button, wait for the download to complete. Once done, we need to install the Arduino IDE. Click on the downloaded file, and follow the installation steps: click "I agree," then "Next," and finally "Install." Once the installation is complete, click the "Finish" button to run the Arduino IDE.

Link: https://www.arduino.cc/en/software

Downloading the Code

119.png
120.png
121.png
122.png
123.png
124.png
125.png
127.png
129.png

We need to open the browser again and go to my GitHub repository to download the code. You can do this by typing github.com/earldanielph.

After that, all my repositories will appear, and you need to click on "MechaMaven." Once there, click on "Code," and download it as a zip file.

Click on the downloaded file, right-click, and extract the file. Then, open the "MechaMavenByEvtech" code.

Link: https://github.com/earldanielph/MechaMaven

Downloading the Necessary Library

130.png
131.png
132.png
133.png
134.png
135.png
136.png
137.png
138.png
139.png
140.png
141.png
142.png

This time, we need to download the PS3 Controller library. Copy this part of the code and paste it into your browser. Click on this link and then this one. Click on the code and download it as a zip file. After that, go to Sketch, include library, add .ZIP library, and select the downloaded library file.

Link: https://github.com/jvpernis/esp32-ps3/tree/master

Downloading the ESP32 Board Manager

142.png
143.png
144.png
145.png
146.png
147.png
148.png
149.png
150.png
151.png
152.png
153.png
154.png
155.png
156.png
157.png

Go back to your browser and type 'ESP32 download manager'. Click on this link, scroll down a bit, copy the URL. Return to your Arduino IDE, click on 'File', then 'Preferences'. Click on this, and paste the URL you copied from the website earlier. Click 'OK', and then click here. Now, go to 'Board Manager', type 'ESP32', and install the ESP32 board manager under Espressif Systems.

Link: https://randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/

Downloading Sixaxis Pair Tool

158.png
159.png
160.png
161.png
162.png
163.png
164.png
165.png
166.png
167.png

Now, return to your browser to download the Sixaxis Pair Tool. Type 'Sixaxis' into your browser, click on this link, and hit the download button. Just wait for it to start downloading. Once it's done, open the file, click 'Next', then 'Next' again, click here, and hit 'Install'. Once installation is complete, click 'Finish'.

Link: https://sixaxispairtool.en.lo4d.com/windows

Getting the MAC Address of the PS3 Controller

168.png
169.png
170.png
171.png
172.png
173.png
174.png
175.png
176.png

This time, we need to open the Sixaxis Pair Tool and insert the USB cable from the computer into the PS3 controller. Once you've done that, the MAC address of your controller will appear on the Sixaxis Pair Tool.

In my case, this is my MAC address, and I will type it into my code. After getting your MAC address, you can now remove the USB cable from your computer going to your PS3 controller.

Uploading the Code to ESP32

177.png
178.png
179.png
180.png
181.png
182.png
183.png
184.png
185.png
186.png
187.png
188.png
189.png

And finally, we are now going to upload the code to the ESP32. Make sure to connect the micro USB cable from your computer to your ESP32. Now, click on 'Tools', then 'Board', select 'Wemos D1 Mini ESP32'. Click on 'Tools' again, then 'Port', and choose the appropriate port for your ESP32. In my case, it is COM24. Finally, click 'Upload'.


Once the uploading is done, you can now remove the micro USB cable from your ESP32 and connect your ESP32 to your PCB.

Demo

Demo GIF (1).gif
190.png
191.png
192.png
193.png

There you have it—the project is completed! It's time to sit back and enjoy the fruits of your labor.

Enjoy!

YouTube Thumbnail.jpg
1.png

And that's it for today's video. This has been Earl Daniel Villanueva, and as always, keep learning and having fun! Bye