Small-scale Autonomous Vehicle Development

Published on 28 March 2025 at 22:23

When I was a first year high school student, I joined Clayton Bradley Academy's RHIT Autonomous Vehicle Challenge team. Later, I had the opportunity to keep developing autonomous vehicles on a new hardware platform and help conceptualize a new competition.

Phase 1: The Rose-Hullman Institute of Technology Autonomous Vehicle Challenge

We developed a small, fully autonomous car to compete in time trials on three distinct tracks. Our car was programmed using MATLAB Simulink, and it had two distinct software profiles it could run on depending on the shape of the track. For more ovular tracks, like the oval itself and that year's abstract track, the code was set up to corner more aggressively following long straightaways. For the cloverleaf, however, it was configured with a left side offset so that it would follow the shortest possible path, ignoring the 'dip' in each side of the track as much as possible to preserve speed. Competing in the RHIT competition was a lot of fun, and gave me the opportunity to learn a number of skills in programming and engineering. Sometimes it proved to be the smallest things that made the greatest difference, like cleaning the tires to enhance grip. While doing so had helped us tremendously during testing, during our first race, which was on the oval track, we made the mistake of tuning the car's performance (a balance of speed and sensor gain, or steering aggressiveness), on freshly cleaned tires and a dirty test track. When we cleaned the actual track before our run, there was a substantial enough difference in friction compared to our test track that the tuning was way off. The car went hurtling into the distance, and we had to retrieve it from the perimeter fence about 10 feet off of the track. We had another chance, but to make sure we set a time, we were forced to tank the speed way lower than we knew the car could handle given appropriate testing. Consistency is key, and all things can be bad if not used in moderation. The cloverleaf and random tracks went much more our way, with us being the second place finisher on the cloverleaf and third overall. The race officials had placed a reflective white competition poster in the middle of the cloverleaf track, which caused many teams' cars to veer off course. We had taken note of the poster early on, and lowered our camera angle and increased the gain accordingly so the car wouldn't see it.

Watching lap times come in

At the test track

Us with our awards

At the test track

The track layouts at the Rose-Hullman Competition

Unfortunately, that was the last year the competition was held at Rose-Hullman. The hardware platform they had been using was no longer available in the United States, and the lack of a sustainable business model meant the competition had run out of funding. A few months later, I was eating lunch. I just happened to have my computer out, and I noticed an email come in to to my friend Steve Chase and me from my mentor and close friend Dr. Barry Lucas with the subject line: "Gentlemen, we have an opportunity." A local nonprofit had expressed interest in supporting a similar competition here in Knoxville. It was then that Steve and I began a project that would last the majority of our high school careers. Although technical setbacks caused our development process to be slower than we desired, meaning the project ultimately did not come to completion by the original definition, I am proud of what we accomplished and the knowledge I gained along the way has proven invaluable. With CBA now having a successful DECA chapter founded by my colleague and NHS Vice President Sydney Correa, perhaps some entrepreneurial CBA students will see the remainder of this project through in the future.

Phase 2: Transitioning Hardware

With the microcontroller and car chassis no longer available in the US market following the spread of COVID-19, we began the process of developing an entirely new hardware platform. The microcontroller would transition to the widely available Arduino ecosystem, and a new, 3D printable chassis, sensor mast, and sensor housing would be created.

Electronics

We began by uninstalling the circuit board on our competition car and replacing it with an Arduino Uno. We also quickly built up a second development car, giving us a means of testing for reproducibility. The newer car was easily identified by its orange sensor housing. The first step to transitioning the microcontroller was understanding the inputs and outputs of the photoresistor array. The array is 128 pixels wide by 1 pixel tall, and it outputs exposure values as a voltage between 1 and 5 volts, corresponding to a numerical value between 0 and 1023. The exposure length is determined by the length of time between pulses on a serial input pin.

Raw data from the photoresistor array

In order to function, the array needs to receive a square wave to its clock pin, with each clock pulse writing an exposure value for the corresponding pixel to an analog input pin on the circuit board. It also needs to receive pulses on the serial input pin 1/128 as often as on the clock pin, and these pulses must be aligned such that the rising edge of the serial input pulse occurs in the middle of the clock peak and the falling edge occurs in the middle of the clock trough. Achieving this signal alignment and ensuring the exposure time fell within the constraints was quite a task. Looking back, it seems trivial, but achieving that task took the better part of a year. If you have keen eyes, you will notice in one of our early prototype data processing algorithms (shown on the slide pictured below from our presentation about the project), the alignment of the pulses is incorrect, since the write commands would need to be separated differently using half delay time intervals. The serial input write statement is not even shown, as it occurred misplaced in the lines above. That meant I spent hours each week staring at a serial console that was reading out nothing more than noise on the pin.

Prototype data processing algorithm

Over a break from school while I was visiting my grandparents, the way to time it correctly occurred to me. I went into the lab early one morning after we returned to try out my theory, and it is difficult to express the feeling of relief, joy, and excitement when it worked. I immediately placed a call to Steve, who ran over from a building down the sidewalk. We were finally able to move on to the next phase of the project.

 

That phase was implementing the steering algorithm. Once again, there was a flaw in our prototype. The normalization conversions were not appropriate for the range of possible center index values. The center index is a value in [1,128], so subtracting 64 and dividing by 128 does not actually yield [-1,1]. It yields approximately (-0.5,0.5]. Thus, the conversion in the second step actually needed to be adding 0.5 instead of subtracting it and dividing by 2. The error was caused by differing definitions for the center index throughout project phases 1 and 2. The excerpt is indicative of the need for standards.

Prototype steering control

The final algorithm to construct was the speed control algorithm, which proved to be an exercise in trial and error on the track. It was changed from the prototype many times. By the time of the project's conclusion, the nexus of the speed control and steering algorithms was the remaining challenge.

Prototype speed control

Body

Like all good engineering projects, work on the new body began with some time at the whiteboard.

The first whiteboard brainstorming for the new 3D printable body

A schematic of the photoresistor array chassis, used in creating housing

Thanks to Steve's expertise in CAD, it only took a couple of weeks to have a prototype of the new body.

Phase 3: Developing a New Competition Business Model

The final phase of the project, which happened more or less concurrently with the previous, was developing a sustainable business model, conducting market research, and making changes to the competition format and rules that we felt would improve it.

 

The first key improvement we made was to opt for black track instead of white, though due to constraints in the development pipeline, that change was not reflected in the business plan that followed. Doing so would prevent dirt from confusing the algorithm as had been a problem previously, while also cutting costs slightly. Additionally, we eliminated the cloverleaf track, opting for a second, predeclared random track to make programming more challenging, but once again, the change could not be reflected in the business plan.

New track designs

We concluded our work on the project by writing up a preliminary business plan.

Our business plan