🌈 ESP32-S3 Rainbow: ZX Spectrum Emulator Board! Get it on Crowd Supply →
View All Posts
read
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi

I finally got the PCBs submitted to PCBWay for manufacture. You can watch a detailed video of the design process with KiCad here:


Or read about it below:

It’s always a bit stressful hitting that final submit button - You never know what you might have messed up.

But generally, everything can be fixed with a bodge wire or two.

I’ve already realised that there are some nice improvements that I could make to the layout and I’ve also made a small mistake which I think is fixable

We’ve got a bit of time before the boards arrive - the good folk at PCBWay are taking a well-deserved break for the Chinese new year.

So I thought it might be interesting to go through how I ended up with my final design and the decisions I’ve made along the way.

First off, what are we building?

I came across these LED filaments a while back and I thought it might be fun to build a large seven-segment clock with them.

LED Filaments

The filaments need quite a high voltage to drive them - I’ve got a video that shows how this is built which you can watch here:

Power Supply Video

I designed some nice seven-segment modules - another video details the build of these and then got to thinking about how to drive them.

Seven Segments

There are of course chips that will drive seven-segment displays - it’s a pretty common requirement (e.g. the MAX6954 chip).

MAX6954

However, they don’t generally support driving segments at 50 volts so I decided to build my own.

As usual, the heart of the system is an ESP32.

There are a couple of things that I wanted to achieve in my design.

  • I wanted to minimise the number of pins being used - the ESP32 does have a lot of pins, but it’s surprising how quickly you run out.
  • I also wanted to minimise the load on my power supply. We’re boosting our 5v supply up to 50v with a homemade circuit - so I really wanted to minimise the power draw on it and avoid any magic smoke being released.

My initial thought was to drive the segments one at a time.

With 3 pins and a demultiplexer, we can potentially control 8 segments.

I also found a nice driver chip - a TBC62783 - that could handle up to 50V on its output.

My plan was to use this to drive each segment’s positive anode and have a common cathode for each digit switched by an n-channel MOSFET.

This would let us connect 4-digits.

LED Filaments

We’d then cycle through each segment and each digit in turn.

Do this fast enough and it looks like they are on all the time.

I prototyped this circuit up with a very rough seven segment display and it worked pretty well.

LED Segment

In total, this circuit would need 4 lines to drive the n-channel MOSFETs, and 4 lines to drive the multiplexer - 3 for the address and 1 for the output enable.

After a bit of playing with the step-up power supply, I realised that it could actually deliver enough current to light up 7 segments without getting too hot.

I also realised that the driver chip could deliver up to 150mA per channel - which would be more than enough to light up 7 segments.

At the same time, I came across someone doing a similar project which pointed me in the direction of the TPIC6595 power shift register.

These are 8-bit shift registers with open-drain outputs that can sink up to 250mA.

This prompted my new circuit idea with the LED filaments having a common anode driven by the TBC62783 and the cathodes switch by the TPIC6595.

This circuit is quite nice as it supports lighting up multiple segments at once.

Or if we want to go back to only having one segment lit at once we just change the pattern in the shift register.

Each digit is multiplexed by the TBC62783.

We’d need 4 lines for the digits and 5 lines for the shift register.

Multiplexed

I was ready to pull the trigger on this circuit and then I came across the 3v LED filaments.

3v Filament

These would let me do away with my high voltage power supply and they are also almost twice as big!

Unfortunately, each filament can take up to 300mA.

Even limiting this to the 250mA the power shift register can take - our high side driver would need to supply almost 2amps to light 7 segments at the same time - which is way too high.

So, here’s my final circuit.

Final Circuit

I’ve done away with the digit multiplexing completely and now have 4 power shift registers with each individual segment connected to an output of the shift register.

The anodes of the digits are all common and connected to either the 5v line or the high voltage line depending on which LED filament we are using.

To drive the shift register we just need 5 pins on the ESP32 and we could probably get away with 4 if we didn’t use the enable pin and just had the outputs enabled all the time.

If I need to switch back to multiplexing the LED filaments I can simply load up the shift register with just one output turned on.

We can easily shift out 28 bits quickly enough that you won’t see any flickering.

The only thing I realised quite late on during the schematic design is that these shift registers don’t work at 3.3v - so I need to have some level shifters on the outputs of the ESP32.

I’m already using a TC4469 to drive the power supply MOSFET so I’ve just used a couple of these chips to do the level shifting.

So, I’ve got my PCBs in for manufacture - I’m pretty sure that my seven segment displays are all wired up correctly.

I’ve made these pretty flexible and each segment can be driven independently or you can common up the anodes or cathodes.

There are two versions - one for the smaller high voltage filaments and one for the larger 3v filaments.

On my mainboard I’ve allowed for both sets of digits - so I can have a play with each type and we can see which one we like best.

PCB

So, what mistakes have I made?

I think I’ve made at least 3.

The first mistake I’ve made is on the enable line of the shift registers.

Should be a pull up!

I wanted to make sure that the outputs were not enabled while everything was starting up, so I put a pull-down resistor on the enable line.

The problem is that the enable line is active low - so a pull-down resistor will enable all the outputs.

It should have been a pull-up resistor.

I’ve also put the resistor on the output of the TC4469, it should have been put on the input so that while the ESP32 is starting up the input to the TC4469 is in a known state.

I’ll probably just leave this resistor off when I solder things up and we’ll see what happens.

The second mistake I made was in the layout of the board.

I started off with the shift registers along the top of the board and I was going to put the ESP32 and power supply circuitry along here as well.

I then decided that I wanted some touchpads on the board so needed to make it bigger.

I moved the ESP32 and the power circuit down next to the touchpads.

But I left the shift registers at the top of the board.

This means that the signals to the shift registers have to take quite a roundabout route from the level shifters.

I should have moved the shift register down to below the digits and close to the level shifters.

The third mistake I made was that I added current limiting resistors to both the small and the large digit segments.

I’m not planning on running the 3 volts and the high voltage led filaments at the same time, so I could have used the same resistors for both sets of filaments.

The high voltage current is mostly limited by the output voltage we set with the trimpot - so we can pretty much use any resistor value - they are really only being used to balance the LED filaments.

Anyway, the boards are now being manufactured - they should come through in about 10 days or so and we’ll see soon see what else I got wrong then.

Related Posts

More fun and games with high voltage - Hey everyone! I know it's been a while since the last video, but things have been crazy busy with shipping off the ESP32 Rainbows. Lately, I've been diving into the world of high voltage again. My last endeavor with a high voltage board led to some gnarly waveforms and flickering LEDs, so I tested with beefy resistors but wasn't thrilled with the results. Fortunately, I've found some nixie tube driver boards that work wonders with LEDs, providing smooth output with little ripple. Still, playing with the old boards has its thrill—hello, 787 volts and some wild sparks! Stay tuned for more high voltage adventures!
Danger danger high voltage - In this blog post, I explore my experiments with high-voltage circuits, trying to light up LED filaments salvaged from broken light bulbs. Despite some explosive mishaps with capacitors and MOSFETs, I decided to try a proper DC-DC converter. Unfortunately, the one I got turned out to be faulty, highlighting some rough soldering and component failures. I've ordered replacements and hope to successfully light the filaments soon. Follow along on my troubleshooting journey with plenty of learning curves!
A Potentially Explosive Error - Just received the new PCBs for the ESP32-TV project and they're looking sharp with only a tiny resistor tweak needed. But I discovered a sneaky, undocumented resistor causing a conflict between the ESP32 and USB2244 over the USB connection. Fixed that, but there's a bigger issue lurking in the design - check the schematic in the video and see if you can spot it before I reveal the explosive mistake!
More Updates on the ZX Spectrum Board - I'm gearing up for production with some updates to our prototype, including switching to a 4-layer board to improve EMI, and refining USB power filtering. Check out the video for a deep dive into our battery charger and an exciting expansion port for potential HDMI output. The main goal now is to get our boards ready for manufacturing and shipping through Crowd Supply!
Minimalist Microcontroller: Building a Bare-Bones Dev Board - In a thrilling DIY endeavour, I attempted to build the most minimalist ESP32 dev board possible. Diving deep into the schematic of the ESP32 S3 WROOM module, I chopped out the non-essentials and whittled our needs down to bare bones. The experiment saw me juggling USB data lines and voltage regulators, waving goodbye to an array of capacitors and connectors and boldly embracing the simplicity of direct connections. Despite a few hitches, the miniature Frankenboard came alive, proving that sometimes less is more...at least in the world of microcontrollers.

Related Videos

787 Volts From a $2 Board! - Let's have some fun with high voltage experiments and LED filaments! I've been dabbling with 300-400 volts, testing out capacitor charging, and saving some flickery Philips bulbs. With a new ESP32 Rainbow project in the works and a nifty minimalist ESP32 S3 board arriving soon, there's lots going on. Despite some high ripple issues and quirky sounds from the modules, swapping to an old-school surface mount board provides smooth performance with almost no ripple. Join me as I explore the limits and potential projects with these LEDs. And for a shocking tidbit at the end, explore some high voltage calculations—it's electrifying!
Easy S3 PCB and Schematic - it’s really simple. - In this video, I explore the functions of my newly arrived little boards - essentially a PCB that an esp32 S3 room module can be connected to. I put the board's voltage regulator, battery charger, and a 3 watt class D amplifier to the test, and damn, they work perfectly! I even use breadboards, connecting them together to facilitate a wider workspace. I gave the pcbs a spin, conducting sanity checks to ensure full functionality. With a successful battery charge and impressive voltage measurements, my PCB's are up to the challenge. I also dabble in some circuit jargon, explaining schematics, amplifiers, battery chargers and a clever mosfet approach. To top it off, I solder on an ESP32 module and prove that yes, it actually works. Stay tuned for a following video where we'll work with a speaker and display!
ESP32-S3 - Which Pins Are Safe To Use? - In this video, I've decided to dive deep into the ESP32-S3, a module ruling my lab recently due to its plug-in-and-play functionality, and the flexibility offered by its GPIO matrix. However, working with it requires vigilance, especially with regard to the strapping pins and USB data pins, among others. Discovering such quirks, I've encountered unexpected values, short glitches and the occasional code crash. To help you avoid these bumps, I've documented everything I've learned on my GitHub repo, where I'm inviting you, my fellow makers and engineers, to contribute your valuable experiences and findings. After a minor hiccup with my ESP32-TV, expect an updated PCB design, courtesy of PCBWay. Explore the ESP32-S3 with me, and let's unravel its secrets together, one pull request at a time.
I Feel the Need – The Need for Hardware SPI… - An insightful iteration on my Arduino Nano esp32 video. Despite criticism regarding the slow display update speed, a solution was found thanks to the helpful fellow, Nick. Turns out, the software SPI was the cause of the issue. A quick tweak in the code and voilà, we've got ourselves an SPI clock whizzing at 80 megahertz. Quite the speed boost for just a few lines of code alteration!
ESP32-TV Version 3 - Is it done? - In today's project update, I'm excited to share that my ESP32-TV boards, fresh from PCBWay, are operating flawlessly! We've successfully dealt with the USB2244 conflict with the ESP32, and the battery charging issue is now a thing of the past. We've also made some awesome additions like a microphone to our board. The real MVP though, is the USB2244 chip that’s given us significantly improved read/write speeds - making it perfect for handling video files. Next on the agenda, figuring out a solution for the non-standard display connector. As ever, there’s progress, there’s problems, and there's David Bowie animated gifs!
HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
Blog Logo

Chris Greening


Published

> Image

atomic14

A collection of slightly mad projects, instructive/educational videos, and generally interesting stuff. Building projects around the Arduino and ESP32 platforms - we'll be exploring AI, Computer Vision, Audio, 3D Printing - it may get a bit eclectic...

View All Posts