I want to keep track of UHF RFID stickers. I’m hoping to do this using a Raspberry Pi zero attached to an UHF RFID reader. I acquired this reader:
https://www.aliexpress.com/item/32848525319.html
intending to use it over TTY via this Python library:
https://github.com/wabson/chafon-rfid
After digging into it a bit more (but not before already purchasing some of the components) I’ve realized that the voltage for the TTY pins on the Raspberry Pi and on the reader take different voltages (maximum 3.3v on the pi and minimum 3.5v on the reader). From what I’ve read, I should be able to solve this problem with a level shifter. So I’ve purchased this:
https://www.aliexpress.com/item/1972789887.html
However, I’m not entirely sure how to use the level shifter/if it’s as simple as it seems. I’ve read a bit about it and I think I know what to do, but I really don’t want to burn out the pi or the reader.
What I intend to do is:
- Wire the 5v pin on the pi to one breadboard positive rail
- Wire the 3.3v pin on the pi to the other breadboard positive rail
- Wire the 5v breadboard positive rail to the VCC pin on the reader
- Wire the 5v breadboard positive rail to the HV pin on the level shifter
- Wire the 3.3v breadboard positive rail to the LV pin on the level shifter
- Wire a GND pin on the pi to a breadboard negative rail
- Wire the breadboard negative rail to a GND pin on the reader
- Wire the TX pin on the pi to LV1 pin on the level shifter
- Wire the RX pin on the pi to LV2 pin on the level shifter
- Wire the TX pin on the reader to HV2 (to connect TX on the reader to RX on the pi)
- Wire the RX pin on the reader to HV1 (to connect TX on the pi to RX on the reader)
Does this make sense? Am I missing anything?
EDIT: Here is a diagram of what I was originally suggesting:
And here is a diagram of what I think Milliways is suggesting:
-
1You might get more level shifting ideas from AdaFruit and SparkFun tutorials: (1) TXB0108 8-channel Bi-directional Logic Level Converter – AdaFruit US$8 adafruit.com/product/395, (2) 74AHCT125 – Quad Level-Shifter (3V to 5V) – AdaFruit US$1.50 adafruit.com/product/1787, (3) 5 logic level shifting suggestions – rpi.stackexchange raspberrypi.stackexchange.com/questions/27928/… – tlfong01 6 mins ago
-
1Two more references: (4) Serial Port and Level Shifting Suggestions TB/SX0102/4 etc) – rpi.stackexchange raspberrypi.stackexchange.com/questions/96697/… (5) Logical level shifter summary – tlfong01 penzu.com/public/ac4c4419. Happy logical level shifting! Cheers. – tlfong01 3 mins ago Edit
The mind glazes over trying to follow your description – I would have to draw a picture.
Frankly I wouldn’t do it this way.
A typical use of a Level Shifter is shown directly wired to a device.
The Pi is on the Right, the Red wire is 5V to HV; the Black Gnd (both soldered to the same pads) Pink is 3.3V to LV, Grey GPIO.
This is only unidirectional you might want to use 2 Level shifters, but you can normally connect the Pi Tx directly to the Rx without.
-
I figured out how to make diagrams (I used Fritzing) and attached one for what I was initially thinking and one for what I think you’re suggesting. Would you mind taking a look? – Dylan 7 mins ago
Categories: Uncategorized