Passion Project (2024)

Introduction

This year we decided to build a LEGO Mindstorm Pathfinder – a robot that could solve any maze presented in front of it using its infrared sensors, code that I created and two motors for movement. As a bonus, we decided to create an adjustable maze so that the people who have come to observe the fair could feel as if they had a role in our project.


Thought Process

When we first decided that we would participate in this year’s STEAM Fair together, knew that we wanted to make something tangible because it would be more interactive; which obviously would get the attention of more people.

After we decided on that, we had to choose what we would make. We were going to go with something that we could make from the resources that we already had at the school (last year our project cost us more than $200), but had no idea what kind of project we wanted. Using an Arduino was the first thing that came to mind, the Mindstorms hadn’t come into my mind yet. Even so, we were completely lost; every project we thought of was either too complex or simplistic.

  Picture of an Arduino I found online

Then, a friend of my partner’s gave us a suggestion to make a guide dog robot; I wasn’t exactly sure if he was joking or not or if he thought we had the resources and the knowledge to, but it reminded me of making a basic Mindstorm robot back in the first semester that could sense walls and turn accordingly – we might not be able to make an actual guide dog but we might be able to create something similar using that concept.


Prototyping

Making the robot was the easiest part; we had to adjust the sensors and the weight distribution later on, but the main robot itself was very simple – we just had to attach a frame onto the two motors so they wouldn’t move around and find three infrared sensors that worked for all three directions that the robot would move in (forward, left and right).

Then I began looking into the code, and found out that the movements could be adjusted to the millimetre, which meant that making the maze would be very easy – we could just change the code depending on the dimensions; that gave me the idea that would complete our project: adjustable walls.

After we printed a couple of those, we began:

Testing

Theres actually not much to write about here; we first tried adjusting the size of the walls but that used up too much cardboard, so we trialed and errored the numbers in our code until the robot didn’t hit any walls throughout multiple turns and used those numbers. The sensors oftentimes didn’t work, so we attached tape onto the bottom of each and every holder during the day of the fair so   that even if the robot ran into a wall it wouldn’t fall.


Code

I went through multiple iterations of the code; mostly changing the numbers, but sometimes changing the fundamental algorithm. Near the beginning I decided to move the robot in small increments and check for walls after every pause. Unfortunately when moving, the Mindstorm turns the motor until the set distance is met, then brakes instead of doing it all at once – the separate pausing made it so that the robot turned slightly every increment; near the end of the maze the Mindstorm was completely off. The next iteration was moving until the robot sensed a wall, and turning right away using the other two sensors without stopping at all – the numbers had to be way more precise than normal, but it worked perfectly after some testing.