Close

Choosing the Oscillator

A project log for Brainless TritiLED

My attempt for TritiLED without a MCU

smajdalfSmajdalf 06/19/2019 at 11:500 Comments

The oscillator can be considered the heart of this project. When it fails, the LED (or the battery, depends on the failure mode) will be dead soon. The oscillator should drive the LED with optimal waveform while consuming minimum current. From Ted Yapo's work we know the LED should be driven with very low duty. When optimal current for a LED is 1mA and we want 1uA average, duty must be only 0.1%. On the other hand the exact shape of the pulse is not critical as long as the duty is kept sufficiently low. Roughly speaking the current is either high enough the efficiency of the LED is good or so low, the power lost is negligible. Another important parameter is low power consumption of the oscillator. It should either use as low battery current as possible or be able to work from "leftover" voltage - difference between forward voltage of the LED and battery voltage.

There is so many options to choose from. Now I will list those options I have explored.


Ted Yapo's MCU may be viewed as an RC oscillator and a counter - the code does little more than configure those two crucial peripherals. Surely we can try to copy it, get an oscillator and counter and configure it the old way. There are some ICs that may be used for this such as HC4060. With some logic it may be used to generate square wave with nearly any frequency and duty. Obviously such solution will be quite complicated. Moreover it will be quite power hungry. To be able to generate 100Hz 0.1% duty square wave its oscillator frequency must be 100kHz. Considering our target current consumption is around 1uA the oscillator alone will need much more. For comparison AVR's WDT with comparable frequency needs 4uA. It is unlikely an oscillator from discrete components will do so much better than on-chip one. Adding the parasitic capacitance of HC4060 pins and the logic it needs to drive resulting current will be huge: 1pf driven with 1V pp @100kHz needs 0.1uA. Since every pin has capacitance of several pF there is no way to make this work.


Another option already explored by Ted Yapo is using and Schmitt trigger RC oscillator. The naive way will fail on shoot through current of the used inverter. But there is another option - a current starved inverter. Inserting a HUGE resistor into the inverter's power supply limits current available for the inverter to waste for the shoot through. It works well to generate a nice square wave with about 0.6Vpp for negligible current. But it has also serious disadvantages. The frequency depends on characteristics of the IC. The duty is about 50%. I have tried adding a Schottky diode and similar tricks to modify the duty but I doubt it would work reliably a repeatedly. This design calls for single gate inverter which is available in a tiny SMD package only. And finally the dealbreaker - the strength of the IC is very weak when operated on a such low voltage. It would need another buffer stage which would complicate the design greatly. I have decided this way have only dead ends.


Many RTCs have very low power consumption AND provide an output for a square wave of some sort. It should be possible to use the output for driving the LED. At least for some RTCs and with a small circuit. Problem will be programming of the RTC to provide the right output. It needs to either have a MCU to program the RTC at power up or it needs to be connected to an external programmer every time the power is lost. The former defeats the whole reason of this while the latter is a bit inconvenient. Anyway cost of a RTC + a crystal is comparable to a simple MCU but using a MCU brings much more flexibility.
I decided it must be an oscillator from discrete components. There is so many circuits to choose from. Currently I have a circuit built on a solderless breadboard on my workbench. It seems to work well and it is waiting for me to find some time to try to do more experiments on it. With my speed and more pressing tasks at hand it may take years to get a PCB - but one day it will happen!

Discussions