Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 1 of 1

Thread: 32x12 Switch + LED Matrix : IC/Library Recs Appreciated

  1. #1

    32x12 Switch + LED Matrix : IC/Library Recs Appreciated

    Hi,

    Long time Teensy and Paul fan. First time poster.

    I'm developing a project that's going to be using many tactile switches and LEDs (see post title). I've spent some time looking around the web, discovered a few approaches that I think may work, and listed them below. I'm hoping someone here might be able to point me in the right direction.


    PROJECT SPECIFICS

    • It's fine if only one button press can be read at a time, but It'd be great if I could get multiple
    • I want to avoid diodes or any kind of resistor placed on every switch or LED. I'm wiring the project by hand
    • DIP Packaging or ICs on breakout boards only



    SWITCH IDEAS

    Shift Registers Approach
    I found this PDF which describes using a combination of 4094 and 4021 chips to create a 16x16 switch matrix. I haven't been able to find any other tutorials using this setup. Some others have used shift registers, but they recommend putting diodes on every switch. There also doesn't seem to be a super user friendly library for this process. Maybe I just haven't found it.

    Port Expander and KeyPad Library
    I found a library that builds on the original Arduino KeyPad one to have it work with a port expander like MCP23017 over I2C. It allows for multiple chip usage, but thinks of them as individual 8x8 matrices. I'm limited to the number of chips I can use here to 8, because of addressing. I think I could make it work though. One major bonus is that the library looks great and has all kinds button interactions built right into it.


    LED IDEAS

    I found the MAX72xxPanel library offered as part of Adafruit's GFX collection. There are lots of things I like about this IC/library. I don't need resistors on LEDs, I can set the overall brightness of the LEDs using software, I can read/write LEDs as X and Y coordinates despite there being many chips, and it uses SPI. The only downside is that I'll need 12 chips, because it would basically be a 4x3 matrix of 8x8 matrices rather than a true matrix. I'm actually not sure if that's a downside. I think I'll take this route unless someone knows a better option.

    Very similar would be to use the HT16K33 library. This one is I2C. It looks like there's a set brightness class, but it doesn't appear in any of the examples.

    I'm using a Teensy 3.5 for the project.

    Thank you for any input you can offer. It is greatly appreciated!
    Last edited by brendanbyrne; 04-22-2019 at 07:06 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •