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


-
Hi,
Check for inspiration and nice enclosure https://oshpark.com/shared_projects/guV5HKTW Is just missing ATSHA204A
Regards,
MiKa -
Hi,
Check for inspiration and nice enclosure https://oshpark.com/shared_projects/guV5HKTW Is just missing ATSHA204A
Regards,
MiKa -
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?
-
@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?
@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. -
@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/masterSchematic attached. I would like some comments before I put this into production.0_1492625836524_MySensors_SecureKeyfob.pdf
-
for example: http://www.tme.eu/sk/details/hsmf-c114/diody-led-smd-farebne/broadcom-avago/ its in 0606 package with common anode
-
If anybody cares, I have improved a few things - rgb led (choose the standard 505 that is used on RGB strips), impedance to antenna, button footprints ... It is all pushed to Github. There is also a branch with gerbers for a panelized version with v-cuts.
I will order it tomorrow evening. (Hint: I'll sit on 60 PCBs for this, soon. Location Germany.) -
If anybody cares, I have improved a few things - rgb led (choose the standard 505 that is used on RGB strips), impedance to antenna, button footprints ... It is all pushed to Github. There is also a branch with gerbers for a panelized version with v-cuts.
I will order it tomorrow evening. (Hint: I'll sit on 60 PCBs for this, soon. Location Germany.) -
@elcaron cool. Do you have atsha204a footprint on them?
Edit: of course you do. Sorry for asking such a stupid question :)@Anticimex Yes, that was the whole point. Someone else already posted a link to a PCB for the same keyfob enclosure without an ATSHA. The ATSHA is next to pin6 of the RFM69.
The other PCB also doesn't have dedicated space for an antenny, so I suspect they just somehow shove a wire in there. My design has a cutout for a spring antenna (already tested that it fits into the enclosure), with a defiined 50Ohm impedance trace leading to it. -
@MiKa Thanks, lets hope so. Did one of you have a close look for issues, at least on the schematic? It's actually my first (MySensors/Ultra low power/THAT small) project.
Anyway, Seeed just dropped the price for 10 10x10cm^2 PCBs to 5$ plus shipping, so there is not much to loose except for 3 weeks waiting. I'll report any success or failure. Until then, the design is to be considered untested.I'm a little afraid of the TQFP package :) Hope I can handle it with my rework station, don't have a toaster oven ...