Inspiration

We were inspired by our past experiences as ECE students at Toronto Metropolitan University, where we spend much of our time in labs working with microcontrollers and other electronics. As such, we were excited to have the opportunity to build our own autonomous vehicle and showcase our skills, while having a lot of fun along the way!

What it does

Beep Beep Car is an autonomous vehicle built around the Arduino Uno, and is capable of following a black line as well as navigate various obstacles in order to traverse different mazes. The car features two LED's at its rear in order to indicate the direction it will be turning in, similar to turning signals on cars in real life!

How we built it

We built Beep Beep Car using the materials given to us in our kit, including a chassis, 2 DC motors, an L298N motor driver, 2 IR light sensors, an ultrasonic sensor, and some other miscellaneous electronics like LEDs, resistors and capacitors. We connected the motors, motor driver, and Arduino before attaching them to the chassis with the provided 3D-printed standoffs. We probably should have done this in the opposite order! Attaching components to the chassis while ensuring to keep all the components properly connected proved to be quite difficult! After the initial assembly, we used zip ties as well as the holes in the chassis to organize the cables better and make Beep Beep Car look a lot nicer! We used the Arduino IDE to flash our code to the microcontroller as well as GitHub to collaborate and work together to split tasks and ensure all our code versions were up to date.

Challenges we ran into

One of the main challenges was one that is ubiquitous across all electronics projects; parts not behaving exactly as expected! The IR sensors were quite particular and required a lot of tweaking in order to find the proper thresholds to ensure the sensors were detecting the black line. Another challenge we ran into was the floors in the Myhal building being grey. This made it difficult for the sensors to discern from the black tape and the floor. We had to be very careful to choose correct threshold values and test very often, as changes in lighting as the day went on also contributed to a slight change in the threshold values. These were difficult challenges to overcome and took most of our time during the first night, but it made it all the more satisfying when we finally got it to work!

Accomplishments that we're proud of

We're proud of all the challenges we overcame in such a short time, particularly fine tuning the car's sensors and all the time we spent going back and fourth from the computer to the practice mazes. This was challenging as we had to work on the fly to change our pathfinding algorithm and ensure Beep Beep Car's movements were as accurate as possible. This process of iteration was something that was familiar to us as engineering students, but nevertheless something we are very proud of, completing such a great project in such a short time!

What we learned

We learned more about working with multiple sensors and peripherals using the Arduino microcontroller. With so many signals and measurements coming in and out, we had to be very careful to write as little blocking code (i.e. using delays) as possible to ensure Beep Beep Car would run smoothly at all times and always be aware of its current position and surroundings. We learned more about refactoring and writing more modular code which was easier to test and make fine adjustments to. Eventually we implemented a state machine to switch between various directions depending on the values being read from the sensors. This was a lot cleaner than our original solution consisting of a bunch of conditional blocks, and allowed us to write code that was easier to extend with more functionality should the need arise.

What's next for Beep Beep Car

In the (hopefully near) future, we'd like to upgrade Beep Beep Car to drumroll please Honk Honk Car! This upgrade will feature many quality of life improvements such as an LCD to display the sensor values at all times, so we don't have to walk Beep Beep Car around with our laptops and continuously analyze the serial monitor! We'd also like to add some musical functionality, since everything is more fun with music! We can't wait to continue to innovate and learn more about electronics, programming, and engineering!

Built With

Share this project:

Updates