Early in my college years I came across this very useful and web based animated circuit simulator, falstad.com/circuit. Since I'm a hands on and visual learner, this tool really helped me grasp the behavior of electronic and logic circuits.
While I was working on the firmware for our concept prototype keyboard, I thought it would be fun to create an animation of how keyboard matrix scanning works.
Click on the image or here to visit falstad.com/circuit and try it out for yourself.
As you can see the micro-controller drives the rows low one at a time and reads the columns as inputs. If both the row and the column are low, then a key-press is detected.
This allows us to read key presses without needing a single input for every single key! In this example we are able to detect key presses for 15 keys with only 8 GPIO pins. Almost all keyboards or TV remote controls follow the same principle.
You can also check out our Arduino code for the keyboard test-kit at the Github project.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Nice work!
Are you sure? yes | no