Saturday, January 19, 2019

A Quick Look at RFID

Back in 2002, I was working a short contract in Seattle, just as the company was notified by Walmart that they must implement RFID on ALL of their products or no longer be eligible to sell through them. I dreamed of starting a consulting company specializing in implementing RFID, but then I realized I'd rather be retired and sailing in warm waters.

Just for kicks I ordered this RFID kit to evaluate, "MFRC-522 RC522 RFID RF IC Card Sensor Module". I would post a link, but I bought it in Chinese via Google Translate. It was only $2.63 so I couldn't pass it up.

I tested it on a Wemos D1 Mini, ESP8266, my current CPU of choice. The Arduino IDE has a library for the  MFRC-522 from  https://github.com/miguelbalboa/rfid. It includes several examples. It is 3.3v and has a SPI interface plus a RST signal.

I tried several of the examples and the reader actually works! The blue tag needed to be less than 1cm to read, but the white card worked out to about 2.5cm.

Writing also worked. Both types of tags are identified as 1kilobhyte. I only wrote my name so I didn't test the limits.



MFRC-522 RC522 RFID Card Sensor Module

Tuesday, January 1, 2019

More Battery Monitor

It was still too hard to tell whether the new batteries were coming up to full charge, so while I waited, I added to the monitor. I already have a current shunt for the old "Heart/Cruising Designs" monitor and now the Xantrex LinkLite, so all I had to do was hook the ADS1115 differential input channels to it.

I added the current monitor with amp hour calculation and a status web page to the Batt_volt_mon. I re-factored the code using the tab capability of the Arduino IDE rev 1.8.8.

I also copied from a friend the idea to make each tab's code optionally included at compile time with #ifdef's. This makes it easier to debug.


  #define DO_ADS
  #ifdef DO_ADS
     #include "ads.h"
  #endif //DO_ADS
     ...
  #ifdef DO_ADS
     setup_ads();
  #endif // DO_ADS
     ...
  #ifdef DO_ADS
     if ( (last_ads + ads_time) < millis() ){
       last_ads = millis();
       loop_ads();
     }
  #endif //DO_ADS
     ...

 
And I uploaded the new code to my github.

Top of the board with the modules out to see the wires
The bottom of the board

And then I documented the connections in Fritzing.
The Fritzing layout