2006 Mazda 3 + Gentoo Linux and custom software
I've been thinking about doing something with a car PC for a while. When my two year old son (allegedly) broke the screen on my wife's netbook, I had a good starting point.
Main goals of this project:
- DAB+ radio to improve reception issues and receive more stations
- MP3 playback with storage beyond the capabilities of the factory CD player
- Steering wheel controls
- Navigation on a reasonably sized screen
- Sensor display and logging
And I want to do all of the above using software I wrote myself (except navigation - that's too hard).
I've spent a couple of months planning, writing software, ordering components, etc. It is taking ages because the two year old doesn't leave me with a huge amount of spare time. Now I've finally started putting it all together. I'm starting with the radio, because I don't like driving without music.
DAB+ Radio
Components for this phase:
- Lenovo S10e netbook (broken screen - original cost A$299).
- Ultimate DAB/FM Radio with Motorola antenna adapter (US$134.90 delivered from craigbrass)
- Car PC JoyCon Exr (steering wheel control USB adapter) (US$45 + $5 postage on ebay)
- Arlec junction box ($4.90 from Bunnings)
- Aerpro wiring harness ($17.56 from Supercheap Auto)
The radio took a long time to arrive, but after that it didn't take too long to write some software for it. The info on the craigbrass forums was helpful. I have a simple touchscreen interface for changing stations and displaying information, plus I can also use steering wheel controls for changing station and volume.
Screenshot:
http://www.harshbutfair.org/linked/m...screenshot.png
I put the radio module into a little junction box I got from Bunnings and drilled some holes in the side (not very well) for the connections.
http://www.harshbutfair.org/linked/m...o_module_1.jpg
http://www.harshbutfair.org/linked/m...o_module_2.jpg
I removed the factory stereo and glovebox. Then with some help from various websites confirmed what all the connections were on the main connector to the stereo.
http://www.harshbutfair.org/linked/m...sassembled.jpg
http://www.harshbutfair.org/linked/mp3car/connector.jpg
Finally a super-dodgy initial installation of the radio for testing purposes. Note it is wired directly to the speakers (no amp). This works reasonably as a proof of concept and confirms that I get excellent reception and it is fine for the short term while I get other things installed and working.
http://www.harshbutfair.org/linked/m...ll_initial.jpg
Just after doing this I found a wiring harness at Supercheap Auto (one of only three places in Perth that stock it according to the manufacturer's website) which I prefer to waiting weeks to get one slightly cheaper from the US. So I'll be tidying up the wiring very soon.
LCD
Next up, I wanted to experiment with the LCD while I had it out of the car. It was much harder to find the information about this connector but I found it eventually on one of the Mazda forums. I hooked it up to a 12v bench power supply and connected to the data lines with a Microchip CAN Bus Demo Board (US$55 + $17.21 postage for two, Microchip Direct). After a couple of nights I have learned everything I need to know about the protocol.
http://www.harshbutfair.org/linked/m..._connector.jpg
This is on the low speed (125kbit) CAN bus (note some information was found on madox.net). Displaying text requires three consecutive messages.
Message ID 0x28f (8 bytes)
Byte 0: Turns on CD-IN, MD-IN, ST, Dolby, AF, RPT, and RDM.
Byte 1: Turns on AUTO-M, TP, TA and PTY.
Byte 3: Enables intermediate characters between letters: . : ' "
Byte 4: Used for setting the clock. Send 0x90 twice then 0x80 to start setting. Then 0x90 followed by 0x80 to go to the next field. 0x88 changes the current select (250ms repeat rate).
Message ID 0x290 (8 bytes)
Byte 0: Nothing displayed when 0x00. Set to 0xc0 to display full message. 0xd0 or 0xe0 or 0xf0 to display ony the second half (this doesn't seem useful).
Bytes 1-7: Characters to display. ASCII codes from 0x20 to 0x7e (except 0x5c is replaced with the yen sign). 0xdf degrees sign, 0xf0 right arrow, 0xf1 left arrow, 0xf2 backslash, 0xf3 small C, 0xf4 small H, 0xf5 small D. The remaining characters are Japanese.
Message ID 0x291 (8 bytes)
Byte 0: Set to 0x85. Other values possibly used for scrolling?
Bytes 1-2: Repeat of bytes 6 and 7 from 0x290 message.
Bytes 3-7: Remaining 5 characters to display.
http://www.harshbutfair.org/linked/m...cd_testing.jpg
http://www.harshbutfair.org/linked/mp3car/lcd_demo.jpg
Once installed back in the car, the LCD will be a handy secondary display and clock. The clock section can also be configured to display fuel consumption etc, but I couldn't work out how (my car doesn't support this functionality) and can't really be bothered. I think I would rather have a clock, and use the touchscreen for more advanced display options.
I tried various messages to get the section on the right to display something but no luck. This section is meant for climate control and ambient temperature display (which my car doesn't have). I think the only way I'll get this to work is if someone else with the same LCD can collect some messages off the CAN bus for me to look at. Currently it is blank.
Next planned work:
- Modify wiring harness to have pins for CAN bus and steering wheel controls
- Install steering wheel control USB adapter
- Wire radio and sound from laptop in properly, buy amplifier if necessary (probably will be)
- Install CAN bus adapters
- Power!
- Touchscreen installation
(Sounds simple but this will probably take weeks or maybe months).