├── FAQ.md ├── README.md ├── _config.yml └── examples └── README.md /FAQ.md: -------------------------------------------------------------------------------- 1 | # Frequently Asked Questions 2 | 3 | This section is a lie because as of the time of writing, nobody has asked any questions. So this section should probably be named PFAQ (Potential Frequently Asked Questions) 4 | 5 | ## Table of Contents: 6 | 7 | - [Should I buy this version or the PxMatrix version](https://github.com/witnessmenow/ESP32-i2s-Matrix-Shield/blob/master/FAQ.md#should-i-buy-this-version-or-the-pxmatrix-version) 8 | - [Will it work with my display](https://github.com/witnessmenow/ESP32-i2s-Matrix-Shield/blob/master/FAQ.md#will-it-work-with-my-display) 9 | - [What pins are used by the display](https://github.com/witnessmenow/ESP32-i2s-Matrix-Shield/blob/master/FAQ.md#what-pins-are-used-by-the-display) 10 | - [What pins are available to use for sensors etc](https://github.com/witnessmenow/ESP32-i2s-Matrix-Shield/blob/master/FAQ.md#what-pins-are-available-to-use-for-sensors-etc) 11 | - [Can I connect a SPI sensor/device to the shield](https://github.com/witnessmenow/ESP32-i2s-Matrix-Shield/blob/master/FAQ.md#device-to-the-shield) 12 | 13 | --- 14 | 15 | ### Should I buy this version or the PxMatrix version? 16 | 17 | Tough one to get us started! 18 | 19 | **Advantages of the PxMatrix version:** 20 | - No need to edit the library header file. 21 | - PxMatrix has proven good support. 22 | - PxMatrix more than likely supports more differnt styles of panels. Some of the matrix panels have strange layouts and scan patters which PxMatrix can handle. 23 | - There are alot of examples of PxMatrix projects. 24 | 25 | **Advantages of the i2s version:** 26 | - Simpler to use than PxMatrix (other than editing the header file) 27 | - The shield is pyhsically smaller 28 | - Does not need the ribbon cable to the out connector 29 | - I2S library is faster - [Check out Aaron Christophel's FPS comparison!](https://www.youtube.com/watch?v=HKWDGangWU0) 30 | - It has a better chance with working with multiple number displays. PxMatrix supports multiple displays, but struggled to handle over 3. The I2S library has a better chance of working with more ([@MLE_Online has tested it with 4 so far](https://twitter.com/MLE_Online/status/1291547518493274113)) 31 | 32 | Personally, for future projects I will more than likely use the i2s version as my go to. If you are a beginner, maybe PxMatrix is an easier choice due to all the examples. 33 | 34 | ### Will it work with my display? 35 | 36 | Honestly, I can't answer that for sure, all I can say is it should work with any display that works with the [ESP32-RGB64x32MatrixPanel-I2S-DMA library](https://github.com/mrfaptastic/ESP32-RGB64x32MatrixPanel-I2S-DMA). I can't guarantee that all display's will work. 37 | 38 | Even links to displays I have bought in past that work are subject to new stock/revisions (this happened previously). 39 | 40 | ### What pins are used by the display? 41 | 42 | [The schematic of the product can be found here](https://i.imgur.com/wbVGML8.png). 43 | 44 | Here is a list of pins that are used by the display: 45 | 46 | ``` 47 | #define R1_PIN_DEFAULT 25 48 | #define G1_PIN_DEFAULT 26 49 | #define B1_PIN_DEFAULT 27 50 | #define R2_PIN_DEFAULT 14 51 | #define G2_PIN_DEFAULT 12 52 | #define B2_PIN_DEFAULT 13 53 | 54 | #define A_PIN_DEFAULT 23 55 | #define B_PIN_DEFAULT 19 56 | #define C_PIN_DEFAULT 5 57 | #define D_PIN_DEFAULT 17 58 | #define E_PIN_DEFAULT 18 // This is the only change from the deafult pins of the library 59 | 60 | #define LAT_PIN_DEFAULT 4 61 | #define OE_PIN_DEFAULT 15 62 | 63 | #define CLK_PIN_DEFAULT 16 64 | ``` 65 | 66 | ### What pins are available to use for sensors etc 67 | 68 | V1.2 and above of the shield has the two i2c pins which are broken out to the accelerometer pads. These are the default i2c pins for the ESP32 so you should just be able to use the Wire object without specifying pins 69 | 70 | ``` 71 | #define SDA 21 72 | #define SCL 22 73 | ``` 74 | 75 | V1.3 added some more pins to the accelerometer pads: 76 | 77 | - 32 78 | - 33 79 | - 34 (this is an input only pin) 80 | - 2 (this is shared with the onboard LED of the ESP32 board) 81 | 82 | ### Can I connect a SPI sensor/device to the shield? 83 | 84 | It is possible to connect SPI devices to V1.3 shields (V1.2 doesn't have enough pins broken out). Some of the default SPI pins are used by the Matrix, but I have succesfully used an SPI device using the following pins: 85 | 86 | ``` 87 | #define NFC_SCLK 33 88 | #define NFC_MISO 32 89 | #define NFC_MOSI 21 //SDA 90 | #define NFC_SS 22 //SCL 91 | ``` 92 | 93 | You will need to use these pins in your SPI.begin command: 94 | 95 | `spi->begin(NFC_SCLK, NFC_MISO, NFC_MOSI, NFC_SS);` 96 | 97 | [Untested by me] Some libraries for devices do not allow you to pass in custom pins, but a lot seem to allow you pass in an SPI interface. Here is an example using an SD card: 98 | 99 | ``` 100 | SPIClass spi = SPIClass(HSPI); 101 | spi.begin(NFC_SCLK, NFC_MISO, NFC_MOSI, NFC_SS); 102 | SD.begin(NFC_SS, spi, 80000000); 103 | ``` 104 | [Source of SD card info](https://www.instructables.com/Select-SD-Interface-for-ESP32/) 105 | 106 | 107 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ESP32-i2s-Matrix-Shield 2 | Info, instructions and examples for the ESP32 i2s Matrix Shield, a shield for controlling HUB75 matrix panels with an ESP32 dev board. 3 | 4 | ![img](https://cdn.tindiemedia.com/images/resize/0KEMu_q8ZZl2meIWinbTlUCxH8M=/p/fit-in/1370x912/filters:fill(fff)/i/528221/products/2020-07-11T16%3A30%3A52.947Z-IMG_20200711_151941.jpg) 5 | 6 | ## Where To Buy? 7 | 8 | - [My Tindie Store - Ships from EU](https://www.tindie.com/products/brianlough/esp32-i2s-matrix-shield/) 9 | - [Eplop (Colin Hickey) - Ships from the UK](https://store.eplop.co.uk/product/esp32-i2s-matrix-shield/) 10 | - [Colin's eBay Store - Ships from UK, but VAT applied for EU](https://www.ebay.co.uk/itm/174822458332) 11 | 12 | ## Aditional Hardware Required 13 | 14 | To use this shield you will need the following additional things 15 | 16 | - ESP32 Mini32 Development board (ESP32 D1 Mini) - NOTE: Get the CP2104 version, there is a CH9102 version that does not seem to program 17 | - [Aliexpress\*]( https://s.click.aliexpress.com/e/_AYPehO) (pick the **CP2104 Drive** version) 18 | - [Amazon.com\*](https://amzn.to/3gArkAY) 19 | - Also available as an add-on on the Tindie listing 20 | - RGB LED Matrix. Please note that I can not gaurantee the following displays will defintly work with the library/board, They are ones I have bought in the past and work, but sellers have changed stock before. 21 | - 64x32 P3 Matrix display - [Aliexpress\*](https://s.click.aliexpress.com/e/_dYz5DLt) 22 | - 64x64 P3 Matrix display - [Aliexpress\*](https://s.click.aliexpress.com/e/_BfjY0wfp) 23 | - [5V 8A laptop style power supply\*]( https://s.click.aliexpress.com/e/_d7uVLXt) - How much power the display uses varies based on how many LEDs are on, but this should cover you for anything you want to draw. 24 | 25 | * = affiliate link 26 | 27 | ## Assembly Instructions 28 | 29 | I created a video of me soldering up a board to use as instructions - [Link](https://www.youtube.com/watch?v=ZiR93TmSyE0&feature=youtu.be) 30 | 31 | **TL;DW (aka steps for Bitluni)** 32 | - All components sit on the top of the board other than the P-in connector and 3no. 1K resistors for C,D and E connections. 33 | - **NOTE:** As the P-in connector and 1k resistors are underneath the ESP32 board, make sure that you solder them before blocking those pads. This is essential if you choose to solder the ESP32 directly to the board, but makes it easier even if you choose to use the header stand-offs 34 | - Ground is a plane across the whole board, so you may need to increase the heat of your iron to solder Ground pads. 35 | 36 | ## Setup and Configuration options 37 | 38 | #### Setup 39 | 40 | - On most displays, there are two connectors. There are arrows on the PCB of the display, the connector that the arrows are moving away from is the input. Insert the shield into this connector (there are arrows on the shield that should match the direction of the arrows on the display's PCB) 41 | - When inserting into this connector, make sure that it is inserted into the center of the connector as it is possible to insert it offset to one side. 42 | - Most display's come with a power cable, connect that to the display and also to the green screw terminals of the shield. (Red = 5V, black = GND) 43 | 44 | #### Powering the board 45 | 46 | - **The board and display take only 5V!**. 47 | - The recomended way of powering the board is either using the 2.1mm barel jack or using the add-on screw terminals. 48 | - The amount of amps needed depends on how many LEDs your project uses, but I recomend roughly 3A for a 64x32 display to cover all scenarios. Double it for a 64x64. I would also recomend allowing some head room, expecially if you are getting a cheaper supply. 49 | - It is possible to power the display through the micro-usb of the ESP32, but I would be very cautious about doing this, as it is probably not designed to handle high amounts of current. 50 | 51 | #### Power Configuration 52 | 53 | There is a 3pin connector with a jumper pin on the shield, this is for configuring the power setup: 54 | 55 | - **Jumper on the bottom two pins** - This should be the position you use unless you want to do something else specific. This mode allows power from your barel jack/screw terminals to power your ESP32, but will block the ESP32 from powering the display if you only have USB connected. 56 | - **Jumper on the top two pins "diode bypass"** - This allows you to power the display using the USB power of the ESP32. I would be very cautious about doing this, as it is probably not designed to handle high amounts of current. 57 | - **Removing Jumper** - If you want to power the ESP32 and the display seperately you can, removing the jumpers disconnects the 5V from the shield from the ESP32 5V pin. GND remains connected. 58 | 59 | ## Software Setup 60 | 61 | #### Board definition 62 | 63 | You will need to have the ESP32 setup for your Arduino IDE, [instructions can be found here](https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/boards_manager.md). 64 | 65 | #### Library dependancies 66 | - [ESP32-RGB64x32MatrixPanel-I2S-DMA](https://github.com/mrfaptastic/ESP32-RGB64x32MatrixPanel-I2S-DMA) - the library this shield is designed to be used with. This is what interacts with the matrix panel. You can install this from the Arduino Library manager by searching for "ESP32 64x32 LED MATRIX" 67 | - [Adafruit GFX](https://github.com/adafruit/Adafruit-GFX-Library) - is a dependacy of the matrix library. This can also be installed from the library manager by searching for "Adafruit GFX" 68 | - [FastLED](https://github.com/FastLED/FastLED) - It is not a dependancy of the matrix library, but some of the cooler examples are built using the FastLED library, so it is worth installing that too. Again you can use the library manager and search for "FastLED". 69 | 70 | #### Basic Usage 71 | 72 | This board is designed to use the default pins of the [ESP32-RGB64x32MatrixPanel-I2S-DMA library](https://github.com/mrfaptastic/ESP32-RGB64x32MatrixPanel-I2S-DMA) where possible, so you can use `dma_display.begin();` instead of passing in the custom pins. 73 | 74 | #### Using a 64x64 display 75 | 76 | If you are using a 64x64 display you will need to edit the [ESP32-RGB64x32MatrixPanel-I2S-DMA.h file](https://github.com/mrfaptastic/ESP32-RGB64x32MatrixPanel-I2S-DMA/blob/master/ESP32-RGB64x32MatrixPanel-I2S-DMA.h) that comes with the library. There are two changes required: 77 | - Change `#define MATRIX_HEIGHT 32` to be **64**. It should be possible to do this from the Arduino sketch by defining it before you import the library, but I have not found this reliable at all. 78 | - Change `#define E_PIN_DEFAULT -1` to be **18**. 79 | 80 | #### Examples 81 | 82 | [ESP32-RGB64x32MatrixPanel-I2S-DMA](https://github.com/mrfaptastic/ESP32-RGB64x32MatrixPanel-I2S-DMA) comes with a few examples that should help get you started. 83 | 84 | - [Test Shapes](https://github.com/mrfaptastic/ESP32-RGB64x32MatrixPanel-I2S-DMA/blob/master/examples/testshapes_32x64/testshapes_32x64.ino) - This is a fairly basic example that will draw some shapes onto the dsiplay then show some text. This is a good example of seeing how to do basics with the display. 85 | - Pattern Plasma - [Code](https://github.com/mrfaptastic/ESP32-RGB64x32MatrixPanel-I2S-DMA/tree/master/examples/PatternPlasma) - This is a really nice looking pattern that really shows off what the display can do 86 | 87 | [Click here for larger](https://gfycat.com/nearajarermine-electronics-arduino-esp32) 88 | 89 | ![Pattern Plasma](https://thumbs.gfycat.com/NearAjarErmine-small.gif "Pattern Plasma") 90 | 91 | - Aurora Demo - [Code](https://github.com/mrfaptastic/ESP32-RGB64x32MatrixPanel-I2S-DMA/blob/master/examples/AuroraDemo/AuroraDemo.ino) - A range of different patterns displayed on screen. Some of them are really cool. The example needs to slightly modified to work as by deafult it uses custom pins. Use `dma_display.begin();` and it should work 92 | 93 | [Click here for larger](https://gfycat.com/blankfancyballoonfish) 94 | 95 | ![Aurora](https://thumbs.gfycat.com/BlankFancyBalloonfish-small.gif "Aurora") 96 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-architect -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | # Examples have moved! 2 | 3 | I have moved all the examples from this repo to the [ESP32 Trinity repo examples section](https://github.com/witnessmenow/ESP32-Trinity/tree/master/examples) 4 | 5 | The I2S shield and Trinity have identical pin outs so examples for each are compatible with each other, so I didn't think it made much sense maintaining two. 6 | --------------------------------------------------------------------------------