Tuesday 10 December 2013

Multiple Bluetooth Endpoints

As mentioned in the last post, one of my winters project was to output the multiplexed NMEA signals from Raspberry PI to 2 different Bluetooth transceivers. Before hooking my Bluetooth creation to the Raspberry PI, I wanted to confirm that this setup would work. All this to share data across android devices using a custom NMEA app.

Last night I tested to see if the custom UART converter design could handle multiple Bluetooth transceivers on the same output circuit. I was worried that splitting 1 NMEA output across 2 Bluetooth devices could result in a depleted signal. Because the length of wire connecting the 2 Bluetooth transceivers is so short (and will be short when installed) I was hoping to see little to no reduction of signal quality going to either Bluetooth transceiver.

From the picture below, you can see the breadboard prototype and the 2 Bluetooth transceivers receiving a split NMEA output. 

Testing showed little to no signal depletion (measuring both volts and amps) after hooking the Bluetooth outputs to a voltmeter and comparing the main signal. The entire system, wind instrument + 2 paired Bluetooth transceivers draws 0.12 Amps, that's a whopping 1.44 Watts! Now I know why my 70 aH battery was still partially charged when mistakenly leaving this system on for 2 weeks.

Next I wired up my wind instrument to the breadboard prototype.



Now realizing that the length/distance of wire from the masthead to the electrical panel on Santeria is about 35 to 40 feet, I went ahead and uncoiled a 35 foot length of speaker wire and connected the data output wire of the wind instrument (to mimic the height of the mast). After connecting the speaker wire to the breadboard, I went ahead and paired 2 different Android devices, one to each Bluetooth transceivers. I turned on the fan to get the wind instrument moving, then started the custom Android app.

The results:

Tablet output:


Phone Output:




Giddie Up!

This should work quite nicely aboard Santeria. This double Bluetooth scenario significantly reduces the amount of redesign effort.

Next.....the Raspberry PI!



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

Monday 25 March 2013

Encasing the Tablet


While browsing the web I found several iPad and Tablet cases. Only a few of these were:

  • hard cased
  • waterproof
  • mountable
  • made for marine environments
The closest unit to my criteria was found here. A little pricey @ 150$




My poor-man mentality led me to an idea to make my own fiberglass hard case. It would lack the luster of these finely finished products however it will be reliable and functional for my purposes.

Here is a diagram of how it will look:

Features:

  • Made of fiberglass cloth
  • Thin plexiglass layer for viewing tablet display
  • waterproof
  • tablet side or top loading (haven't decided) into box
  • mountable to mast
Construction starts soon! More at 11...




Wind Instrument to Bluetooth - Update

Waiting for one of these USB-TTL programmers to arrive to change the baud rate of the bluetooth device (previously posted here)



Waiting for this programmer to arrive has given me time to complete the beta version of my bluetooth board as seen below based on my breadboard prototype (previously posted here). Parts:

1 - 2" x 3" PCB board
1 - Standalone serial bluetooth transceiver
1 - 4 pin Terminal block
1 - 5 volt regulator
4 - 1 uF Capacitors
1 - Max 232
1 - 8 pin chipset (for max 232)


This will be installed in a dry container and will supply wireless data, via bluetooth, to my android tablet with custom NMEA software

Friday 1 March 2013

Wind Instrument to Bluetooth


There are many different options in the Marine Electronics market for publishing your instrument wireless. Different vendor offer everything from, Ethernet, to proprietary wireless technology to Bluetooth. The leap to wireless for me is a very expensive leap. To buy one of these complete products will not be possible this year.

Full small vessel Wind/ Speed/Depth systems start around $1,100 and go upwards to $1,800 US

Alternatively there are hybrid systems that take a wired system and output wi-fi and bluetooth. Companies like ShipModul, Noland, Actisense, and Brookhouse offer Multiplexer that output these wireless signals. cost begins around $250 and go upwards to $700 US

There are also serial to bluetooth dongles that plug into a multiplexers serial port that enable this data transfer wirelessly for boat with existing wired multiplexers. Cost range for the dongle is from $50 to $85 US. Unfortunately for me I don't have a multiplexer.

As mention in previous posts, I have 2 instruments on-board, one of which is NMEA based (wind instrument). My winter project was to interface this wind device with Bluetooth. To start, I needed a bluetooth transmitter, something that would work with a DC power supply and eventually hook up with serial based data (outputted from the wind device). After a few web searches and a credit card, I purchased one of these devices. Approx 10$ CAN for the BT device


JY-MCU Bluetooth transmitter
Back side of board


From the vendor...

Serial Bluetooth RF Transceiver Module RS232 w/ Backplane Enable & State Pin

This small size Bluetooth TTL transceiver module allows your target device to both send or receive the TTL data via Bluetooth technology without connecting a serial cable to your computer. It's easy to use and completely encapsulated.
- TTL data transparent transfer between a host Bluetooth device.

- Works with any USB Bluetooth adapters.
- Default Baud Rate: 9600,8,1,n.
- Coverage up to 30ft.
- Built in antenna.
- Power input: +3.3VDC.
- Mini Size.
- TXD: Transmit Data (Data output pin for the UART),must be connect to the RXD of you device
- RXD: Receive Data (Data input pin for the UART),must be connect to the TXD of you device
- VCC,GND: power supply,between 3.6V~6.0V,Prohibit more than 7V,Otherwise, damage to device!
- State: Connection status output,when bluetooth is connect,output high,otherwise,output pulse(about 5Hz)
- ON/OFF: Power Control,when is low(default),power is open,when is high(not less than VCC-0.5V),power is close




Some of the challenges in using the Bluetooth transceiver are:
  • Must regulate the voltage down from 12 volts (on boat) to 3 to 6 volts to supply power to the unit.
  • Device accepts TTL based communication, so must convert serial to TTL
  • Must program the unit and change the baud rate to 4800

Seen below, using a solderless breadboard, I created a small circuit using a 5 volt regulator, 4 capacitors and a RS232 Max (Serial to TTL).




The idea was copied from the following diagram which shows a circuit using serial, Max 232 TTL converter and a downstream TTL device (in my case, Bluetooth)




I'm waiting for a TTL programmer device to change the bluetooth baud rate before testing all this.


More to come at 11....

Android Wind app


This post is a continuation from an earlier post on an experiment to display my NMEA wind instrument data via Bluetooth.......

Update:

Spend the last few weeks developing a new Android app for my Tablet to show my wind instrument data over Bluetooth. Here is how my development works:

  • VB.Net program producing simulated NMEA sentences. This is sent out to one of my laptops COM ports using standard baud rate (4800 baud)
  • Installed a bluetooth dongle to my laptop to broadcast this simulated NMEA data.
  • Started the VB.Net program to send data over bluetooth
  • Paired my computers bluetooth with my Android bluetooth
  • Develop the Android app using Eclipse and Android plugin
  • Install the Android app (I called it WindTooth) on the tablet
  • Start the android app, pick the bluetooth device
  • the data feed from my laptop is displayed within the Android app
See below for 2 screen shots:

Next steps: Look into standalone bluetooth devices that accept serial data and broadcast as a standalone device (no laptop or PC needed)

Home Screen
Home Screen

Data Screen

Wednesday 20 February 2013

My Proposed Instrument Experiment



I like instruments on a race boat and find their feedback very useful. They help the skipper/helmsmen validate whether their vessel is at optimal performance in the conditions being faced. Throughout the 2013 season I noticed that my NMEA instrument display was failing. It worked for about 5 minutes then froze and required a power off/power on cycle...not very reliable. Over the winter months, I've tested and determined that the central computer of my NMEA instrument panel has an electrical short (somewhere within the curcuitry). Emails to the gentlemen that installed my unit have gone unrepresented. Time to seek out new options.

I received an Android Galaxy Tab 2 7" for Christmas. This little device has built in GPS and bluetooth and has a large screen display. Its good for web stuff and my daughters games while on the road.

I started to devise a plan to see if I could use this little device as a NMEA repeater. If I wanted to use the tablet I would have to:

1. prove suitability/usability on board
2. Determine how NMEA data would get to the tablet
3. Write an Android program to repeat the data

1. to determine suitability/usability on board, my requirements were:
a) must be mounted
b) must use a protective case (the case must handle the elements, rain, splashing, hail, sun. Options here are to either buy or make a waterproof case. Nothing really fits this requirement on the market that is mountable. Because this use case is very specific, it looks like making a case may be the only option).
c) must be able to interface with touch features, either physically with finger (case must allow touch options through the protective display cover) or remotely via another device (using remote control apps for Android). My touch requirement may not be possible.
d) mounted to the mast, just below the boom for all crew to see
e) must show at least 1 instruments data in the display, for starter Wind speed and direction.

2. How to get NMEA to tablet. In my case, I have 2 instruments onboard. The first is a NMEA based wind instrument, the second is a water speed instrument. Upon further discovery I've found that the water speed instrument doesn't output NMEA based signals. I did this my hooking up my boat devices to a USB to serial interface cable and outputted the instrument data to a PC Serial data logger. NMEA signals are transmitted via serial protocols, to be more specific RS-232 protocol. RS-232 protocol is essentially serial based ASCII signals sent as bytes and transmitted over wires using positive and negative DC voltage. The challenge here is to get the serial data signals from the wind instrument forwarding to the tablets bluetooth device. If I can figure out how to get this converted, then we're off to the races.

3. I'm a software developer, so writing Android programs to interface with bluetooth and the resulting NMEA data should be fairly straight forward. Something that shows wind speed and direction in a simple Android app will do nicely.

With all these pieces in play, there might be a solution here, or maybe not.

Neil