Has anyone ever managed to get a USB FDTI serial sensor working?

For years now, I’ve been looking for answers to why my FDTI USB serial sensor doesn’t work.

I have a Rasp Pi 4 running home assistant OS connected to an old Arcam rs232 AV Amp.

I can send shell commands using “echo -e “\x50\x43\x5f\x2f\x31\x31\x0d” > /dev/ttyUSB0” but can never receive a response no matter what I try.

Anyone help?

Did you get it working?
Are both TX and RX connected to the right pins? Have you tried a loopback connection test? Is the UART configured for half duplex?

No. I think it is something to do with the x0d EOL. Home Assistant doesn’t accept them

I’m wondering if there are any entries in the system log?
Is the UART appropriately configured?
Which amp model is it? Does it support IR, WiFi or other control options as well?

I’ll have a look at the log. Do I still need to configure UART when it’s a USB adaptor?

You are using a USB Adapter to emulate a serial port using the FDTI chipset, so yes, all the usual parameters must be correct so you can successfully talk to your amp. Speed, stop bits, handshaking, voltage swing etc. The RS232 is a long established industry standard for serial data interchange

Don’t leave us guessing: make and model of both your amp and USB adapter are essential to be able to be more specific to attempt to solve your problem. Any reason you are withholding this information?

Thanks.

My amp is an Arcam AVR250.

My USB0 is this;

ID_BUS: usb
ID_MODEL: FT232R_USB_UART
ID_MODEL_ENC: FT232R\x20USB\x20UART
ID_MODEL_ID: ‘6001’
ID_PATH: platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0
ID_PATH_TAG: platform-fd500000_pcie-pci-0000_01_00_0-usb-0_1_4_1_0
ID_PATH_WITH_USB_REVISION: platform-fd500000.pcie-pci-0000:01:00.0-usbv2-0:1.4:1.0
ID_REVISION: ‘0600’
ID_SERIAL: FTDI_FT232R_USB_UART_00000000
ID_SERIAL_SHORT: ‘00000000’
ID_TYPE: generic
ID_USB_DRIVER: ftdi_sio
ID_USB_INTERFACES: ‘:ffffff:’
ID_USB_INTERFACE_NUM: ‘00’
ID_USB_MODEL: FT232R_USB_UART
ID_USB_MODEL_ENC: FT232R\x20USB\x20UART
ID_USB_MODEL_ID: ‘6001’
ID_USB_REVISION: ‘0600’
ID_USB_SERIAL: FTDI_FT232R_USB_UART_00000000
ID_USB_SERIAL_SHORT: ‘00000000’
ID_USB_TYPE: generic
ID_USB_VENDOR: FTDI
ID_USB_VENDOR_ENC: FTDI
ID_USB_VENDOR_ID: ‘0403’
ID_VENDOR: FTDI
ID_VENDOR_ENC: FTDI
ID_VENDOR_ID: ‘0403’
MAJOR: ‘188’
MINOR: ‘0’
SUBSYSTEM: tty
TAGS: ‘:systemd:’
USEC_INITIALIZED: ‘3616363’

My sensor config;

- platform: serial
  serial_port: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_00000000-if00-port0
  name: "Arcam Serial Input"
  baudrate: 38400
  stopbits: 1
  bytesize: 8
  parity: N
  value_template: "{{ states('sensor.arcam_serial_input') }}"

The vendor is Future Technology Devices International, Ltd.

Wow, nice amp! Lots of switching functionality. Ideal for integrating to a home automation setup. You certainly should persist in getting it integrated.

Had a quick look at the manual and also the service manual. Impressed that there is a full disclosure of control codes, circuit diagrams and even chip numbers. Kudos to Arcam. This is how all manuals should come, with full details.

Your amp uses an industry standard MAX232 interface chip for the serial interface, and the parameters needed are as you described. 38400 81n.
Have you connected your USB device to a Windows machine and the amp to check if a firmware update is required for the amp? That can also be used to confirm your USB Adapter and cable is correctly configured and working. Use a serial terminal program such as PuTTY, and the amp should respond to commands with an ok or error code as mentioned in the appendix at the end of the user manual pertaining to serial control. As a quick check your USB serial adapter FTDI UART is working, short pin 2 and 3 on the RS232 connector and the screen should respond with an echo of what you type there, either one or two characters, depending if you turned echo on or off in your terminal program. Once we are confident the serial port is working, we can check other things.

Some cheaper USB adapters only swing 0 to +5volts, not +/-12volts like the RS232 standard dictates. This may be the source of your woes. Measure the voltage on both pin 3 and pin 2 to pin 5 (Ground) on your USB RS232 adapter with a multimeter set to 12volts or more DC range. Are they minus 12 volts for either in respect to pin 5 (Ground)? If so, you have true RS232. If not, you may need alternative measures we can discuss later. Check also at your amp.
Please report back on all four readings if you have a multimeter.

Some RS232 cables are straight through Tx to Tx, Rx to Rx. Others swap them so the send goes to receive. This may also be a source of trouble if it is not correct. A common gotcha, easily checked by swapping them and seeing if it then works. You won’t blow up anything if you get it wrong. You can also check with your multimeter if pin 2 on one end goes to pin 2 or pin 3 on the other end of the cable.

Can you include a picture of your RS232 adapter or the URL to where you bought it from? The cable also? Side as well as connector end on. Is there a chip on the USB adapter the has the number 232 on it. If so, what are the rest of the alphanumeric characters on that chip?

I note the Infrared model CR80 remote control for the AVR250 is based on the common Philips RC-5 standard. The main system control uses RC-5 system codes ‘16’, and also ‘17’. This may also be another avenue to control your amp. The RS232 gives you full control, but infrared may be sufficient for daily needs. ESPHome has recently added IR support.

Another option may be ESPHome with a ESP32 and a RS3232 voltage translator to match the correct voltages to speak directly to your AVR250 amp. The benefits are you can control UART traffic both ways, decode strings and error codes in a controlled way as well, which you can’t do with a ESP32 and IR.

The final option is to use a Python serial library and write your own integration. You may use another integration as your starting template and modify it for your own use. Stand on the shoulder of giants.

Thanks! I bought it from ebay and replaced all the caps with better quality ones, so I’ve spent some time getting this all working.

I can already send shell commands to the amp but just not receiving anything back. Your quick reply prompted me to have another go and tried Google AI and Co-Pilot for some answers. It suggested a template sensor that I’ve tried but not working yet.

I might have a go at you suggestion though, I see there is an Arcam integration that uses ESP32 and has it working. Great suggestions and thanks again for taking the time to help!

You have to be confident the devices are communicating at the RS232 hardware level, before expecting the software level to work. The TX has to go to RX, at the right voltage swing, etc.

The UART in the ESP32 combined with a MAX232 voltage level translator might be the most effective way to beautiful music. You have full control of the traffic, two way. The hardware issues will still need to be right for communication.

Spend a little time checking out the cable - it may be just a simple pin swap is required and everything will burst into life.

Keep us posted on progress.

1 Like

Will do. I should mention, I can receive return confirmations using Node Red but nothing in Home Assistant so I assume the hardware is working properly.

I’ve read into this and I find that HA doesn’t process 0xd as EOL that Arcam sends out and I think that is causing the problem with a simple sensor.

I’ll order an ESP32 and keep you posted.