Author Topic: Comparison of microcontrollers  (Read 5533 times)

0 Members and 1 Guest are viewing this topic.

Offline epicepee

  • Thread Starter
  • Posts: 35
Comparison of microcontrollers
« on: Mon, 06 October 2014, 22:27:18 »
It seems like most people around here use the Teensy 2.0 to run their keyboards.  It's got 25 pins, which would be enough for basically any keyboard, and it's nice and small.  The only issue is that it's a little pricier than I'd like at $16 a pop.  (Yes, I'm a cheap-ass.)

The main alternative I refer to is the "Arduino Pro Micro" clones on eBay.  Half the cost of a Teensy will get you the same processor, nearly the same dimensions, but only 16 pins -- not really enough to run a decently-sized keyboard. 

Then there are some other interesting bits of hardware out there.  $20 will get you a Teensy 3.1, with 34 pins and a 32-bit processor clocked at 72mhz.  In other words, enough pins for an F-122 without breaking a sweat, and enough processing power to run a 3D printer. 

Last but far from least, there's the Arduino Due.  $22 buys you enough pins and power to run, by my estimation, three decent-sized keyboards.  A larger package, yes, but still quite promising.

Unfortunately, the latter two both use processors which wouldn't be usable with current firmwares that I've heard of without a major rewrite.  Are there any usable firmwares for 32-bit MCUs out there?  Are there any options I'm missing?

Offline MrJohnK

  • Posts: 15
Re: Comparison of microcontrollers
« Reply #1 on: Mon, 06 October 2014, 22:35:03 »
No reason you couldn't use a clone with the same ATMEGA32U4 chipset that the Teensy 2.0 has.  I've made a few boards of my own with that chip and flashed code I compiled with Teensyduino and AVR directly to it.  All you are really getting with the Teensy is the halfkay proprietary bootloader.  Without that, you have to use some sort of AVR programmer like AVRISP MKII or even another Arduino running as a programmer to upload the code over the ICSP interface.  I guess the key is, without the bootloader, getting the code onto the chip may cost you more to buy a programmer that can do that job for you.  Past that, nothing special about the board.  The schematic is public so anyone can copy it, but the halfkay bootloader is not public and only comes on new Teensy boards, enabling it to work with the Arduino IDE.

-John

Offline JPG

  • Posts: 1124
  • Location: Canada (Beloeil, near Montreal)
  • Model F is my new passion!
Re: Comparison of microcontrollers
« Reply #2 on: Mon, 06 October 2014, 22:38:48 »
Want do you need to controller for? I you want to replace the controller on a cherry keyboard or hand-wire some creation of yours, then yea a teensy is probably a good option since you will need the pins for this type of operation (you need to plug the columns and rows on the controller).


BUT, you mentionned the F122. For a F122, you don't necessarily want to replace the controller. Most people will simply make a converter with Soarer code. This only requires 4 pin, so the number of pins is not an issue with the pro micro. That's what I use on all my model F's and it works great.


For the model F, there's now the option to get a brand new controller. But it's a dedicated new controller that has stuff for capacitance and all. I don't know much of the technical part, but I know enough to tell you that no Teensy/promicro/whatever you considered will do this.


So, if you want to hand-wire a cherry keyboard, then you can use a teensy. If you want to make a converter, you can use either a teensy or a pro micro. If you want to do something totally different, well it will depend on what you want to do.
IBM F122, IBM XT F X2, IBM AT F (all Soarer converted), Filco Camo TKL Browns

Offline epicepee

  • Thread Starter
  • Posts: 35
Re: Comparison of microcontrollers
« Reply #3 on: Mon, 06 October 2014, 22:51:09 »
To clarify:  I'll probably go with a Teensy because other people use them.  This is all theoretical.

MrJohnK:  The clones seem to have fewer pins broken out.  Could this be fixed via judicious application of solder?

JPG:  I don't plan to build or buy an F-122, that was just an illustration of how many pins the 3.1 has.  Similarly, I don't plan to run three keyboards off the same Arduino!

Offline MrJohnK

  • Posts: 15
Re: Comparison of microcontrollers
« Reply #4 on: Mon, 06 October 2014, 22:58:37 »
Certainly, if there are not pins broken out on the board, it will be quite difficult to get access to them.  Soldering directly onto the MCU is not recommended as the legs are tiny.  I saw some boards on Ebay for less than $10 that look like they have lots of legs broken out.  They may not have all the legs in the same order, so a little investigation of what pins go to what holes.  The official Arduino board that uses this MCU is called the "Leonardo", so that can be used as a search term too.  I've seen lots of Leonardo clones out there.

-John

Offline epicepee

  • Thread Starter
  • Posts: 35
Re: Comparison of microcontrollers
« Reply #5 on: Mon, 06 October 2014, 23:09:34 »
Yes, the Leonardo has 20 pins, which would be enough for some keyboards.  It's larger than the Pro Micro, though.

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Comparison of microcontrollers
« Reply #6 on: Tue, 07 October 2014, 12:19:08 »
Then there are some other interesting bits of hardware out there.  $20 will get you a Teensy 3.1, with 34 pins and a 32-bit processor clocked at 72mhz.  In other words, enough pins for an F-122 without breaking a sweat, and enough processing power to run a 3D printer. 

Last but far from least, there's the Arduino Due.  $22 buys you enough pins and power to run, by my estimation, three decent-sized keyboards.  A larger package, yes, but still quite promising.

Unfortunately, the latter two both use processors which wouldn't be usable with current firmwares that I've heard of without a major rewrite.  Are there any usable firmwares for 32-bit MCUs out there?  Are there any options I'm missing?

There are some people working on new (and awesome) keyboard firmware that will support ARM on teensy 3.0 / 3.1 and MCHCK. MCHCK is (in theory) very cheap.

Offline epicepee

  • Thread Starter
  • Posts: 35
Re: Comparison of microcontrollers
« Reply #7 on: Tue, 07 October 2014, 14:16:51 »
A MC HCK keyboard controller would be amazing.  Could you point me to one of these in-development firmwares?

Offline twiddle

  • Posts: 165
    • Portfolio
Re: Comparison of microcontrollers
« Reply #8 on: Tue, 07 October 2014, 15:11:30 »
If size isn't an issue, or for prototyping with an ARM-based firmware, you also have the FRDM boards from Freescale (they make the Kinetis chip used in MCHCK and Teensy 3.1).
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=FRDM-K20D50M
Programmable via drag-n-drop on a dedicated USB port, about 30 i/o pins.
$13AUD, probably cheaper States-side.
No fully-featured keyboard firmware at present, but there are basic tutorials and information available that can be adapted pretty easily. I'm pretty close to having a functional first implementation that works for my switch tester/numberpad here:

 The development environment requires more effort than, say Arduino, but still provides a reasonable level of hardware abstraction. What's nice is that theoretically at least it allows you to port code between processors fairly easily (essentially just adapting pin names, clock frequencies) so that firmware for this could work on a MCHCK, or on a custom board using a different Kinetis chip (my eventual goal).