Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. Secure 5-button keyfob with enclosure (was: 8-button keyfob)

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

Scheduled Pinned Locked Moved My Project
72 Posts 5 Posters 16.9k Views 7 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • MiKaM Offline
    MiKaM Offline
    MiKa
    wrote on last edited by
    #32

    Hi,
    till now just tested from supply of USBasp programmer -3.3V, today I hope, I will have a time to play little bit with it :)
    I already order couple of RFM95 for testing LoRa I hope RFM95 have the same footprint like RFM69HCW ;)
    As a option for v1.1 is good to have some LDO in SOT23-5 package (SPX3819M5-L-3-3) with possibility to bypass - than You can use CR2032 and LIR2032 as well :thumbsup:
    Next idea for v1.1 is to have RX,TX,DTR,GND and VCC pins somewhere on the edge of pcb for debugging and uploading sketch via bootloader and serial port
    MiKa

    E 1 Reply Last reply
    0
    • MiKaM MiKa

      Hi,
      till now just tested from supply of USBasp programmer -3.3V, today I hope, I will have a time to play little bit with it :)
      I already order couple of RFM95 for testing LoRa I hope RFM95 have the same footprint like RFM69HCW ;)
      As a option for v1.1 is good to have some LDO in SOT23-5 package (SPX3819M5-L-3-3) with possibility to bypass - than You can use CR2032 and LIR2032 as well :thumbsup:
      Next idea for v1.1 is to have RX,TX,DTR,GND and VCC pins somewhere on the edge of pcb for debugging and uploading sketch via bootloader and serial port
      MiKa

      E Offline
      E Offline
      elcaron
      wrote on last edited by elcaron
      #33

      @MiKa The SPX3819M5-L-3-3 has massive (well, comparably) quiescent current. Ten times the HT7333. That alone will suck a LIR2032 empty in about a month. I think I can fit the SOT-89 of the HT7333 package next to the LED. Alternatively, one could conider boosting with a MCP16252.

      Serial flashing capabilities requires one more capacitor and resistor ... And the routing is also already pretty difficult. What is the avantage? As far as I can see, it is just another flashing device ...
      I do intend, though, to add 2 pins rx/tx to the icsp header. How did you do that one, by the way? Does your version already have the bigger holes? In the most recent version, it is intended to take a machined female header. with that, it fits into the enclosure. I am still thinking about changing it over to SMD pads, which I would interface with pogo pins.

      1 Reply Last reply
      0
      • MiKaM Offline
        MiKaM Offline
        MiKa
        wrote on last edited by
        #34

        Ok, I go to order HT7333 :) and RX and TX smd pad will be good to have it anyhow ;)

        1 Reply Last reply
        0
        • MiKaM Offline
          MiKaM Offline
          MiKa
          wrote on last edited by
          #35

          V 1.1 of pcb should have really bigger side pads for battery holder, I already destroyed one pcb pads when I put in coin battery, probably reason is overheating this small pads during soldering the battery holder :angry:

          E 1 Reply Last reply
          0
          • E Offline
            E Offline
            elcaron
            wrote on last edited by
            #36

            Thanks, I'll change that.

            BTW, I found another reason against adding a serial programming interface: To safe power, brownout detection should be disabled. If the battery runs low, erratic behavior may occur, which includes jumping to arbitrary addresses in flash. If a bootloader is still there, there is code to write to the flash, which might damage the programming. On the other hand, I highly doubt that a failing mcu will manage to go through the full process of sending an authenticated button pres, especially since high current RF tasks are involved.
            So it is probably generally advisable to not have the Arduino bootloader on there.

            1 Reply Last reply
            0
            • MiKaM MiKa

              V 1.1 of pcb should have really bigger side pads for battery holder, I already destroyed one pcb pads when I put in coin battery, probably reason is overheating this small pads during soldering the battery holder :angry:

              E Offline
              E Offline
              elcaron
              wrote on last edited by elcaron
              #37

              @MiKa I have made a big new push to the repository. Here are the changes from the commit:

              • Doubled size of battery pads.
              • Added HT7333 to allow for LIR2032 lithium coin cell (Bridge pads for CR2032).
              • Changed A7 to A2 to make LED work.
              • Added SMD contacts for TX and GND for debug output (interface with pogo pins).
                (Getting TX out was hard enough, RX just wasn't worth it, I thing we really do not need to send anything to a keyfob :))

              I would have liked to put a step-up converter on there, but I have not found a possibility for one that does not need an inductor that is too bit to fit on there.

              AnticimexA 1 Reply Last reply
              0
              • E elcaron

                @MiKa I have made a big new push to the repository. Here are the changes from the commit:

                • Doubled size of battery pads.
                • Added HT7333 to allow for LIR2032 lithium coin cell (Bridge pads for CR2032).
                • Changed A7 to A2 to make LED work.
                • Added SMD contacts for TX and GND for debug output (interface with pogo pins).
                  (Getting TX out was hard enough, RX just wasn't worth it, I thing we really do not need to send anything to a keyfob :))

                I would have liked to put a step-up converter on there, but I have not found a possibility for one that does not need an inductor that is too bit to fit on there.

                AnticimexA Offline
                AnticimexA Offline
                Anticimex
                Contest Winner
                wrote on last edited by
                #38

                @elcaron you will need at least TX from your board in order to personalize the atsha204a. Lest you personalize it before you solder it on the board. The personalizer can operate without TX.

                Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                E 1 Reply Last reply
                0
                • AnticimexA Anticimex

                  @elcaron you will need at least TX from your board in order to personalize the atsha204a. Lest you personalize it before you solder it on the board. The personalizer can operate without TX.

                  E Offline
                  E Offline
                  elcaron
                  wrote on last edited by
                  #39

                  @Anticimex Why? I thought there is SKIP_UART_CONFIRMATION. I have to set USER_KEY, but isn't that generated once for the whole network? I figure it doesn't have to be the keyfob node that does that ...

                  AnticimexA 1 Reply Last reply
                  0
                  • E elcaron

                    @Anticimex Why? I thought there is SKIP_UART_CONFIRMATION. I have to set USER_KEY, but isn't that generated once for the whole network? I figure it doesn't have to be the keyfob node that does that ...

                    AnticimexA Offline
                    AnticimexA Offline
                    Anticimex
                    Contest Winner
                    wrote on last edited by
                    #40

                    @elcaron yes, but how would you obtain the atsha204a serial if you want to be able to whitelist your keyfob?

                    Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                    E 1 Reply Last reply
                    0
                    • MiKaM Offline
                      MiKaM Offline
                      MiKa
                      wrote on last edited by
                      #41

                      Wow, good progress! :)
                      Finnaly I start up sketch, but with USBasp is not possible to upload firmware to atmega when the radio is connected :angry: I put temporary radio via pin socket and I need to remove radio during programming :open_mouth: , maybe RFM69HCW need to have connected RESET pin or some pull-up is missing.
                      From sleep mode Im able to wake up node just via SW5 wchich is conneted to pin D3 (INT1), Its possible to wake up from some sleep mode also via another pins (except D2 which is INT0)?

                      E 2 Replies Last reply
                      0
                      • AnticimexA Anticimex

                        @elcaron yes, but how would you obtain the atsha204a serial if you want to be able to whitelist your keyfob?

                        E Offline
                        E Offline
                        elcaron
                        wrote on last edited by
                        #42

                        @Anticimex Ok, I see ...
                        Well, good that we have TX now :) If my current version works, I'll personalize the ATSHA outside of the board. It's really easy to solder with a hot air gun.

                        AnticimexA 1 Reply Last reply
                        0
                        • E elcaron

                          @Anticimex Ok, I see ...
                          Well, good that we have TX now :) If my current version works, I'll personalize the ATSHA outside of the board. It's really easy to solder with a hot air gun.

                          AnticimexA Offline
                          AnticimexA Offline
                          Anticimex
                          Contest Winner
                          wrote on last edited by
                          #43

                          @elcaron sure, that works. Just remember to take a note of the serial. Or use the TX pad you just made and run the personalizer again :)

                          Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                          E 1 Reply Last reply
                          0
                          • MiKaM MiKa

                            Wow, good progress! :)
                            Finnaly I start up sketch, but with USBasp is not possible to upload firmware to atmega when the radio is connected :angry: I put temporary radio via pin socket and I need to remove radio during programming :open_mouth: , maybe RFM69HCW need to have connected RESET pin or some pull-up is missing.
                            From sleep mode Im able to wake up node just via SW5 wchich is conneted to pin D3 (INT1), Its possible to wake up from some sleep mode also via another pins (except D2 which is INT0)?

                            E Offline
                            E Offline
                            elcaron
                            wrote on last edited by
                            #44

                            @MiKa What? Unsoldering the radio is terrible ... I really don't see a reason for that, it should be SPI and the radio should do nothing ... maybe we need to pull CS low to make sure the radio is not selected? Someone here should know that ...
                            Regarding wake up: Yes, THAT I know about :) All the button pins are on PCINT1_vect: https://playground.arduino.cc/Main/PinChangeInterrupt
                            Consider setting a mask to limit it to the 5 button pins.

                            1 Reply Last reply
                            0
                            • AnticimexA Anticimex

                              @elcaron sure, that works. Just remember to take a note of the serial. Or use the TX pad you just made and run the personalizer again :)

                              E Offline
                              E Offline
                              elcaron
                              wrote on last edited by
                              #45

                              @Anticimex If the personalizer can read it indefinitely, can't I just send it out over the radio?

                              AnticimexA 1 Reply Last reply
                              0
                              • E elcaron

                                @Anticimex If the personalizer can read it indefinitely, can't I just send it out over the radio?

                                AnticimexA Offline
                                AnticimexA Offline
                                Anticimex
                                Contest Winner
                                wrote on last edited by
                                #46

                                @elcaron no. Never. Then it can be sniffed. And made pointless.

                                Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                                E 1 Reply Last reply
                                0
                                • MiKaM MiKa

                                  Wow, good progress! :)
                                  Finnaly I start up sketch, but with USBasp is not possible to upload firmware to atmega when the radio is connected :angry: I put temporary radio via pin socket and I need to remove radio during programming :open_mouth: , maybe RFM69HCW need to have connected RESET pin or some pull-up is missing.
                                  From sleep mode Im able to wake up node just via SW5 wchich is conneted to pin D3 (INT1), Its possible to wake up from some sleep mode also via another pins (except D2 which is INT0)?

                                  E Offline
                                  E Offline
                                  elcaron
                                  wrote on last edited by
                                  #47

                                  @MiKa BTW, thanksfor testing. I have very little time right now, so I am glad I don't have to do the tests AND update the PCB. I still haven't finished my adapter from my 10 pin usbAVR to the 6 pin ISCP header ...

                                  1 Reply Last reply
                                  0
                                  • AnticimexA Anticimex

                                    @elcaron no. Never. Then it can be sniffed. And made pointless.

                                    E Offline
                                    E Offline
                                    elcaron
                                    wrote on last edited by elcaron
                                    #48

                                    @Anticimex

                                    1. How can it be sniffed if the transmission is AES encrypted by the RFM69?
                                    2. How is it pointless if it could be read by a bad guy from a lost keyfob? I thought it was the point of the ATSHA that it can be safely lost.

                                    I thought security was given because a badguy cannot change the ATSHA id and also cannot extract the PSK. SO the id doesn't seem private.

                                    AnticimexA 1 Reply Last reply
                                    0
                                    • MiKaM Offline
                                      MiKaM Offline
                                      MiKa
                                      wrote on last edited by
                                      #49

                                      @elcaron No problem, I playing with it when I have time :) I will play now with interrupt changing :)
                                      btw. LIR was an good idea, I have for test now CR2023 which have cca 2,75V and working distance from the gateway is really low. :)

                                      E 1 Reply Last reply
                                      0
                                      • MiKaM MiKa

                                        @elcaron No problem, I playing with it when I have time :) I will play now with interrupt changing :)
                                        btw. LIR was an good idea, I have for test now CR2023 which have cca 2,75V and working distance from the gateway is really low. :)

                                        E Offline
                                        E Offline
                                        elcaron
                                        wrote on last edited by elcaron
                                        #50

                                        @MiKa The LIR2032 have much smaller capacity, tough. The 4uA quiescent current of the HT7333 alone will suck them dry in about a year. Probably even destroy them, due the lack of undervoltage protection :(
                                        The solution is far from optimal.
                                        What tantalum cap capacity did you use? How low is the range?

                                        MiKaM 1 Reply Last reply
                                        0
                                        • E elcaron

                                          @MiKa The LIR2032 have much smaller capacity, tough. The 4uA quiescent current of the HT7333 alone will suck them dry in about a year. Probably even destroy them, due the lack of undervoltage protection :(
                                          The solution is far from optimal.
                                          What tantalum cap capacity did you use? How low is the range?

                                          MiKaM Offline
                                          MiKaM Offline
                                          MiKa
                                          wrote on last edited by
                                          #51

                                          @elcaron I using 10u/10V, I didnt measure distance exactly,but is "visible" difference when is node powered from USBasp(3.3V) or from 2.7 V :)

                                          E 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          19

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular