My 8-yo daughter asked if we could put an electronic lock on her treasure box. I suggested we use her Octopus card (Hong Kong public transport smart card) to open and close the box. I had experimented a while ago with the PN532 NFC chip and Arduino, and found a way to read the Octopus card ID, which is a FeliCa type of smart card.

IMG_0641

I cut a 5mm thick plywood box on the laser cutter with a sliding cover, over a hole in the top panel. The sliding cover has a block at the end that can be held back by a servo. Below picture shows the box upside down, with the servo in closed position: the cover is locked. When the servo moves to a horizontal position, the panel can slide out to the front without obstruction.

IMG_0642

The electronics are fairly simple:

  • Arduino Nano because it is small and still has the USB connection for uploading
  • NFC module by ITEAD based on the PN532 chip
  • 2 status LEDs and a buzzer
  • 3x AA battery pack: the servo needs around 5V, it does not work with only 2 batteries
  • a switch to power on the Arduino with an LED

I soldered 2 rows of female headers on a perf board and added the buzzer and the resistors for the LEDs there also. The NFC module connects over SPI.

Then lots of kids wanted to make this box so i designed a PCB and used a different PN532 breakout board, which for some mysterious reason i couldn’t get to work with Octopus cards. So i went for the standard Mifare card and tag supplied with the breakout.

IMG_1385 - Edited

IMG_0852 - Edited

I made quite a few of these, good fun for kids.

IMG_1397 - Edited

Leave a Reply

Your email address will not be published. Required fields are marked *