Embedded Microcontroller
In order to receive and process messages received from the data broker service and translate those messages into clock hand movements, an embedded computing system is needed. Several primary design elements were needed for the embedded computing system.
- Communication with the Adafruit IO data broker
- Processing event messages to create specific clock actions
- Controlling clock hand movements
Research
In selecting approaches for embedded computing, I considered different potential options.
My Earlier Fab Academy Assignments
There were many earlier Fab Academy assignments that were directly applicable to the microcontroller setup, and were considerations for the embedded computing setup.
- Embedded Programming - I simulated XIAO ESP32C3 for WiFi communication. In addition, simulated XIAO ESP32C3 for button input and LED output.
- Electronics Design - I designed a PCB development board for XIAO ESP32C3 using KiCad
- Electronics Production - I produced a PCB development board for XIAO ESP32C3 using the earlier KiCad PCB design, Mods for toolpath generation, and Roland SRM-20 Mill for PCB milling. Soldered the development board components to the milled PCB to create the functional development board - XIAO ESP32C3 (microcontroller), pushbutton input, LED output, and breakout headers for XIAO ESP32C3 pins.
- Input Devices - I used XIAO ESP32C3 development board that I produced for button input, as well as photosensor input.
- Output Devices - I used the XIAO ESP32C3 development board that I produced for LED output and for servo motor control.
- Embedded Networking and Communication - I used the XIAO ESP32C3 development board that I produced for (group) I2C communication and (individual) Bluetooth BLE communication with a secondary embedded computing board (Arduino Uno R4 WiFi).
- Mechanical Design, Machine Design - I used an Arduino UNO microcontroller board with CNC shield and motor driver chips to control stepper motors for actuating the drawing machine.
- Interface and Application Programming - I used the XIAO ESP32C3 development board that I produced for connecting to WiFi and creating an embedded web server and web socket server.
What Others Have Done Beforehand
In considering potential clock case designs, I also reviewed the hand designs used in some of the previous related projects. Overall, designs incorporated a primary device for communication and a secondary device for motor control.
| Project | Embedded Computing |
|---|---|
| Modern Weasley Clock | ESP8266 (data broker communication), ATtiny 1614 (motor control) |
| Weasley Clock | Raspberry Pi (data broker communication and motor control) |
| Where'sLy Clock Project | ESP8266 (data broker communication), x2 Arduino ATMEGA328P-MU 328P Mini (motor control) |
| Magic-Clock | NodeMCU (data broker communication), Arduino Pro Mini (motor control) |
Locus Pocus Embedded Computing Design
I selected an embedded computing design that followed the general breakdown of one primary device (communication and event processing) and one secondary device (controlling clock hand movements).
Primary Application Controller - XIAO ESP32C3 Development Board
Having had extensive experience with the XIAO ESP32C3 development board that I had designed and produced in earlier Fab Academy assignments, it was a straightfoward choice to use that board as the primary device for Locus Pocus. I was able to draw upon previous assignemnt experience with the communication capabilities of my XIAO ESP32C3 board - both for WiFi (for communicating with the Adafruit IO data broker) and for Bluetooth BLE and I2C communication for working with the secondary device.
The Locus Pocus primary controller board was designed in the Fab Academy Electronics Design assignment.

XIAO ESP32C3 Development Board - KiCad Schematic Design

XIAO ESP32C3 Development Board - KiCad PCB Design
The Locus Pocus primary controller board was produced in the Fab Academy Electronics Production assignment.

XIAO ESP32C3 Development Board - Milled PCB

XIAO ESP32C3 Development Board - Completed Board with Soldered Components
Secondary Motor Controller - Arduino UNO R4 WiFi
For the secondary, motor control device, I chose to use an Arduino UNO R4 WiFi board. This was largely a practical consideration, given time constraints. But it also followed the guidance in previous Embedded Networking and Communication assignment, where a secondary board could be a commercial board if the primary was of our own design. In addition, the Locus Pocus clockwork component was essentially a Mechanical Design, Machine Design activity. As such, this secondary selection as part of the clockwork component also followed the guidance in the Mechanical Design, Machine Design week, where any board including commercial boards could be used for actuation and automation.
Application Programming
For embedded computing application programming, a different application design was needed for each of the primary / secondary embedded computing components. The application programming for each of the microcontrollers is presented on separate pages focused on the application coding, as follows:
- Locus Pocus Application Code for Primary Application Control - Communication with the Adafruit IO data broker, processing event messages to create specific clock actions
- Locus Pocus Application Code for Secondary Clockwork Control- Controlling clock hand movements