Step right up, folks, for the grand unveiling of my shiny new crystal balls – yes, crystal balls. I've transformed ordinary AliExpress pieces into juggernauts of light and color, all powered by the splendid WLED software. Dive deep with me into the nitty-gritty of the underlying electronics and come face-to-face with the true beauty of voltage measurements (I promise, it's more riveting than it sounds). While the original circuit boards from AliExpress might not thrill, my beefed-up version invites gasps of wonder, with microphone-controlled LEDs throwing light in a million dazzling ways. Join me as I chronicle my journey through schematic revisions, components selection, and technological trickery – in short, the wild ride that has led to this epic macOS light show.
[0:01] Look at my shiny crystal balls! Aren’t they beautiful? Don’t you just want to pick
[0:06] them up and touch them?
[0:07] Ok, that’s getting a bit weird with the whole balls thing.
[0:11] I got these crystal globes from AliExpress. I’ve put a link in the description.
[0:15] The out of the box behaviour is pretty boring so I’ve done a bit of work and created versions
[0:20] that are controllable by the amazing WLED software.
[0:24] At the moment I’ve just got them running in a colour loop effect.
[0:27] But I’ve also got a microphone. So what I can do is I can switch into the microphone
[0:32] effect.
[0:33] So let me just find that.
[0:35] So there we go. I’ve got it switched into a user mod that now responds to the microphone
[0:42] input.
[0:43] So that’s really pretty cool.
[0:44] Yeah, pretty good.
[0:46] So very nice bits of kit.
[0:48] But let’s dive into the electronics that’s underneath it all and makes it all work.
[0:54] So let’s have a quick look at the original PCB that came from AliExpress.
[0:59] It’s pretty simple.
[1:00] We’ve got three resistors and six LEDs and it’s got a simple on/off switch.
[1:07] So, not particularly exciting.
[1:09] The power comes directly from the USB so we’ve got the plus and the minus coming on here.
[1:14] Let’s just check the voltage across the LEDs.
[1:19] So I’ve got my multimeter here and let’s just try and poke in here and see what the voltage
[1:27] is across the LEDs.
[1:30] So I can actually get in.
[1:34] Okay, so it’s just under three volts and now we’ve got our five volts coming in from the
[1:39] USB.
[1:40] Let’s just check that.
[1:42] Yeah.
[1:43] 4.6 volts.
[1:44] Interesting.
[1:45] So that says to me there’s quite a lot of voltage drop across this cable.
[1:51] Let’s bring in the fairly simple schematic.
[1:56] So we’ve got 47 ohm resistors and there’s three of them, so 47 divided by three.
[2:03] So that’s about 15.7 ohms and we’ve got three volts across the LEDs.
[2:15] So then we’ve got two volts across here, which means the current should be two divided by
[2:22] 15.7.
[2:27] So about 127 milliamps.
[2:33] So then we’ve got six LEDs.
[2:37] So it’s about 20 milliamps per LED.
[2:41] Let’s just double check our calculations.
[2:44] So I’ve assumed five volts going across here, but when we measured it, it was quite a bit
[2:48] lower.
[2:49] So let’s just pull in the USB tester and see what the current actually is.
[2:59] So just plug this in, plug that in.
[3:06] So we’re actually getting about 0.11 amps, so 110 milliamps.
[3:16] So it’s not drawing very much current at all.
[3:18] I think this cable might be a bit shonky because the voltage we’re measuring on the actual
[3:25] PCB is a lot lower so let’s just zoom out and measure that again.
[3:29] So according to our USB tester, we’re getting pretty much bang on five, five volts from
[3:35] our supply.
[3:36] Let’s measure what we’re actually seeing on the PCB, 4.5.
[3:45] So yes, I’m going to say this cable, pretty rubbish.
[3:53] So that’s the fairly simple schematic for their PCB.
[3:56] Let’s have a look at what I’ve done.
[3:59] So here we go, quite a bit more stuff.
[4:03] So the main thing is the ESP32-S3 Mini.
[4:08] So that lets us use the amazing WLED software, which is fantastic if you’ve not tried it.
[4:15] Give it a go.
[4:16] We’ve got a microphone so we can do audio responsive LEDs.
[4:21] So that makes that pretty flashy.
[4:24] For driving the LEDs, I’ve used this driver chip.
[4:29] That was inspired from the LED curtains that I took apart a while back.
[4:33] Now you can just take one of these LEDs and use it as a sacrificial driver, but these
[4:38] tend to need five volts to come in.
[4:40] So I’ve got a nice driver chip, just to level shift the output from the ESP32, which is
[4:46] a 3.3 volt device.
[4:49] The other interesting things, there’s a jumper here.
[4:52] So I’ve designed this board to be fairly flexible.
[4:55] So the LEDs can either be powered directly from the bus power coming in, so from the
[5:01] USB or battery, or you can power them from an external input.
[5:05] So I can drive quite a few LEDs from this board if I give them their own separate power
[5:10] supply.
[5:11] There’s a battery charger, so a TP4057, so we can make this all battery powered.
[5:17] So that’s pretty good.
[5:19] What else do we have?
[5:20] Oh yes, the power path.
[5:23] So let’s actually look at that in detail because this is quite an interesting circuit.
[5:28] So this is currently one of my favorite circuits.
[5:31] It’s really quite clever.
[5:32] So let’s imagine we have a battery connected, so say that’s 4.2 volts, and we’re connecting
[5:39] five volts from USB.
[5:41] So we have five volts coming in, it comes into the gate of this PMOS transistor, and
[5:49] it turns off this transistor because 4.2 volts, which is flowing through the transistor, is
[5:54] lower than five volts, and our gate source threshold isn’t crossed.
[5:58] So this PMOS turns off, and that blocks the battery from supplying any voltage.
[6:05] Our USB voltage carries on, comes through this diode, comes up here, and it flows into
[6:12] our voltage regulator, which then comes out as 3.3 volts to power our system.
[6:19] So when we connect five volts to USB, it’s blocked from the battery, doesn’t touch it.
[6:25] It could be very dangerous to connect five volts directly to the battery, and that doesn’t
[6:28] happen because it’s blocked by both this PMOS and by the body diode of the PMOS.
[6:36] So that’s great.
[6:38] What about the other case where we’re using battery power and USB’s not connected?
[6:46] So let’s draw that case.
[6:48] So in this situation, we may have naught volts on the USB, or it may not be connected at
[6:56] all.
[6:57] And we’ve got 4.2 volts say on our battery.
[7:04] So what happens, USB’s not connected, it’s pulled down by this 100k resistor.
[7:12] So this now gets pulled down to zero volts.
[7:17] That goes onto our gate of our PMOS.
[7:21] Now at the same time, we have our battery voltage, that comes through here, and it goes
[7:27] through the body diode of the FET, and comes to here.
[7:32] So now our gate source, our gate is lower than our source, so the MOSFET turns on, and
[7:38] the battery voltage comes straight through the MOSFET and comes through here, supplies
[7:44] our 3.3 volt regulator, which then supplies 3.3 volts to our system.
[7:51] Now it can’t flow back into the USB, because we have this diode here, which blocks it flowing
[7:58] back.
[7:59] So even if our USB is connected and just not powering anything, the battery voltage can’t
[8:04] flow back into the USB, it just flows into our 3.3 volt regulator.
[8:09] So it’s really quite a clever circuit, I really like it.
[8:13] So as always, I got my boards manufactured by the guys at PCBWay, because I really didn’t
[8:18] fancy trying to do some of these tiny components.
[8:21] In particular, these LED indicators, I mean that’s just way too small for me to bother
[8:28] with.
[8:29] Life’s just too short.
[8:30] But it’s a great job, everything’s soldered on nicely, including the USB socket, which
[8:35] I always struggle with.
[8:36] So yeah, thanks PCBWay, worthwhile getting the assembly done if you’re willing to spend
[8:41] the money on it.
[8:42] So saves a lot of effort and time.
[8:48] So the very last thing I wanted to check is the actual current draw of my PCB.
[8:54] So I’ve set the LEDs to maximum brightness, so I’ve just put in 255.255.255 for the RGB.
[9:03] We’re drawing around 230 to 240 milliamps.
[9:09] So that’s not too bad given that the ESP32 is using Wi-Fi and we’re driving the LEDs
[9:16] at maximum brightness.
[9:18] So that’s not bad at all.
[9:20] The last thing is I do have these little indicator LEDs for showing battery charging.
[9:26] So let me bring in the one that has a battery, so I can show that.
[9:32] So let’s plug in here, and our battery is fully charged, so it’s showing green.
[9:45] Actually, my battery was turned off.
[9:50] So I’ve turned the battery on, so I’ve just connected the battery using this switch.
[9:56] And now it’s charging the battery, the indicator light turns red.
[10:01] When it’s fully charged, it will turn green.
[10:04] And there’s also another LED in this tri-color LED, so we can also do the blink sketch if
[10:11] we really want to.
[10:12] And of course, the other thing to point out is when we’re charging the battery, obviously
[10:18] the current draw is quite a bit more.
[10:21] So that’s about 400 milliamps, so maybe 420 milliamps when charging the battery.
[10:29] So that’s pretty cool.
[10:31] I have got WLEDs wired up, so if I push one of the buttons, which one is it, that should
[10:39] turn off the LEDs.
[10:40] So now we’ve gone down to just 300 milliamps, and that’s charging the battery.
[10:46] And the ESP32 is listening on Wi-Fi through instructions from the WLED software.
[10:55] So the last thing to talk about is the base.
[10:59] From AliExpress, they come with this fairly basic wooden base.
[11:03] It’s quite nice, you could actually sand this down and varnish it and get quite a nice decorative
[11:10] piece.
[11:11] But I’ve ended up 3D printing a bunch of bases.
[11:15] I’ve used this silk PLA.
[11:19] It’s come out kind of okay, I’m not completely sure about the color.
[11:23] What I really wanted to do was try some nickel plating, but unfortunately my attempts didn’t
[11:30] really work that well.
[11:32] So this is an attempt at nickel plating a 3D print.
[11:36] If you hop over to the extras channel, you’ll see a complete video on that and my experiments.
[11:42] It kind of worked, but not well enough to really use, although it doesn’t look that
[11:48] bad.
[11:49] What do you think?
[11:50] Let me know in the comments.
[11:52] Anyway, that’s this project kind of done.