Wyatt's Projects

Automatic Menorah - V1

The why

During Hanukkah, my wife's family places a menorah with AC-powered “flickering” lights in the front window of their home. Each day, another bulb must be screwed in manually.
As an engineer, I found it inconvenient to add another light at the end of each day of Hanukkah, so I decided to build an automatic menorah using only analog circuits rather than an MCU for timing control.

The design - clock frequency generator

Finding the best oscillator design required multiple attempts and was probably the most time-consuming part of the project.
Initially, I planned to use a low-frequency crystal oscillator and divide the frequency down using a series of D flip-flops to achieve a 24-hour period. This approach presented two major challenges:
After deciding this was not the best route, I began looking into ring oscillators with RC filters added between each stage to decrease the frequency. This approach is much more configurable than the crystal oscillator method because the RC time constants can be adjusted to change the frequency.

Based on the research I had done, this seemed like a plausible solution, so I built a 3-stage ring oscillator on a breadboard to test the timing. The results were not very good. The rising edge was extremely slow due to the long time constants, which caused transition issues and unstable oscillation.
1K Ohm 1mF 3 stage ring oscillator 1K Ohm 1mF 3 stage ring oscillator
After switching to a Schmitt trigger oscillator, the rising and falling edges became much cleaner, and the oscillation was considerably more stable compared to the ring oscillator.
8.2K Ohm 1mF Schmitt Trigger hex inverter 5V 8.2K Ohm 1mF Schmitt Trigger hex inverter 5V

Implementing the design

The design is divided into several functional blocks:
Schematic
Top layer PCB
Bottom layer PCB

Results from first PCB

After assembling the first PCB, several issues were identified:
The RC time constant was recalculated using the example from All About Circuits: https://www.allaboutcircuits.com/technical-articles/exactly-how-schmitt-trigger-oscillators-work/

Period equation from allaboutcircuits.com All About Circuits
The resistor required to achieve a 24-hour period with the SN74LVC1G14 voltage thresholds and a fixed 1.5 F capacitor is approximately 73.83 kΩ.
RC time constant calculation
Resistor divider schematic
Resistor divider calculation used to charge the capacitor to the low-voltage threshold.
Resistor divider calculation to 1.88V

Conclusion

After multiple revisions to the circuit, I determined that leakage currents within the components were interfering with the design and causing the long-time-constant circuit to fail, preventing the next LED from incrementing properly. The design works well when the LEDs are incremented manually, and the LEDs themselves look very cool with the built-in flickering feature!
I ultimately concluded that the design would be much easier to implement using a low-cost MCU rather than a purely analog approach. However, I would still like to revisit the idea in the future using an all-analog implementation with additional frequency-divider stages.
← Back to Home