RX7Club.com - Mazda RX7 Forum

RX7Club.com - Mazda RX7 Forum (https://www.rx7club.com/)
-   Interior / Exterior / Audio (https://www.rx7club.com/interior-exterior-audio-26/)
-   -   Pi 2 B Custom CarPC Build (https://www.rx7club.com/interior-exterior-audio-26/pi-2-b-custom-carpc-build-1096215/)

Lord Bro 02-15-16 09:05 PM

Pi 2 B Custom CarPC Build
 
Alternate thread title: How to find holes in your gas tank and fix some nightmare wiring.

I've wanted a car computer longer than I have wanted a car. In my previous cars the radio either wasn't a problem and did what I wanted, or it wasn't a priority. When I bought my FD though I discovered that even though the unit in the car already was pretty nice, It didn't allow me to do the one thing I really wanted: Bluetooth audio streaming.
We live in the future, I shouldn't have to deal with something mundane like an actual cable.

I figured that since I have a Raspberry Pi B+ which I can run the Pi's version of Debian (Raspbian), and I think I have enough electronics knowledge to do this, I would just build my own radio unit.
I started like I usually do and made a list of my requirements:

Required
  • Audio playback from local storage
  • Touch screen as large as possible
  • Bluetooth audio
  • Data over wifi connection (internet radio streaming)
  • Logging from PowerFC
Optional
  • Bluetooth headset for calls
  • GPS & maps
  • FM radio
  • Backup/rear-view camera
  • Dash camera
  • Additional sensors

I estimated this to cost about $300 if I was careful not to overspend, so I also went through the list of current offerings as well:i-carus is crap if reviews are to be believed, but the list of features was nice to gather info from. It was the reviews that swayed me towards not buying it, plus I knew the screen I would use was better than most offerings.
Engineering-DIY is essentially what I'm doing, plus a custom minimal image for the Pi specifically for car use. The whole Pi car computer thing has been done before so I know I can do it, and this is a great resource for getting things to work. Packaging all the components is going to be half the fun here.
As far as Android devices are concerned Android Auto shows a lot of promise to me, but it's not ready for all devices yet, and I still couldn't do the logging I want to from the PowerFC.
The deck I've removed from the car is a Pioneer AVIC F90BT which is a pretty nice unit by itself (and I'm selling it if anyone wants it), but I can't stream music to it over bluetooth, and I can't log to it.

Custom Pi system for the car it is.

As a short primer on my car and what I expect to find when I look at the wiring in the dash, here is what I found when I went into the trunk to remove the subwoofer and capacitor left by the previous owner:

https://s3-us-west-1.amazonaws.com/t...nk02_small.jpg

https://s3-us-west-1.amazonaws.com/t...nk03_small.jpg

At least two of the screws holding down the sub go right into the gas tank.
I discovered this when I loosened just one of the screws and heard a hiss, and then got bit by a snake.
...
Ok that's a lie, but I did smell fuel so I immediately put the screw back and inspected the other ones. There is at least one other screw which I suspect goes into the gas tank, but I'll have to wait till I'm lower on fuel before I rip everything out and drop the tank off the car to fix it. At least I know there's not a big leak since the screws puncturing the gas tank form a good seal. :icon_tup:

Lord Bro 02-16-16 12:17 AM

Time passes.
While my engine was being rebuilt I made some progress, and bought the parts I would need to get this thing going:
  • Raspberry Pi 2 Model B
  • 7" Touch screen, 1280x800
  • Bluetooth 4.0 USB adapter
  • WiFi USB adapter
  • USB sound card
  • Powered 4 port USB hub
  • GPS breakout board for the Pi
  • 2x Stereo 2x50W audio amplifiers
  • 2x Relays
  • Main power supply @ as of yet undetermined output voltage
  • many small buck voltage regulators
  • 100 little banana connectors
  • Rotary encoder
  • Stereo potentiometer
  • Scosche adapter for OEM stereo harness connection
  • 2x cheap clipboards to mount things on
  • Short HDMI cable, USB cables
  • I already have heat shrink tubing, solder, nice wires, nylon m3 hardware, and tools
  • If I forgot anything in this list... I guess it will just come up later.
https://s3-us-west-1.amazonaws.com/t...Pi01_small.jpg

I got the dimensions for the Pioneer unit in the car and drew its footprint on a piece of cardboard so I could start laying out the components to see where they would fit. I tried to imagine where all the cables were going to go, because even though I could see that everything would fit in the footprint, it might get tight without some cable management.

https://s3-us-west-1.amazonaws.com/t...Pi02_small.jpg

The reason for the relays is so I can ensure there is a total physical disconnect from the car battery once both the car and Raspberry Pi are off. I have a small PC680 battery in the car, so making sure there isn't any sort of parasitic drain while the car is off is important.

The problem isn't quite as simple as driving everything off of the ignition wire or a relay switched by the ignition, because I want to give the Pi time to do a clean shutdown once the car is off. Another reason is in real life we don't turn the radio off every time we stop the car. If I'm at a gas station I'll leave music playing, or I wouldn't want to shut down each time the ignition switched while I was logging data.
With a device that has a startup and shutdown time of more than just a few seconds this means I have to keep the Pi running for a little bit after I take the key out, and shut down automatically after an adjustable timed interval. The solution I'm going with is to use the two relays to keep power on by tying the normally open and normally closed terminals of each in parallel, turning the relays into a logical OR. One relay coil is energized by the ignition wire, and the other is energized by the Pi. Once the car is off, power is still supplied to the Pi via a relay as long as the Pi is on. Once the Pi is off neither relay is energized and the circuit cannot draw any power.

https://s3-us-west-1.amazonaws.com/t...Pi03_small.jpg

https://s3-us-west-1.amazonaws.com/t...Pi04_small.jpg

This is almost everything (minus cables) stacked up in the footprint. It's only about half the height of the double din space, so I decided I would have room to put everything up on nylon spacers and run cables underneath. It's just another reason to be confident I will be able to fit everything in, as there is only one more piece I have yet to receive that will be going in, so there shouldn't be any trouble.

https://s3-us-west-1.amazonaws.com/t..._harness01.jpg

Once I had everything laid out how I wanted it was time to start wiring everything up. Once I get power to all the components I can test out the amps with the speakers in my living room before installing this in the freezing weather outside.
Everything gets a harness. Everything is getting soldered, shrink wrapped, tied, tied down, etc to keep this clean and free of electrical issues related to bad connections. The space constraint is interesting with the cables, so expect to see some possibly bad practice cable modifications so I'm not stuck using several 3' USB or serial cables. Even if actually getting all the parts into the space isn't a huge issue, getting some air flowing around to keep all the components cool will still be important.

MotoCARR 03-04-16 09:07 AM

I have the same wedding ring. #cfeverything :)

Lord Bro 03-06-16 11:35 PM


Originally Posted by MotoCARR (Post 12035047)
I have the same wedding ring. #cfeverything :)

Yep, it was clearly the best choice :icon_tup:

On the car pc front, I'm kind of kicking myself now that the Raspberry Pi 3 has come out. It has both wireless and Bluetooth built in, so it may be easier to get the Bluetooth audio streaming working. Who knows.
I've had bit on my plate recently with the car in and out of the shop for things, so I haven't had much progress. I'll probably want to get my security camera recording my parking spot on my other Pi before I work on completing this.

Mazda_X 05-07-16 11:43 PM

My car has been in the shop since last February, but it's almost ready to get back on the road, and I want to do exactly this. I'm interested in your progress as you go along.

I'm going to be using the Raspberry Pi 3 board as you mentioned because it already has the Bluetooth and WiFi built in. I also want a high res screen like the 7" 1280x800 one you got. Where did you get it? Tontec seems to be popular, but I only see a 10.1" with resolution that high.

Also, I might use a modified version of Android because I'd really like to run Waze, Spotify, etc. via my phone's wireless hotspot (turned on automatically by Tasker when it detects the Bluetooth connection with the car). However, I'm not at the stage of figuring this part out yet.

MotoCARR 05-09-16 09:13 AM


Originally Posted by Lord Bro (Post 12036134)
Yep, it was clearly the best choice :icon_tup:

On the car pc front, I'm kind of kicking myself now that the Raspberry Pi 3 has come out. It has both wireless and Bluetooth built in, so it may be easier to get the Bluetooth audio streaming working. Who knows.
I've had bit on my plate recently with the car in and out of the shop for things, so I haven't had much progress. I'll probably want to get my security camera recording my parking spot on my other Pi before I work on completing this.

Just noticed you're in Chicago. I'm in the north suburbs, if you hit any of the local meets I'd love to check it out when it's done. :icon_tup:

Lord Bro 05-12-16 12:37 PM


Originally Posted by MotoCARR (Post 12061513)
Just noticed you're in Chicago. I'm in the north suburbs, if you hit any of the local meets I'd love to check it out when it's done. :icon_tup:

I'd definitely like to head out to some meets this year. I'd like to at least do some autocross too, so I'll be out and about.


Originally Posted by Mazda_X (Post 12061093)
I'm going to be using the Raspberry Pi 3 board as you mentioned because it already has the Bluetooth and WiFi built in. I also want a high res screen like the 7" 1280x800 one you got. Where did you get it? Tontec seems to be popular, but I only see a 10.1" with resolution that high.

Also, I might use a modified version of Android because I'd really like to run Waze, Spotify, etc. via my phone's wireless hotspot (turned on automatically by Tasker when it detects the Bluetooth connection with the car). However, I'm not at the stage of figuring this part out yet.

I'm sure I'll upgrade to a Pi 3 at some point. I can never have enough little computers around, so I'll have a use for the one I'm using for this project if I retire it from car use.
For the screen I actually took a chance on from Amazon, although I'm sure eBay would have done just as well. I'm pretty happy with the quality so far, but we'll see how it does sitting in the car.
I like the idea of using an Android variant as well, but I couldn't do that with my Pi 2, and I wouldn't be able to log to it from the PowerFC.

I finally made a little more progress on my build. Between getting the car itself running right and the rest of real life there just hasn't been much time, but here we are:

https://s3.amazonaws.com/93fd3s/rad_01.jpg

https://s3.amazonaws.com/93fd3s/rad_02.jpg

I got all my measurements from my cardboard mockups and got the bracket all set up to accept the components. Getting the holes in the plastic pieces and the metal brackets to line up right was kind of a pain. I don't have a lot of power tools, so there was a lot of sitting around with small files getting things to match up right.

https://s3.amazonaws.com/93fd3s/rad_03.jpg

https://s3.amazonaws.com/93fd3s/rad_04.jpg

Everything fits in the space alright, and there should still be enough room for the screen on the front. I'm a little worried that the usb WiFi dongle sits too close to the front, but there are solutions to that if it turns out to be an issue.

On the bottom I have the sound amplifiers (front and rear), power relay, main power supply, and the Raspberry Pi.
I decided to put the USB hub on the top due to space constraints, and was able to fit it in with some creative use of spacers. Attached to the hub are my WiFi and Bluetooth modules in front, and in the rear the larger USB sound card, and touchscreen driver. Also on top is that touchscreen driver, and the screen driver board.

https://s3.amazonaws.com/93fd3s/rad_05.jpg

https://s3.amazonaws.com/93fd3s/rad_06.jpg

The biggest remaining internal space is in the back right area of the unit, so that is probably where my usb datalogit-like thing will go once that arrives.

The next step is to cable it all up, configure my voltage regulators in the internal harness, and then make sure I can power everything on. Once nothing is on fire I'll test the sound.

RGHTBrainDesign 05-21-16 10:28 AM

This is SO badass. Love it!

Personally, I'd seal the enclosure and run 4x ~80mm fans in a push/pull configuration (2 on each side of the case with one side pulling air in, and the other side pushing air out).

I'm scratching my head at this point looking at all the crap I've purchased for this car and why I haven't gone PDM...

ZZ33 02-16-17 08:04 AM

Any progress on this build? Looks so promising!

lcfd 06-29-17 08:41 PM

Very cool!

Rx7Jordan 07-09-17 05:23 PM

Any updates?


All times are GMT -5. The time now is 12:28 PM.


© 2024 MH Sub I, LLC dba Internet Brands