Monday 28 October 2013

Raspberry Pi multiplexer


As mentioned in earlier articles I have created an electronic device that will convert my boats NMEA instrument signals (Wind instrument in my case) to a NMEA bluetooth signal. This in turn pairs and pushes this data to an android device where an android application displays apparent wind speed and apparent wind angle using a tablet or smart phone. This year I would like to add another NMEA based instrument to my boats system, more specifically a Depth, Speed and Temperature sensor. 

As it stands, the electronic device that converts NMEA instrument signal to bluetooth doesn't scale up to a multiple instrument scenario. So I'm proposing a slight modification to the custom UART converter device to accept more NMEA instrument signals.

The Raspberry Pi is a small computing device the size of a credit card. The purpose of this article is to not describe the purpose of the Raspberry Pi but to tell how we propose to use it to multiplex NMEA data and publish it via Bluetooth technology. 

Having more than one NMEA instrument on board has added a requirement to multiplex the different NMEA signals from each NMEA instrument into one Bluetooth output signal. Getting back to the Raspberry PI, the reason why it may be an appropriate device for multiplexing are the GPIO pins on the board. GPIO stands for General Purpose Input Output and can be programmed to accept a number of signal protocols. The one that is most interesting and compatible with my custom electronic device is the UART/TTL protocol. Here is the Raspberry PI Rev 2 pinout:


As you can see in the above diagram, there is one hardcoded UART TXD pin (pin 8) and one UART RXD pin (pin 10) on the board already. With the help of a little little python startup script, any one of the other 8 GPIO pins can be converted to accept UART signals. Why this is significant? Well, it now means that I could use the Raspberry PI, in conjunction with my custom serial to UART converter, to accept and multiplex a number of NMEA signals before pushing them out over bluetooth. I'd rather not have to connect with 2 or more bluetooth transmitters in order to get different NMEA instrument signal data (it just seems like bad design in my opinion). So, something like this:

























So this winters project is to:
  • Use the Raspberry PI to multiplex 2 or more different NMEA signals
  • Output the multiplexed signals from Raspberry PI to 2 different bluetooth adapters (so that more than 1 android device can view this data)
  • Update the design of the custom UART converter 
  • Find another NMEA instrument for testing and multiplexing signals (GPS, etc...)

Friday 4 October 2013