M6E NANO (SEN-14066) and interfacing with Raspberry Pi (USB and GPIO).

Hello,

I have successfully connected the M6E NANO (SEN-14066) to a Raspberry Pi 4 using the suggested SparkFun Serial Basic Breakout - CH340G board. Interaction with the RFID board is achieved using the Mercury API and a C# program running on .NET.

Things work pretty decently, however I have a couple quick questions:

  1. Per SparkFun tutorial ( https://learn.sparkfun.com/tutorials/sp … 1630003239 ), boards like the SparkFun Serial Basic Breakout - CH340G are for prototyping and should not be used for production. I quote:

Warning: These boards are for prototyping ONLY. Unlike commercial devices, power negotiation and suspend mode do not occur, and it is possible to overload the USB host. Exercise caution when connecting a load, and never connect a load that draws too much current.

That said, is there a board similar to SparkFun Serial Basic Breakout - CH340G that can do the same but that can be used for production applications?

  1. Next on my agenda is to try to connect the RFID board using the serial GPIO pins on the Raspberry Pi and the serial GPIO pins on the RFID board and not involving the USB connection. Has anyone tried doing that? Do you know if the Mercury API code would work the same? Would I still use the tmr:////dev/ttyUSB0 connection string to connect to the RFID device?

Thank you.

if you want to connect to the mini-uart or the real uart read this article : https://di-marco.net/blog/it/2020-06-06 … ort_usage/. If you have a PI-4, that has additional UART that can be activated (https://forums.raspberrypi.com/viewtopic.php?t=244827) in that later case your device becomes /dev/ttyAMA1

paulvha, thank you very much for your response, I am new to all this so it is taking me some time to get thru all this. If you don’t mind, I would like to ask you another quick question if its ok.

Basically, I got things to work using the serial interface on the Pi (not sure yet how or why things are working but they are working). The thing that I don’t get is that I am only using the TX and RX pins and ignoring the flow control pins ( DTR, CTS, etc). So the question is why is this working without using the flow controls pins?

At first I though that the answer had to do with the “Serial Selection Switch” (HW-UART / SW-UART). I assumed that setting it to HW-UART will require using the flow control pins on the Pi while using SW-UART flow control would be handled via software however, no matter what I select things work… but I am guessing here that this switch will only kick in if there is an overflow of data and something tells me that have not reach that overflow point so I don’t see a difference.

Do you happen to have any insight on this?

Thanks.

Ah, never mind, looks like the Hardware Serial (HW-UART) and Software serial (SW-UART) are there to switch between using the designated RX and TX pins or using pins 2 and 3 in the Arduino / Red Board which I assume simulate serial communication… not sure why someone will need or want to use software UART instead of the hardware one…

Still not sure why we don’t need the flow control pins in order for serial communication this to work… curious what are the negative effects of ignoring them.

it does not use flow control at all. It assumes that the UART connection will not drop a byte.

As for SoftwareSerial(), the board layout fits an Arduino Uno and that only has ONE UART which is used for the USB connection. In that case SoftwareSerial is the only choice.