element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
element14's The Ben Heck Show
  • Challenges & Projects
  • element14 presents
  • element14's The Ben Heck Show
  • More
  • Cancel
element14's The Ben Heck Show
Forum Arduino/Teensy/Whatever Micro-controller DIY keyboard
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join element14's The Ben Heck Show to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 12 replies
  • Subscribers 33 subscribers
  • Views 1654 views
  • Users 0 members are here
  • keyboard
  • frontpage.
  • arduino
Related

Arduino/Teensy/Whatever Micro-controller DIY keyboard

fuzion_reaktor
fuzion_reaktor over 11 years ago

Hello element 14, I am seeking the advice of whomever may offer it on how to make a DIY keyboard using, preferably an arduino pro mini, some other small type of arduino, or another type of micro-controller. Why I want to make a DIY keyboard you might ask? Reasons. Anyway, I need your help as all the websites and forums I have checked are either speculative, or deal with number-pads, not entire keyboards. There are no guides, nor much else I can find, and I'm not really into creating my own firmware with my current skill level. I plan to create my own PCB (not including the micro controller) and use hobby store micro momentary switches and generic diodes for this, along with whatever else you may suggest.

Anyway, thank you whomever can help me, and have a nice day.

  • Sign in to reply
  • Cancel
  • Former Member
    Former Member over 11 years ago

    There's some info on converting the keyboards of old 8 bit machines to usb that might be relevant to your needs here. Most 8 bit machines had keyboards that were nothing more than a matrix of switches so adapting the concept to suit your needs will be fairly straightforward.

     

    More info:

    http://shiggyenterprises.wordpress.com/2012/10/21/how-to-create-your-own-keyboard-from-scratch-arduino-uno-and-power-part-1/

    Building a new and improved keyboard from scratch | ITProPortal.com

     

    If all else fails, just Google 'diy keyboard' - I built a usb ZX Spectrum keyboard myself for my RPi project, but that's all I did.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • royston02
    royston02 over 11 years ago

    A point to note- even a cheap keyboard will be way better than an actually home built one and it will cost a lot of time and money.

    But if you still want to make it, here are a few things:

    -An odinary microcontroller will not have enough of IO until it is huge. So you would consider to use a shift register which runs of I2C

    -You could use it with bluethoot.

    -You would like to use a HID(Human Interface Device) controller like Arduino micro or adafruit's Pro Trinket micrcontroller.

    Hope it helps.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ih@cam
    ih@cam over 11 years ago

    I've written up a conversion of an Acorn Electron into a USB keyboard on Instructables, here: Acorn Electron USB keyboard

     

    This uses a Freescale KL25Z dev board - see FRDM-KL25Z - FREESCALE SEMICONDUCTOR - ARM, KINETIS, KL25Z, FREEDOM DEV | Farnell UK - which is absolute overkill (48MHz Cortex-M0) for a keyboard scanner, but it has plenty of I/O and is super-cheap.

     

    You can browse the source for this here: https://mbed.org/users/IH/code/electron_kbd/ - the comment at the top of main.cpp has quite a bit of explanation as to how it works and how to customise it for other keyboard layouts.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fuzion_reaktor
    fuzion_reaktor over 11 years ago in reply to royston02

    Do you think an arduino pro mini could work? I'm not sue if it has enough pins, But I've got one lying around here. I am also considering using a dirt-cheap keyboard's own controller and a custom matrix, give or take some keys. I'm making this for a raspberry pi thing you see, and I need something small, but not as small as some micro keyboards.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago

    Using the controller from a keyboard is certainly the cheapest option, and the easiest if you don't mind wiring your own matrix. I ended up utilising the controller from a cheap USB rubber 'waterproof' keyboard in a very similar way when building my ZX Spectrum project. Though I experimented with using a microcontroller, in the end I plumped for connecting the original membrane to the pins of the controller combined with a custom keymap .

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fuzion_reaktor
    fuzion_reaktor over 11 years ago in reply to Former Member

    How did you adapt the board to your custom key map? I was thinking of doing something similar until I saw just how confusing the matrix is inside a generic keyboard. I'm not sure where or what to cut to get just the keys I want.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago

    That part was made easy for me because I was connecting an pre-existing matrix to the controller (from the Spectrum), then all I had to do was remap the keys through trial and error. Quite a few examples I have seen (Google 'diy keyboard matrix') are built using tactile keyswitches on a piece of proto-board, though my initial tests to find the best positions to solder the keyboard 'rows' to the controller were performed by simply shorting pairs of pins/pads with a piece of wire to see what keypresses were produced.

     

    48k Keyboard Matrix photo yr05_721_zps47a3c54a.gif

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fuzion_reaktor
    fuzion_reaktor over 11 years ago in reply to Former Member

    So, for the matrix you used everything was just simple rows and columns? I've looked inside a keyboard or two and the matrices seem more like a maze than a circuit.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • supper_slash
    supper_slash over 11 years ago

    How many ADC's can you have on that micro controller?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • supper_slash
    supper_slash over 11 years ago in reply to supper_slash

    Forgive me, but would this not be an option also? If there are enough ADC's that is.

    I was working on a similar project, using a 430 MCU and it worked fine.

    Please let me know if this will not work, this set up uses a few resistors, and a supply of power to

    key-log.

    This is just a quick ruff draft, just for an example, but if the MCU has 5 ADC pins, i think this may be

    a viable option Peter.

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube