Barcode scanner and Serial1

I have a 3.3V RS232 barcode scanner connected to the RX/TX (pin 13 and 14) on my MKR1310. I dont seem to be receiving any serial data though. I have tried the same scanner and same program with a Arduino Micro and it seems to work fine, even when running on 3.3V.

image

Any help would be appreciated as I cant seem to figure this one out.

Are you sure it's an RS232 scanner and not a TTL one?
Send a link to a datasheet if you have one.

How are the pins connected, via level shifter I hope?
Check this out: The microcontroller on the this board runs at 3.3V, which means that you must never apply more than 3.3V to its Digital and Analog pins.

Quick update - I ended up using a scanner from Zebra with a RS232 connection. The output from the scanner had to be run through a hex inverter before receiving with the MKR to be able to decode the scanner output correctly. The result was then sent over LoRa to my gateway which then published it to my MQTT broker.
All seems to be working well now. Big learning were to choose a scanner that has a dedicated RS232 connection as some scanners say they send RS232 over the USB cable which did not work. Also look out for inverted logic levels between the scanner and MKR RX.

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