How To Interface A GC9A01 Round Display With Arduino & ESP32 - Voltlog #349

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
i'm gonna start this video with a question do you agree that technological advancement as well as market demand for technology is making our hobby nicer and more accessible by providing us with parts and tools that are easier to get and also cheaper to get now than ever before that's how i feel as a hobbyist when today i can get my hands on parts and tools that just a few years ago were inaccessible were hard to get or expensive or too technically challenging to use at hobby level here is one example this is a 1.3 inch 240 by 240 pixel round display and it even comes installed on its own little breakout board which features a 0.1 inch header for easy connection with dupont wires you can get such a module for cheap on aliexpress and i'll place a link to this in the description below so you can check it out and now the interface to this display is not some complex and hard to implement lvds interface or hdmi it's just a simple spi interface that you are probably already familiar with so join me in this video to learn how to control this type of display module and i'll show you how to connect them to your favorite development board and what libraries you can use to show pictures and animations on such display modules so the applications where this display could be used obviously involve any round shaped devices you could build which include a diy smartwatch you could build a thermostat you can load some googly eyes on there you could build some nice looking gauges for i don't know rpm speedometers maybe a voltmeter and i would be interested to hear in the comments what else you think you can build with such a round display as you can see on a close-up image although certainly not the dax guts when it comes to display technology there are probably modules with twice the pixel density on the market but this little guy looks very well even better in real life it's an ips panel 240 by 240 pixels resolution but when you consider the 1.3 inch size it's quite a high pixel density so pretty much any graphics loaded onto this will look good and will have uh more than enough brightness let me also give you a few specs and numbers about this display the part number for the controller is gc9801 and it runs at 3.3 volts so make sure you don't connect this to a 5 volt arduino this particular display does not feature touch sensing but i'm pretty sure there are other models out there which also feature touch the data sheet claims viewing angles of 80 degrees all around but i feel like it's more than that in reality i mean if you check it out from the side it still looks very good the colors look good the brightness is still good even from a very shallow angle the brightness of this is 400 candelas per square meter and the maximum current is 40 milliamps and i quite like the controller chip integrated in this display because it doesn't require much external circuitry everything is included inside the driver what you see on the back is just a bypass cap and a transistor so you can pwm the backlight to control the brightness and then there is the interface which is just spi so you should be able to drive this with pretty much any microcontroller that has enough memory but before we get to the part where i show you how to drive this display with an arduino let me introduce the sponsor of this video pcbway.com they offer professional pcbs manufactured at affordable pricing with fast turnaround times they also offer complete turnkey solutions where they handle everything from sourcing the parts to assembling and testing your boards before shipping so you can get them fully assembled check out their website link below and order your pcbs so you've got one of these display modules and now you want to drive them well the obvious choice in this case would be arduino because of the availability of ready-made libraries but ultimately you can drive this with any microcontroller if you're willing to do a bit of work to port the display driver at the time of this video i know lvgl has support for the gc9801 but i decided to go with the arduino gfx library so start by installing this library then you'll get access to the examples provided by the library and as far as hardware goes i would suggest going with something that has a little more memory and processing power like i did here with the esp32 this is a very simple esp32 development board with some minimal supporting hardware i'm gonna walk you through the process of loading the hello world example and getting that running first load the hello world example and start editing if you went with an esp32 board like i did you'll need to select the spi interface to use next you need to select the controller in this case is the gc9801 so uncomment this line and comment the other declarations below so only one display driver is selected the default connections to the lcd should be made according to this diagram so pause the video here and follow this diagram for connections you can play with these later but for now use the default connections to get you started because these are already declared inside the code next upload the code and the display should spring to life with the hello world example now we are ready for trying out something nicer how about loading an image well for loading an image we can use a trick for storing the image inside the esp32 module flash memory chip which resides under this shield if you use another processor then this technique probably doesn't apply and you'll have to use a different method to load data into a flash memory if you have such a flash memory connected or maybe loaded via an sd card but for the esp32 we can use this arduino tool so start by downloading the arduino esp32 file system uploader tool from github i'll place a link to this in the description below and while we're here let's also install the jpeg deck library which will help with decoding jpeg files that we're going to be loading you'll have to restart arduino to enable all of these now you can load the example project named image viewer jpeg and the trick here is that you need to select a partition scheme which includes spiffs and this is a reserved region in the flash memory i have the option with 1.5 megabytes pips selected next inside the sketch folder you'll have to create a data folder if it doesn't already exist and inside of that place your jpeg file in this case it's called volk.jpg which is then declared in the start of our arduino sketch make the same changes to the code as shown before for selecting the driver chip as well as the spi interface to use and everything else can stay original next click the esp32 sketch data upload option under tools menu and this will take whatever is placed inside the data folder and upload it to that flash region make sure the file you are trying to upload will fit inside the reserved area of 1.5 megabytes next compile and upload the code as you would normally do and the result should be the uh jpeg image displayed on the lcd like shown here and the same technique can be used for uploading a gif file like i did here with the volt low logo just load the gif example same as before select the driver chip and the spi interface place your gif file in the data folder upload the new data to spiffs compile and upload the code and the animation should just start displaying on the module this can literally be done in less than half an hour and in includes any time needed for downloading and installing any required tools and this is where i'm grateful for living in this age and time even with all of the difficulties that we are experiencing and you might be complaining about the accessibility to parts and tools like this have never been better for hobbies like ours just imagine 10 years ago it would have been next to impossible to find such a display as a hobbyist not to mention the work it would need for writing the appropriate driver and libraries to interface it that was all for today i hope you got your display up and running after watching this video and i would be interested in hearing your thoughts in the comments below i would like to hear if you have some interesting ideas about stuff that you could be building with a round display like this if you like the video don't forget you can support the channel on patreon with as little as one dollar per month i also have a new tnd store where some of my projects are available for purchase and this will all be linked below in the description thank you for watching and i will see you next time
Info
Channel: VoltLog
Views: 90,827
Rating: undefined out of 5
Keywords: Voltlog, Voltlog Consulting, Electronics Design, GC9A01 Display, GC9A01 Round Display, GC9A01 IPS module, 1.28” Round Display, Arduino GC9A01 Library, GC9A01 Backlight Control, GC9A01 Brightness Control, GC9A01 Image Data, How to use GC9A01 display, GC9A01 GIF Animation, GC9A01 Wiring Diagram, GC9A01 ESP32 Example, GC9A01 ESP32 Code, ESP32 SPIFFS GC9A01, SPIFFS Memory Load Tool, How to upload data to SPIFFS ESP32
Id: Y0BGnHFuYBU
Channel Id: undefined
Length: 9min 28sec (568 seconds)
Published: Tue Jan 26 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.