Teensy 2.0 alternatives, ATmega32U4

User avatar
tactica

21 Mar 2015, 11:48

philpirj wrote: 18 pins should be sufficient for 6*12 = 72 keys, or 8 * 10 = 80 keys, making this one a good candidate for diy 60% keyboards.
Exactly how do you count that? I'm new to this stuff and need to find a controller to adapt a bunch of 122-key keyboards to USB. The Teensy is too expensive so I was considering the Pro Trinket instead which I can purchase locally, but I don't know if it comes with enough pins.

User avatar
Muirium
µ

21 Mar 2015, 11:51

You just need a converter. Teensies can do both jobs: converters and controllers. Controllers replace the keyboard's original circuitry (or install as the heart in a custom keyboard) and need a lot of pins to drive the matrix. Converters use the original circuitry to do the complex stuff, and just need 4 pins to handle AT etc.

The Pro Micro is kinda sorta ideal for a converter. But getting Soarer's Converter software onto it is a pain in the arse I can't even remember how to do and don't want to! And I've found my Pro Micro board is much more picky about USB power than any of my Teensies. I definitely wouldn't want one in the heart of a custom keyboard where it's INCREDIBLY DIFFICULT to replace. A keyboard that can't work reliably every place I use it, is broken to me.

User avatar
tactica

21 Mar 2015, 12:17

Ahhhh... So, basically any board with a few spare pins will do as converter. That's good to know, thanks! :)

User avatar
scottc

21 Mar 2015, 12:19

Well, in short, any board with an ATMega 32u4!

User avatar
tactica

21 Mar 2015, 13:40

What's wrong with the 328? 32u4 based boards tend to be on pricey side here and I'm on a budget to refurbish & convert old keyboards...

User avatar
scottc

21 Mar 2015, 13:45

Most firmware is for the 32u4 because it has hardware USB support. On the 328, you can use v-usb, but Soarer's converter/controller doesn't support it to my knowledge. I think that TMK used to support it or partially supports it, but I'm not sure about that.

User avatar
matt3o
-[°_°]-

21 Mar 2015, 14:16

TMK dropped v-usb many releases ago. if you look at the commit history you may find a version that is compatible

User avatar
tactica

21 Mar 2015, 14:57

OK, in the end I found a local source of cheap (just under €10) Pro Micros, so I suppose I'll go with that. There's that seller from Hong Kong selling them at ~$6 but I don't want to get a Paypal account just for this, and besides shipping would take forever.

User avatar
Muirium
µ

21 Mar 2015, 16:24

Not as long as configuring the damn things feels! Good luck.

User avatar
scottc

21 Mar 2015, 16:30

10 euro for Pro Micros is pretty bad. I just ordered 5 for $21 shipped (AKA, the price of a Teensy) off of aliexpress.com a few weeks ago!

User avatar
tactica

21 Mar 2015, 19:14

Yeah, I found that offer now and am feeling quite tempted... Will have to wait, I'm broke right now :/

Again the problem is that you may have two wait two months for the goods to arrive... <sigh>

User avatar
fohat
Elder Messenger

21 Mar 2015, 19:34

Most of the gear that I have ordered from China to the US has taken 2-3 weeks, 4-5 at the outside.

However, I don't know how they ship Teensies so fast, but I have ordered several (to Atlanta from the West Coast) over the last 3 years, and they often get here in 72 hours.

Although $21 is a lot for a small thing, they always work, properly, immediately, with Soarer's firmware.

User avatar
scottc

21 Mar 2015, 22:34

tactica wrote: Yeah, I found that offer now and am feeling quite tempted... Will have to wait, I'm broke right now :/

Again the problem is that you may have two wait two months for the goods to arrive... <sigh>
China is usually one month for me, no more. Even Aliexpress. :)

User avatar
hasu

24 Mar 2015, 18:00

If someone need to get ATMega32u4 chips, try verical.com.
Their price is as low as aliexpress, and they offer free international shipping for now(until end of March?).

User avatar
XMIT
[ XMIT ]

07 Apr 2015, 20:20

My ATmega32U4 Sparkfun Pro Micro knockoff boards are here! 5.77 USD apiece, I got ten:

http://www.ebay.com/itm/171715861393

Once I find some time (ha!) I'll start playing with Soarer's Converter, TMK, etc. and report in. They don't have quite enough pins to be a full-on controller replacement, and they have mini-USB instead of micro-USB. But they should make very nice converters.

User avatar
scottc

07 Apr 2015, 20:23

Yours have Mini USB?! Mine all came with micro. Nice!

For future reference, you can sometimes get Pro Micros on aliexpress etc. for a little cheaper if you plan to buy in bulk.

User avatar
XMIT
[ XMIT ]

07 Apr 2015, 20:27

Hmm. Good point. I'll shop around a little bit before ordering the next batch. I may be more interested in Teensy 3.0 competitors, anything with more pins for controller replacements.

User avatar
scottc

07 Apr 2015, 20:30

ARM boards are the future for controllers and converters, that's for sure. But in the short- to medium-term, ATMega is here to stay. Hopefully, Soarer will return triumphantly with a new ARM-compatible firmware!

User avatar
XMIT
[ XMIT ]

07 Apr 2015, 20:43

Maybe. But ATmega32 is still cheap and sufficient. I cut my teeth on Intel 8051 and am just grateful for instructions that (mostly) finish in one machine cycle running at a very speedy 16MHz. Plus I like to keep my keyboard on a strict power budget as I often connect them to laptops or tablets.

I do have an idea for a Hall Effect keyboard mod that reads raw values from the sensors run through an ADC to do interesting things. That would definitely benefit from more CPU power.

User avatar
Touch_It

07 Apr 2015, 23:48

http://www.ebay.com/itm/1Pcs-XTWduino-N ... 462cb566c8

Despite being less than ideal with the pin headers soldered in, would these be viable? I want to get 4 or so, and do it on the cheap.

User avatar
scottc

07 Apr 2015, 23:50

They're an ATMega 328P, you need a 32u4. You can get some cheaply here.

User avatar
Touch_It

07 Apr 2015, 23:58

scottc wrote: They're an ATMega 328P, you need a 32u4. You can get some cheaply here.

Thanks. Obviously I'm incapable of reading today :cry:

User avatar
XMIT
[ XMIT ]

08 Apr 2015, 00:04

That looks like a perfectly workable 32u4 board. It is nearly identical to the ones I have. Same reference design but clearly a different board based on silkscreening.

But that's a great price. I may order 20 more. My goal is to have one converter per keyboard. Then, when The Keypocalypse comes, all of the boards that I sell will come with a USB port. :-D

User avatar
scottc

08 Apr 2015, 00:08

Note that these guys have Micro USB, not Mini USB! I think they go even cheaper if you get a larger amount. Depends on the seller. I also recommend banggood.com. But use a spam email, they almost definitely sell your details... months later, I still get random mails about LEDs in Chinese. :?

User avatar
XMIT
[ XMIT ]

11 Apr 2015, 05:14

Well, I'm typing this post on a Model M 1391401 connected through a Sparkfun Pro Micro running Soarer's Converter. I did all the programming on my Mac.

The directions with Soarer's Converter are appropriate. I happened to have a spare SDL cable sitting around and these are my pinouts:

Red - VCC
Brown - PD1 - "2" on the Pro Micro
Black - GND
White - PD0 - "3" on the Pro Micro

Installing CrossPack from http://www.obdev.at/products/crosspack/index.html worked for me. This is the command I used for flashing:

avrdude -p atmega32u4 -P /dev/cu.usbmodem1421 -c avr109 -U flash:w:Soarer_a t2usb_v1.12_atmega32u4.hex

Shorting RST and GND twice in succession put the Pro Micro in bootloader mode. The tools work just fine and detect a Soarer's Converter.

It took me a little under two hours to figure all of this out, including: installing the (non-helpful) Arduino IDE, reading through a bunch of docs, determining pinouts, and some other trial and error.

This is great for my Model Ms and AT keyboards but doesn't get me ADB or other obscure protocols. For this I'll play with Soarer's Controller and/or TMK. This was just a "hello world" for getting started.

Code: Select all

$ ./scinfo
scinfo v1.10
scinfo: looking for Soarer's Converter: found
scinfo: sending info request: ok
device: ok

Protocol Version: v1.00
Code Version: v1.12
Max Settings Version: v1.01
Current Settings Version: v0.00
SRAM Size: 2560 bytes
SRAM Free: 1809 bytes
EEPROM Size: 1024 bytes
EEPROM Free: 1020 bytes
IMAG1450.jpg
IMAG1450.jpg (273.94 KiB) Viewed 6710 times
IMAG1452.jpg
IMAG1452.jpg (306.93 KiB) Viewed 6710 times

User avatar
idollar
i$

11 Apr 2015, 08:25

I have done the same with a couple of model Ms 122.

User avatar
Muirium
µ

11 Apr 2015, 08:29

Yeah, you'll need TMK for ADB. A task I need to get on with for myself. The trouble with TMK, besides needing to build from source, is the fact that key mapping is defined in the source code directly, so you have to recompile and reflash for any edits. Soarer's is more elegant for the kind of little nitpicky edits I so often make! The effort between an idea and its implementation is that bit lower.

Soarer's Controller, meanwhile, is an option for any boards where you fancy pulling out the original controller to drive the matrix directly for yourself. Not always the easiest thing to do, physically speaking. And you need a Teensy (or whatever) for each and every keyboard. Converters are much simpler to share!

User avatar
scottc

11 Apr 2015, 12:19

I'm sorry that I didn't think to mention it before, XMIT, but I actually wrote a tutorial on how to do this with Soarer's converter: http://deskthority.net/workshop-f7/how- ... t8448.html
I probably could've saved you a couple of hours of pain!

User avatar
XMIT
[ XMIT ]

11 Apr 2015, 13:07

Thanks scottc. Yep, my local notes file looks almost exactly like your other forum post. I don't mind the time invested, though. I would have to climb the learning curve one way or another. Plus I was being difficult and doing this on my Mac laptop. Yes I know this is much easier in Linux but I just wanted to see if it was possible to do this from the Mac.

I'm hunting for a cheaper alternative to the Pro Micro that can serve as a replacement controller as well. I have a couple of older boards that may need it, as well as some custom build projects that I'm considering. 20 I/O pins is *just barely* enough for a 100-position matrix and will cover some of the smaller keyboards.

bloopbloop

14 Jan 2020, 04:49

Sorry to revive an old thread. Recently dug up my XT keyboard and realized I have an old Leonardo R3 lying around. There used to be a thread on making a soarer converter from that. (other-external-f66/make-a-soarer-s-conv ... t9499.html) However, the link is dead, is there anyone that have it archived or can explain the differences vs pro micro procedure? Thanks in advance.

Post Reply

Return to “Workshop”