Posted on 2 Comments

Roving Networks RN-52 Bluetooth Audio

I’ve been doing some tinkering with the RN-52 Bluetooth Audio module from Roving Networks, in prep for building a portable wireless speaker system, & thought I’d share my designs.

Initially I was having some issues with RF noise on the audio output from the RN-52, as I was only using the outputs single-ended. The module didn’t like this treatment, with all the RF whine coming straight out of the speakers.

To fix this issue I have used a pair of jellybean LM386 audio power amplifiers, running in differential input mode. This solves the high-pitched whine when the audio is enabled, & also allows the module to directly drive a set of 32Ω headphones at a reasonable level.

In Eagle I have designed a simple board, routing only the audio output, serial TTL & command mode pins out, along with the supporting power supply circuitry to operate from 12v DC.

RN-52 Breadboard
RN-52 Breadboard

Above is the current incarnation of the circuit on the breadboard. The RN-52 is on the left, audio power stage in the centre & headphone output on the right.

RN-52 Breakout
RN-52 Breakout

The bluetooth module on a breakout board. I was cheap in this case & etched my own board. I’m not paying Sparkfun, (as much as I like them), an extra ~£10 for a small PCB with the pins broken out. Much cheaper to spend 15 minutes with the laser printer & the iron, & do a toner transfer PCB.
As this board is single sided, I added a ground plane on the underside with copper foil, to help with the RF issues. Breadboards really aren’t all that good at rejecting noise induced when there’s a 2.4GHz transceiver mounted on them.

LM386 Amplifier
LM386 Amplifier

The LM386 audio power stage. The differential inputs from the module are capacitively coupled with 1µF electrolytics. This setup remarkably reduced the noise on the output. I left these at their default gain of 20, as I’ll be connecting another high power amplifier stage to drive large speakers.

RN-52 Eagle Layout
RN-52 Eagle Layout

Here’s the circuit laid out in Eagle, ready for PCB.

RN-52 Eagle PCB
RN-52 Eagle PCB

And here’s the PCB layout. Only one link required for the +5v line from the TTL serial port.

As always, the Eagle PCB & Schematic layout files are available at the bottom of the article.

*Update 29-01-15*
Rerouted a few things:

  • Moved the audio power stage to the +12v rail to improve sound response. – As the LM386 has a max input voltage of 12v (absolute maximum 15v), a regulated supply is recommended. The LM386-N4 variant has a higher voltage range, up to 18v. This should be suitable for an unregulated supply.
  • Removed 1µF coupling capacitors to reduce distortion & amplifier hiss. The capacitors appeared to cause some instability on the amplifier, causing random distortion. Removing them has cured this. No signal hiss has also been reduced to a very low level.
  • Reversed input polarity on input of one of the amplifiers – this appears to produce better audio.
  • Added PWR.EN header to allow connection of power button. Saves hassle of cycling power to the board when the RN-52 goes into sleep mode.

Improved PCB & Schematic layouts.

RN-52-SCH-v3.6
RN-52-SCH-v3.6
RN-52-PCB-v3.6
RN-52-PCB-v3.6

[download id=”5579″]

Posted on Leave a comment

Wearable Raspberry Pi – Some Adjustments

USB Hub
USB Hub

As the first USB hub I was using was certainly not stable – it would not enumerate between boots & to get it working again would require waiting around 12 hours before applying power, it has been replaced. This is a cheapie eBay USB hub, of the type shown below.

These hubs are fantastic for hobbyists, as the connections for power & data are broken out on the internal PCB into a very convenient row of pads, perfect for integration into many projects.

Breakout Hub
Breakout Hub

I now have two internal spare USB ports, for the inbuilt keyboard/mouse receiver & the GPS receiver I plan to integrate into the build.

These hubs are also made in 7-port versions, however I am not sure if these have the same kind of breakout board internally. As they have the same cable layout, I would assume so.

 

Connector Panel
Connector Panel

Here is a closeup of the back of the connectors, showing a couple of additions.

I have added a pair of 470µF capacitors across the power rails, to further smooth out the ripple in the switching power supply, as I was having noise issues on the display.

Also, there is a new reset button added between the main interface connectors, which will be wired into the pair of pads that the Raspberry Pi has to reset the CPU.
This can be used as a power switch in the event the Pi is powered down when not in use & also to reset the unit if it becomes unresponsive.

 

Posted on Leave a comment

Raspberry Pi GPIO Breakout

Board Built
Board Built

After seeing these on eBay for £8.99 I thought it might be a good deal – interfacing with the RasPi’s GPIO & it has built in power supplies.

As a kit, it was very easy to assemble, the PCB quality is high, and is a fairly good design. It worked first time, the regulators hold the rails at the right voltages.
However there are some issues with this board that bug me.

The documentation for the kit is *AWFUL*. No mention of the regulators on the parts list & which goes where – I had to carefully examine the schematics to find out those details.
The 4x 1N1007 diodes required weren’t even included in the kit! Luckily I had some 1N4148 high speed diodes lying around & even though they’re rated for 200mA continuous rather than the specified part’s 1A rating, the lack of heatsinking on the regulators wouldn’t allow use anywhere near 1A, so this isn’t much of a problem.

Component numbering on the silkscreen isn’t consistent – it jumps from R3 straight to R6! These issues could be slightly confusing for the novice builder, and considering the demographic of the RasPi, could be seen as big issues.

On the far left of the board are the 5v & 3.3v regulators, well placed on the edge of the board in case a heatsink may be required in the future. However the LM317 adjustable regulator is stuck right in the middle of the PCB – no chance of being able to fit a heatsink, & the device itself seems incredibly cheap – the heatsink tab on the back of the TO-220 is the thinnest I have ever seen. Not the usual 2-3mm thick copper of the 5v & 3.3v parts – but barely more than a mm thick, so it’s not going to be able to cope with much power dissipation without overheating quickly.

As the adjustable rail can go between ~2.5v – 10v, at the low end of the range the power dissipation is going to shoot through the roof.

The GPIO connector – this could have been done the other way, at the moment the ribbon cable has to be twisted to get both the Pi & the GPIO board the same way up. Just a slight fail there. See the image below

Plugged In
Plugged In

The power rails are not isolated out of the box – there is no connection between the 5v & 3.3v rails & the Pi’s GPIO, but the GND connections are linked together on the board.

Getting the ribbon cable through the  hole in the ModMyPi case was a bit of a faff – the connector is too big! I had to squeeze the connector through at a 45° angle. The case is also remarkably tight around the connector once it’s fitted to the board – clearly the designers of the case didn’t test the an IDC connector in the case before making them!
Everything does fit though, after a little modification.

All Cased Up
All Cased Up

Here is the unit all built up with the case. The top cover just about fits with the IDC connector on the GPIO header.

More to come once I get some time to do some interfacing!