Arduino communication with TC sensor

hello
I'm trying to communicate with a sensor with an Arduino.
The sensor is directly connected via USB and supports RS232C communication.
The test was completed by connecting the sensor to the computer.
When connecting with Arduino, the usb-uart line was used, the library software serial was used, and communication was attempted using 13 and 12 digital pins, but failed(nothing come out data).
How to communicate with Arduino and sensor?

image


#include <SoftwareSerial.h>

SoftwareSerial temp(13,12); //rx, tx
// Arduino - Send HEX value to Serial

char tc1;

void setup() {
  Serial.begin(9600);
  temp.begin(19200);
}
void loop() {
  
  byte serialPacket1[] = {0xFF,0x0F,0x01,0xF1};

  temp.write(serialPacket1, sizeof(serialPacket1));
  while (temp.available() > 0) {
  tc1 = temp.read();
  Serial.println(tc1);
  delay(1000);
  }

}

are using using a RS232 to TTL Serial Port Converter Module to interface with the sensor?

@ahsjdkfl0630 can you provide a link to where you purchased the thermocouple board and the documentation for it.

That sounds like the thermocouple is a USB device that enumerates to a serial port. If that is the case, then I think you would need to be a USB host (like a PC or Raspberry Pi for example) to talk to it.

There do appear to be 4 pins next to the USB connector. Maybe they break out the raw serial data.

I am using pl2303hx usb to ttl converter.

This is product manual.
USB-TC Manual (2).pdf (335.6 KB)

yeah, don't think you can use that to connect the TC sensor with your arduino... that's not how they work.

I was hoping that the board has a RS232c breakout that you connect to directly but the datasheet does not show any such pins available :frowning:

@markd833 suggestion is probably the route if you dont want to use a PC unfortunately

@ahsjdkfl0630 there doesn't seem to be a way to get at (or intercept) the serial data on that board. In simple terms the USB thermocouple board is a USB "slave" device. The PL2303 is also a USB "slave" device, so they won't talk to each other.

If you really wanted to use an Arduino, then you would need to know the part number for the thermocouple IC (it'll be written on the top of the chip). Given that information, you should be able to get hold of a datasheet for the chip - assuming it's from one of the big chip companies. Once you have the datasheet, you may well find the pins on the chip that send/receive the serial data.

If you are prepared to carry out some minor surgery on the board, then you might be able to disconnect the serial signals from the USB chip and re-route them to your Arduino.

refering to the ATmega88PA datasheet, this pins seem to be the UART TX and RX pins:


hope that helps...

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.