Custom board backlighting questions

Melbeachmoose20

04 Mar 2016, 06:32

I'm in the process of planning my first custom mechanical board. The only thing that I'm having trouble with is the LED back lighting. I'm going to use orange leds which draw 2.0 volts and 20 mA. I think the leds running at 3 mA is about the light output I'm looking for. I'm not sure how to wire all the leds in parallel. I can't seem to be able to picture how it would workout for just a single pin. I attached the key layout that I'm going to make. It is a 16 by 9 matrix which would take up 25 pins on a Teensy 2.0. Would there even be enough pins on the Teensy to wire all the switches and the leds?

If someone could tell me if the Teensy could handle everything for the keyboard and help me with a wiring diagram that would be awesome.
Attachments
keyboard-layout.png
keyboard-layout.png (46.03 KiB) Viewed 943 times

User avatar
flabbergast

04 Mar 2016, 15:30

Here's how backlight LEDs are usually wired:
Image
All of them on one pin, preferably one that supports PWM (so that it's easier to manage various levels of brightness). You might want to have indicator LEDs (Caps, Scroll, Num Locks) on separate pins.

Another solution is to have a dedicated LED driver chip (which then talks to the Teensy via I2C or something similar). This requires 2 teensy pins.

User avatar
vvp

04 Mar 2016, 22:14

flabbergast's post is good. The only think I would add is if your LED's have only 2 V forward voltage then you can put two led in series into each parallel branch blabbergast did draw. That will halve your power consumption. It is also great if you can dedicate one IO pin to control the backlight. The point is that you will probably need to have backlight switched off till your keyboard is enumerated. Check out this post to see some related notes.

Also I would probably try to find some good FET instead of a bipolar transistor. This will save you the base resistor (you do not need it) and it will almost for sure lower the collector-emitter voltage drop. In general, the idea is like this. If the current switched is low then FET is typically better. If the current being switched on is high then bipolar transistors (or rather IGBTs) may get better. The reason why it is so is that a fully open bipolar transistor behaves more like a diode while fully open FET behaves more like a small resistor. You can find FETs with drain-source resistance of about 45 mΩ with gate-source voltage of 5V easily. That gives you at most 2.25 mV voltage drop at 0.5 A (which is the maximum you can pull from USB). You can find even much better FETs but they will be bigger than 3 mm. With a bipolar transistor your voltage drop will be probably around 0.3 V. If you know better (with lower voltage drop) bipolar transistors then please post.

Post Reply

Return to “Keyboards”