Home Elements Boards Recipes

Panel ESP32-3248S035

This panel is using a ESP32 processor with 4M Flash Memory in combination with a 480*320px 16 bit color display and touch controller. This panel is supported by the [HomeDing Display Example]

This device is supported by the [HomeDing Display Example].

Arduino Configuration

#define TOUCH_SDA 33 #define TOUCH_SCL 32 #define TOUCH_INT 21 #define TOUCH_RST 25 #define TOUCH_WIDTH 320 #define TOUCH_HEIGHT 480

{
    "board": "espressif:esp32:esp32",
    "configuration": "JTAGAdapter=default,PSRAM=disabled,PartitionScheme=default,CPUFreq=240,FlashMode=dio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,LoopCore=1,EventsCore=1,DebugLevel=none,EraseFlash=none"
}

Components

The following components are available on the board:

LED

There is a RGB Led above the display using 3 GPIO pins as input.

Color Pin
Red GPIO4
Green GPIO16
Blue GPIO17

Light Sensor

A Light sensor with a LDR is populated to the board and connected to pin GPIO34.

Using the Analog Input Element the value can be read and mapped to the range of display brightness.

The configuration below maps the raw analog values to the brightness of the background light.

From my testings a value of 20 is usable in low light situations and a value of 80 fits to normal indoor situations:

{
  "analog": {
    "ldr": {
      "pin": 34,
      "readtime": "500ms",
      "mapInMin": "0",
      "mapOutMin": "80",
      "mapInMax": "200",
      "mapOutMax": "20",
      "constrain": "true",
      "onvalue": "DisplayST7796/0?brightness=$v"
    }
  }
}

LCD and Touch Display

The Display is based on the ST7796 driver chip with a 320*480 display.

For Touch events there are 2 versions available.

Configuration can be found below.

SD Card

The SD card is available at the standard SPI bus of ESP32. The SD Card Element can be used to extend the filesystem and to mount the sd card file system on the /sd folder.

function ESP32 pin
CS GPIO5
SPI-bus VSPI

Device configuration

This device configuration can be used:

{
  "device": {
    "0": {
      "name": "panel480",
      "title": "ESP32-3248S035",
      "description": "320*480 Touch Panel from JCZN",
      "loglevel": "2",
      "button": "0",
      "xled": "16",
      "logfile": 1,
      "safemode": "false",
      "homepage": "/board.htm",
      "cache": "max-age=600",
      "i2c-SDA": "33",
      "i2c-SCL": "32"
    }
  },
  "ota": {
    "0": {}
  },
  "ntptime": {
    "on": {
      "zone": "CET-1CEST,M3.5.0,M10.5.0/3"
    }
  },
  "diag": {
    "0": {}
  },
  "light": {
    "l": {
      "pin": "4,16,17",
      "mode": "pwm",
      "invert": "true",
      "enable": "true",
      "value": "x000000"
    }
  },
  "color": {
    "l": {
      "title": "RGB",
      "loglevel": 2,
      "config": "RGB",
      "mode": "fix",
      "duration": "4s",
      "value": "x000000",
      "brightness": "50",
      "connect": [ "light/l" ]
    }
  },
  "analog": {
    "ldr": {
      "pin": 34,
      "readtime": "500ms",
      "mapInMin": "0",
      "mapOutMin": "80",
      "mapInMax": "200",
      "mapOutMax": "20",
      "constrain": "true",
      "onvalue": "DisplayST7796/0?brightness=$v"
    }
  },

  "DisplayST7796": {
    "0": {
      "height": "480",
      "width": "320",
      "color": "black",
      "border": "black",
      "background": "xccccff",
      "lightpin": 27,
      "bus": "hspi",
      "spidc": "2",
      "spics": "15",
      "spiclk": "14",
      "spimosi": "13",
      "spimiso": "12"
    }
  },

  "DisplayTouchGT911": {
    "0": {
      "address": "0x5D",
      "resetpin": "25",
      "interruptpin": "21"
    }
  }
}

Download of supporting files is available at http://www.jczn1688.com/zlxz, Download passwort: jczn1688

See also

Tags

Board Wip