Raspberry PI Zero with Qualia displays | ugh log 2
2025-04-23 01:35:15
"Compensation for displays which use overscan is tricky under Wayland, and we haven’t quite got it working yet, so this has been removed for now. The vast majority of displays nowadays don’t need it, but we will be putting it back when we have worked out how best to do it"
So wayland doesn't allow for overscan settings, which sucks because both displays I'd like to use have about 80 pixels that they're not showing.
Raspberry PI Zero with Qualia displays | log ugh
2025-04-22 13:19:32
My LED driver was not correct, I burned the backlight of my display when accidentally hitting the memory button of my power supply, sending 60V to my Display woops.
Took me forever to put two code examples for the PIOs together. Now I'm back to using the Qualia board to send the commands first and then see if the Raspberry is sending the right info at least. no dice yet, might have to connect the reset pin.
I'm thinking about designing V2 of the board now, before endulging all of this.
Raspberry PI Zero with Qualia displays | Current State
2025-04-01 11:25:57
Since Bookworm — the new version of Raspberry Pi OS, things have changed with setting up external displays that are connected through the GPIO pins of the 40pin header. You can connect displays in an RGB565, RGB666 or RGB888 mode and there are presets for generic displays that don't need special setups. Thankfully it's easy enough to read the documentation of the Raspberry PI boards and follow through to make the PI zero yell RGB on all pins I chose. Just be aware if you're googling that you might run into outdated tutorials!
The HD371001C40 display that I chose from adafruit needs to be initialised through a 9-Bit SPI interface. In my first glance over existing code I thought I would be able to just copy the init code array of the adafruit examples and send that through a real SPI port of the RP2040 and be done with that.
Sadly it is not that easy. Adafruit is using a special routine to send the codes through a shift register that's connected through I2C. In that function it also reads certain codes from the array and figures out which byte is a command and which one is a data packet. So only sending these additional packets through an 8Bit port just doesn't make sense to the display at all, as the display is expecting the first bit to be a command / data flag.
From here I could go two routes: I can try bitbanging 9 bit SPI from the Raspberry Pi directly, like the cool kids from pimoroni are doing - or I could start learning a bit about the PIOs of the RP2040 that I have slapped on my test board and do it that way. I chose PIOs. Because that sounded more fun.
After turning to some AIs, I finally understood why the people who are telling me how cool and helpful LLMs are for coding, are also the people who seem to be always frustrated about their code not working and not figuring out why exactly.
Since the 9-bit SPI feels like making three LEDs blink in different speeds, I should come a long way with the tutorials I have spotted so far.
Raspberry PI Zero with Qualia displays | PCB for testing display
2025-03-19 15:22:41
Mysterio SAO | final boards are in
2025-02-18 19:00:17
Thin PCBs are in and I'm super happy - so glad since I've ordered 50 of them lel
Mysterio SAO | Results are in
2025-01-21 10:27:54
I have to admit I'm a bit underwhelmed - it feels too obvious now and the skull itsell is still blurry. After a bit of brain storming on mastodon, I'm now at the following stack up:
4 Layer boards, but thinner than 1.6mm. The skull details can be on bottom layer or the one after the FR-4. I will probably remove the reflection from the board, moast of the time it looks like a hello kitty bow and isn't brighter than anything around it. Just realised that I don't like the highlights on the diamond scarf brooches. Wondering about adding green LEDs behind them.
The light bleeding is gone thanks to the 4L with two layers basically being just copper.
Programming the CH32V003
The hackaday badge can be used as a programmer for the CH32V003, it even came with a little board that featured some LEDs and the chip. After some group-effort debugging we fixed the python script in the discord and were able to let the LEDs blink differently.
So from V1 to V2 I changed the chip to feature the CH32, forcing me to try compiling code for the chip next. Thankfully there's ch32v003fun by CNLohr! I followed the instructions and installed the RISC-V toolchain threw brew first. I skipped all the probably helpful programmer tips and guides, since I already had my trusty badge.
The "fun" examples for the chip included code for neopixels, but the chosen pin was not available on the 8 Pin version.
#define NR_LEDS 160constint pin_number = 6;
#define BITS_PER_LED 24#define TIME_SLICES_PER_BIT 4 // 4 is more reliable, 3 has less overhead.constint gpio_pin = PD6;
GPIO_TypeDef * const gpio_port = GPIOD;
Further down in the example there's a hidden PD0 that I replaced with "gpio_pin" later - I should turn that into a pull request [edit: done]. For whatever reason I don't know yet: when I change the LED number to 4, it gets very flickery, probably some timing that scales with the number that doesn't like a reduction to 2.5%
I also don't quite understand why there's a pin_number and a gpio_pin variable.
Production of 3rd version of the board will start on February 5th - thanks to purple stopmask, ENIG plating and 0.8mm thickness. I've ordered 50 and will populate as many as I have chips and LEDs for it for Hackaday Europe!