What's new
Ram Heavy Duty Forum

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Keypad

My most common use case for it is when we're camping. Once we're setup at our camping spot we don't do much driving around. (it's more hiking, biking, kayaking, etc.) So we typically end up using our truck more as a storage locker than for transportation.

We often camp outside of cell coverage where unlocking with a phone isn't an option. Since we're not driving, we typically don't carry a truck key on us. And there's four of us, with only one truck key... So often the person needing in the truck isn't the same one who has the key (or knows where it is).
 
I haven't been able to find any good options. I may just have to build my own...
 
I really miss this too! Camping, beach, sports are most common use cases, but also just needing to get something out of or put something into the truck and the keys are hanging up somewhere. Taking out the phone and using the Ram app is quite slow and didn't work when I didn't have cell service (i.e. camping or underground parking garage)
 
I haven't been able to find any good options. I may just have to build my own...
I've completed my first prototype, and am able to lock/unlock my truck. This is an entirely wireless module, and requires no modifications to the truck (other than to pair a new Keyfob).
Currently the passcode to unlock is hard coded to 12345. Then to lock, the 4 & 5 buttons are held for approximately 3 seconds.
Screenshot 2024-07-03 at 4.22.21 PM.png
I mostly used parts I already had on hand. The main board is an Adafruit Feather M0 Adalogger with an ATSAMD21G18 ARM Cortex M0 processor. (Now you know where my username came from). The whole thing is currently powered by a lipo battery. The display is temporary and for debugging purposes only. And the "key" to making this work, is a Keyfob I got off eBay and then modified.

My next steps are a custom PCB and code modifications to reduce current consumption. The ultimate goal is to fit in the below 3d printed enclosure, and hopefully get more than 1 year of battery life from a CR2032 coin cell.
Screenshot 2024-07-03 at 5.12.10 PM.png
 
I've completed my first prototype, and am able to lock/unlock my truck. This is an entirely wireless module, and requires no modifications to the truck (other than to pair a new Keyfob).
Currently the passcode to unlock is hard coded to 12345. Then to lock, the 4 & 5 buttons are held for approximately 3 seconds.
View attachment 74652
I mostly used parts I already had on hand. The main board is an Adafruit Feather M0 Adalogger with an ATSAMD21G18 ARM Cortex M0 processor. (Now you know where my username came from). The whole thing is currently powered by a lipo battery. The display is temporary and for debugging purposes only. And the "key" to making this work, is a Keyfob I got off eBay and then modified.

My next steps are a custom PCB and code modifications to reduce current consumption. The ultimate goal is to fit in the below 3d printed enclosure, and hopefully get more than 1 year of battery life from a CR2032 coin cell.
View attachment 74653
Well done! Thats pretty great
 
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?

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?

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
 
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.
Screenshot 2024-07-04 at 7.25.19 AM.png

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.
 
Last edited:
Very cool. I like the powering up the fob only if the code is correct! Then there is no security concern, and the battery life is longer. You'll be able to play with the bootup delay until you get it perfect, too. The GPIO with the external pullup makes sense so the input side can be high impedence input looking for a momentary ground. You'll just sink a bunch of current through your GPIO during the pulse (of whatever width to get past the debouncing). They probably already have a resistor to avoid too much current already. I guess I'm not offering anything new here just thinking out loud while reviewing your work, which is very sound.

Have you looked at physical whitespace inside the door pillar? Also, what is your total cost so far, if one were to purchase that microcontroller (and not already have it or the LCD screen or pushbuttons)?
 
Very cool. I like the powering up the fob only if the code is correct! Then there is no security concern, and the battery life is longer. You'll be able to play with the bootup delay until you get it perfect, too. The GPIO with the external pullup makes sense so the input side can be high impedence input looking for a momentary ground. You'll just sink a bunch of current through your GPIO during the pulse (of whatever width to get past the debouncing). They probably already have a resistor to avoid too much current already. I guess I'm not offering anything new here just thinking out loud while reviewing your work, which is very sound.

Have you looked at physical whitespace inside the door pillar? Also, what is your total cost so far, if one were to purchase that microcontroller (and not already have it or the LCD screen or pushbuttons)?
I haven't looked inside the door pillar yet. At this point I'm still not sure where I would like to mount it at. But I do know I would like to avoid any modifications to the truck if possible.

So far, all I've spent on this project (other than 4-5 hours of my time) is $23.01 for the key fob. Had all the other parts on hand already, and they'll get reused again on future projects. Since this is a one off project, the cost of parts will likely be insignificant compared to my time.

Thinking through the BOM on my PCB, the only expensive part on there will be the processor. That's about $4/ea in single piece quantities. Then there are the 5 push button switches. Beyond that are some passive components, and those are quite cheap. So, the most expensive item will be the prototype PCB itself. I'll use all surface mount parts and solder everything by hand. Then the enclosure will be 3d printed. For the flexible button membrane/gasket, I'll 3d print a mold and cast it out of silicone caulk. I would anticipate a few revisions to get the enclosure right, so maybe $20 in filament and silicone.
 
Back
Top