Electronic – LED display flickering when connected to an ESP8266

7segmentdisplayesp8266

I'm building a simple clock using an ESP8266 chip and a 7 segment LED display which is driven by a HT16K33 chip. The ESP8266 uses 3.3V, the display can handle 5V. I want to use a simple USB cable as a power supply, so I've added a voltage regulator to get the correct voltage.

This all works fine, The problem I have is that the display is flickering when everything is connected to a single power source. During testing I connected the display and the ESP8266 to different power supplies and the flickering was gone. But obviously I don't want to use two USB cables for a single device.

What can I do to prevent the flickering? Since the problem doesn't exist with two power supplies I ruled out a software problem on the ESP8266 (I've written a relatively simple Arduino sketch using existing libraries for a connection to the WiFi, handling the time including NTP and updating the display). The display is updated once a second by the code, but the flickering is distinct higher.

enter image description here

Some more specs, as requested in the comments:

The voltage regulator is an LF33CV (TO220). It outputs up to 500 mA

The ESP8266 module is one of the ESP-01 type. I measured ~70 mA while it is running.

The HT16K33 module is an Adafruit LED Matrix Backpack. It is controlled by the ESP8266 via I2C. It draws around 20mA (including the LEDs).

For the electrolytic capacitor C3 I tried:

  • 47 µF
  • 100 µF

for the other capacitors C1 and C2:

  • 0.01 µF
  • 0.1 µF

It is difficult for me to find out what capacitors I need for this.

Both capacitors are as close to the modules as possible on the breadboard.

Best Answer

Your schematic design has some missing components. you need to have input EMC filters close to USB connector. you also need a 2.2uF electrolytic decoupler capacitor at the regulator output and a 100nF low ESR cap at its input for stability. Unlike it seems easy but Voltage regulators must be designed with lots of care otherwise they could be unstable. (look at related Steve Sandler's articles)

But the flicker effect that you have on the LEDs is very similar to unwanted EMI effect at the gate of MOSFET transistors inside the LED driver.

The wi-fi chip could be the source of generated EMI too therefore it need an EMI low pass filter for its power rail.

The LED driver also need bypass capacitors close to its VDD/VSS rail.

Moreover the bread board is not a good environment for solving EMC problems. you have to make a PCB and then If the problem still exist, try to solve it. Normally with a good PCB most of EMC problems will never appeared and multilayer PCBs are ten times better than single/two layer ones in tolerating EMC.

With direct power injection method you can find the most vulnerable point of your circuit and especially if the flicker repeated, you can find your weakness point and design a cure for it.