Which controller to use?

tommakrin

13 Nov 2014, 11:49

Hello everybody,

I decided to build my first keyboard from scratch and now I have to decide what kind of controller should I use. The most obvious choice is Teensy 2.0++ however, I like the 3.1 ver which has the ARM M-4 MCU on it. I have a couple of questions:

I want to have a full-sized keyboard, with backlight, a volume knob, 4-5 extra keys for sleep, shutdown, etc, and a display to show information (volume level, backlight color, etc). Also I would like to feature a USB hub with two USB ports. Will the Teensy 2.0++ do well with all this stuff? If no, the 3.1 will be better (less I/O, but superior MCU and more sophisticated firmware)? I don't mind experimenting with writing a new firmware / customising an existing one.

And the last question: do you think my project is feasible? I have seen these features in other people's custom keyboards, but never all of them bundled together. I don't want to end up with something that is a "lite version" of what I initially designed.

User avatar
matt3o
-[°_°]-

13 Nov 2014, 12:54

User mtl here on DT did something very similar last year and used a teensy++

Image

I believe your best bet is to use a teensy++

tommakrin

14 Nov 2014, 01:25

Thank you very much for your reply. I thought too that this would be the safest choice. But actually I'm pretty stubborn :lol: and I'd like to ask again if there is a good reason for NOT using the Teensy 3.1 or any other 32-bit ARM MCU? I've searched a lot and although I couldn't find a DIY project with one of these, I found out that many manufacturers use it for their keyboards. I guess the lack of reliable firmware is one reason?

User avatar
Muirium
µ

14 Nov 2014, 01:36

We're also lazy. So much easier to go with a precompiled firmware (like Soarer's Controller, which is what I use) or to edit Hasu's source with our own minimal customisations then build for Teensy 2 series. ARM is definitely more powerful, but as we're not exactly taxing anyway, we haven't a specific reason to make the effort to use something new!

Nothing against the Teensy 3.1, it looks a promising chip. But the one I bought alongside a bunch of Teensy 2s sits unused, while I can never have enough of those simpler guys. Your project, though, could well make the best use of it. A screen is definitely beyond the trivial stuff I've done. (I'd just drop in a commercial USB hub though, stripped down and mounted inside your case.)

Aren't the Teensy 3.1's extra pins hard to reach compared to a Teensy++? For simple builds like ours, through hole has its advantages. I haven't a clue how to reach the underside pads on the 3.1

User avatar
matt3o
-[°_°]-

14 Nov 2014, 08:30

nothing stops you from using the teensy 3.1, anything that works on the teensy 2 can be quite easily ported to the teensy 3 actually. I haven't counted them but I believe the teensy2++ has still more outputs so you might need it anyway.

from a keyboard maker standpoint there's very little use of the ARM processor. unless you need the added speed or the lower power consumption, you can probably stick with atmega.

User avatar
vvp

14 Nov 2014, 13:02

There is very little 32 bit arithmetic to do in a keyboard firmware. It is only scanning a keyboard matrix, remapping, and replaying macros. So ARM will not help you much from the performance point of view. And you do not need that much performance anyway. The limiting factors will be the size of FLASH/RAM/EEPROM and maybe the available libraries and their licenses. Whether it is 8 or 32 bit is almost irrelevant. I think the keyboard manufacturers just select the chip they can get the best deal for. Sometimes it may be ARM, sometimes something more simple.

tommakrin

14 Nov 2014, 14:05

Thank you again guys, you're amazing. I'll give it a shot with the Teensy2.0++ and possibly an extra controller if needed to drive fancy stuff like display. I'll keep you informed about the progress, as I'm waiting for the parts to arrive and I'm preparing for a small-scale initial phase (just a few keys, the display and maybe the volume knob).

Post Reply

Return to “Workshop”