hello I'm going to be building my very first mechanical keyboard. Not pre kit one but every button will be wired by hand no PCB. My question is sense i see a lot of keyboards using a teensy and not say a UNO, Leonardo or a pro mini board what makes it so special? Is it because of speed? OR or the HID it can use? I don't get it. Can someone please explain why use a teensy and not another micro controller.
There are several different Teensy boards.
Some use AVRs some use ARM processors.
Often, the main reason to use a Teensy is well, it is actually teensy.
It is tiny compared to an UNO & Leonardo, like less than 1/10th the size. This allows it to fit in very small spaces.
The Teensy boards are in a DIP form factor which, IMO, is much better than an UNO/Leonardo for prototyping (it can plug into a bread board) and can then can be soldered to a proto board.
In comparing the Teensy boards to something like a pro-mini there is little benefit from a physical format.
But, keep in mind that Paul provides his own core even for the AVR based boards. And he has done several fixes and enhancements to the AVR core that the Arduino development has refused to pull into the AVR code that is included with the IDE.
Because of this if you get an AVR based Teensy, it will have capabilities that are not available in the AVR core for UNO, Leonardo, Mega, etc... This includes MUCH faster digital i/o. like up to 42x faster.
Also, if you have a really old library that was created before the 1.0 release, where the Arduino team decided to break 100% of the existing s/w, that library will likely work with the Teensy core, even though it will not work with the standard AVR core.
Another example of something available in the Teensy core that is not available in the standard AVR core is printf() support in the Print class. This allows to do things like Serial.printf(....) or lcd.printf(...) and have nice formatted output.
Downloads are faster as it uses direct USB communication vs going through a USB to serial chip and using async serial to communicate with the AVR chip.
Paul provides lots of libraries, including examples for how to use the AVR for USB devices.
The teensy++ can be really useful if you need LOTs of i/o pins. Many more than you get with UNO or Leonardo.
It also has lots more FLASH and RAM than those Boards.
Teensy boards are also available with 3v 32 bit ARM processors. (vs the 8bit AVR)
They are MUCH faster with lots of flash and RAM and many have real digital to analog outputs.
These are nice if you want/need something to talk to 3v logic.
IMO, the Teensy boards are simply a better product with better core and library s/w.
But depending on the project, you may not need the added capabilities or reduced footprint.
And then there are the ESP8266 modules.
These are really cheap (like $2-3 USD) , 32 bit, very fast and have gobs of flash (like 4-16 megabytes) and RAM.
Not as many pins as the other devices but they are fantastic if you want/need wifi as it is built in.
--- bill
josephchrzempiec:
My question is sense i see a lot of keyboards using a teensy and not say a UNO, Leonardo or a pro mini board what makes it so special?
I think the main reasons are the Leonardo (and other AVR boards using the 32U4 microcontroller) and Teensy 3+ have native USB so can easily support USB protocols like HID that is needed for keyboard/mouse/joystick emulation and no need for extra external components to deal with USB signals.
You can get some small form factor 32U4 boards like the Sparkfun Pro Micro but with 18 I/O pins it might not do a full size keyboard matrix without using external chips but a Teensy 3.1 has 34 I/O so is more likely to not need external chips.
Hello Everyone Thank you very much for the information i have learned a lot. Wow I know some of the Teensy boards have a 32u4 processor on them That is why I'm asking what would be really the difference between the Leonardo and uno board. I did make the UNO board into a Hid device a while back. So i know that does work. But yes Having more I/O ports is great less matrix a keyboard is good. Some of the newer Teensy boards speeds are way better.
So next question is to make a HID device of any kind would need USB native port on it. Does it really need to be a teensy?
josephchrzempiec:
So next question is to make a HID device of any kind would need USB native port on it. Does it really need to be a teensy?
The board does not need to have native USB as it can emulate USB like the ATmega16U2/8U2 used on the UNO as the USB-serial converter does but IMO native USB is easier to work with from a hardware and firmware point of view.
You don't need to use a Teensy as there are many ways to skin a cat and to decide this you can maybe tell us how many keys your keyboard will have.
My question is I'm trying to build a keyboard shortcut using cherry mx switches for gaming. A 6 button keys. Sense i see others using teensy that why i was wondering. Sense i dont know anything about teensy boards and i do know about arduino. Would it best to stick with arduino. However from what I'm seeing is that the teensy speed is better and faster processor then the leonardo. But is speed really needed in this case? I'm looking into the arduino zero board it has native usb. From what I'm seeing that it can be used as a hid device. Will update as i figure this all out.
If your only talking about 6 keys then no need to lay them out in a matrix as each switch can connect to 1 pin. Not having to do matrix scanning will improve speed so I don't think the speed increase you get with a Teensy is really much help.
You can pick up small Arduino compatible 32U4 boards like this pretty cheap but a Teensy will cost more. You can get 5.0V and 3.3V versions so if running off battery the 3.3V will help on power but runs at 8MHz instead of 16MHz (but I don't think this will make any noticeable difference.
Good luck in you project.
Hello Riva Thank you. NO battery use at all. Everything will be Through USB. I was thinking of using some type of wireless. But figure it be better through USB. I have no 32u4 boards here aka Leonardo. I do have 5 or 6 of the m0 zero boards that i have tested one and it does do keyboard Hid. I tested one hour ago. So i will be using that for now. Later on i will be picking up a 32u4 board.
Riva:
You can pick up small Arduino compatible 32U4 boards like this pretty cheap
That listing has a misleading title. It is really a Pro Mini with a 328P.
Need to look very carefully at ebay listings - all the sellers put the names of lots of popular arduino boards in the title so they'll show up in more search results. Examine description and pictures carefully before you order.
Also in ebay title might be wrong and board as well. Becuase a lot of boards look the same and yet they are different. Some Ebay sellers juet copy information and images from other listings and it is not the same board or chip as the one they are selling. I had that happen to me twice a long times ago.
oqibidipo:
That listing has a misleading title. It is really a Pro Mini with a 328P.
well spotted. I had glanced at the image and thought the reset button was the oscillator.
Here is a link to known correct 32u4 MCU as I have bought several from this seller.
hello i just wanted to updated this post with i got in a Adafruit m0 Feather board from eBay for cheap and i have been playing around using little momentary buttons. So far it's been great native USB set it up as a HID keyboard. Got my game short cut keys setup using the arduino keyboard example sketch.
Later i need to get some more money for some cherry Mx keys or something like them. They are a little costly but looks well worth it.
josephchrzempiec:
Some eBay sellers just copy information and images from other listings
Actually, I suspect they are all together in a large warehouse, separate office areas, likely relatives or just a sort of "club" for mutual interest, and agree to offer the same things using the same advertising material and at the same price.