Hi everyone!
A question which has never done before (I know, forum is full of threads like this. However, I need some advices before working on the PCB).
I want to build a MIDI controller with a Teensy LC. It has 4 fader, 16 knobs, 16 buttons, 16 Neopixels (under the buttons). The only limitation I have is that everything should be only USB powered - no external supplies.
To lower pin count, i will use 74HCT4067 powered from 5V(VIN) pin.
16 pots (10k, connected between 3.3V and GND) ---> middle pin connected to a 74HCT4067 ---> 4 address pins (DIGITAL) to Teensy + analog pin for mux output (ENABLE pin of the MUX shorted to GND);
4 faders (10k, connected between 3.3V and GND) ---> middle pin connected directly to Teensy analog pins ---> 4 Teensy pins (ANALOG);
16 buttons (will use the Sparkfun silicone button pad, one side to ground) ---> other side connected to a 74HCT4067 ---> same 4 address pins (DIGITAL) to Teensy + digital pin for MUX output;
Estimated power consuption of pots and faders = (3.3v/10kohm) * 20 = 6.6mA.
Total pin count = 5 analog pins + 5 digital pins (YAY).
No problems whatsoever. Teensy LC should be fast enough to scan all every cycle and read the status of faders, pots and buttons and send/recive MIDI messages.
The problems comes with the LEDs. I'd like to use some WS2812b because they will fit nicely under the buttons silicone pad. Also, they use one digital pin for control (not running out of pins on the Teensy actually, but I like to have spare room for future improvements) and if i use pin 17 i don't even need a level shifter.
The LEDs should be connected like this : LED 5V to VIN pin, LED GND to GND pin, DATAIN to pin 17.
The 16 LEDs will not be on all at the same time (a max of 12 LED at the same time), but for a worse case scenario, let's assume 16 LEDs on.
They will not be on at max brightness and i will only use primary or secondary color (1 or 2 led on at the time, so 1/3 or 2/3 of estimated current).
The LEDs with full brightess, white (all 3 colors on), consume about 60mA. But, in my case, they will not consume 60 mA. Let's assume 20mA per LED (which seems to be a real world standard estimate), so a total of 320mA.
The specific question is: is USB power enough for powering all without a problem?
I am a newbie, so if anyone finds any error (not only about LEDs) please let me know!
I will attach later a detalied schematics but it's a pretty standard wiring.
A question which has never done before (I know, forum is full of threads like this. However, I need some advices before working on the PCB).
I want to build a MIDI controller with a Teensy LC. It has 4 fader, 16 knobs, 16 buttons, 16 Neopixels (under the buttons). The only limitation I have is that everything should be only USB powered - no external supplies.
To lower pin count, i will use 74HCT4067 powered from 5V(VIN) pin.
16 pots (10k, connected between 3.3V and GND) ---> middle pin connected to a 74HCT4067 ---> 4 address pins (DIGITAL) to Teensy + analog pin for mux output (ENABLE pin of the MUX shorted to GND);
4 faders (10k, connected between 3.3V and GND) ---> middle pin connected directly to Teensy analog pins ---> 4 Teensy pins (ANALOG);
16 buttons (will use the Sparkfun silicone button pad, one side to ground) ---> other side connected to a 74HCT4067 ---> same 4 address pins (DIGITAL) to Teensy + digital pin for MUX output;
Estimated power consuption of pots and faders = (3.3v/10kohm) * 20 = 6.6mA.
Total pin count = 5 analog pins + 5 digital pins (YAY).
No problems whatsoever. Teensy LC should be fast enough to scan all every cycle and read the status of faders, pots and buttons and send/recive MIDI messages.
The problems comes with the LEDs. I'd like to use some WS2812b because they will fit nicely under the buttons silicone pad. Also, they use one digital pin for control (not running out of pins on the Teensy actually, but I like to have spare room for future improvements) and if i use pin 17 i don't even need a level shifter.
The LEDs should be connected like this : LED 5V to VIN pin, LED GND to GND pin, DATAIN to pin 17.
The 16 LEDs will not be on all at the same time (a max of 12 LED at the same time), but for a worse case scenario, let's assume 16 LEDs on.
They will not be on at max brightness and i will only use primary or secondary color (1 or 2 led on at the time, so 1/3 or 2/3 of estimated current).
The LEDs with full brightess, white (all 3 colors on), consume about 60mA. But, in my case, they will not consume 60 mA. Let's assume 20mA per LED (which seems to be a real world standard estimate), so a total of 320mA.
The specific question is: is USB power enough for powering all without a problem?
I am a newbie, so if anyone finds any error (not only about LEDs) please let me know!
I will attach later a detalied schematics but it's a pretty standard wiring.