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

Learn about the final design decisions and potential mistakes made in the process of creating a large seven-segment clock using LED filaments and an ESP32. Explore the different circuit ideas, designs, and the final PCB ready for manufacturing.

Related Content
Transcript

[0:00] I finally got the PCBs submitted to PCBWay for manufacture.
[0:04] It’s always a bit stressful hitting that final submit button.
[0:07] You never know what you might have messed up.
[0:09] But generally, everything can be fixed with a bodge wire or two.
[0:12] I’ve already realised that there are some nice improvements that I could make to the
[0:16] layout and I’ve also made a small mistake which I think is fixable - I’ll talk about
[0:20] those at the end of the video.
[0:21] We’ve got a bit of time before the boards arrive - the good folk at PCBWay are taking
[0:26] a well-deserved break for the Chinese new year.
[0:28] So I thought it might be interesting to go through how I ended up with my final design
[0:32] and the decisions I’ve made along the way.
[0:34] I’d be interested to know what you think - so let me know in the comments.
[0:37] And if you like this video then give it a big thumbs up.
[0:40] And if you don’t like this video - well, YouTube is taking away the dislike button so I guess
[0:45] you also have to give it a big thumbs up.
[0:47] First off, what are we actually building?
[0:49] Regular viewers probably know, but I’m guessing everyone else is in the dark.
[0:53] I came across these LED filaments a while back and I thought it might be fun to build
[0:57] a large seven-segment clock with them.
[1:00] The filaments need quite a high voltage to drive them - I’ve got a video on building
[1:04] a power supply to drive them that should be up in the top right corner now.
[1:08] I designed some nice seven-segment modules and then got to thinking about how to drive
[1:12] them.
[1:13] There are of course chips that will drive seven-segment displays - it’s a pretty common
[1:17] requirement.
[1:18] However, they don’t generally support driving segments at 50 volts so I decided to build
[1:23] my own.
[1:24] As usual, the heart of the system is an ESP32.
[1:27] There are a couple of things that I wanted to achieve in my design.
[1:30] I wanted to minimise the number of pins being used - the ESP32 does have a lot of pins,
[1:36] but it’s surprising how quickly you run out.
[1:38] I also wanted to minimise the load on my power supply.
[1:42] We’re boosting our 5v supply up to 50v with a homemade circuit - so I really wanted to
[1:47] minimise the power draw on it and avoid any magic smoke being released.
[1:52] My initial thought was to drive the segments one at a time.
[1:55] With 3 pins and a demultiplexer, we can potentially control 8 segments.
[2:00] I also found a nice driver chip a TBC62783 that could handle up to 50V on its output.
[2:08] My plan was to use this to drive each segment’s positive anode and have a common cathode for
[2:13] each digit switched by an n-channel MOSFET.
[2:16] This would let us connect 4 digits.
[2:18] We’d then cycle through each segment and each digit in turn.
[2:22] Do this fast enough and it looks like they are on all the time.
[2:26] I prototyped this circuit up with a very rough seven segment display and it worked pretty
[2:31] well.
[2:32] In total, this circuit would need 4 lines to drive the n-channel MOSFETs, and 4 lines
[2:36] to drive the multiplexer - 3 for the address and 1 for the output enable.
[2:41] After a bit of playing with the step-up power supply, I realised that it could actually
[2:45] deliver enough current to light up 7 segments without getting too hot.
[2:50] I also realised that the driver chip could deliver up to 150mA per channel - which would
[2:55] be more than enough to light up 7 segments.
[2:58] At the same time, I came across someone doing a similar project which pointed me in the
[3:03] direction of the TPIC6595 power shift register.
[3:08] These are 8-bit shift registers with open-drain outputs that can sink up to 250mA.
[3:15] This prompted my new circuit idea with the LED filaments having a common anode driven
[3:20] by the TBC62783 and the cathodes switch by the TPIC6595.
[3:27] This circuit is quite nice as it supports lighting up multiple segments at once.
[3:32] Or if we want to go back to only having one segment lit at once we just change the pattern
[3:36] in the shift register.
[3:38] Each digit is multiplexed by the TBC62783.
[3:42] We’d need 4 lines for the digits and 5 lines for the shift register.
[3:47] I was ready to pull the trigger on this circuit and then I came across the 3v LED filaments.
[3:52] These would let me do away with my high voltage power supply and they are also almost twice
[3:57] as big!
[3:59] Unfortunately, each filament can take up to 300mA.
[4:02] Even limiting this to the 250mA the power shift register can take - our high side driver
[4:08] would need to supply almost 2amps to light 7 segments at the same time - which is way
[4:13] too high.
[4:14] So, here’s my final circuit.
[4:17] I’ve done away with the digit multiplexing completely and now have 4 power shift registers
[4:22] with each individual segment connected to an output of the shift register.
[4:26] The anodes of the digits are all common and connected to either the 5v line or the high
[4:31] voltage line depending on which LED filament we are using.
[4:35] To drive the shift register we just need 5 pins on the ESP32 and we could probably get
[4:40] away with 4 if we didn’t use the enable pin and just had the outputs enabled all the time.
[4:46] If I need to switch back to multiplexing the LED filaments I can simply load up the shift
[4:51] register with just one output turned on.
[4:53] We can easily shift out 28 bits quickly enough that you won’t see any flickering.
[4:58] The only thing I realised quite late on during the schematic design is that these shift registers
[5:03] don’t work at 3.3v - so I need to have some level shifters on the outputs of the ESP32.
[5:09] I’m already using a TC4469 to drive the power supply MOSFET so I’ve just used a couple of
[5:15] these chips to do the level shifting.
[5:17] So, I’ve got my PCBs in for manufacture - I’m pretty sure that my seven segment displays
[5:22] are all wired up correctly.
[5:24] I’ve made these pretty flexible and each segment can be driven independently or you can common
[5:29] up the anodes or cathodes.
[5:30] There are two versions - one for the smaller high voltage filaments and one for the larger
[5:35] 3v filaments.
[5:37] On my mainboard I’ve allowed for both sets of digits - so I can have a play with each
[5:41] type and we can see which one we like best.
[5:43] So, what mistakes have I made?
[5:46] I think I’ve made at least 3.
[5:48] The first mistake I’ve made is on the enable line of the shift registers.
[5:52] I wanted to make sure that the outputs were not enabled while everything was starting
[5:56] up, so I put a pull-down resistor on the enable line.
[5:59] The problem is that the enable line is active low - so a pull-down resistor will enable
[6:04] all the outputs.
[6:05] It should have been a pull-up resistor.
[6:08] I’ve also put the resistor on the output of the TC4469, it should have been put on the
[6:13] input so that while the ESP32 is starting up the input to the TC4469 is in a known state.
[6:20] I’ll probably just leave this resistor off when I solder things up and we’ll see what happens.
[6:26] The second mistake I made was in the layout of the board.
[6:28] I started off with the shift registers along the top of the board and I was going to put
[6:32] the ESP32 and power supply circuitry along here as well.
[6:36] I then decided that I wanted some touchpads on the board so needed to make it bigger.
[6:40] I moved the ESP32 and the power circuit down next to the touchpads.
[6:44] But I left the shift registers at the top of the board.
[6:47] This means that the signals to the shift registers have to take quite a roundabout route from
[6:51] the level shifters.
[6:52] I should have moved the shift register down to below the digits and close to the level
[6:56] shifters.
[6:58] The third mistake I made was that I added current limiting resistors to both the small
[7:02] and the large digit segments.
[7:04] I’m not planning on running the 3 volts and the high voltage led filaments at the same
[7:08] time, so I could have used the same resistors for both sets of filaments.
[7:13] The high voltage current is mostly limited by the output voltage we set with the trimpot
[7:17] - so we can pretty much use any resistor value - they are really only being used to balance
[7:22] the LED filaments.
[7:24] Anyway, the boards are now being manufactured - they should come through in about 10 days
[7:28] or so and we’ll see soon see what else I got wrong then.


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

> 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