Using USB Transceiver with Arduino

Hi, I have an Arduino UNO and a Raspberry Pi 4 model and I want to communicate between the 2 (I want to send data from the raspberry pi to Arduino).
I have 2 transceivers with a USB connection named KYL-220. (link at the bottom).
I manage to send data from Arduino to the raspberry pi using direct USB but not the opposite.
Also, when I plug the transceivers, I see that the transceiver that is plugged into the raspberry pi does send and the transceiver that is connected to the Arduino receives, but I can't see it in the Arduino (I know the transceivers work because they have red LED for sending and green for receiving.
I am using the "Serial.read()" command. Is there a better way to receive data with the Arduino?

link to the transceiver website: Shenzhen KYLCOM Communication equipment Co., Ltd.rf models rf IO models

The device is a USB slave. Your Arduino is a USB slave. Your PI is a USB master. You need to make your Arduino a USB master as well. That requires a separate circuit board to make the Arduino a USB master.

Paul

http://www.rf-data.com/en/product-23475-28813-93842.html

This one is ttl and all kyl are said to be compatible with one another.

The USB port on the Arduino is not a master (or Host) that means that normally you cannot use the USB port to connect slave devices such as disk drives, printers, scanners, keyboards etc. to the Arduino and expect to use them as you would an on a normal PC or Raspberry Pi.

You may need to buy a USB shield to operate your transceiver (but check with others before doing so!

This article explains it better than I could (there are other articles - this is just the first I found): Can the Arduino interface with USB devices without the USB host shield? - Arduino Stack Exchange

countrypaul:
The USB port on the Arduino is not a master (or Host) that means that normally you cannot use the USB port to connect slave devices such as disk drives, printers, scanners, keyboards etc. to the Arduino and expect to use them as you would an on a normal PC or Raspberry Pi.

You may need to buy a USB shield to operate your transceiver (but check with others before doing so!

This article explains it better than I could (there are other articles - this is just the first I found): Can the Arduino interface with USB devices without the USB host shield? - Arduino Stack Exchange

Paul_KD7HB:
The device is a USB slave. Your Arduino is a USB slave. Your PI is a USB master. You need to make your Arduino a USB master as well. That requires a separate circuit board to make the Arduino a USB master.

Paul

So the USB is a slave. can I use the Rx and Tx pins? I am asking because I also have another transceiver (KYL-210) which needs an RS232 to UART board( and I wished to avoid it but looks like I have no choice)

  1. Is there a way to turn the Arduino to a master using the Rx and Tx pins and a library?
  2. Can I connect the transceiver to an Arduino Due? I read that this board can be used as a USB master but in the library, I only saw commands for a keyboard and a mouse.
  3. Any shields you recommend? I saw there is one sold by Arduino and another sold by Sparkfun

hantop310:
So the USB is a slave. can I use the Rx and Tx pins? I am asking because I also have another transceiver (KYL-210) which needs an RS232 to UART board( and I wished to avoid it but looks like I have no choice)

  1. Is there a way to turn the Arduino to a master using the Rx and Tx pins and a library?
  2. Can I connect the transceiver to an Arduino Due? I read that this board can be used as a USB master but in the library, I only saw commands for a keyboard and a mouse.
  3. Any shields you recommend? I saw there is one sold by Arduino and another sold by Sparkfun
  1. If you are referring to the normal RX and TX on the Arduino the I would assume so, if you are referring to the parts of the USB connection then I would assume not.
  2. From what I have read the library that allows the USB slave to act as a master can only cope with very low speed and struggles with USB 1 speed 1.5Mb/s - whether it would work with those transceivers - no idea.
  3. I have never used one of the USB shields so cannot recommend one to you- Paul (_KD7HB) may be able to. I did notice there are some advertised on Amazon for <£4 and similar on Ebay but I have no idea on suitability. I would be tempted to go with a well known make even though it is much more expensive if you have never used one and only intend to get one.

The one I recommended, which the OP happens to have, says TTL, not RS232, no need to convert. Should just try it, OP.

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