Puck.js - using a RFID sensor?

Posted on
  • I want to connect an external RFID sensor to the Puck.js? Has anyone done that before? Should I use a serial connection or what would be the best/ easiest way to do it? Does anyone know some sensor devices that I could use for that purpose?

    I have to say that I haven't got any experience with connecting external devices? Is there a good instruction anywhere? As far as I see it serial connections do use two pins (TX and RX) for data transmission as well as one GND pin and one for power (which should not be more than 3,3V - so that the puck.js can power the sensor).

    One more question concerning the power consumption: is it possible to power the puck.js with an external battery (one that lasts longer and is easier to replace/reload)? What sort of batteries could I use and how would I connect them to the puck.js?

    What I finally want to do is: using the external RFID sensor to sense the RFID data and then transmit it via the blutooth (puck.js) to an app running on a connected mobile phone, which is then sending it to a webserver. If you have any helpful thoughts on that setup, I would be appriciate if you would let me know too.

  • Hi! There are two types of RFID sensor that have some example code to make them work with Espruino right now:

    http://www.espruino.com/MFRC522
    http://www.espruino.com/PN532

    They only read the card's unique ID, but if needed let me know and I could extend them to read full RFID data.

    One is SPI, and one is I2C (requiring less wires) - and on Puck.js any peripheral can be on any pin, so you literally just have to wire it up to any free IO pins and you're sorted.

    For power - yes, you can power Puck.js from its 3V pin. You just need a voltage between around 2V and 3.6v. Sadly that's not quite high enough to allow you to run it from a LiPo battery (but then the RFID sensor wouldn't have liked that anyway), so you'll probably want to use some kind of 3.3v voltage regulator/power supply - they're easy enough to get hold of but ask if you need some advice there.

    In fact, realistically while the voltage to an RFID reader is correct, I think you'll struggle getting enough power out of the CR2032 battery in the puck to power the reader, so you'll probably want an external power supply anyway.

    For the Phone->webserver thing, the simplest method would be to do something using Web Bluetooth: https://www.espruino.com/Puck.js+Web+Blu­etooth

    However as another simple, no-setup multiplatform option you could actually make Puck.js act like a Keyboard (https://www.espruino.com/Puck.js+Keyboar­d) and 'type' the data it received.

  • He could use LiFePO4 batteries.. they have a nominal voltage of 3.2/3.3 volts.. they are pretty much perfect for 3.3v projects. Here is a video about it https://www.youtube.com/watch?v=DicVZfW5­YL0

    .

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Puck.js - using a RFID sensor?

Posted by Avatar for user82902 @user82902

Actions