MIDI controller with pots, pushbuttons and LED

Status
Not open for further replies.

ozlow.own

Member
Hi everyone!

I want to build a MIDI controller with 32 pots, 12 LEDs and 12 pushbuttons with a Teensy LC. Everything has to be USB powered. The teensy will read every cycle the status of the pots and the pushbuttons. If status changes it will send a MIDI message over USB to the PC. The controller will also receive MIDI messages from the PC to turn on/off the LEDs.
I'm trying to plan everything right on the HW side. Here is the you can see the block diagram of the controller.
Untitled.png

The 32 pots (10k value) and the pushbuttons are connected to 3x 74HC4067 mux. This allows me to use a total of 16 digital pins and two analog pins (4 bit address + 1 pin enable + 1 pin analog input for each 4067 connected to pots and 4 bit address + 1 pin enable + 1 pin digital input with pullup for the one connected to the pushbuttons).

Now i need to wire the LED part. I found [URL="https://www.pjrc.com/teensy/td_libs_ShiftPWM.html"this]this [/URL] to PWM 12 leds with just 3 pins and two 74VHC595. All the LEDs can be on at a given time, so the power consumption of the LEDs is 20mA*12 = 240mA (assuming i'm not PWMing the led). The 3.3V regulator has a maximum current of 100mA. So i need to connect the 595 to the +5v pin of the Teensy (which uses the USB 5V - 500mA max). But the 595 datasheet says that the minimum volt allowed to have a an logic high at the input of the 595 is 0.7 * Vcc, so 0.7*5V = 3.5v. The Teensy will output 3.3V, so i can't wire things like that.

Am I missing something? Is there some smart way to connect everything? Do i need to put a 5 to 3.3V regulator to power the 595?
Also, is the teensy fast enough to do everything (scan the pots/buttons, send MIDI, receive MIDI, PWM LEDs with shift registers)?
 
74VHC595 probably isn't a great choice for driving 20 mA. I believe it's rated for only 8 mA current, and whether all 8 pins can do that simultaneously (staying within recommended specs) is questionable. Probably better to use something like TPIC6C595, and connect each LED+resistor between its output pin and +5V.

You might need level shifters to get the 3.3V signals up to 5V level, for input to that TPIC6C595 chip. Any of the "HCT" chips works, like 74HCT125, since they recognize anything over 2.0V as logic high, even when running at 5.5V.


Also, is the teensy fast enough to do everything (scan the pots/buttons, send MIDI, receive MIDI, PWM LEDs with shift registers)?

Yes, Teensy LC is plenty fast enough.

If you were also going to process audio signals, that's where you'd definitely want to step up to Teensy 3.2 or higher.
 
Hi Paul, thank you for help!

I found what could be ideal for me to have a low part count (for 12 LEDs i need 2 8-bit shift register and 3 level shifters).
Searching i found TLC6C5816-Q1, which is basically a 16 bit shift register (so i just need one). It can accept input high signal down to 2.4V, so no need to use level shifters. The downside is that it comes with a HTSSOP (28) package, i'm not experienced with SMD soldering but i need to start somewhere :)

The schematic is basically in the datasheet. There are some extra pins for the diagnostic functionality, but i don't need them.
I'll keep on searching to find a bare 16 bit shift register which can accept 3.3V levels and drive the LEDs without any extra functionality to not mess around with unused pins (ground them? Leave unconnected? I need to read the datasheet really well). Extra points for a more DIY-friendly package!
 
Last edited:
Actually for a even lower part count and DIY-friendly package i could use a MAX6969 (DIP package, 16 bit shift register with 50 mA per pin) and power it with a 5V to 3.3V regulator, so no need to put 12 resistors in series with the LEDs. I hope this way is suitable!
 
Status
Not open for further replies.
Back
Top