Quick and dirty “Magic” detector
This was a quick and dirty project I threw together quickly because I was about to run my first Dungeons and Dragons (DnD) game and wanted something people hadn’t seen before. This is essentially a wifi controlled LED cube, except in the shape of a cylinder rather than a cube.
The circuit is a little odd, the ESP32 didn’t have enough GPIO to do all the LEDs I wanted so I used some I2C to GPIO expander chips (TCA9554PW) I had lying around to get more GPIOs. This worked but it does put some limitations on the design as the speed I can turn LEDs on/off is affected by the I2C write speed. There were a few other issues with it, first it was supposed to have two “Walls” of LEDs (inner and outer) however i vastly overestimated my ability to do tight soldering and joining component legs in free air with the tight space constraints was just beyond me (so i just left it as a single “Wall”). It's also possible that the gate resistors I put on the BJTs (and I didn't optimize the BJTs selection for low gate capacitance) are affecting the turn on speed as they are driven by the TCA9554PW which might have some issues with sinking current quickly. On the plus side I had all the parts at home so I only needed to order the PCBs which only took a few days as it's a 2 layer board and pretty small.
On the software side i used the freeRTOS system to simply things, the esp32 has 2 cores (well 3 technically) so i put the wifi stuff/webserver in one core (device acts as a wifi access point and hosts a single website) as a single task, and then the other core runs two tasks, one which just pulls user inputs from the webserver core, and another task which handles implementing the LED pattern.
ATM it just displays 4 hardwired patterns and you can select the speed at which is runs through them with a very simple website.