sn-lab / MouseGoggles

A dual-SPI display mouse VR headset, powered by Raspberry Pi and the Godot game engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LCD Screens: ST7789 vs. GC9307 and alibaba supplier

monrky opened this issue · comments

Hello! This is not an "issue" but unfortunately one of our LCD screens is broken and I was just wondering whether you had a recommended Alibaba supplier? We had ordered from Toppop Shenzhen Electronic Co. previously but were curious whether you had another supplier you liked.

Thanks in advance (and sorry for all the messages!)

All of my orders have been fulfilled by Shenzhen Toppop as well. Broken screens are rare in my experience, and the few times I've had them it could have been my own handling since they are a bit delicate outside of a case.

Gotcha! Thank you! Shenzhen Toppop said they only have a different version now with a different driver ic. Do you know if this one would work with the rest of the setup?
SPEC-TT108RRN11A-V0.pdf
ST7789V2_SPEC_V1.0.pdf

Oh interesting. Is this the one they sent you, or were you working with the GC9307 version that they used to ship? This new one should definitely work with the VR setup, but will probably need a few changes to the driver, which I can get started on. ST7789 is I think a more common IC anyway so it shouldn't be too hard to implement.

Thank you so much!!!!!! (This is different from the one they originally sent me.)

Hi @misaacson01 , I've received the new LCD screens, and it seems as though the display is upside-down and hue inverted, and the dimensions are just slightly different. I was wondering if there's a simple fix I could make, or if I need to use a different display driver. Thank you again!

This is the ST7789? If so, yes probably a new driver is the best way to start.

Yes, it's the ST7789. Thank you so much -- I really appreciate your help with all of this. I will watch out for an updated driver!

@monrky I've added a new driver folder to test on the st7789v2 display.

To test this new driver, if you've already installed the old driver, check out step 5 of operating the system if you need to shut down the old driver. If the driver doesn't start up when you restart the Pi, maybe this step isn't necessary.

To install the new driver, follow the software installation instructions as normal, but for step 3, instead of line 4 cd mouseVRheadset/fbcp-ili9341, enter cd mouseVRheadset/fbcp-st7789 instead. The rest stays the same, including line 9 sudo ./fbcp-ili9341

After it's installed, operating it is similar, except the folder has changed to cd mouseVRheadset/fbcp-st7789/build.

This is just a test driver for now, it very well may not work. If it doesn't, let me know what new error messages you see. If you don't see any error messages but the display still doesn't look right, one thing you can try before I look into it deeper is by shutting down the driver, changing a specific couple lines of code, and reinstalling it with the above directions. The lines of code will be in the st7789v2.cpp file: On line 37, change #if 0 to #if 1. And on line 98, change #if 1 to #if 0. Then, rebuild/reinstall the driver and try again.

Let me know how it goes or if anything's unclear!

This is good progress, but I don't immediately know how to fix it completely. What exactly is the difference between the 2 photos? It sounds like the 1st photo (with 1/2 static) is with the new driver, after you edited the st7789v2.cpp file? And this one does update?

And then the 2nd photo is with the old driver (in fbcp-il.i9341/build), which doesn't have the 1/2 static, but also does not update?

[sorry I accidentally deleted my original comment; here it is again..]

Thank you!! I tried with the fbcp-st7789 driver (along with updating the raspberry pi config.txt file to dtoverlay=vc4-fkms-v3d instead of vc4-kms-v3d) -- this did not work at all (the terminal still says "All initialized, now running main loop...", but the LCD displays did not update).

I then changed the lines you suggested in the st7789v2.cpp file, and the displays are updating but half the pixels aren't updating (staticky), and I think the position is also off -- here's a photo if it helps. (I switched out the LCD screens and PCB for new ones, and the problem persists.)

IMG_6305

Running the old driver seems to fix the problem with the static...

IMG_6303

To answer your question -- both photos are showing the st77989v2 LCD screens. The first photo is with the new st7789v2 driver after I updated the .cpp file. The second photo is with the old ili-9341 driver. Both update!

@monrky I just pushed an update to the st7789v2 driver for you to rebuild and try again. Not sure if it's fixed but it will be telling either way, let me know what you see!

looks much better! thank you so much -- you are amazing!

IMG_6308

Great! As for that slight apparent change of dimensions (where the scene isn't completely reaching the edges of the display), I would be very surprised if that's an actual change in the LED screen size. Could I trouble you to check whether you see this same thing with the old gc9307 displays? If you see it with the old displays, then I think this just needs a slight change to the Godot shaders.
Also, can I ask what lab you're working in? Just curious to see who's building these!

ok! just checked-- the old gc9307 displays (with the new driver) also have a slight dimensions mismatch. I'm working in the Kaye Lab at Yale -- we're all very excited about this tool and are grateful to you for sharing this project !!

My pleasure!
For that dimensions mismatch thing, it isn't making a big difference because the mouse can't quite see to the edges of the screen, but I think it's some simple mistaken change to the Godot shaders so I'll take a look at that soon.

I just realized I think the displays are still upside-down! I didn't realize until I assembled it with the 3d printed case!

Oh right! I think this might be a Godot issue, it's easy to fix there anyway (some kind of rearrangement or flipping of the viewports). I'll check on this soon. I wonder if you would see the same thing with the old displays as well.

Hi @misaacson01 just checking in on this!

@monrky I just pushed an update with Godot project V1.0, lots of little improvements in this one. All the known issues are fixed (as far as I can tell with my setup), including the upside-down views and dimension mismatch. You might also notice that some VR scenes look darker on the display than before -- we just found that mice are more comfortable when the scene isn't too bright. Let me know how it works for you!