From time to time I deal with devices only offering a RS232 to interact with them in a “programmatic” way. Some of my multimeters only offer RS232 since they are old.
My computer does not offer a RS232 interface anymore, just USB. One solution I came along was to connect them via RS232 to Bluetooth. I checked out a few modules exiting on the market.
I was not happy with them. Connection problems, crashes, etc. made me think about my own solution.
I came up with this little board I designed:
It is basically very simple.
The RS232 connection is done via the DSUB 9 connector. Only RX,TX,GND is used since most of my devices do not offer CTS, DTR etc.
The RS232 signals are handled by the standard Chip MAX232 (bottom picture) and the typical Caps to generate the required voltage levels for RS232.
The signals from the MAX232 are fed into a HC-05 module (top picture, lower part). A HC-06 would also have been possible, but I had several HC-05 at hand so I used them.
A few things I had to consider.
Where to get the power supply from. RS232 does not offer any type of supply voltage. Some people use DTR, CTS etc. signals to derive a power supply from, but I regarded this as too risky. So I choose to have a USB micro plug for the power supply. USB Power is typically always around where I use the module. Some internet sites say the HC05 is capable to run at 5V, but I tried to be sure and added an AMS1117 (3.3V) Voltage regulator to power the HC05. It is optional and by just shortcutting 2 pins, the HC05 would run on 5V.
How to configure the HC-05 for baud rate etc.? I decided to just have a jumper to connect the key pin of the HC05 to VCC. Several internet sites say that the “key” pin needs to be GND while powering up, but my modukles require VCC in order to go to AT Mode. Being in AT Mode allows you to send AT commands to control communication settings (Baud, Bits, etc.), the name of the device (BT Name) and the pin code for pairing. Just plug the jumper while powering up, then remove it again.