Well done! So you just need to short the fob's lock or unlock pushbuttons once the valid code is entered? Is that using some spare gpios and relays?
The main component on the keyfob is a NXP PCF7953. This is what's responsible for completing the pairing process, storing the necessary information, and generating the one time use code needed to successfully send a message to the truck. Unfortunately, there is almost no information freely available on this part. Being it's security related, it looks like it's only available under NDA. I'm sure I could get that through my work, but that's more effort than I want to put in at this point.
Looking at the keyfob, one side of each button is connected to ground, while the other goes directly to a pin on the PCF7953. The PCF7953 appears to have a pull-up to 3 volts on these pins. When the button is pressed this line gets pulled to ground and a button press is detected. What I did was connect this pin directly to a GPIO on the ATSAMD21. The majority of the time this GPIO is configured as an input. When I want to send a lock/unlock command, the PCF7953 is powered on, and an after a brief delay this GPIO gets reconfigured as an output and driven low. This is detected as a button press and the PCF7953 sends the appropriate message.
I looked up your Microchip device. Looks like an entire devkit, are you thinking of actually designing and fabbing a PCB with just the bare minimum components and some kind of housing for it and the fob? When you say single cr2032 do you mean the one already in the fob?
Yes, the plan is to design a new PCB with the minimum components to support the processor. This is needed both for physical size and power consumption reasons. This PCB will be designed to fit into a custom 3d printed enclosure and will also be responsible for the proper placement and mechanical support of the buttons. (What's left of the keyfob will stay on it's existing PCB)
For reasons I'll get into below, I've actually removed the portion of the Keyfob PCB that holds the CR2032 and only power up what's left of the Keyfob PCB after the correct code has been entered. But yes, my hope is to power the whole thing off the CR2032 the fob came with.
Very cool, you are much more ambitious than I ever was! Fun project
One wild curiosity I have is if you figure out a way to embed this (including the fob) in the door, do you think it would detect as "inside" the vehicle or "outside"? If inside, you could technically start your truck maybe, or a thief could
I had considered this some. Initially, I was planning on going with a completely different technique just for this very reason. This system wouldn't be very useful if it was still detectable as a keyfob and anybody could walk up, unlock, and start the vehicle. This is where the modifications to the keyfob PCB come into play, and only powering up the keyfob PCB after the correct code has been entered. The remainder of the time the keyfob is actively powered down.
I also want to do some testing with all (or portions) of the 125kHz antenna removed. From what I gather from the FCC documents and how these systems typically work, the key press functionality of the fob likely doesn't use this. However, I wanted to gain some confidence in the rest of my setup working first, and not change too many variables at one time.