I settled on the ESP32 Mini for this project:
- It has a much smaller form factor than the canonical ESP32 dev board, yet have a good number of pins exposed through its double-row header layout.
- It is one of the cheaper ESP32 dev boards. I got mine for ~A$6 (including shipping) on AliExpress.
Generating Tick Pulses using the ULP
The platformio.ini file looks like this:
Here's the test code:
The 2 pins assigned to emit the tick pulses are GPIO25 and GPIO27. The ULP code generates 60 tick pulses (30 on each pin, 40ms pulse width) and stops. Since this is exactly 1 minute, it allows me to easily check if there are any missed ticks. The pulses are fed into the diode bridge in the ESPCLOCK3 circuit, and makes the analog clock tick as expected.
Using the current meter, the current draw was determined to be 2.62mA.
Next, I used a precision side cutter to remove the red power LED that is always illuminated when power is applied and cannot be turned off.
So we are off to a good start! The power consumption is on par with the ~1.2mA drawn on the ESPCLOCK3, which I am sure can be reduced further through optimization.
Some observations about ULP programming
- I_END() only ends the RTC timer. It does not stop the ULP code. To do that, it needs to be followed by a I_HALT() command.
Jut for fun..
I connected the circuit to the sweeping clock that I modded previously, and modified the code slightly to pulse 16 times a second (8 pulses on each pin, 32ms pulse width, spaced 62.5ms apart).
The power draw is measured to be a whooping 14.7mA!