I’m trying to integrate my amplifier (Cambridge Audio CXA81) into HomeAssistant over RS232 with ESPHome. The serial control protocol is described here.
When I connect my computer to the amplifier over an USB-to-RS232 cable I’m able to send commands to the device and I do receive messages from it. (I use CoolTerm on my Mac for that.) I then connected an max3232 based adapter board (bought from AliExpress) to a D1 Mini ESP32, but the amplifier does not react to any sent commands. I tried interchanging the RX and TX connections several times and tried driving the chip both with 5V and with 3V. I also tried different adapter boards from different vendors.
When I connect the adapter board directly to my computer over an USB-UART adapter I cannot control the amplifier either. But when I connect the USB-RS232 cable to the adapter board (with the USB-UART adapter) directly and open two serial connections I can «chat» with myself. So the boards seems to be working?!
I’m not completely clear on the electrical setup here: what’s the port on the amplifier? Is it a regular DB9 with +/- 12V signal levels?
Your problem here may be a lack of pull-up resistors on the TTL logic side to the Wemos. Most times I’ve done this type of interfacing I need to put 10kOhm (22kOhm can work too) resistors between Vcc and the TX and RX pins (1 resistor each) - otherwise communication just doesn’t work.
EDIT: Re-reading your post I think I get it - RS232 is on the amplifier. Your problem is almost certainly that you need pull-up resistors on the TTL lines. I suspect when you connect the USB-RS232 and USB-UART together via the adapter, the combined pull-ups are just enough to get it to work.