Guition esp32-p4-jc1060p470

Does anybody have working config for this board? Looks like there are two versions.

This one has the P4 and C6 separate.

And in this version GUITION has combined both the P4 and C6 into a single chip! This one has an Ethernet port and a camera included.

https://www.aliexpress.com/item/3256810238878747.html

A lot of interesting development here.

They also have a dev board version

URL of Device Specifications document

Board
http://pan.jczn1688.com/directlink/1/HMI%20display/JC1060P470C_I_W.zip

Display driver

Touch

2 Likes

nice one.
I’m very curious about the first comments about that device.

but there are two type with other pcb.

one is yellow pcb, the other is black with full case.
on ali I was reading about quality problems of the display connection/connector and people where arguing because there are no cables with the tiny connectors at the black version.

should have ordered it as well when I shared the link this morning. :thinking:
now the price is on high level again. if you want to get it for a good price, then it is a little less then €40. (this morning it was at €38.50 shipping incl.)

I like the big header on the black version that exposes power and some I/O pins. the yellow one has very little I/O.

Ali in the US is all over the place they will lower the price on something but charge more shipping. $46USD is still the cheapest I have seen with free shipping.

Another interesting thing I see is the LCD screen on the black version has a slightly larger resolution then the yellow. At least in the specs.

docs for the black version:
http://pan.jczn1688.com/directlink/1/HMI%20display/JC1060P470C_I_W_Y.zip

screenshot from the spec sheet:


so it is a TFT display that looks like a IPS. :lying_face:

1 Like

Mine has just arrived - looks a bit different from the pics - this one has the back enclosed in the case, so aesthetics-wise it’s great.

Will have a go this evening and weekend.

Edit: Got the LVGL demo installed and working - and it looks like the same display as the Waveshare one (WAVESHARE-ESP32-P4-WIFI6-TOUCH-LCD-7B):

I (1126) ESP32_P4_EV: Install MIPI DSI LCD control panel
I (1130) ESP32_P4_EV: Install EK79007 LCD control panel
I (1135) jd9165: version: 2.0.1
I (1420) ESP32_P4_EV: Display initialized

Second Edit: Works OK with the same config as the waveshare - but have two errors:

[17:18:29.035][E][es7210:035]:   Failed to initialize
[17:18:29.035][E][component:154]:   es7210.audio_adc is marked FAILED: unspecified

Will RTFM :slight_smile:

Third edit: So leaving it for a while - only display works - touch screen is off a bit, backlight not working, so on second flash that’s until demo is reflashed, and haven’t looked at the audio. Some progress - and lots for better qualified folks to work out. :slight_smile:

Happy with the Waveshare P4 as I’ve got it dispensing Tommy his dry food with voice assist - but the black with full case makes this model look really decent.

Thanks,
Charlie

1 Like

To get anyone else started here’s the esp32, esphome and PSRAM sections I used:

esp32:
  variant: esp32p4
  flash_size: 16MB
  cpu_frequency: 360MHz
  framework:
    type: esp-idf
    advanced:
      enable_idf_experimental_features: true
  
esp32_hosted:
  variant: ESP32C6
  reset_pin: GPIO54
  cmd_pin: GPIO19
  clk_pin: GPIO18
  d0_pin: GPIO14
  d1_pin: GPIO15
  d2_pin: GPIO16
  d3_pin: GPIO17
  active_high: true

psram:
  mode: hex
  speed: 200MHz

And got the display, touchscreen and backlight working with:

# -------------------------------------------
# Touchscreen gt911 i2c
# -------------------------------------------
i2c:
  - id: bus_a
    sda: GPIO07
    scl: GPIO08
    frequency: 400kHz

touchscreen:
  - platform: gt911
    id: my_touchscreen
    i2c_id: bus_a
    # reset_pin: GPIO23 # Shared with backlight
    update_interval: 50ms
    transform:
      swap_xy: true # false if rotation is 0
      mirror_x: false
      mirror_y: true # false if rotation is 0

# -------------------------------------------
# Backlight
# -------------------------------------------
output:
  - platform: ledc
    pin: GPIO23
    id: gpio_backlight_pwm
    frequency: 100Hz
    min_power: 0.03
    zero_means_zero: true

light:
  - platform: monochromatic
    output: gpio_backlight_pwm
    name: Display Backlight
    icon: mdi:lightbulb-on
    id: display_backlight
    restore_mode: ALWAYS_ON

# -------------------------------------------
# Display
# -------------------------------------------
display:
  - platform: mipi_dsi
    id: my_display
    model: JC1060P470
    reset_pin:
      number: GPIO05
    rotation: 90
    update_interval: never
    auto_clear_enabled: false
    hsync_pulse_width: 20     # The only difference to the examples provided

One gotcha is the reset GPIO is shared between the backlight and the display. In the examples, the display was set to GPIO_NUM_NC (-1), so I just commented it out in the display.

And to clear the es7210 FAILED (to be honest, I’m not even sure it has one - not having a speaker yet, haven’t been able to spend too much time on that) was to change the default address from 0x40:

audio_adc:
  - platform: es7210
    id: es7210_adc
    i2c_id: bus_a
    address: 0x36

So the WAVESHARE-ESP32-P4-WIFI6-TOUCH-LCD-7B display kinda worked - but the init sequence for JC1060P470 is a direct match for the examples included in the above zip file - which is obvious in hindsight as it’s a match for this model. :man_facepalming:

It’s nice as it doesn’t need any external_components pointing to PR’s as it’s already in ESPHome.

The one I got came with no cables - so you’ll need to stock up on Micro JST MX 1.25mm (yes - I know that’s not the correct name :smile:) connectors — available from the usual outlets and here.

A couple of 2 pin and 4 pin ones should do it (for connecting a speaker etc).

Thanks,
Charlie

I’ve checked it in: GitHub - charrus/Guition-esp32-p4-jc1060p470-Sci-fi-dashboard

It’s very much work in progress - voice doesn’t work at all (since I don’t have a speaker) and cam needs to be added.

Edit: Sorry about the AI slop used for README and licence.

Edit2: @andrew_NH I’ve checked out your repository as a submodule in the esphome directory and added guition-esp32-p4-jc1060p470.yaml to hardware and examples.

It’s not complete (no camera support etc) but fancy a draft PR?

I think my Sci-fi dashboard is looking a bit long in the tooth :smile:

Nice, I’ll test it tonight.

Next up adding the new media player and Sendspin support from here.

1 Like

That looks fascinating - looking forward when you have results!

Also - I think my PR needs a little fix as during the OTA updates the screen is a bit funky - constantly flashes between blue and the progress bar.

That’s pretty normal, try execute_from_psram in the esp32 config, that may help.

1 Like

I tried that - but it’s only for esp32s3 - not esp32p4 - however I tried the sdkconfig_options from PR #9907 there was no change on OTA updates.

Ah, there is a similar option for P4, but it’s named differently and not implemented in ESPHome just yet. You can try it in the sdk config options:

CONFIG_SPIRAM_XIP_FROM_PSRAM: y
1 Like

I tried that - but it didn’t get much further than the initialisation bit’s looking at the serial monitor before freezing.

It’s no biggie - it’s just @andrew_NH has a progress bar in his repo during OTA updates - so was reporting it flashes.

I’m not sure if that’s by design, or not (I can’t remember all the workarounds; there’s turning off the backlight and I vaguely recall something to do with LVGL pages or alpha settings).

It’s nice that you’ve been adding config options that fix this as well by executing from the PSRAM.

Thanks,
Charlie

I’ll look into it in due course. The problem is that when writing to flash the cache is disabled and that limits the data rate available for the display interface, leading to the flashing.

I tried it again to troubleshoot - and this time it worked.

Not really sure what I did differently, but including it here for anyone else wanting to get rid of the flashing during OTA updates, and confirm that sdkconfig option works on this board:

esp32:
...
  framework:
...
    sdkconfig_options:
      CONFIG_SPIRAM_XIP_FROM_PSRAM: y

Thanks for the pointer - and the explanation of what’s causing the flashing.

For the RTC (rx8130) to work for this model, it needed a different address (0x14) so including it here as well to help other folks:

time:
  - platform: rx8130
    # repeated synchronization is not necessary unless the external RTC
    # is much more accurate than the internal clock
    update_interval: never
    timezone: Europe/London
    address: 0x14

And follow the rest of RX8130 Time Source in the ESPHome docs. The coin cell to power the RTC is a CR1220 (as per discord).

Thanks,
Charlie

It only works when flashed after it’s been flashed with that option at least once.

Thanks.

Problem was it stopped the device coming up past the usual initialisation bits before it invokes main() I think? Just had to use serial to upload to fix. Haven’t seen this behaviour since so it’s all good, and I probably messed something else up.

Thanks,
Charlie

to those wondering… the PA CTRL is on gpio 11, audio works too :grin:

# --- BUSES / PERIPHERALS ------------------------------------------------------
i2c:
  sda: GPIO7
  scl: GPIO8
  scan: true
  frequency: 400kHz
  id: bus_a

i2s_audio:
  - id: i2s_audio_bus
    i2s_lrclk_pin: GPIO10
    i2s_bclk_pin: GPIO12
    i2s_mclk_pin: GPIO13

# --- TOUCHSCREEN --------------------------------------------------------------
touchscreen:
  - platform: gt911
    id: my_touchscreen
    i2c_id: bus_a
    interrupt_pin: GPIO21

# --- BACKLIGHT ----------------------------------------------------------------
output:
  - platform: ledc
    id: backlight_output
    pin: GPIO23
    frequency: 100Hz
    inverted: true
    min_power: 0.0
    max_power: 0.8

light:
  - platform: monochromatic
    id: Sled
    name: Screen
    icon: mdi:television
    entity_category: config
    output: backlight_output
    restore_mode: ALWAYS_ON
    default_transition_length: 250ms

# --- AUDIO DEVICES ------------------------------------------------------------
switch:
  - platform: gpio
    name: Speaker Enable
    icon: "mdi:speaker"
    entity_category: config
    pin: GPIO11
    restore_mode: ALWAYS_ON

audio_dac:
  - platform: es8311
    id: es8311_dac
    i2c_id: bus_a

audio_adc:
  - platform: es7210
    id: es7210_adc
    i2c_id: bus_a

microphone:
  - platform: i2s_audio
    id:  box_mic
    i2s_audio_id: i2s_audio_bus
    i2s_din_pin: GPIO48
    sample_rate: 16000
    bits_per_sample: 16bit
    adc_type: external

speaker:
  - platform: i2s_audio
    id: box_speaker
    i2s_audio_id: i2s_audio_bus
    i2s_dout_pin: GPIO9
    audio_dac: es8311_dac
    dac_type: external
    channel: mono
    buffer_duration: 100ms
    bits_per_sample: 16bit
    sample_rate: 48000

# --- DISPLAY DRIVER -----------------------------------------------------------
display:
  - platform: mipi_dsi
    id: main_display
    model: JC1060P470
    update_interval: never
    auto_clear_enabled: false
    reset_pin:
      number: GPIO05
    hsync_pulse_width: 20
    rotation: ${rotate_display}
    pages: !include ../display_pages.yaml
1 Like

Hello everyone, i purchased a [ ESP32P4 + ESP32-C6 Development Board 4.3 Inch Display 480*800 IPS Capacitive Touch Screen 32MB PSRAM WiFi 6 Bluetooth 5] from AliExpress and finding a way to use it with esphome. My question is can I use ESPHome builder [.yaml] to integrate with my homeassistant? If yes, I would appreciate if you point me to the right direction. Thank you

it’s interresting that the schematics show a es7210, but the board configuration guition supplied for xiaozhi they don’t use it, also tried using 0x32 and it does not change, still works and error in logs gone. so i think we could just remove that component.

touch seems to work with both 0x14 and 0x5D

and touch reset is GPIO22 not 23. interrupt is GPIO21 but none of them is needed for touch to work.

1 Like