Secure 5-button keyfob with enclosure (was: 8-button keyfob)



  • While most of my home is made smart using ESP8266s, I plan to dive into MySensors for more energy critical stuff. The first project is a keyfob.

    Attached is a first design for a 8-button keyfob mit hardware HMAC authentication via an ATSHA204, running on a CR2032 coin cell and fitting into a commercially available keyfob enclosure (see README on github repository).
    The ATMEGA is supposed to run in power-down mode (400nA with disabled ADC, internal oszillator @ 8MHz), the powered down RFM69HCW should take 100nA in sleep mode and the ATSHA <150nA in sleep mode, so the overall standby consumption should be well below the self-discharge rate of the coin cell.
    In standby, the buttons will have interrupts attached via PCINTx_vect, so that a button press will wake the ATMEGA.

    Before I send out the PCB order, perhaps somebody is interested in having a closer look ... this is both my first MySensors project and my first low power project. Also, it is probably the most compact thing I have ever clicked together. (I am so glad about KiCAD's push and shove router ...)

    Any comments? Tips? Ideas? Errors?
    I would hate to send this to production and end up with 80 unusable PCB :) (Taking about PCBs, I will have a lot of spare ones in Germany, is anybody is interested ...)
    The major issues I could currently think of are:

    • Does MySensors implement the sleep mode of the ATSHA? Is it even possible in that package? I don't really know much about the chip (only followed the MySensors tutorial) and it would be a bugger if it sucked my battery dry ... - Answered: Yes it does.
    • Will the coin cell provide enough current for transmission? I added a 22uF tantal, should I include more?

    KiCAD project on github: https://github.com/kvoit/MySensors_SecureKeyfob/commits/master

    Schematic: 0_1492625836524_MySensors_SecureKeyfob.pdf

    0_1492686736377_Screenshot_2017-04-20_13-10-27.png
    0_1492686740917_Screenshot_2017-04-20_13-08-39.png



  • Older 8-button version, abandoned since no case exists. Never tested, but I am not aware of issures.

    Changelog:

    • v2.0: Rotated NRF module
    • v2.1 moved 2 caps out of the battery :)
    • v2.2 small trace optimization (towards back mostly vertical, front mostly horizontal), made through-holes for ICSP header larger to fit a machine header deeper into them
    • v3.0 centered the switches, new routing, ground planes in areas far away from the antenna

    Most recent version:
    Schematic: 0_1491890133730_keyfob.pdf
    0_1491942507782_keyfob.png
    KiCAD project v3.0 (it seems I cannot upload ZIP files?)
    Not sure if you can open the KiCAD project without my custom libraries.


  • Hero Member

    Downloading the .zip does not seem to work?



  • You are right, I'll giving it another try. But again, I'll change the routing quite considerably, so there is not much use for the KiCAD project yet.
    EDIT: Nope, the ZIP upload doesn't seem to work. I'll find another possibility for the finalized next version. Go for the schematic PDF for now.



    • removed uninformative post about old 8-button version -

  • Contest Winner

    @elcaron The MySensors library handles ATSHA204A sleep modes. The device is put to sleep whenever it is not required to be kept alive due to ongoing signing operations.



  • Awesome, one point off the list.



  • Hi,
    Check for inspiration and nice enclosure https://oshpark.com/shared_projects/guV5HKTW Is just missing ATSHA204A
    Regards,
    MiKa



  • @MiKa Hm, having an enclosure ready is a major benefit. Pitty it doesn't have KiCAD files available, so I would have to measure everything ...



  • Someone know that guy which one shared pcb on OSH park?
    Would be good to have a kicad project for small editing ;)



  • @MiKa I was a little skeptical at first because it seemed the enclosure wasn't that easily available for me in Germany. Now, however, I found out that it seems to be identical to the RND 455-00014 that is e.g. sold at Reichelt for less than 4€. They also have a datasheet with good documentation of the measures. I will not have the keyfob from above made but attempt a redesign over eastern for that enclosure.

    Two questions for the general public:

    • Should I switch to an RFM69? I do not have anything installed yet, so I am free. I understand that range and wall penetration are better, but I am a little worried that the antenna will not fit.
    • Any idea if the contacts for those buttons are an existing footprint in KiCAD?

  • Contest Winner

    @elcaron I definitely suggest rfm69 because it supports AES encryption in hw and is therefore better suited for security sensitive use (not that encrypting keyfob data makes much sense but anyway...). Also like you say, it has better range. Antenna can probably be coiled. Perhaps a chip antenna could work as well.
    Regarding kicad, it is always possible to make any footprint needed given proper measurements.
    We have official MySensors libraries where the footprints can be stored if created so everyone can benefit from them (perhaps they already exist). See here.



  • @Anticimex AES is a big plus. I already looked for coiled antennas on Aliexpress and as far as I can see, these will fit into the case. i will make a cutout in the PCB for that. I hope my Reichelt shipment will arrive on Saturday, so I can test it with some coiled 433MHz antennas I have lying around. Diameter is probably the same, I should even be able to clip them off to convert them.
    I know I can make footprints. But if there was a footprint for that type of contact, I would rater use that. Since I am neither a professional nor a native speaker, I don't really have an idea what to look for ...

    Pity that the OSHPark guy chose to name himself after a transistor, that doesn't really make finding him easier ...



  • I have created a 5 button version that fits into the keyfob enclosure. I put the KiCAD project and a dxf file with the PCB measures on GitHub. I'll add an image later.
    https://github.com/kvoit/MySensors_SecureKeyfob/commits/master

    Schematic attached. I would like some comments before I put this into production.0_1492625836524_MySensors_SecureKeyfob.pdf



  • Hi,
    Good job!
    Add also some RGB LED or Fast LED (WS2812B) good place will be on opposit side of the battery ;)
    MiKa



  • Yeah, I could do that. No free PWM pins, though. But one could use Software PWM on A0/A1/A7, those woud be easy to route.
    Any footprint+Aliexpress/EBay link ready for a suitable LED?



  • for example: http://www.tme.eu/sk/details/hsmf-c114/diody-led-smd-farebne/broadcom-avago/ its in 0606 package with common anode


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.