Electronic – MSP430 Bluetooth interfering with USB module

bluetoothmsp430usb

I have a simple project that basically sends and receives data through USB connection and Bluetooth. Both the USB module and the BT module share the same UART RX (P1.2) and TX (P1.1) ports.

The problem I am having is that when the bluetooth is powered, I can't send commands to the MSP430 with the USB module. If I unplug the BT module, I can send just fine over USB.

Am I connecting them incorrectly, or do I need to disable the BT when using USB?

The USB module is based on FT232R:
https://www.sparkfun.com/products/9716

The BT module is based on RN-42:
https://www.sparkfun.com/products/10269

USB connections:

  • GND –> GND
  • CTS –> GND
  • 3V3 –> N/C
  • TXD –> P1.1
  • RXD –> P1.2
  • DTR –> N/C

BT connections:

  • CTS-I –> N/C
  • VCC –> 3.3V
  • GND –> GND
  • TX-D –> P1.1
  • RX-I –> P1.2
  • RTS-D –> N/C

Best Answer

The Arduino has the same issue, and they have implemented a fix a long time ago.

image

As you can see in the image, Resistors RN4B and RN4A are 1k series resistors between the USB-Serial ic and the Arduino's ATMega328p. This allows a device connected directly to the Arduino headers, like a shield/boosterpack to communicate with the Arduino without interference from the USB-Serial IC.

You want to implement the same thing. Place 1k resistors between your MSP430 and your Bluetooth module. This will mean that the USB-Serial connection has precedence over the Bluetooth module. Any communication between the USB-Serial and the MSP430 will not be interfered by the Bluetooth module. That said, you cannot send/receive from the bluetooth module when the USB-Serial connection is plugged in.

Update: This may not always work though. Some devices, when there is no usb signal on one side, will turn the tx/rx into floating/open inputs, instead of driving the line, which is good, but others, when off can still siphon power via clamping diodes in gpio pins. It can be a pain because this means they attempt to drive the line, preventing others from doing so.. In your case, you might need a bi-directional multiplexer, or simpler, if the usb serial is only occasionally used, you could add a jumper to the line. Plug in the jumper when you need to use the usb connection, remove it when you don't.