RFID Desk Lamp

November 8, 2018

Supersede your old desk lamp with a new one controlled by an RFID tag or card and personalize it with an RGB color pattern to turn it off.

Keywords
Brands
Hardware
  • Arduino Nano R3[1]
  • MFRC522 RFID Reader[1]
  • RFID Key Tag[1]
  • 2-Way Relay[1]
  • Rotary Potentiometer[3]
  • RGB Common Anode[1]
  • 5mm Green Led[1]
  • Resistor 220 ohm[4]
  • Male/Male Jumper Wires[1]
  • Male Female Jumper Wires[1]
  • Mini Breadboard[3]
  • 9V Battery[1]
  • 9V Battery Clip[1]
  • Soldering Iron[1]
  • Hot Glue Gun[1]
Software

Description

I have had an old and, not surprisingly, a dilapidated desk lamp for a long time and I thought it would be more effective and useful by getting upgraded with an MFRC522 RFID reader. But I, also, wanted to personalize it by using a specialized color pattern to turn the lamp off, hence the use of potentiometers and RGB led.

project_image_1
project_image_2

How to use an MFRC522 RFID Reader

First of all, download MFRC522 library from this link.

1 ) Solder male headers to MFRC522 RFID reader with a soldering iron carefully.

project_image_3
project_image_4

2 ) If you do not save or register an UID to EEPROM, use the function - registerCardUID() - below by uncommenting it from setup().

project_image_5

3 ) After saving get the UID from EEPROM by using this function.

project_image_6

4 ) And the final step, just compare the saved UID and the UID read by MFRC522 to turn the lamp and control led on.

project_image_7

Connections

Components connections are well-explained at the source code down below, make sure defining RST and SS pins properly.

Connect all components to Arduino Nano.

project_image_8
project_image_9
project_image_10
project_image_11
project_image_12

Rearrange your lamp parts to make components fit in it perfectly.

project_image_13
project_image_14

And then, sturdier all components via a hot glue gun.

project_image_15
project_image_16

Features

ON :

When MFRC522 RFID reader reads the same UID saved by EEPROM accurately.

- Turn control led and the lamp turn on.

OFF :

When all potentiometer values are turned into zero.

Red Potentiometer Value = 0;
Green Potentiometer Value = 0;
Blue Potentiometer Value = 0;

- Turn control led, RGB led and the lamp off.

project_image_17
project_image_18

Videos


Project GitHub Repository

The project's GitHub repository provides:

  • Code files

Schematics

project_image_19

Code

Select File

  • RFID Desk Lamp.ino

Custom assets

See on other platforms