Powering RGB Rotary Encoders with Teensy

Status
Not open for further replies.

porma

New member
Hey everyone, I'm trying to build a volume mixer over serial for Windows and I'm having a bit of trouble planning out how to put everything together. I don't have a lot of electronics knowledge or experience so bear with me

The current plan is to use a Teensy 3.6 or 4.1, 8 push-button rotary encoders with a built-in RGB LED, possibly a few led push-buttons, and an LCD or OLED screen to show volume levels and other info. I don't have any of the components yet and I've just been playing around with a couple of regular encoders on an Arduino Nano.

My main concern is how to provide enough power to the LEDs since from what I can tell the Teensy can only output 10mA per pin at 3.3V but the datasheet says that they need 25mA at 2-2.4V for R and 3.3-3.7V for G/B. I'm not sure if I'm understanding the specs correctly but I will link the datasheet below. If the Teensy cannot provide sufficient power then my next plan would be to use a battery pack or some form of external power and transistors for each channel on each LED but I would like to avoid that because it almost seems like its just too much going on for what I'm trying to do.

My next issue to tackle would be how to get all the components connected since the RGB encoders alone will need 48 pins. I would rather stick with the ~40 breadboard friendly pins since I don't feel to comfortable soldering anything to the pads so I will be looking into multiplexers but was hoping you guys could give me some general information. Is the I/O speed impacted in any way with multiple connections going to the same pins on the microcontroller? And which components would you recommend I connect to the multiplexer out of 16 encoder, 8 push button and 24 RGB pins? Or does it not matter at all?

Encoder: https://www.sparkfun.com/products/15141
Datasheet: http://cdn.sparkfun.com/datasheets/Components/Switches/EC12PLRGBSDVBF-D-25K-24-24C-6108-6HSPEC.pdf
I'm going to purchase them from a different website but I believe its the same product

If you guys have any other advice for me on how to make this project better, easier or more compact I would be happy to hear it

Thanks in advance :)
 
Power supply:
The most easy and straight forward solution would be to power the Teensy via the USB cable and the rest of your device from an external supply. But, even then, you can not directly connect 24 LEDs@20mA to the Teensy since its output per pin and its total output capability is limited (IIRC total < 100mA?, datasheet will help). Your 24 LEDs will consume about 20mA*24 =480mA.

USB-only power supply
In case it is important to only have a single USB cable connected to you device, you could use USB-C which usually is able supply 1.5A to a USB2.0 device. Here a corresponding USB-C -> USB-Micro converter:

kicad_3d_2.jpg breadboard2.jpg
Details, schematic and gerbers: https://github.com/luni64/USB-C---MicroB. Building this would require some electronics knowledge and SMD soldering.

Sparkfun has a ready to use USB-PD board which might also fit https://www.sparkfun.com/products/15801. You would use the power output of this board to supply the Teensy and the LEDs. However, you would need to solder the USB signals (D+/D-) to the Teensy. This would also require some electronics experience.

LED Driver:
I would go for a ready to use PWM driver and power it by a simple external 5V supply. I once used the following one in a project. It has a I2C connection, works nicely, doesn't require additional parts and can easily be daisy chained to drive your 24 LEDs.

815-04.jpg
https://www.adafruit.com/product/815


Encoders + encoder buttons:
This library https://github.com/luni64/EncoderTool supports multiplexed readout of encoders. It can also handle the encoder buttons. The extras folder of the repo contains information on different multiplexing hardware. Since you mentioned little electronics experience I would go for the solution with the 4067 multiplexers, you get breakouts at the usual sites.
Here an example of a compact setup to readout 16 encoders. You can stack a third board to handle the corresponding switches. Schematic and more info in the link given above.

assembly3d.jpg

Have fun with your project!
 
You don't have to provide the maximum rated current to an LED - in fact today they are so efficient that
this is usually blindingly bright.

Try 1mA to 5mA range - some experimentation may be needed to get the right current limiting resistor
ratios. Forward voltages are less at lower currents to so 3.3V is likely to be enough for the blue and green
devices.
 
Thanks a lot for the info fellas, I've got a better idea of what I'm working with and how to go forward from here now

Try 1mA to 5mA range - some experimentation may be needed to get the right current limiting resistor
ratios. Forward voltages are less at lower currents to so 3.3V is likely to be enough for the blue and green
devices.

I did consider this route but I would like to be able to drive them at full power if needed so I think I'm going to go with external power. Plus it would probably help to power the display

I've decided to start with just 6 encoders for now so I might be able to get away without the multiplexer depending on what else I want to add in the future. The PWM driver looks like an amazing solution and much better than my backup plan of wiring up individual transistors for each channel. I've ordered the encoders and plan to order the Teensy, driver, and display this week once I figure out how I want to handle external power - at the moment leaning towards battery.

Finally decided to try this project out after thinking about it for a couple of years and I'm keen to see it all come together :)
 
Status
Not open for further replies.
Back
Top