Silicon Chip1.3in Monochrome OLED Display - October 2023 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Take mains safety seriously!
  4. Feature: The History of Electronics, Pt1 by Dr David Maddison
  5. Project: 1kW+ Class-D Amplifier, Pt1 by Allan Linton-Smith
  6. Feature: How to Photograph Electronics by Kevin Poulter
  7. Project: 2m Test Signal Generator by Andrew Woodfield, ZL2PD
  8. Review: The Linshang LS172 Colorimeter by Allan Linton-Smith
  9. Project: TQFP Programming Adaptors by Nicholas Vinen
  10. Subscriptions
  11. Project: 30V 2A Bench Supply, Mk2 - Pt2 by John Clarke
  12. Feature: 1.3in Monochrome OLED Display by Jim Rowe
  13. PartShop
  14. Serviceman's Log: Watch out - delicate repair in progress by Dave Thompson
  15. Vintage Radio: IJA Chi receiver by Ian Batty
  16. Market Centre
  17. Advertising Index
  18. Notes & Errata: Arduino LC/ESR Meter, August 2023; CD Spot Welder, March & April 2022
  19. Outer Back Cover

This is only a preview of the October 2023 issue of Silicon Chip.

You can view 37 of the 112 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • The History of Electronics, Pt1 (October 2023)
  • The History of Electronics, Pt1 (October 2023)
  • The History of Electronics, Pt2 (November 2023)
  • The History of Electronics, Pt2 (November 2023)
  • The History of Electronics, Pt3 (December 2023)
  • The History of Electronics, Pt3 (December 2023)
  • The History of Electronics, part one (January 2025)
  • The History of Electronics, part one (January 2025)
  • The History of Electronics, part two (February 2025)
  • The History of Electronics, part two (February 2025)
  • The History of Electronics, part three (March 2025)
  • The History of Electronics, part three (March 2025)
  • The History of Electronics, part four (April 2025)
  • The History of Electronics, part four (April 2025)
  • The History of Electronics, part five (May 2025)
  • The History of Electronics, part five (May 2025)
  • The History of Electronics, part six (June 2025)
  • The History of Electronics, part six (June 2025)
Items relevant to "1kW+ Class-D Amplifier, Pt1":
  • 1kW+ Mono Class-D Amplifier cutting and drilling details (Panel Artwork, Free)
Articles in this series:
  • 1kW+ Class-D Amplifier, Pt1 (October 2023)
  • 1kW+ Class-D Amplifier, Pt1 (October 2023)
  • 1kW+ Class-D Amplifier, Pt2 (November 2023)
  • 1kW+ Class-D Amplifier, Pt2 (November 2023)
Items relevant to "2m Test Signal Generator":
  • 2m FM DDS Test Generator PCB [06107231] (AUD $5.00)
  • ATtiny45V-20PU programmed for the 2m VHF FM Test Signal Generator [0610723A.HEX] (Programmed Microcontroller, AUD $10.00)
  • 3-pin 5V step-up (boost) switch-mode regulator module (Component, AUD $3.00)
  • 3-pin 5V step-down (buck) regulator module (Component, AUD $4.00)
  • Files for the 2m FM Test Generator (Software, Free)
  • 2m FM DDS Test Generator PCB pattern (PDF download) [06107231] (Free)
Items relevant to "TQFP Programming Adaptors":
  • TQFP-32 Programming Adaptor PCB [24108231] (AUD $5.00)
  • TQFP-44 Programming Adaptor PCB [24108232] (AUD $5.00)
  • TQFP-48 Programming Adaptor PCB [24108233] (AUD $5.00)
  • TQFP-64 Programming Adaptor PCB [24108234] (AUD $5.00)
  • TQFP Programming Adaptor PCB patterns (PDF download) [24108231-4] (Free)
Articles in this series:
  • PIC Programming Adaptor (September 2023)
  • PIC Programming Adaptor (September 2023)
  • TQFP Programming Adaptors (October 2023)
  • TQFP Programming Adaptors (October 2023)
Items relevant to "30V 2A Bench Supply, Mk2 - Pt2":
  • 30V 2A Bench Supply revised main PCB [04107223] (AUD $10.00)
  • 30V 2A Bench Supply front panel control PCB [04105222] (AUD $2.50)
  • INA282AIDR shunt monitor IC and 20mΩ 1W shunt resistor for 30V 2A Bench Supply (Component, AUD $10.00)
  • Mk2 30V 2A Bench Supply main PCB pattern (PDF download) [04107223] (Free)
  • 30V 2A Bench Supply front panel artwork (PDF download) (Free)
Articles in this series:
  • 30V 2A Bench Supply, Mk2 – Pt1 (September 2023)
  • 30V 2A Bench Supply, Mk2 – Pt1 (September 2023)
  • 30V 2A Bench Supply, Mk2 - Pt2 (October 2023)
  • 30V 2A Bench Supply, Mk2 - Pt2 (October 2023)
Items relevant to "1.3in Monochrome OLED Display":
  • MMBasic sample code for driving the 1.3in OLED display (Software, Free)
Articles in this series:
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • A Gesture Recognition Module (March 2022)
  • A Gesture Recognition Module (March 2022)
  • Air Quality Sensors (May 2022)
  • Air Quality Sensors (May 2022)
  • MOS Air Quality Sensors (June 2022)
  • MOS Air Quality Sensors (June 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Heart Rate Sensor Module (February 2023)
  • Heart Rate Sensor Module (February 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • VL6180X Rangefinding Module (July 2023)
  • VL6180X Rangefinding Module (July 2023)
  • pH Meter Module (September 2023)
  • pH Meter Module (September 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 1-24V USB Power Supply (October 2024)
  • 1-24V USB Power Supply (October 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)

Purchase a printed copy of this issue for $12.50.

Using Electronic Modules with Jim Rowe 1.3-inch (33mm) Monochrome OLED Display Small monochrome OLED display modules have become widely available at a low cost in the last few years. Typically these measure only about 35×33mm but offer a 128×64 pixel resolution in a few different colours, like white or blue. Their I2C serial interface means that popular microcontrollers can easily drive them. O LED (organic light-emitting diodes) are solid-state light-­ emitting devices like standard LEDs. But instead of using a regular semiconductor P-N junction to emit light when passing a current, an OLED uses a thin film of an organic compound. As a result, displays using OLEDs tend to be thinner, lighter and use significantly less energy than those using traditional LEDs. In the last 15 or so years, they have become widely used in smartphones, handheld gaming consoles and, more recently, colour TVs. Small monochrome OLED displays are also used extensively in portable electronic equipment, so they have dropped significantly in price. Among the most popular are the 1.3inch (33mm) modules, such as the one shown in the photos. We have already used these in a couple of projects, like the MultiStage Buck/Boost Charger Adaptor from October 2022 (siliconchip.au/ Article/15510). These are available from a wide range of online suppliers, including via eBay, AliExpress and Amazon, and local suppliers like Jaycar and Core Electronics. Prices vary over a pretty wide range, about $5 up to nearly $20 from overseas suppliers, or around $15 from local suppliers (plus postage, if you’re getting them delivered). We also sell them in our Online Shop for $15 + P&P ($13.50 + P&P for subscribers), with catalog codes of SC5026 (blue) and SC6511 (white). These are not the smallest OLED modules available. Another common size is 0.96in or 24.4mm diagonal, with prices slightly lower than those for the 1.3in/33mm modules. These Fig.1: the block diagram of the SH1106 and SSD1306 controllers that are typically used in both the 0.96in and 1.3in OLED modules. 82 Silicon Chip Australia's electronics magazine siliconchip.com.au generally have the same display resolution; the smaller size means those pixels are smaller. We used these in a few recent projects, like the Advanced Test Tweezers (February & March 2023; siliconchip.au/Series/396). There are also even smaller OLED modules, like those with a designated size of 0.49in/12.45mm. Those have a lower display resolution of 64×32 pixels. We used those in the original SMD Test Tweezers from the October 2021 issue (siliconchip.au/Article/15057). Inside the OLED modules The 1.3in OLED modules all use a single interface/controller and OLED driver IC, usually the SH1106 from Sino Wealth or the SSD1306 from Solomon Systech. The same controllers are used in the 0.96in modules. Fig.1 is a block diagram of the SH1106 and SSD1306 controllers. At upper left is the microcontroller (MCU) interface, which can be configured to interface with an MCU via an 8-bit 6800/8080-series parallel interface, a 3/4 wire SPI interface or an I2C serial interface. Most 1.3in and 0.96in OLED modules use the last option, I2C. Received display data is stored in the graphic display data RAM (the large block to the right of the interface), while commands are sent to the command decoder block at lower left. The display controller block at upper right uses the display data to drive the columns and segments of the OLED via the common and segment drivers shown at far right. The OLED has 64 common/column lines and 128 segment lines, matching the 128×64 pixel resolution. There are commands to update the display, turn the OLED display on or off, set the OLED addressing mode, set the column starting address, and adjust the OLED’s display contrast/ brightness (which also determines its operating current). The SH1106 and SSD1306 devices both come in very thin (0.3mm) SMD packages with over 260 contact pads. In the modules, they are mounted on the rear of the OLED screen itself. The module circuit Fig.2 is the circuit of a typical 1.3in monochrome OLED module based on the SH1106 device (those using the SSD1306 are very similar). The OLED is at upper right, with the SH1106 interface/display RAM/controller/ driver IC1 in the centre. The rest of the circuit (to the left of IC1) provides the module’s power supply and I2C input interface. Four-pin SIL header CON1 is used for both power input and the I2C interface. REG1 takes the incoming Vcc (typically around 5V) and steps it down to +3.3V to run both IC1 and the OLED. The +3.3V line also drives IC1’s reset circuit (it needs to be reset as soon as power is applied) and feeds the 4.7kW pullup resistors for the I2C interface lines, SCL and SDA. The SH1106 and the SSD1306 controllers can adopt an I2C address of either 0x78 or 0x7A, depending on the voltage applied to the DC input at pin 15. If the pin is pulled to ground (in this case, via a 4.7kW resistor), the controller adopts the 0x78 address, while if the pin is pulled up to +3.3V, it responds to the 0x7A address. That lets you run two similar OLED modules on the same I2C interface. Most of the modules are set for the 0x78 address when you get them, but Fig.2: the circuit diagram of the 1.3in OLED module with a SH1106 controller. The circuitry separate to the OLED matrix and controller is for providing power and the I2C interface. siliconchip.com.au Australia's electronics magazine October 2023  83 The rear of the 1.3in OLED module shown at twice actual size. it is relatively easy to swap the 4.7kW resistor over to the ‘pullup’ position to change the address to 0x7A if needed. Some 1.3in OLED modules have a 7-pin interface header instead of the 4-pin header shown in Fig.2. These modules allow the use of the faster SPI interface instead of the I2C interface we’re focusing on here. Now let’s focus on what is involved in driving one of these modules from an MCU like an Arduino Uno or Micromite. Connecting it to an Arduino Connecting a 1.3in OLED module to an Arduino Uno is relatively straightforward, as you can see from Fig.3. The GND and Vcc pins connect to the GND and 3.3V pins on the Arduino, while the SCL and SDA pins connect to the Arduino’s A5 (SCL) and A4 (SDA) pins, respectively. If using an Arduino Mega 2560, the arrangement is similar, but the module’s SCL pin goes to pin 21 of the 2560 and the SDA pin to the 2560’s pin 20. As for software support, if you go to the Arduino website and look at the library listings for “Display” applications (siliconchip.au/link/abl7), you will find quite a few libraries to do this job: Adafruit SSD1306, GyverOLED, OLED SSD1306-SH1106, OLED Display VGY12864L-03, ss_oled, ssd1306, ssd1306xled and U8g2. Another site (www.lcdwiki.com) offers a library called “1.3inch_IIC_ OLED_Module_SKU:MC130VX”, together with some documentation and three example sketches. All of these depend on the library U8g2, which you can download as a zip file from https://github.com/olikraus/ The three example sketches demonstrate how to draw graphics, text strings and a BMP image on the OLED, so they’re pretty informative. Screens 1 to 5 show some of the displays I was able to produce using these sketches and a blue 1.3in OLED module. Connecting it to a Micromite Connecting one of the 1.3in OLED modules to a Micromite MCU is also quite easy. Fig.4 shows the connections needed for driving the OLED module from a Micromite Plus Explore 64 (August 2016; siliconchip. au/Article/10040). Connecting the module to a Micromite Mk2 or LCD Backpack V1/V2/ V3 would be almost the same, except the module’s SCL pin would be connected to pin 17 of the Micromite and the SDA pin to pin 18. As with an Arduino, you need to install some software to let the Micromite drive the OLED module. That isn’t quite as easy as with the Arduinos, as there is no widely available Micromite OLED driver software yet. Still, because I knew that some Silicon Chip readers would want to drive an OLED module from a Micromite, I decided to try writing an MMBasic program to go through the necessary steps. Luckily, fellow Silicon Chip staff member Tim Blythman was able to offer some help, as he has done quite a bit of work with the smaller 0.96in OLED modules (which use the same SH1106 and SSD1306 chips) and is very familiar with the steps needed to drive them. Thanks to Tim’s help, despite losing some of my rapidly thinning grey hair, I was able to develop an MMBasic program that can drive one of these OLED modules from a Micromite. It demonstrates how text and simple graphics can be displayed on its screen. The ◀ Fig.3 (left): you can use this diagram to help connect a 1.3in OLED module to an Arduino Uno or similar. Fig.4 (below): how to drive the OLED module via a Micromite Plus Explore 64. You can similarly connect it to a Micromite BackPack by connecting SCL to pin 17 and SDA to pin 18. 84 Silicon Chip Australia's electronics magazine siliconchip.com.au Screens 1-6 (left-to-right, top-to-bottom): example output produced by the various test programs we downloaded or created for use with the 1.3in (33mm) OLED module. Screen 6 at lower right is from our Micromite program. program is called “OLED MODULE TEST Prog2.bas”, and the display it achieves is shown in Screen 6. It’s a pretty basic little program (no pun intended), and as it stands, it only demonstrates how the OLED module can display text and simple graphical symbols. It doesn’t let you type text in via the Micromite console and display it directly on the OLED; that would involve additional programming. That’s because the easiest way to drive these OLEDs is by setting the driver chip to Page Addressing Mode, which effectively divides the OLED screen into eight horizontal ‘pages’, each page consisting of 128 vertical segments eight pixels high. The pages are arranged vertically, with page 0 along the top of the screen, page 1 immediately below it and then the remaining pages descending until page 7 runs along the bottom of the screen, as shown on the left side of Fig.5. When the driver chip updates each page on the OLED (which it does one page at a time), it starts at the far left and displays the eight-pixel segments one after the other, moving from left to right. Each eight-pixel segment is sent in b0 to b7 order (‘LSB-first’), as shown on the right-hand side of Fig.5. This Page Addressing Mode makes it not too difficult to display lines of text; all you need to do is work out the sequence of segment bytes required to show the character or symbol you want to display, then send that sequence to the OLED controller as a sequence of single bytes. For text, it’s easiest to have a line spacing of 8 pixels, meaning the characters are around 7 pixels tall and perhaps 4-5 pixels wide. To help you do this, I have worked out the byte sequences for the upper case and lower case text characters, plus the basic numerals (0 to 9) and a reasonable number of common symbols. These are listed in a second dummy MMBasic program called “OLED MODULE textchar strings. bas”, which you can download from the Silicon Chip website along with “OLED MODULE TEST Prog2.bas”. That should allow you to write a program that can display up to eight lines of text on the screen of one of these 1.3in OLED modules. Drawing detailed graphics on the OLED screen is a bit more involved but, as the demonstration program shows how to write pixels into the OLED’s display RAM, that should provide a starting point for more advanced graphics. A reader with more programming experience might accept the challenge of creating a full display driver for these OLEDs, possibly based on the SC starting point I have provided. Fig.5: Page Addressing Mode divides the OLED into eight sections as shown. This is the easiest way to drive the OLED. siliconchip.com.au Australia's electronics magazine October 2023  85