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

About: I like to combine electronics like Arduino's, ESP8266 etc with 3D designing and 3D printing.

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

Step 1: Hardware

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.

Step 2: Enclosure

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

Step 3: Software

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

Step 4: Assembling

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.

Step 5: Charging and Using

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!