Simple zynthian board



AdditionnAl parts are needed:

  • wm8731 board14.00€ shipping incl
  • or pcm5102a board, 3.50€ shipping incl
  • 3.5 inch SPI display, 12.50€ shipping incl
  • Step down converter, 1,50€ shipping incl
  • 4 rotary encoders, 4 dip switches 6mm, 2x20 pins female header (tall enough so that board can fit above USB ports), 1x11 pins female header for the wm8731 solution or, 1x6 + 1x4 pins male header for the pcm5102a solution => less than 10€
  • I’ve just ordered 5 boards to jlcpcb for 30€ (using a coupon and with the cheapest shipping method) => 5€ per board
    So the total cost without the RBPI is around 50€ (with the wm8731 board).

For the price, you’ve got:

  • stereo in or mic in, stereo out
  • the RBPI powered through the GPIO with a protection circuit
  • ability to adjust the power voltage
  • ability to power the synth with a battery pack
  • a compact sized synth: without box 10x10x4 cm

Well that’s in theory :sweat_smile: :sweat_smile:
It’s my first design sent to production, so fingers are already crossed :zynface:

Additionnal notes:

  • I didn’t tested the wm8731 board yet because crystal and the two capacitors for the oscillator circuit are missing.
  • The display doesn’t work out of the box with its ili9488 driver chip. I had to use some frame buffer copy trick.
  • touch function hasn’t been tested yet (lack of time)
  • when using the pcm5102a board, the digital signals and also the power have to be wired with real wires
7 Likes

@le51 looks great keep us updated!

This cheap Chinese board variation was probably intended for a system with an external clock source, which is a big pain. Is there a connection to pin 25 ( XTI/MCLK) ?.

(The AudioInjector boards using that chip have a 12Mhz crystal hidden on the bottom, one example application shows 22pf capacitors. There’s a fair chance the Audio Injector driver option could work with your board with added crystal.

From page 31 pf the chip specs:
"For applications where a component other than the WM8731/L will generate the reference clock, the external system can be applied directly through the XTI/MCLK input pin with no software configuration necessary. "

The AudioInjector board with Raspberry Pi header is about the same price as the Aliexpress part, if you arrange free shipping on Amazon.

— A couple of headless demo connection guides, which could provide one starting test setup

Quick guide running naked headless Zynthian, setting up CC buttons to cycle through presets.

No, there are footprints on the board for soldering the oscillator and the two capacitors.

Another aliexpress seller photo with the crystal is omitted, you can see one of the Y1 pins has an external connect trace for applications that are using an external clock, at least this one gives a visible warning of the absence of a crystal in the PCB photo.

I hope the 12Mhz crystaand 22pf capacitors info helps you finish your board…

HELLO FRIEND, I’M TESTING fb_ili9488, COULD YOU TELL ME HOW YOU MADE IT WORK?

HELLO @techouselgs - I can’t tell if your question was for @le51 specifically and the simple Zynthian board and maybe you need more info on:

above or just a general fb_ili9488 framebuffer driver question. If intended generally, we’d still need some detail on what problem you are experiencing, here’s a general guide to “How to use fb_ili9488 on a Raspberry Pi running Zynthian” from Gemini. Also there is no need or benefit to using all caps - it comes across as SHOUTING to me.

How to use fb_ili9488 on a Raspberry Pi running Zynthian

While a standard Zynthian build prioritizes officially supported displays for stability, it is possible to use an fb_ili9488 display by manually configuring the system files. The process involves modifying the Raspberry Pi’s display configuration and the Zynthian service files to direct the graphical output to the correct framebuffer device.

Step 1: Connect your hardware

  • Connect the ili9488 SPI display to your Raspberry Pi’s GPIO pins. The specific pinout will depend on your screen model, so consult its documentation.

  • The ili9488’s MISO pin does not always go tristate, so do not connect it if you have other SPI devices on the same bus.

  • For the initial setup, connect your Raspberry Pi to a standard HDMI monitor and a USB keyboard so you can access the command line.

Step 2: Install and configure the fbtft drivers

The fbtft framework is often used for ili9488 displays, although it’s deprecated in recent Raspberry Pi OS versions.

  1. Enable SPI using sudo raspi-config.

  2. Edit sudo nano /etc/modules-load.d/fbtft.conf and add the following modules: spi-bcm2835, flexfb, and fbtft_device.

  3. Configure fbtft options by creating sudo nano /etc/modprobe.d/fbtft.conf. The options, including flexfb and fbtft_device parameters like width, height, bus width, and initialization sequence (init), will depend on your specific display model. You may need to consult your screen’s original driver scripts for the correct init sequence.

Step 3: Redirect the framebuffer

To use the ili9488 as the primary display, redirect the output from /dev/fb0 to /dev/fb1.

  1. Edit cmdline.txt (located at /boot/firmware/cmdline.txt or /boot/cmdline.txt) and add fbcon=map:10 fbcon=font:VGA8x8 before rootwait.

  2. Create /usr/share/X11/xorg.conf.d/99-fbdev.conf and add a “Device” section with the Driver “fbdev” and Option “fbdev” “/dev/fb1”.

  3. Modify Zynthian service files (/etc/systemd/system/zynthian.service, /zynthian/zynthian-sys/sbin/splash-screen.sh, and /zynthian/zynthian-ui/zynthian.sh) to change references from /dev/fb0 to /dev/fb1.

Step 4: Configure the display in Zynthian

  1. Access the Zynthian WebConf at http://zynthian.local.

  2. Under Hardware > Kit, set the Kit option to Custom.

  3. In Hardware > Display, select Generic HDMI Display to indicate a custom setup.

  4. For touchscreen calibration, stop the Zynthian service (sudo systemctl stop zynthian), install xinput-calibrator, run the calibrator, add the values to /etc/X11/xorg.conf.d/99calibration.conf, and restart the Zynthian service (sudo systemctl start zynthian).

Additional considerations

  • Be mindful of driver compatibility, as Zynthian uses a specific Raspberry Pi OS version, and older fbtft configurations might not work.

  • A framebuffer copy (fbcp) is a possible but more complex workaround for display issues.

  • The Zynthian Discourse forums are a valuable resource for custom hardware support.

could you explain more about A framebuffer copy (fbcp) is a possible but more complex workaround for display issues.

A framebuffer copy (FBCP) is a technique that clones the content of one framebuffer, typically the primary display, to a second display’s framebuffer. It is considered a complex workaround because it is not a native or optimized solution but rather a manual process for forcing output to a display that lacks direct hardware support.

How FBCP works

A framebuffer is a region of RAM that holds the pixel data for the image displayed on a screen. A typical system uses a single framebuffer for its main display (e.g., HDMI). FBCP works by performing the following actions:

  1. A program (often fbcp or a variant like fbcp-ili9341 for Raspberry Pi) is run continuously in the background.

  2. It takes a snapshot of the primary display’s framebuffer, for example, /dev/fb0.

  3. It then copies that pixel data to the framebuffer of the secondary display, such as /dev/fb1.

  4. This process is repeated very quickly to give the appearance of a live video feed on the second screen.

For low-speed connections like SPI (Serial Peripheral Interface), optimized FBCP implementations improve performance by only copying the pixels that have changed since the last frame, rather than the entire screen.

Why FBCP is a complex workaround

FBCP is used when the secondary display—often a low-resolution display connected via a slow, serial interface like SPI—cannot be natively driven by the graphics processing unit (GPU). The complexity arises from several factors:

  • Performance overhead: The continuous process of reading, copying, and writing an entire screen’s worth of pixel data is processor-intensive. This can put a significant load on the CPU, potentially impacting the performance of other running applications.

  • Potential for bugs: If a program changes the parameters of the primary framebuffer while FBCP is running, it can cause the FBCP process to “choke,” resulting in a frozen display.

  • Resolution and scaling issues: The secondary display’s resolution is often different from the primary display’s. FBCP may need to scale the image, which can result in black borders or uneven, blurry scaling.

  • Software and driver dependencies: FBCP often relies on older or legacy display software stacks. For example, some Raspberry Pi versions with newer operating systems have deprecated the legacy drivers that FBCP uses, making it no longer a viable option on those systems.

  • Synchronization challenges: As a manual copy process, FBCP can struggle to keep up with high-motion content, leading to a lower effective refresh rate on the secondary display and potential screen tearing.

When FBCP is used

Despite its complexity, FBCP can solve specific problems, particularly with small, inexpensive displays on embedded devices like the Raspberry Pi:

  • Adding a small secondary screen: For a Raspberry Pi or similar device, FBCP can be used to drive a low-resolution SPI display that is too small to be a primary monitor, such as for a console or control panel.

  • Using incompatible display types: It allows a device to output to a display that lacks a native driver, effectively duplicating the output from a compatible display type (like HDMI).

Thank you my friend, sorry, it wasn’t my intention to use capital letters, I use the translator and I didn’t even realize it was in uppercase, but thank you very much for the answer, I will apply this knowledge.

1 Like