I had 2 driving inspirations to make this project. My first inspiration was this video by Upir who made a boost gauge with the same development board. My second was my car which suffers from oil starvation on right turns.
With this video I immediately bought the same dev board that he had used. As much as I’d like to say I got to work immediately, my classes and my fear of the amazon checkout button for the rest of the parts scared me and it sat on my desk doing nothing for a semester.
My main goals for this project are the following: A parametric analog guage UI with support for other UI modes. This is so it can easily be repurposed with different sensors and other applications. A chassis that is standard with most 52mm gauge form factors for cars.
In these goals there are 3 distinct aspects of development to this project. These are: Software, Hardware/Packaging, Installation. The third is most applicable to my specific use case and less relevant to the goals of the project as a whole.
The main hardware components that I had to develop here was the case for the gauge and a mount for my car.
I had 3 main clear guidelines for developing the case. First it had to be made with easy 3d printing in mind. Something I am very familiar with given my 7 years of 3d modelling and 5 years of 3d printing. Second it had to fit in the rough dimensions of a standard 52mm car gauge. Finally I wanted it to be screwless. The design I came up with was a little carriage frame thing that the dev board slips into like threadripper cpus. A barrel that friction fits with the frame and a tabbed twist and lock lid with holes for the wires. With this design it came out near perfect! The only major changes I made until the final design was adding a fillet to the front, changing the hole design for the rear cables, adding extra securing tabs to the frame, and making the internal layout flip the other way. All of these changes are relatively self explanatory except the last one. This last change was done to aid with the design of the mount.
The mount I designed was designed for only my specific use but I could easily see it adapted for other uses. My initial thought was to have it as a 3 piece design. A post on the barrel with a channel for wires, a mount for this post, and a vent clip for the posts’ mount with the wire channel. This design was done with the intent of both easier 3d printing and to allow for the gauge to be rotated to the comfort of the user. It also happened to let the mount be more easily adapted to different cars and vent styles. In order to lock the guage at a comfortable angle and ensure it does not get jostled out of place while driving I put a threaded insert in the post the gauge inserts in with a screw to hold it at the angle. As for securing the post to the vent clip I used another insert and a countersunk screw as well as a aligning post.
Overall this design was largely successful as a functional minimal viable product. The main issues I encountered I have already fixed in the current revision that I’m using. First was the internal layout issue with the sensor and usb wires crossing over each other, second was stability of the mount which I resolved by combining the post and the vent clip into one piece. One of the issues I still have was my connector terminals do not fit in the channel due to the angle but this I would rather solve with a different connector. One other issue I had was while developing the clip for the vent the repeated removal and attachment scratched up my vent. Next time I would use some kind of foam or other soft buffer to prevent this.
My software development process had originally started with reading the documentation for the dev board but after some time I ended up just opening the example project provided by waveshare. After commenting out a line related to an ADC read for the battery terminals it worked perfectly and had no issues. From this point I cleared out a majority of their code but kept most of their libraries. I then started work on a program that takes a reading from the accelerometer and draw the needle in the same orientation similar to a compass. I did this as a proof of concept that this board can run the animations smoothly and quick enough and to refamiliarize myself with trig. The code involved a lot of trig to align things to an angle on the grid such as the value ticks and the needle.
After I had completed this I added some additional features. I added a minimum and maximum indicator that is reset on screen touch, a parametrically adjustable gauge “deadzone” where the needle cannot enter. for any extra information and easier readability, a setting that under a certain percentage under max the UI changes to a warning colour, and finally drawing all the ticks with appropriate offsets and value increments.