• 2.0 version

    MakerM002/19/2023 at 05:16 0 comments

    The PCB and 3D files can be ordered directly on PCBWay.

    Ver 2.0, I increased the number of LEDs from 7x7 to 8x8, then modified the order of the pins, and increased the LED output signal.

  • prototype

    MakerM011/25/2022 at 11:16 0 comments

    I love the feeling of pressing mechanical keys, so I apply mechanical buttons to some projects. But the function of these buttons is not fixed, the way of sticking labels is not easy to remember, in order to solve this problem, I was wondering if I can add a display device to my keys to facilitate real-time indication according to different functions.

    During the design process, I came across the activities of SeeedStudio. The designers can design a Grove sensor module for free and have a chance to win more than $300. When designing the Grove sensor I needed to meet their design specifications.

    Regarding mechanical buttons, I chose kailh's CHOC series, which is highly satisfying to the overall design.

    For the display part, I would have liked to choose an OLED screen, but it requires too many pins to control and cannot meet the grove specification. Then I thought of the WS2812, which only needs 1 pin to control its display content.

    Along these lines, I chose the grove digital interface, one pin to detect keys and one pin to control the LED.

    During the design process, it was found that the size of the WS2812 was too large to fit enough LEDs within the limited size, so I needed to continue to look for a smaller size. In the end, I found the right component, SK6805-EC15 from OPSCO, and successfully implemented a 5X7 LED matrix.

    Due to the size limitations of this project, I chose the Grove 20X40 DIP design out of Grove specification.

    The PCB can be ordered on seeed's fusion PCBA service .It consists of two two-layer PCBs.

    PCB _motherBoard

    PCB_LED

    rgbled
    rgbled
    mainBoard
    mainBoard

    charging animation

    Cistercian Display

    #include <Adafruit_GFX.h>
    #include <Adafruit_NeoMatrix.h>
    #include <Adafruit_NeoPixel.h>
    #ifndef PSTR
    #define PSTR // Make Arduino Due happy
    #endif
    
    uint8_t key1 = 21;
    uint8_t key2 = 10;
    
    #define LED_PIN1 20
    #define LED_PIN2 9
    
    Adafruit_NeoMatrix matrix1 = Adafruit_NeoMatrix(5, 7, LED_PIN1,
                                                    NEO_MATRIX_TOP + NEO_MATRIX_LEFT +
                                                        NEO_MATRIX_ROWS + NEO_MATRIX_PROGRESSIVE,
                                                    NEO_GRB + NEO_KHZ800);
    
    Adafruit_NeoMatrix matrix2 = Adafruit_NeoMatrix(5, 7, LED_PIN2,
                                                    NEO_MATRIX_TOP + NEO_MATRIX_LEFT +
                                                        NEO_MATRIX_ROWS + NEO_MATRIX_PROGRESSIVE,
                                                    NEO_GRB + NEO_KHZ800);
    const uint16_t colors[] = {
        matrix1.Color(255, 0, 0), matrix1.Color(0, 255, 0), matrix1.Color(0, 0, 255)};
    
    const uint8_t numberUnits[10][7] = {
        {0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100}, // 0
        {0b00000111, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100}, // 1
        {0b00000100, 0b00000100, 0b00000111, 0b00000100, 0b00000100, 0b00000100, 0b00000100}, // 2
        {0b00000100, 0b00000110, 0b00000101, 0b00000100, 0b00000100, 0b00000100, 0b00000100}, // 3
        {0b00000101, 0b00000110, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100}, // 4
        {0b00000111, 0b00000110, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100}, // 5
        {0b00000101, 0b00000101, 0b00000101, 0b00000100, 0b00000100, 0b00000100, 0b00000100}, // 6
        {0b00000111, 0b00000101, 0b00000101, 0b00000100, 0b00000100, 0b00000100, 0b00000100}, // 7
        {0b00000101, 0b00000101, 0b00000111, 0b00000100, 0b00000100, 0b00000100, 0b00000100}, // 8
        {0b00000111, 0b00000101, 0b00000111, 0b00000100, 0b00000100, 0b00000100, 0b00000100},
    }; // 9
    
    const uint8_t numberTens[10][7] = {
        {0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100}, // 0
        {0b00011100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100}, // 1
        {0b00000100, 0b00000100, 0b00011100, 0b00000100, 0b00000100, 0b00000100, 0b00000100}, // 2
        {0b00000100, 0b00001100, 0b00010100, 0b00000100, 0b00000100, 0b00000100, 0b00000100}, // 3
        {0b00010100, 0b00001100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100}, // 4
        {0b00011100, 0b00001100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100}, // 5
        {0b00010100, 0b00010100, 0b00010100, 0b00000100, 0b00000100, 0b00000100, 0b00000100}, // 6
        {0b00011100, 0b00010100, 0b00010100...
    Read more »