Go Down

Topic: Using FTDI interface while Bluetooth module TX/RX is connected? (Read 2 times) previous topic - next topic

zenwebb

I've been working on a simple LED controller board that has an ATMEGA328P on-board along with an cheap Bluetooth module from DealExtreme (http://dx.com/p/wireless-bluetooth-rs232-ttl-transceiver-module-80711). I have the RX/TX lines of the Bluetooth module connected to the TX/RX lines of the ATMEGA328, but I also wanted to provide an FTDI interface so different sketches can be uploaded after the board is shipped (so users can update animation patterns, sensor input, etc).

But all of the tutorials and similar projects I've seen using Bluetooth modules with Arduinos have warnings saying that I'll need to disconnect the RX/TX lines between the two, otherwise the FTDI serial connection won't work. If this is correct, how can I isolate my on-board Bluetooth module from the ATMEGA328 when the FTDI interface is active?

I've attached a schematic for my board, if anyone wants to take a look.
Grad student, creative technologist, OSHW engineer
http://jason-webb.info

retrolefty

The bluetooth has an output signal wired to the 328p rec pin. The FTDI also has a output pin wired to the 328p rec pin. What happens if the FTDI output is high and the BT output is low? That's called a short circuit and will cause large currents to flow and chips to be damaged. You simply can't wire two or more output together unless you can guarantee that they will never switch to different states from each other. So some form of isolation needs to be wired in to prevent that. It could just be a dip switch or a diode-or gate with pull-up. The standard arduino design uses two 1k series resistors between the FTDI send and rec pins to the avr rec and send pins. This prevents damage but still does not allow for interference free data sharing between two different data links, and usually you have to disconnect the external serial connections if you want the FTDI usb uploading to work correctly.

Hope that helps?

Lefty

zenwebb

Makes sense why they can't both be connected. Now I need to figure out how to isolate the BT module and the FTDI interface when the FTDI interface is in use.

What is the 'standard' way to prevent cross talk? Put diodes on both the FTDI and BT RX/TX lines, or something more clever?
Grad student, creative technologist, OSHW engineer
http://jason-webb.info

retrolefty


Makes sense why they can't both be connected. Now I need to figure out how to isolate the BT module and the FTDI interface when the FTDI interface is in use.

What is the 'standard' way to prevent cross talk? Put diodes on both the FTDI and BT RX/TX lines, or something more clever?


Personally I like to use a pair of PCB mounted 3 pin male header and then use a two pin clip and place the jumper clip in one position or the other as to who 'owns' the AVRs serial pins. Total isolation, little board space used. Keep  it simple is my rule.  ;)

Lefty

zenwebb

I like the idea, but I'm really tight on board space at the moment. I'd like to keep my size at or below 1.96x1.96" to be cheap to run through Seeed Studio's PCB service, and am already close to that size.

I just tried fitting an SMD DPDT slide switch, and then a 3-pin male 0.1" header, but both were too big for my board. Here's a screencap of my PCB right now, maybe you can suggest another solution?

Grad student, creative technologist, OSHW engineer
http://jason-webb.info

Go Up