• 0

Pmod rs232 problem in communication with Arduino 1 (or other microcontroller)


Question

Hi everybody,

I have an RFID module which can be controlled through an RS232 communication. I have tested it with a rs-232 connection with a PC and with an also with an usb-serial converter. I can connect with the RFID module an receive its data through a terminal emulator such as Teraterm, PuTTY, etc. The data are simply ASCII strings of codes. The module can also be configured by sending some ASCII commands, this is also tested.

Now I want to do the same with a microcontroller (Arduino, Lopy, etc.), i.e., the microcontroller would act as the PC, getting data from the RFID reader. I have acquired a Pmod rs232. The needed connection with the RFID module is shown in the attached image. The RFID module comes with a rs232 wire with the connections made. I connected the d9-female side connector to the Pmod rs232 through a female-male gender like this one. My understanding is that the RFID module is a DTE since RXD and TXD are crossed as can be seen from the image. I have connected the Pmod rs232 to Arduino but I am not able to see anything. So the scheme is:

Arduino UNO serial connection --> Pmod rs232 --> rs232 wire --> RFID module.

The connection is 9600 8N1. I tried some code such as "if some character is received activate internal LED", or getting the data through a configured software UART and sending data through the USB and see them in serial monitor. So far with no success.

I have some questions:

1- My understanding is that this Pmod rs232 is a max232. Can be any problem if I am doing a DTE-DCE connection or DTE-DTE? I seem to understand I just would have to connect the TTL pins accordingly. Pins 1 and 2 are unconnected.

2- How can I test the Pmod rs232 is working? This is connected to arduino 1, on the ttl side pin 6 is connected to 5V, pin 5 to gnd, and 4 and 3 to RX and TX respectively. 

3- Is there any other way to check where the problem is?

Any advice will be very welcome, I am stuck with this.

Thanks in advance.

PS: Long time ago I designed a PCB based on a PIC and a max232 and I could succesfully communicate with the RFID module.

 

RFID.PNG

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi,

I solved this problem and I will answer here if it can help someone. The problem is that the RFID module crosses RX and TX (DTE device) as can be seen from the scheme in my previous post. This makes that TX from the RFID module is connected to T1OUT and RX to R2IN in pmod rs232 (see this). The solution was to swap RX and TX in the RS232 side, i.e., before connecting to the pmod rs232.

It took me two days full time to figure this out...bear always in mind that this pmod rs232 module is configured in DCE mode!

Regards.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now