Author Topic: Arduino vs Teensy?  (Read 26937 times)

0 Members and 1 Guest are viewing this topic.

Offline mamcx

  • Thread Starter
  • Posts: 33
Arduino vs Teensy?
« on: Mon, 26 September 2016, 20:20:07 »
I will made my first keyboard, and wonder what to use.

Look like Teensy is more popular for keyboards, but Arduino is more popular overall. The price difference is small to me, so I wonder what could be better.

Offline 0100010

  • Posts: 1127
  • Location: DFW, TX, US
  • Not Sure
Re: Arduino vs Teensy?
« Reply #1 on: Mon, 26 September 2016, 21:45:25 »
Most common open source firmware for keyboards is written for AVR chips, like on the older Teensy 2 or ++.  There are some written for ARM though, as is common with Arduino.
  Quoting me causes a posting error that you need to ignore.

Offline vextanys

  • Posts: 40
Re: Arduino vs Teensy?
« Reply #2 on: Tue, 27 September 2016, 03:55:34 »
Most open firmware is written for the Teensy (2.0 mainly), but the Arduino / Pro Micro (cheap clone - quality may vary) has exactly the same chip (ATMega32u4 - worth checking on Arduino/Pro Micro boards). Its pretty easy to make a keyboard with the Arduino software, as its one of the examples.
The differences for me are:
Support (Teensy can use TMK with little to no modification, Pro Micro you use an example as a basis for the keyboard)
Price (Pro Micro clones are ~£3 from China vs Teensy ~£10-15)
USB Port (Teensy has Mini, Pro Micro has micro)
Bootloader (Pro Micro has a serial interface that is always present, Teensy uses a USB mode activated by a onboard button)

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Arduino vs Teensy?
« Reply #3 on: Tue, 27 September 2016, 13:37:34 »
The pro micro clone has less pins so can only do small boards - if that's OK it may be for you.

The Teensy 2.0 has a nice GUI flasher and is shorter by about a quarter than the  official Arduino Micro, it has mini USB socket.

The Arduino Micro has all the pins down the sides (which is great for breadboard use) rather than some on the end and in the middle like the Teensy, but this makes it longer.  It has a micro USB socket.

Newer Teensys supposedly work with TMK but the only example is a one key so it will take a bit of work - probably not the best idea for a first build.


Take your pick :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline kolec94

  • Posts: 111
Re: Arduino vs Teensy?
« Reply #4 on: Wed, 28 September 2016, 07:44:50 »
I would go with the teensy unless you want to do your own firmware

kbparadise v60 blues

Offline Fictiouz

  • That "White" Guy
  • Posts: 465
  • Location: Halifax, NS, CA
  • "You miss 100% of the shots you take." -S. Trooper
Re: Arduino vs Teensy?
« Reply #5 on: Wed, 28 September 2016, 08:01:46 »
Honestly it doesn't matter all that much as long as you have the proper number of pins (Max Columns + Max Rows) and is using the proper MCU. I have used pololu, teensy, arduino and other manufacturers with TMK/QMK as long as it had the 32u4. The only difference between them being the bootloading. And obviously the pin definitions based on how the matrix is oriented.

You want a small form factor board using an Atmel MCU; I'm sure you could program an ARM chip, but the resources available are centred around Atmel.
Halifax, NS Meetup | "I know you'll come back to me, I'm like a good kind of herpes, I'm impossible to get rid of." - 27
67g Zilent V2 M60-A | BKE Redux HHKB Professional 2 | 62g Silent Black Planck | 62g Vint Black Tex Yoda II | Bolt-Modded Model M 1391301

Offline IBNobody

  • Posts: 113
Re: Arduino vs Teensy?
« Reply #6 on: Wed, 28 September 2016, 08:40:10 »
One other deciding factor is that non-Teensy 2.0 have a bootloader that is 8x the size. For ATMEGA32U4 devices, this means that you only have 28k of flash space. Teensy 2.0 has 31.5k. The Teensy bootloader is proprietary too.

If you just are creating a simple keyboard, this won't matter. If you are trying to get ALL the bells and whistles supported by QMK, you will run out of space.

I have actually switched to using Teensy++'s. Sure, they are more expensive, but they gave me the IO count and flash space (128k) to do some fun stuff.

Offline Fictiouz

  • That "White" Guy
  • Posts: 465
  • Location: Halifax, NS, CA
  • "You miss 100% of the shots you take." -S. Trooper
Re: Arduino vs Teensy?
« Reply #7 on: Wed, 28 September 2016, 08:58:22 »
One other deciding factor is that non-Teensy 2.0 have a bootloader that is 8x the size. For ATMEGA32U4 devices, this means that you only have 28k of flash space. Teensy 2.0 has 31.5k. The Teensy bootloader is proprietary too.

If you just are creating a simple keyboard, this won't matter. If you are trying to get ALL the bells and whistles supported by QMK, you will run out of space.

I have actually switched to using Teensy++'s. Sure, they are more expensive, but they gave me the IO count and flash space (128k) to do some fun stuff.

Would recommend Teensy++'s too. You can literally do anything you want in keyboard world with it.
Halifax, NS Meetup | "I know you'll come back to me, I'm like a good kind of herpes, I'm impossible to get rid of." - 27
67g Zilent V2 M60-A | BKE Redux HHKB Professional 2 | 62g Silent Black Planck | 62g Vint Black Tex Yoda II | Bolt-Modded Model M 1391301

Offline mamcx

  • Thread Starter
  • Posts: 33
Re: Arduino vs Teensy?
« Reply #8 on: Wed, 28 September 2016, 10:17:08 »
Ok, so arduino work but is requiere more effort and teensy is simpler yet powerfull. Thanks!

Offline slickmamba

  • Posts: 651
  • Location: SF
Re: Arduino vs Teensy?
« Reply #9 on: Wed, 28 September 2016, 10:18:56 »
Yes teensy is super easy, but limited in capabilities
Hi :)

Offline vvp

  • Posts: 887
Re: Arduino vs Teensy?
« Reply #10 on: Wed, 28 September 2016, 12:27:09 »
One other deciding factor is that non-Teensy 2.0 have a bootloader that is 8x the size. For ATMEGA32U4 devices, this means that you only have 28k of flash space. Teensy 2.0 has 31.5k. The Teensy bootloader is proprietary too.
There was a free 2kB ATmega32u4 HID bootloader posted on deskthority. If you have a programmer you can replace the default 4kB bootloader with a 2kB one. That gives you 30 kB free flash. Teensy 512B bootloader is proprietary. But most keyboard firmwares fit into 28kB easily so bootloader size is rarely a problem.

Offline IBNobody

  • Posts: 113
Re: Arduino vs Teensy?
« Reply #11 on: Wed, 28 September 2016, 13:38:02 »
One other deciding factor is that non-Teensy 2.0 have a bootloader that is 8x the size. For ATMEGA32U4 devices, this means that you only have 28k of flash space. Teensy 2.0 has 31.5k. The Teensy bootloader is proprietary too.
There was a free 2kB ATmega32u4 HID bootloader posted on deskthority. If you have a programmer you can replace the default 4kB bootloader with a 2kB one. That gives you 30 kB free flash. Teensy 512B bootloader is proprietary. But most keyboard firmwares fit into 28kB easily so bootloader size is rarely a problem.

Was that the V-USB one (which we don't want because it consumes extra pins) or was that the HID one? I seem to recall that there was a 2k HID bootloader somewhere, but it was buggy in that it required you to power cycle the chip after every load.

The ideal bootloader would be small, HID based, and secure. The only one that hits all three categories is the Teensy HalfKay, and it is only available via the Teensy boards.

Offline vvp

  • Posts: 887
Re: Arduino vs Teensy?
« Reply #12 on: Wed, 28 September 2016, 15:43:49 »
It was a HID one. I used it in the past when I had an ATmega32u4 keyboard. I use my own controller with ATXmega now.)I do not recall any bugs in the bootloader but I flashed firmware with it .... I do not know .... probably only about 10 times.
This is probably it: https://deskthority.net/post154426.html#p154426

Yes, HalfKay is the only distinguishing thing about Teensy. And in my opinion it is not that important since most keyboard firmwares fit into 28 kiB easily. Though I had problems with my firmware to fit into 31 kiB, so I moved to ATXmega. It took about a day to port the firmware from ATmega to ATXmega.

Offline IBNobody

  • Posts: 113
Re: Arduino vs Teensy?
« Reply #13 on: Wed, 28 September 2016, 16:58:51 »
It was a HID one. I used it in the past when I had an ATmega32u4 keyboard. I use my own controller with ATXmega now.)I do not recall any bugs in the bootloader but I flashed firmware with it .... I do not know .... probably only about 10 times.
This is probably it: https://deskthority.net/post154426.html#p154426

Yes, HalfKay is the only distinguishing thing about Teensy. And in my opinion it is not that important since most keyboard firmwares fit into 28 kiB easily. Though I had problems with my firmware to fit into 31 kiB, so I moved to ATXmega. It took about a day to port the firmware from ATmega to ATXmega.

That looks like it is still V-USB, though. Does it work with the native USB port on the 32U4 or is it implemented with the RX/TX lines?

Offline wolfv

  • Posts: 269
Re: Arduino vs Teensy?
« Reply #14 on: Thu, 29 September 2016, 01:40:53 »
I will made my first keyboard, and wonder what to use.

Look like Teensy is more popular for keyboards, but Arduino is more popular overall. The price difference is small to me, so I wonder what could be better.

Teensy LC cost less than Teensy 2.0, and has 3 times more memory.
The keybrd library is the simplest way to write keyboard firmware.  The keybrd library repository is at https://github.com/wolfv6/keybrd
The examples in the keybrd tutorials show how easy it is to program Teensy LC: https://github.com/wolfv6/keybrd/tree/master/tutorials
keybrd is an Arduino library.  Teensy is Arduino compatible.  The Arduino development environment is easy to setup and learn.

Offline vvp

  • Posts: 887
Re: Arduino vs Teensy?
« Reply #15 on: Thu, 29 September 2016, 03:34:21 »
That looks like it is still V-USB, though. Does it work with the native USB port on the 32U4 or is it implemented with the RX/TX lines?
It works with the native USB port. I'm not sure I sent the link to the right message in the thread but it was definitely published in that thread. 2kiB, uses the hardware USB port of ATmega32u4, and you need an open source bootloadHID to upload your new firmware. The bootloader is activated with the reset button (like HalfKay).