I made a thing to help you make a thing out of a keypad
cliffle.com
cliffle.com
“I could manually enter 100 lines of text or…I could spend all afternoon writing Perl to clean and correct my noisy OCR data…and end up with the same 100 lines of text.
But also I’ll have built a tool! A tool nobody asked for. I really hope I can get someone else to use it so I can feel better about my lost afternoon.”
We do these things not because they are easy, but because we want to
And later we can find 100 good excuses explaining why it was worth it
At least that's me. I've built sooo much stuff just because I wanted to learn how to build it.
>> DIY embedded hardware
20 years ago an Arduino was brand new and 50 bucks.
Now any one can get a PCB made. You can do hardware like software (iterative, casual).
This is both silly and amazing!
We will be there if we can send off a design and get back a small quantity of reasonably priced fully assembled devices.
And this is not only about ability alone. Learning the skills to assemble a board is pretty realistically possible for almost anyone. It's just so annoyingly boring and tedious once the initial fascination and excitement has worn off. Contrary to when I learned it, it is already a pretty useless skill and will be comletely futile in the future.
The original posting had the word "casual" in it. When I have to worry so much about parts availability and things like this through-hole to prevent prices from exploding it's the opposite of casual.
I think the author already knows this :-)
The primary goal in this project appears to be "fun", not "provide a cheap option for reading keypads".
I mean, the author ate the pain of learning-to-Rust-on-the-STM32, uses it for no discernible gain for a project of this scope, and for good measure adds in a home-written embedded OS.
For something of this scope no multi-task-driven design is necessary, and an 8051-or-cheaper uC with an i2c peripheral and ISRs reading with a while(1) loop writing is more than sufficient.
I attempted making and selling a thing like this (integrating 2x16/2x32 character LCD and keypad) waaaay back in 2003/2004, but the number of hobbyist uC developers just didn't make it worthwhile.
Today, with the arduino already a grandaddy in relative terms, everyone and their dog is doing embedded, so might be a good time for me to relook at all-in-one i2c peripherals for hobbyists.
I can buy a 5" 800x400 TFT color touch screen with an onboard 32-bit processor that has I2C and SPI ports that can be programmed with the Arduino IDE. And for good measure, implementing an onscreen keypad is already built into the libraries available for it.
Cost is around $30 on Aliexpress. I have a couple of them and they are amazing for the price. A github project has sprung up around these devices: https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display
I encountered a similar problem, but solved it with USB keyboards / keypads instead. I managed to get a low-speed USB host working on ESP32. Now I use these instead as much better build quality is available, although they are notably more expensive.
One thing that caught me off guard was that USB keyboard scancodes were different from PS/2. Previously I had tackled the issue using PS/2 keypads and a chip with some firmware that translated the scancodes to 5V serial. This was neat, but sourcing old keyboards eventually became a pain.
When I opened a bank account, I had to choose a PIN on the keypad in the office (probably a computer numpad with the same layout as a keyboard) and the clerk warned me that the numbers are upside down compared to an actual POS machine or ATM (which are phone layout).
Some banks send you a random PIN in a sealed letter.
Other banks have you key in your choice of PIN in various manners (at a branch, online or by phone).
Some banks support changing PIN at an ATM. Others don’t.
If you don't have a Bank-ID on your phone you can hardly do anything any more.
edit * models-> modules (autoincorrect)
I do a lot of custom builds of arduino-class hardware and it gets easier and easier every year. Cheap hardware coming out of China is plenty good enough and means that I rarely need to design anything electronic. Just write code.
Getting the mechanical engineers to produce a modular shaft, motor mounts, and modular payload mounting interface will come later. (Yes I'm aware of brackets, shaft couplings, pillow-blocks)
The drawback is that at 10 years old, she knows lots of songs and artists as "number 84" or "number 328" and has no idea that their actual name is.
Or you could use shift registers which cost a few USD cents.
On a personal project a long long time ago, I recall using daisy-chained shift registers to control a stupidly high number of relays (think 100+), at an extra BOM cost of around $1.
The relay switching time was still much, much larger than the time it took to bit-bang the daisy-chained shift registers for all relays.