CAD software used - SolidWorks
Manufactured - 3D Printed
For an introduction to robotics class we were presented with an open ended term project in which we had to create a mechatronic system using at least 2 sensors and 2 actuators.
We used 2 stepper motors with a driver board powered by 7.4V, and 3 ultrasonic distance sensors controlled by a Raspberry Pi Pico powered by a 3.7V battery.
The first step to our design process was to get our parts into a CAD file and get the documentation for all actuators and sensors so we can figure out our external power supply values.
We used GrabCAD to get sensors, actuators, and microcontrollers, and designed and 3D printed necessary parts like the holders for the stepper motors and distance sensors.
Since I took the lead on this project I tried my best to give work to my teammates in a way that was easy to comprehend. A strategy I used was trying to propose our real life problems that needed to be solved in the form that was taught in our lectures and given to us in our homework.
After getting our theoretical design in CAD I 3D printed and bought all our needed parts. Then as one of my team members made a simple function that revolved around stepping the motor 1 full revolution, I began to make the physical maze.
We were using cardboard as walls and in order to stand up the cardboard I designed clips that acted as stands for the walls.
I then took the lead on the coding and decided to put our functions into a library using object oriented programming since we had so many functions, and the function used to step the motors one full revolution was pretty messy.
We had 2 main functions, one to turn right 90 degrees, and one to turn left 90 degrees. This would only work if the stepper motor did not skip any steps and the wheels did not slip on the surface. The skipped steps in the stepper motor were unpredictable and minuscule, however on dirty surfaces our wheels would slip easily. I solved this by proposing the adding of weights right over the wheels to increase the normal force which would increase the friction force.
This was successful, but not perfect, so I made 2 more functions that adjusted the car 15 degrees to the right or left whenever the car got too close to either walls. Overall this solved all our problems and the project was a success.
Since all of our functions rely on being called through a conditional, we made sure that in the main.py file we only checked the ultrasonic values every 400 steps as to not slow down our Raspberry Pi Pico.
Here is a snippet of our main.py file utilizing the object maze_car.
Here is us declaring our maze_car object. We passed multiple important constants into the library because we wanted to do most of our editing in main.py, and these were constants that needed adjusting if necessary.
Here is a video demonstration of our car in action.