Simple RFID Scanner Battery Powered (MiFare, MFRC522, Oled, Lipo, TP4056)

by Wim3d in Circuits > Arduino

3395 Views, 6 Favorites, 0 Comments

Simple RFID Scanner Battery Powered (MiFare, MFRC522, Oled, Lipo, TP4056)

RFID scanner

In this instructable I show you how I made a simple RFID UID reader which reads the UID of a Mifare RFID card.

The program is quite simple and on a breadboard the reader was quickly made. Then I soldered it all on a piece of perf board and I designed an enclosure for it.

It has a built-in LiPo charger.

Supplies

Hardware

Schematic_Simple-RFID-scanner_Simple-RFID-reader_20190728223128.png
IMG_20190728_154734.jpg
IMG_20190728_154740.jpg
IMG_20190728_154724.jpg
IMG_20190728_154646.jpg
0Z89W.png

The whole reader is powered by a 3.7V LiPo battery. Its voltage is fed into the RAW pin of the Arduino and the on-board voltage regulator of the Arduino Pro converts the voltage to 3.3V for the Arduino and the VCC-pin of the Arduino. The Oled screen and the RFID module are connected to the VCC pin of the Arduino.

According to the datatsheet, the voltage regulator of the Arduino should be able to deliver a maximum of 150 mA, which is sufficient for the:

  • Arduino (45 mA)
  • Oled (10 mA)
  • MFRC522 (26 mA)

The voltage of the battery is measured by the Arduino and converted to a battery percentage.

I soldered female header pins for all components to a perf board.

See the schematic for the circuit, most is self explanatory. Some remarks:

  • Change the resistor on PROG of the TP4056 to suit your battery, see the attached table. Charge the battery in 1 hour, so in case of a 400mAh battery, you should use a 3k resistor.
  • The voltage of the battery has a maximum of 4.2 V, which is higher than the maximum voltage of 3.3V, so a voltage divider is applied. Assuming a voltage drop of 0.3V, a minimum battery voltage of 3.6V is needed.
  • In a previous version of the module, I read the state of the CHARGE and STD BY pins of the TP4056 via digital inputs of the Arduino (connected via a 10K ohm resistor). While this was succesful, I wanted to show the charge state by LEDs. However, because of some current flowing from the TP4056 to the Arduinos digital inputs, the LEDs did not shut down completely. Also did the connections between the Arduino and the TP4056 did result in some unpredicted behavior of the TP4056. Therefore I removed the connections between teh TP4056 and the Arduino.

Enclosure

IMG_20190728_154818.jpg
IMG_20190728_154751.jpg
IMG_20190728_154808.jpg

I designed an enclosure in Fusion360. The STL files are in my Thingiverse.

Software

IMG_20190728_182719.jpg
IMG_20190728_170320.jpg

The program file is in my Github.

The program is straightforward:

  • Init all components
  • Measure the voltage of the battery via the voltage divider, see this website for a handy voltage divider calculator.
  • Convert the voltage to a percentage and show this percentage. Assuming a voltage drop of 0.3V, a minimum battery voltage of 3.6V is needed, so 3.6 V = 0% and 4.2V is 100%.
  • Read the RFID and slow the ID on the Oled screen.

I programmed the Arduino via a FDTI programmer at 3.3V

Assembling

IMG_20190728_155411.jpg
IMG_20190728_161302.jpg

I aligned the Oled with the opening and glued it in the enclosure with hot glue. Then glued the MFRC522 in the enclosure and placed the on/off switch and the micro USB charge connector.

Charging and Using

IMG_20190728_163200.jpg
IMG_20190728_164828.jpg
IMG_20190728_182707.jpg

While charging, the red LED is alight. When the battery is full, the green LED is alight.

Then: switch on the module and use it!