Joy It 3.2 (Waveshare clone) display not working

Hi everyone,

I have two zynthians (OZINE :innocent:), unfortunately, only one is functional and I can’t manage to get the other one working with my Joy-it display, which is - I think - a clone of the waveshare 3.2b. I saw in a thread that someone had an issue with this display, and that the “waveshare 3.2b” option in the hardware set up of the webconf was working, however, it didn’t help me solve my issue.

An overview of my zynthians hardware (both are with the latest Aruk-Buster image, then updated)

Raspberry Pi4, 4go
Hifiberry DAC+ADC
Zynaptik (homemade, encoder and midi parts only)
generic hdmi display (5"), wired on the HDMI port, and powered by usb from the rpi
“Custom kit” and " MCP23017_ENCODERS" wiring, “Generic HDMI display”
This one works great

Raspberry Pi4, 4go
Hifiberry DAC+
All-in-One circuit from official kit
Joy-It 3.2 wired with the ribbon cable
“Custom kit” and " MCP23017_ENCODERS" wiring, “Waveshare 3.2b”
This one does not work.

The Joy-it screen lights on (dark light, not white) when the rpi boots, then, it shuts completely down (no light) after few seconds, which to me corresponds when zynthian is up to run. As long as the screen is plugged, the webconf charges indefinitely and can’t be reached. As soon as I unplug the screen, webconf is working, showing my zynthian’s caracteristics. The GPIO expander is not recognized at first, but if I refresh the page, the GPIO expander is recognized as MCP23008 (not as MCP23017, as it should). Here the screenshot of the webconf:

I tried to plug the screen directly on top of the Rpi+hifiberry, and it works. Zynthian menus are displayed, however the touch is not well calibrated. When plugged in, I tried the different waveshare 3.2 versions for the display set up, and none of them worked.

I have a TFT 2.8 touch shield for rpi v2.1 that I got from the zynthian outlet, I tried with it, changing the display set up to TFT2.8 resistive (i also tried with capacitive), and same symptoms happen, screens lights on then shuts down like the Joy-It, and webconf only accessible when display unplugged. I also tried both Joy-it and TFT2.8 displays with all possible combinations of the hifiberry cards cards and all-in-one/custom zynaptik circuit, with no luck, symptoms are always the same. When I use the 5" HMDI display, all combinations are working.

It seems to be a conflict between some pins, but I don’t understand, since the all-in-one/zynaptik was made especially to avoid those issues by using pins unused by displays and sound cards. I also made a new ribbon cable, to avoid doubts coming from a loose contact, and always checked that the display was wired properly (pin 1 to pin 1 of the rpi…), and it didn’t solve anything.

Am I missing something ? I have the feeling I am making a very obvious mistake that lies right in front of my nose, but can’t find it !

Thanks for reading until there :slightly_smiling_face:

And since it is my first post (hopefully the next one will be in the successful build section!), I would like to warmly thank Jofemodo and all the people that make zynthian exists and always getting better and better !!

1 Like

My original Waveshare 32b works with an mcp23008 and that special w32 wiring.
I never tested it with an 23017.
You might post traces

Have you googled waveshare32 and pi4 issues?

I’ve got screens working by starting with a raspbian build and no encoders or audio cards and seeing if that an be configured…

i’ve attached my process notes from mucking around and getting a XPT2046 based touchscreen.

LCD Installation

XPT2046

![|294x393](file:///tmp/lu8077dbgksx.tmp/lu8077dbgktj_tmp_6f22ad84953ab2de.jpg) https://ozzmaker.com/piscreen-driver-install-instructions-2/

https://www.raspberrypi.org/forums/viewtopic.php?t=143581

pi@raspberrypi ~ $ sudo apt-get install fbi
pi@raspberrypi ~ $ wget https://ozzmaker.com/piscreen/image-test.gif
pi@raspberrypi ~ $ sudo fbi -noverbose -T 1 -a -d /dev/fb1 image-test.gif

export FRAMEBUFFER=/dev/fb1
sudo startx &
pi@raspberrypi:~/LCD-show $ cat /etc/os-release
PRETTY_NAME=“Raspbian GNU/Linux 10 (buster)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“10”
VERSION=“10 (buster)”
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL=“http://www.raspbian.org/
SUPPORT_URL=“http://www.raspbian.org/RaspbianForums
BUG_REPORT_URL=“http://www.raspbian.org/RaspbianBugs
/usr/share/X11/xorg.conf.d/99-fbturbo.conf
#This is a minimal sample config file, which can be copied to
#/etc/X11/xorg.conf in order to make the Xorg server pick up
#and load xf86-video-fbturbo driver installed in the system.
#When troubleshooting, check /var/log/Xorg.0.log for the debugging
#output and error messages.

#Run “man fbturbo” to get additional information about the extra
#configuration options for tuning the driver.
Section “Device”
Identifier “Allwinner A10/A13 FBDEV”
Driver “fbturbo”
Option “fbdev” “/dev/fb1”
Option “SwapbuffersWait” “true”
EndSection

/boot/config.txt

#Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18
#Additional overlays and parameters are documented /boot/overlays/README
#Enable audio (loads snd_bcm2835)
dtparam=audio=on
[pi4]
#Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
[all]
#dtoverlay=vc4-fkms-v3d
dtoverlay=piscreen,rotate=90
export DISPLAY=:0.0
/etc/X11/xorg.conf.d/99-calibration.conf
GNU nano 3.2 /etc/X11/xorg.conf.d/99-calibration.conf
Section “InputClass”
Identifier “calibration”
MatchProduct “ADS7846 Touchscreen”
Option “Calibration” “3853 170 288 3796”
Option “SwapAxes” “1”
EndSection

So far the touchscreen top and bottom is inverted.

Adding the terminal to the screen . . .
Enable Console on PiScreen

To move the console from the HDMI/RCA to PiScreen you have to updated /boot/cmdline.txt

1. Backup cmdline.txt

pi@raspberrypi ~ $ cp /boot/cmdline.txt ~/cmdline.txt

2. Update cmdline.txt

pi@raspberrypi ~ $ sudo nano /boot/cmdline.txt

Add the text below to the end of the first line. Not on a new line as this will not work.
Rotate will rotate the console on PiScreen. Rotate can be 0, 1, 2 or 3.

fbcon=map:10 fbcon=rotate:2 fbcon=font:ProFont6x11
pi@raspberrypi:~ $ ls -l /dev/input/event*
crw-rw---- 1 root input 13, 64 Feb 1 15:47 /dev/input/event0
pi@raspberrypi:~ $ cat /proc/bus/input/devices
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name=“ADS7846 Touchscreen”
P: Phys=spi0.1/input0
S: Sysfs=/devices/platform/soc/3f204000.spi/spi_master/spi0/spi0.1/input/input0
U: Uniq=
H: Handlers=mouse0 event0
B: PROP=0
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=1000003

modern X11 like what is on Buster should work without any custom configuration. Do you have something strange in /etc/X11/xorg.conf of in /etc/X11/xorg.conf.d/*? If so, please try removing it.

It would also be useful to know more about your graphics setup. Install inxi (if you don’t already have it), then run and post the output of the following:

Code:
inxi --graphics
08022020
Burned zynthian to 32G
loaded to 3B+ with above screen.
With HDMI monitor sonnected continually reboots.
![|531x398](file:///tmp/lu8077dbgksx.tmp/lu8077dbgktj_tmp_149a555cf361dbc3.jpg)

Justthe touchscreen boots but webconf available.
Left right on touchscreen swapped.
Zynscreen 3.5(v1)
(Power connector at top)
Left right on touchscreen swapped.
dtoverlay=piscreen2r-notouch,rotate=270
dtoverlay=ads7846,
speed=2000000,
cs=1,
penirq=17,
penirq_pull=2,
swapxy=1,
xohms=100,
pmax=255
![|643x401](file:///tmp/lu8077dbgksx.tmp/lu8077dbgktj_tmp_12fb9e0068772776.jpg)
PiScreen 3.5 (V1)

(Power connector at top)
Left right on touchscreen swapped.

dtoverlay=piscreen,speed=16000000,rotate=90
PiScreen 3.5 (V1)
(Power connector at top)
Left right on touchscreen swapped.
dtoverlay=piscreen,speed=16000000,rotate=0
Width=320
height=480
dev/ fb1
![|643x401](file:///tmp/lu8077dbgksx.tmp/lu8077dbgktj_tmp_12fb9e0068772776.jpg) dtoverlay=piscreen,speed=16000000,rotate=90
To try to reorientate the touchscreen . . .

With the @rod_amaral help, I finally got sucess on LCD configuration (and how to disable the built-in mic from audioinjector).

To disable the audioinjector microphone, I’ve followed these steps:

  1. alsamixer
  2. F5
  3. Navigate to MIC Option and press space.

To enable the audioinjector RCA inputs, I follow these steps:

  1. alsamixer
  2. F5
  3. Enable L/R CAPTURE to LINE and change INPUT Mux to Line In.

To configure the touchscreen, I’ve followed these steps:

  1. apt-get install -y xinput-calibrator (to download/install the touchscreen calibrator)
  2. Create a file calibrate.sh with the content:
    #!/bin/sh
    xinput_calibrator -v
  3. chmod +x calibrate.sh (to make it executable)
  4. systemctl stop zynthian (stop zynthian)
  5. startx ./calibrate.sh (start the calibrator)
  6. Touch the four points on the screen
  7. Update the 99-calibration.conf with the result of calibrator run
    Section “InputClass”
    Identifier “calibration”
    MatchProduct “ADS7846 Touchscreen”
    Option “MinX” “3868”
    Option “MaxX” “63578”
    Option “MinY” “61610”
    Option “MaxY” “2901”
    Option “SwapXY” “0” # unless it was already set to 1
    Option “InvertX” “0” # unless it was already set
    Option “InvertY” “0” # unless it was already set
    Option “TransformationMatrix” “-1 0 1 0 1 0 0 0 1”
    EndSection

At end, I’ve changed the LCD to PiScreen 3.5 V1 on the webconf.

My results …

With the @rod_amaral help, I finally got sucess on LCD configuration (and how to disable the built-in mic from audioinjector).

To disable the audioinjector microphone, I’ve followed these steps:

  1. alsamixer
  2. F5
  3. Navigate to MIC Option and press space.

To enable the audioinjector RCA inputs, I follow these steps:

  1. alsamixer
  2. F5
  3. Enable L/R CAPTURE to LINE and change INPUT Mux to Line In.

To configure the touchscreen, I’ve followed these steps:

  1. apt-get install -y xinput-calibrator (to download/install the touchscreen calibrator)
  2. Create a file calibrate.sh with the content:
    #!/bin/sh
    xinput_calibrator -v
  3. chmod +x calibrate.sh (to make it executable)
  4. systemctl stop zynthian (stop zynthian)
  5. startx ./calibrate.sh (start the calibrator)
  6. Touch the four points on the screen
  7. Update the 99-calibration.conf with the result of calibrator run
    Section “InputClass”
    Identifier “calibration”
    MatchProduct “ADS7846 Touchscreen”
    Option “MinX” “3868”
    Option “MaxX” “63578”
    Option “MinY” “61610”
    Option “MaxY” “2901”
    Option “SwapXY” “0” # unless it was already set to 1
    Option “InvertX” “0” # unless it was already set
    Option “InvertY” “0” # unless it was already set
    Option “TransformationMatrix” “-1 0 1 0 1 0 0 0 1”
    EndSection

At end, I’ve changed the LCD to PiScreen 3.5 V1 on the webconf.

$ xinput list

$ xinput list-props “ADS7846 Touchscreen”

This is coordinate transformation matrix that transform from input coordinate(x, y, z) to output coordinate(X, Y, Z).

⎡1 0 0 ⎤
⎜0 1 0 ⎥
⎣0 0 1 ⎦

ON this setup we need to swap x & y . . .

in case of swapping x and y,

  ⎡ 0 1 0 ⎤ 
  ⎜ 1 0 0 ⎥ 
  ⎣ 0 0 1 ⎦ 

Option “TransformationMatrix” “0 1 0 1 0 0 0 0 1”


My results . . .

Section "InputClass"

Identifier "calibration"

MatchProduct "ADS7846 Touchscreen"
Option "MinX" "48452"
Option "MaxX" "49134"
Option "MinY" "22198"
Option "MaxY" "22107"
Option "SwapXY" "1" # unless it was already set to 1
Option "InvertX" "0" # unless it was already set
Option "InvertY" "0" # unless it was already set
`Option
"TransformationMatrix" "0 1 0 1 0 0 0 0 1"`
EndSection
1 Like

Thanks a lot for your answers. Before I upgraded to Rpi4, I had a Rpi 3B+ with the Gorgona image, and the issue was the same. I guess the issue might come from using 23017 chip. The wiring I use is the one from the all-in-one circuit, I haven’t tried the special w32 wiring. I will try the w32 wiring and try to follow Wyleu’s method, although I am new to this and might need some time :sweat_smile:

Thanks a lot for the help

The w32 is only needed when you use a mcp23008.
You don’t need it.