The Last Piece: Programing Update


Computer Systems, Electrical System, General, uncategorized / Thursday, April 25th, 2024

With almost all the programming working, and the car getting ever closer to being finished, the SOCKEYE looks more promising than ever. Our code has had multiple revamps including the Telemetry data and to the Cruise Control.

Control Teensy on left and Telemetry Teensy on Right.

To start, our car is primarily run on two microcontrollers (Teensy 4.1s), which both have their unique duties when it comes to controlling the car. The first microcontroller, the “Control” Teensy, controls all of the main components of the car, things like the motor, lights, steering wheel, and more. While the “Telemetry” Teensy controls all of the data surrounding the car, things like the battery power, solar panel data, motor data, and more are all controlled by the Telemetry Teensy. Arguably the most important part of the Telemetry is its ability to communicate with the internet via an onboard router which sends all of the data we collect to a database that we can access called Grafana that our strategy team use to communicate to the driver.

Router (On) Communicating with Grafana Servers.

With these features come problems of communication between the two Teensys. The Telemetry doesn’t collect all of the data about the car, and so, some must be collected from the control to send to the internet. Conversely, the control needs information about various electrical components’ data, like their power consumption, so that it can be displayed on the steering wheel’s screen for the driver to view.

Along with the data between the two microcontrollers, the control teensys cruise control code had to be rewritten to accommodate for a new button on the steering wheel. After all of the editing, the cruise control now has 4 functioning buttons, on/off, up, down, and set. Set is a unique button that serves multiple functions, it allows you to control the Cruise control percentage without it affecting the throttle, but when you press the button, it will activate the cruise control, implementing whichever throttle you had selected beforehand, if you have the pedal pressed and decide to click. Set will change the Cruise control throttle to the current pedal throttle, which is useful for easily getting the cruise control to a higher number without manually pressing the button a bunch of times.

Left Orange: On/Off,  Top Right White: Up, Bottom Right White: Down, and Middle Orange: Set.

In the end, we were able to test the car this last weekend and found multiple issues with the car which we promptly fixed, the progress on the car is better than ever, and yet we must still fight hard for the journey ahead.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.