This is my car:
It's about as simple of a hatchback as you can get, while still having every creature comfort you need:
It's perfect; exactly what I look for in a car. However, there are a couple of things I miss from my previous car... namely Bluetooth audio and heated seats. Whatever can be done about this!?
I've always loved tinkering, both with physical machines and with electronics. Why not just add the features I want to the car?
I started playing around with the idea in February this year. I decided a good place to start was Bluetooth audio - it makes listening to music (or map directions) a lot easier, and it would be a good proof of concept.
The ESP32 platform is where I looked immediately because of its support for Bluetooth Classic (commonly used for audio streaming). A quick search led me to this article, which walked through setting up an ESP32 to act as a Bluetooth audio receiver. Great.
Pair that with a digital-to-analog convertor (DAC), and you have a prototype ready to test:
Great - the most important "mod" is pretty easily possible... what's next?
All throughout the school year my tinkering urge was killing me. I'd take breaks from working to go learn about CAN buses or plan out little projects. Here's a non-comprehensive list of stuff I might want to do to the car:
That's a lot of ideas. How will I actually get any off the ground? Well, I've already started.
As seen above, I've already made a prototype for the bluetooth audio system. What if I want to hook it up to the car's controls?
Cars use what's called a CAN bus to allow all sorts of systems to communicate. The Mazda has 2: a high speed bus for critical systems (e.g. engine), and a medium speed bus for less critical systems (like the stereo).
I spliced in to both buses (busses?) at the OBD2 port:
Now that I had access to both buses, I created another scuffed little board to read in the data:
The ESP8266 on this module reads in the data from both CAN buses, parses information I want, then broadcasts it out using ESP-NOW (a wireless communication protocol for ESP8266 and ESP32 based boards) to whatever other modules are listening.
I need to finish decoding all the CAN data I want to read in, but then it'll be up to each individual module to listen for the data and do stuff with it.
I saw an x86 based router for sale on Facebook marketplace. Recent enough 4 core processor and 2GB of DDR3. What really piqued my interest was the power draw of the computer: ~7.5 watts, and the input is 12 volts. Perfect for the car's existing power system! I went and bought the router/computer for $40.
The biggest hurdle to get over initially was the storage: It had 4gb of EMMC storage. Perfect for installing RouterOS, but not great if I want to watch movies or play some games. I decided to see what I could do with this limited space:
Puppy linux seemed like a great way to test whether it was even feasible to turn this router into a car-puter. It was easy enough: clear CMOS to get into the BIOS, then just boot from a USB.
My initial plan was to install puppy linux onto the 4GB internal drive, then bring movies to the carputer on a USB drive. After a bit of deliberation, I thought that seemed a bit boring. If it doesn't have fragile, janky wiring, does it truly have my touch?
I ran into some odd issues with the little display: everything would work great on my desktop monitors, but when I was only connected to the little display it would be scaled wrong (looked like the computer thought it was larger than it was - things were cut off, I couldn't see my windows, etc.).
After switching to linux mint didn't fix these issues, I discovered the actual cause - it was the cheap HDMI cable that came with the display. Another HDMI cable fixed the issues immediately. Occam's Razor, huh?
With the carputer having the storage space and ability to play movies, I decided to give it WiFi as a final touch:
Now I should be able to park in a driveway or parking lot and stream/download videos, catch up on emails, even play some basic games. Not bad, huh?
I've got plans, and I've already tinkered around with a couple of tricky pieces. I don't have a concrete idea of what I want to start with, but I've got all summer to play around and learn along the way. Here's my basic idea of how I want to do things (subject to change):
Most electronic mods depend on some core work being done first:
I want to do lots to this car. I get to learn about tons of electronic components, make my ride a little nicer, and it's a ton of fun.
I have lots of plans, have done some tinkering and experimenting, and am ready to jump into it with the warm weather.