SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By TurboCamaro
#167549
I recently purchased the RS232 Shifter SMD No DB9,PRT-08780.
I am wanting to use it to add Bluetooth connectivity to a microcontroller based box I'm using. Can someone verify that this is an intended use for this product?
Here is how it is connected:
The microcontroller has its com lines running through a MAX232 chip and out to a DB9 connector. It is intended to be connected to a PC serial port. I wanted to use one of those cheap eBay Bluetooth modules(5v supply, 3.3v level TX/RX) to connect wirelessly. I connected the shifter board to the db9 on the box via a gender changer since they both have female connectors. I connected 5v to the Bluetooth module via pin 1 on the db9(supplied by the box) then added a voltage divider to get 3.3v on the VCC pin on the shifter board (3.26v confirmed with DMM). I connected TX on the shifter to RX on the BT module and vice versa. Every thing would power up and I could pair to the BT but it seemed like I couldn't get any serial comms though to the micro box at all. I even tried reversing the TX/RX connections with no change.
Am I missing something or is this shifter board not meant to be used like this?
By Mee_n_Mac
#167571
Your voltage divider is likely the problem. You're not feeding the circuit w/3.3v as if from a battery but rather 3.3v through some "large" (source) resistance. Most true source resistances are a few ohms and so can be ignored. Yours will affect the circuits performance. Can you use a proper voltage regulator ?
https://www.sparkfun.com/products/526
By TurboCamaro
#167572
Since I wrote that post late at night there's probably something left to be desired from my description. Here is a semi-crude diagram showing how I connected this and how it interacts with the other components present.

I have gotten one of these Bluetooth modules to work with another instance of this hardware but what I did was remove the MAX232 chip, then route the microcontroller TX and RX pins directly to the DB9 connector and connected everything directly to the BT module. So looking at the MAX232 schematic, the IC was removed and Pin #11(on the PCB) was connected to Pin #14 then Pin #12 was connected to Pin #13. Then the BT module TX pin was connected to the DB Pin#3 and then BT RX pin to DB9 Pin#2. Then power was connected to the BT module via DB9 pins #1 and #5.

In this instance I'm trying to get this to work without making internal modifications to the box while just plugging things into the DB9 externally.
You do not have the required permissions to view the files attached to this post.
By TurboCamaro
#167573
I saw your response after posting mine w/ the diagram.

I had looked at that 3.3v regulator but was trying to reduce complexity/size(it's a tiny trim pot) and also use what I had on hand so I went with a voltage divider. Would lower value resistors make a difference? I was thinking higher values would help in reducing the current draw on the 5v line. I think the main thing I could get locally would be a adjustable TO-220 package regulator but then I'd need external resistors to adjust the output to 3.3v. Does anyone make a TO-92 package 3.3v regulator?
By Mee_n_Mac
#167579
TurboCamaro wrote:Would lower value resistors make a difference?
Not enough to make it work. Read ...
http://en.wikipedia.org/wiki/Th%C3%A9venin%27s_theorem

You could protect the BT module from a 5v powered shifter by putting the divider btw the shifter's Tx out and the BTs Rx in. The problem then is that for Tx even the BTs logic 1, 3.3v level, looks like a logic 0 to the shifter. That PNP will still be turned on. Perhaps a pullup to 5v on shifter's Rx, with a diode or 2 btw Rx and the BTs Tx out might work ?
Last edited by Mee_n_Mac on Thu Jan 23, 2014 12:26 pm, edited 1 time in total.
By TurboCamaro
#167583
Mee_n_Mac wrote:
TurboCamaro wrote:Would lower value resistors make a difference?
Not enough to make it work. Read ...
http://en.wikipedia.org/wiki/Th%C3%A9venin%27s_theorem

You could protect the BT module from a 5v powered shifter by putting the divider btw the shifter's Tx out and the BTs Rx in. The problem then is that for Tx even the BTs logic 1, 3.3v level, looks like a logic 0 to the shifter. That PNP will still be turned on. Perhaps a pullup to 5v on shifter's Rx, with a diode or 2 btw Rx and the BTs Tx out might work ?
Would just running a 3.3v regulator like you said instead of a voltage divider both work and reduce this potential complexity?
By TurboCamaro
#167584
waltr wrote:Why not just add a MAX3232 to the bluetooth module to make it true RS232.
So would combining these products:
https://www.sparkfun.com/products/11189
https://www.sparkfun.com/products/8552
connected between the serial port on the box and the BT module bridge the gap? Can the MAX3232 take the 5v levels from the serial port and bring them down to the required 3.3v of the BT module, and vice versa?
Perhaps that's what I should have ordered in the first place.
By Mee_n_Mac
#167586
TurboCamaro wrote:
Mee_n_Mac wrote:
TurboCamaro wrote:Would lower value resistors make a difference?
Not enough to make it work. Read ...
http://en.wikipedia.org/wiki/Th%C3%A9venin%27s_theorem

You could protect the BT module from a 5v powered shifter by putting the divider btw the shifter's Tx out and the BTs Rx in. The problem then is that for Tx even the BTs logic 1, 3.3v level, looks like a logic 0 to the shifter. That PNP will still be turned on. Perhaps a pullup to 5v on shifter's Rx, with a diode or 2 btw Rx and the BTs Tx out might work ?
Would just running a 3.3v regulator like you said instead of a voltage divider both work and reduce this potential complexity?
Yes.

Here's that complexity.
(click to open)
Serial-to-Bluetooth.jpg
You do not have the required permissions to view the files attached to this post.
By waltr
#167622
TurboCamaro wrote:
waltr wrote:Why not just add a MAX3232 to the bluetooth module to make it true RS232.
So would combining these products:
https://www.sparkfun.com/products/11189
https://www.sparkfun.com/products/8552
connected between the serial port on the box and the BT module bridge the gap? Can the MAX3232 take the 5v levels from the serial port and bring them down to the required 3.3v of the BT module, and vice versa?
Perhaps that's what I should have ordered in the first place.
Yes, The TTL logic side of a MAX3232 can work with 3.3 to 5V levels.
The RS232 side works with the +12 to -12V RS232 levels. This is the RS232 level translator chip I use in all my projects that require an RS232 interface. It is very simple to use and just works.

It is a shame that SparkFun did not put both the MAX3232 and the DB9 on to one BoB (but maybe they do have one).
By TurboCamaro
#167635
n1ist wrote:Looks like you also need a null modem; both sides are transmitting on pin 2 and receiving on pin 3...
/mike
Are you saying I need to flip the RX TX pins between the DB9 coming off the MAX232 and the DB9 on the shifter board? It's not enough that I have them flipped between the shifter board and the BT module?