How much current can I draw for my keyboard?

tommakrin

05 Dec 2014, 11:15

Hello,

as I mentioned in a previous post of mine (http://deskthority.net/workshop-f7/whic ... t9110.html) I'm on my way to make my own keyboard from scratch with some nice stuff onto it (display, USB hub, backlight etc). Now my first few Cherry blues arrived, so the Teensy 2++ which will power the whole monstrosity :lol: , but eventually I have some questions.

I knew that the max current I can draw from a single USB port is about 100mA. But I landed here: http://electronics.stackexchange.com/qu ... a-usb-port

where it's mentioned that when a device is in specific configuration during the enumeration stage can draw as much as 500mA. What is the typical current draw of a keyboard with Teensy 2++? Do I have to consider something else except the MCU current draw, i.e. internal resistance of wires?

P.S. I already know the max current needed by a Teensy board. I've dove some calculations and my keyboard needs about 180mA, but I'm trying to figure out if this is an acceptable number in practice.

User avatar
vvp

05 Dec 2014, 13:09

500mA per USB port. If you have only one device on the bus then it can take full 500mA at most.
Resistance of wires will not play much role. How many LEDs are lit up (at what current) and whether buzzer (if any) is active will play a big role.
Some power consumption numbers can be found here http://deskthority.net/keyboards-f2/pow ... t9126.html

Edit: That 100mA limit for enumeration is probably right. Just do not turn on your LEDs before the keyboard is connected and you can fit in the limit easily.
Last edited by vvp on 05 Dec 2014, 14:01, edited 1 time in total.

User avatar
Halvar

05 Dec 2014, 13:25

180 mA (= 0,9 W) seems a lot -- that's more than my F-122 draws, which is the most power hungry board in my collection.

How did you estimate that?

EDIT: ok I just saw all the goodies that you added to the board.

tommakrin

05 Dec 2014, 14:16

So the estimation I have in mind is:

Controller: ~60mA max (https://www.pjrc.com/teensy/low_power.html)
Display: ~25-50mA max (http://www.adafruit.com/products/1431 says about 30mA but I put some margin)
Backlight: the rest. How much? I don't know. I'm trying to conclude to a led type (SMD or classic), brightness levels, maybe 3-color leds... Any ideas? I have seen some stuff and my estimations are at least 1mA per led.

User avatar
vvp

05 Dec 2014, 20:51

The LED forward current depends entirely on what kind of LED you select and how bright you want it to be.
You can find a LED where 20 mA may not be enough since it gives you only 0.1 mcd (CMD5055).
You can get a LED which gives at least 35 cd at 20 mA (HLMP-CM1A-450DD). That is very bright. You would probably want to run it at less than 0.2 mA.
Notice that the first LED is 350,000 times weaker to a human eye. So asking how much current you will need for your LEDs does not make sense if you do not select what LEDs you want to use and how bright they should be. To find out that, first decide on the (multi)colour of the LEDs then go to your favourite part supplier and find what is available. Select the one which is the most efficient, fits your PCV/switches, and is not too expensive. If you do not want your LEDs too bright then there is a good chance that 1mA per LED will be plenty enough.
https://en.wikipedia.org/wiki/Candela

Post Reply

Return to “Workshop”