Close

Prototype and Firmware Complete

A project log for "Chad" - The NFC Voting System

Using NFC NTAG203 tags as voting tokens

mike-szczysMike Szczys 01/03/2014 at 23:330 Comments

I'm happy to report that I have finished the hardware prototype and have the first full version of the firmware done.

That turns out to be a lot of wires. From left to right is the PN532 NFC reader, Arduino, and breadboard. On the breadboard form bottom to top is the 20x4 character LCD (not the pretty pink trimpot), rotary encoder, piezo buzzer, and three LEDs.

The firmware is close to done. I need to do some more output for the utility functions (scanning tags before the voting begins, etc.). But for now it recognizes tags from a header file of pre-approved UIDs. It will let you vote just one, notating the activity in the EEPROM so that you can't vote twice. "Chad" will also reject a tag that is not in the header file, and a tag that is not an NTAG203 format.

This is the first in-depth project I've done with Arduino (I'm more of a bare-metal guy). I must say, they are useful. Having the no-nonsense terminal interface is really nice. I did find the EEPROM libraries to be a joke. They only have functions to read and write bytes. That's probably to get around the need to cast pointer types, but I just ended up using hte AVR-GCC library and got what I needed (reading and writing uint16_t for the ballout counts).

I probably wouldn't have included sound if I had been programming bare-metal. The Tone library is super simple. But then again, I'm sure there are C piezo libraries out there I've just never looked for one.

Discussions