Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hardware:diy_zedmd [2024/07/30 05:35] – add safer power supply methods, add pictures of power supplies atarihardware:diy_zedmd [2026/01/30 08:13] (current) nadenislamarre
Line 13: Line 13:
   * 1 ESP32 and its shield [[https://www.aliexpress.us/item/1005005626482837.html|ESP32+shield]]   * 1 ESP32 and its shield [[https://www.aliexpress.us/item/1005005626482837.html|ESP32+shield]]
   * 16 male/male 10cm jumpers [[https://www.aliexpress.us/item/4000578173872.html|Jumpers]]   * 16 male/male 10cm jumpers [[https://www.aliexpress.us/item/4000578173872.html|Jumpers]]
-  * 1 power supply [[https://www.aliexpress.us/item/1005006189932540.html|Adjustable power supply]] or [[https://www.aliexpress.us/item/1005005896562268.html|Switch-mode power supply]] - **Note**: the power supply may be optional if you build a 32x128 DMD (but is required for resolutions 256x64 and above). +  * 1 power supply [[https://www.aliexpress.us/item/1005006189932540.html|Adjustable power supply]] or [[https://www.aliexpress.us/item/1005005896562268.html|Switch-mode power supply]] - **Note**: the power supply is optional if you build a 32x128 DMD (but is required for resolutions 256x64 and above). 
-  * 1 plug [[https://www.aliexpress.us/item/1005005029176614.html|Plug]]+  * 1 plug [[https://www.aliexpress.us/item/1005005029176614.html|Plug]] (only if you put a power supply)
  
 You probably already have a plug at home. You probably already have a plug at home.
Line 106: Line 106:
 Execute the following command, and don't forget to replace ''ttyUSB0'' by ''ttyUSB1'' if necessary, based on the previous explanation. Execute the following command, and don't forget to replace ''ttyUSB0'' by ''ttyUSB1'' if necessary, based on the previous explanation.
  
 +**For Batocera 42 and later** (ZeDMD version 5.x.x required)
 +<code>
 +wget https://github.com/PPUC/ZeDMD/releases/download/v5.1.7/ZeDMD-128x32.zip
 +unzip ZeDMD-128x32.zip
 +wget https://github.com/espressif/esptool/releases/download/v4.8.1/esptool-v4.8.1-linux-amd64.zip
 +unzip esptool-v4.8.1-linux-amd64.zip
 +chmod a+x ./esptool-linux-amd64/esptool
 +./esptool-linux-amd64/esptool --port /dev/ttyUSB0 --chip esp32 write_flash 0x0 ./ZeDMD.bin
 +</code>
 +
 +**For Batocera 41 and earlier** (ZeDMD version 3.x.x required)
 <code> <code>
 wget https://github.com/PPUC/ZeDMD/releases/download/v3.6.0/ZeDMD-128x32.zip wget https://github.com/PPUC/ZeDMD/releases/download/v3.6.0/ZeDMD-128x32.zip
Line 116: Line 127:
  
 The first line downloads the ZeDMD firmware for a 128x32 matrix. The first line downloads the ZeDMD firmware for a 128x32 matrix.
 +Note that batocera 42 requires ZeDMD 5.1.5 or over. And previous versions of batocera requires versions before 5.x.
  
 The second line unzips it. The second line unzips it.
Line 184: Line 196:
  
 {{:hardware:zedmd_result.jpg?800|}} {{:hardware:zedmd_result.jpg?800|}}
 +
 +===== ZeDMD configuration =====
 +If you've ZeDMD 5.x or higher (on batocera 42 or higher), by default, the rendering is not smooth.
 +You need to configure the minimal refresh rate and the USB package size via the command line tool zedmd-client.
 +You may need to configure the RGB order and the brightness.
 +
 +First, shutdown the dmd_real service, then use zedmd-client -i to list your current dmd settings.
 +After configuration, reboot batocera or just restart the dmd_real service
 +
 +A usb package size of 1024 and a refresh rate of 60 is good on my device. Depending on the esp32 hardware, you may adjust values to get smoother animations.
 +
 +<code>
 +# batocera-services stop dmd_real
 +# zedmd-client -i
 +
 +ZeDMD Info
 +=============================================================
 +ID:                         3904
 +firmware version:           5.1.7
 +CPU:                        ESP32
 +libzedmd version:           0.9.7
 +transport:                  0 (USB)
 +device:                     /dev/ttyUSB0
 +USB package size:           32
 +WiFi SSID:                  could only be retrieved via WiFi
 +WiFi port:                  could only be retrieved via WiFi
 +WiFi power:                 could only be retrieved via WiFi
 +WiFi UDP delay:             5
 +panel width:                128
 +panel height:               32
 +panel RGB order:            0
 +panel brightness:           2
 +panel clock phase:          0
 +panel i2s speed:            8
 +panel latch blanking:       2
 +panel minimal refresh rate: 30
 +panel driver:               0
 +Y-offset:                   0
 +
 +# zedmd-client --set-brightness=7
 +# zedmd-client --set-panel-min-refresh-rate=60
 +# zedmd-client --set-usb-package-size=1024
 +
 +# batocera-services start dmd_real
 +</code>
 +
 +Only the most common USB-to-serial chips used in various ESP32 boards supported by the auto-detection. Others are ignored to not break the communication to other devices, for example bluetooth headsets or game controllers.
 +But if your specific ESP32 is not recognized, you can explicitly specify the serial device in the settings.
 +
 +The best performance could be achieved by using an ESP32 S3 N16R8. Beside the fact that this one has more RAM which is actively used for rendering, it provides a native USB port. This native USB port supports much higher data transfer speeds.
 +
 +To increase the compatibility with some USB ports or hubs or low quality cables, the USB package size became configurable. The default value of 32 bytes for the original ESP32 is very low. If you notice stuttering of the DMD frames, try to increase this value.
 +If your hardware supports it, good values are 512 bytes for the original EPS32 and 1024 for the ESP32 S3. If ZeDMD doesn't work with these values, try a different USB port of your computer. In some cases not all of them and their driver chips are of the same quality.
  
 ===== Issues ===== ===== Issues =====
Line 194: Line 259:
  
 {{:hardware:zedmd_noise.gif?400|}} {{:hardware:zedmd_noise.gif?400|}}
 +
 +=== Pannel driver issue ===
 +Depending on the hardware you bought, some settings on the dmd need to be changed.
 +One user having nothing displayed on the dmd (just the red squares) reported he had to change the panel driver to make it work.
 +(see https://github.com/PPUC/ZeDMD)
 +
 +<code>
 +zedmd-client --set-panel-driver=4
 +</code>
  
  • hardware/diy_zedmd.1722317722.txt.gz
  • Last modified: 22 months ago
  • by atari