Overclock.net › Forums › Case Mods & Cases › Builds & Case Mods › Build Logs › [Scratch] SimpleStereo Alpha - A Built-From-Scratch Car Stereo Prototype
New Posts  All Forums:Forum Nav:

[Scratch] SimpleStereo Alpha - A Built-From-Scratch Car Stereo Prototype

post #1 of 4
Thread Starter 
The Build

Lets be honest, we all have phones with data plans that we use to stream music that we actually like while we are driving. No one listens to the radio or CDs, and those expensive touchscreen car stereo head units make no sense when all modern cell phones have screens just as big and you can install android auto as an app on them. The cheaper aftermarket car stereos all have millions of unnecessary and poorly arranged buttons and they charge extra for Bluetooth when they could have just skipped the CD drive and included it for the same cost. Basically, the available options for car stereo head units are terrible.

Well, this is OCN, we don't accept stock if stock isn't as good as good can get.

It has been a long time since I have posted a build log on here, but I'll do my best to keep this interesting. There probably will not be any watercooling in this build, but there will be lots of custom electronics prototyping (by someone who is definitely not an electrical engineer) and a good bit of case, face plate, and button fabrication once I get all the functional bits working.

Oh, and unlike my previous builds, I have access to a machine shop now yessir.gif

I envision there will be 3 phases to this build:
  1. Breadboard Prototyping (lots of learning for me here, but not much case modding/fabrication)
  2. PCB Prototyping
  3. Enclosure Build (this is when the case modding skills will shine)

Edited by kevingreenbmx - 4/12/17 at 6:26pm
post #2 of 4
Thread Starter 
Table Of Contents
2017-04-12 - The Base Equipment
2017-04-17 - RN-52 Bluetooth Module Firmware Update
2017-04-24 - Streaming Music and Microphone Trial and Error
To Be Continued
Edited by kevingreenbmx - 4/24/17 at 5:43pm
post #3 of 4
Thread Starter 
The Base Equipment

The Spirit: RN-52 Bluetooth Audio Module (Prototyping using SparkFun breakout):


This one with a 3.5mm TRS connector for scale:


The Brains: Arduino Pro Mini 3.3v (we will see if we can bump that 8MHz up to 12MHz in the spirit of OCN):


Anyone who is familiar with the standard Arduino form factor will appreciate the size of this little beast:


There will be much more equipment to come, including home-brew amplifiers, power supplies, buttons and encoder circuits, and more, but to start here is the rest of the collection I have for starting this out (including a bit of work on the project I started before deciding to do a build log):

Edited by kevingreenbmx - 4/24/17 at 5:44pm
post #4 of 4
Thread Starter 
RN-52 Bluetooth Module Firmware Upgrade From 1.10 to 1.16

The RN-52 ships from SparkFun with the old version 1.10 firmware. The old firmware is a bit buggy and lacks some of the commands I need for the functionality I would like to work into this project (better hands free profile commands for calls, improved commands for setting the microphone amplifier gains, etc). So one of the first things I needed to conquer was to update that firmware to the latest version 1.16.

Microchip (the makers of the RN-52 since they bought Roving Networks) offers a Device Firmware Update (DFU) utility that comes with some slightly confusing instructions. The DFU instructions are written for both update via USB or UART Serial connection, with an emphasis on the UART method. However, that just makes things confusing since you can only update a v1.10 firmware device using the USB connection. Things are complicated further by the fact that the datasheet section on DFU has some errors in it.

However, if you read the DFU instructions carefully, and take some creative liberty on reconciling it with the datasheet, what it really boils down to is very simple: you just need to follow the prompts in the DFU utility for USB update while providing the RN-52 with power and holding GPIO3 and PWR_EN high (at 3.3v) through the whole process. It is simple!

I didn't have a handy USB port breakout for my breadboard, so I practiced my wire soldering and heat shrink skills by combining an old cut USB-A to USB-B cable (who still uses them anyway?) with four header jumper wires cut in half:



your standard old-school USB cables will have four wires. Black is ground, Red is 5v power, green is data+, and white is data-. The data in USB runs as a paired complementary differential 3.3v signal, so that any interference is canceled out by the receiving device. For this application, all that means is that it is really easy to hook up to the RN-52, you just tie the USB cable ground to the power supply ground so the voltage reference is the same, connect data+/- directly to the RN-52, and plug the 5v into any unconnected bus on the breadboard since 5v would kill the RN-52.

Here is the bare minimum that needs to be connected to update the firmware (well, the filter capacitors are optional, but they can add some stability when you have more connected, so I just leave them there):



Another View:



And with that hooked up, flip the power on and the RN-52 should boot up in DFU mode and be ready to update by running the DFU Utility on your computer with the new firmware file.

I will note that when I updated my RN-52, I did have the an FTDI connected to the UART and was connected via a serial terminal with the RN-52 in placed in CMD (command) mode by pulling GPIO9 to ground. This does not harm anything, just be sure to only ever connect a single power source to the 3.3v power rail, so if using an external power supply like I am, do not connect the FTDI 3.3v line to anything (likewise, if powering from the FTDI, do not connect any other power supply).

*edit* Here is a close-up of the power supply I am using for getting the RN-52 and controls worked out. It is a sparkfun kit that comes as parts and you solder together yourself. I am only using this for now, it will not be part of the final product, as I will be building a power supply that provides clean 12v to the amplifiers and 3.3v to the controls/RN-52 from t a car's dirty 12v line.



**Edit 2**

I mentioned above there are errors in the RN-52 datasheet related to DFU. Here is the section I was referring to:



the errors, as I read it at least, are in the Note and Schematic. In the schematic R1 and R2 form a voltage divider (USB power is 5v, so it puts GPIO3 at 3.3v when a USB cable is plugged in for DFU). The note specifies that R2 is required as a pull down resistor even if the USB DFU is not used. I believe this to be an error in that what it really should say is that if you want to use UART for DFU after upgrading to v1.16, you have to implement some capability of pulling GPIO3 high and low. If you do this with a button, you would need the button and a pulldown resistor, but not necessarily a 47K, a 10K should work just fine. The other option would be to have GPIO3 driven by a microcontroller output. The point is if you want to implement UART DFU, you need to be able to drive GPIO3 high AND low, not just hold it high like for USB DFU.

The other error is that the schematic puts the 5v USB power to the 3.3v bus via a schottky diode. What this really should be is that USB power should feed a 3.3v regulator after the diode which then feeds the RN-52 3.3v power. Connecting the 3.3v power input of the RN-52 to the output of that diode in the schematic would burn out the RN-52 unless I am misunderstanding something (again, I am no electrical engineer, just a guy playing around).
Edited by kevingreenbmx - 4/20/17 at 5:36pm
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Build Logs
Overclock.net › Forums › Case Mods & Cases › Builds & Case Mods › Build Logs › [Scratch] SimpleStereo Alpha - A Built-From-Scratch Car Stereo Prototype