Close
0%
0%

Brainless TritiLED

My attempt for TritiLED without a MCU

Similar projects worth following
385 views
For his always-on coin cell powered LED marker Ted Yapo is using a MCU to generate pulses driving the LED. While use of a MCU gives a lot of flexibility, it should be possible to drive the LED by much simpler circuit with comparable results.

This project is inspired by the TritiLED project. The key idea of the project is that every LED has its optimal current which is typically much higher than a few microamps but much lesser than the rated current of given LED. Its author Ted Yapo uses a PIC MCU and some passives to generate current pulses. He thinks using a MCU for blinking a LED can be considered an overkill and I agree. I would like to make my own version of TritiLED without a MCU. I will rely heavily on Ted Yapo's work and when I do something differently I plan to compare my motives and results with his.

Requirements for the project:

  1. Use common, loosely specced parts
  2. Simple (and cheap) circuit
  3. Predictable, repeatable and reasonably stable parameters
  4. Settable current draw with reasonable minimum 1-2 uA or less

Ad 1.:

Many circuits I find on the web use some components that are not easy to get. It may be some ancient part (such as unijunction transistor), some IC with strict requirements (i.e. very low supply current op amp), or a discrete part with some non-trivial requirements - very low threshold voltage or specific R_DS(ON) of a MOSFET, exceptionally low or high gain of a BJT. This also limits resistor value - 10M is the highest common value of a resistor. Avoiding parts unavailable in THT is also preferred.

Ad 2.:

Paying premium for extending a coin cell battery lifetime by 10% is nonsense. Cost and complexity must be balanced with possible gains. This also limits resistor usage - pair of 10M resistors in series may be acceptable to "create" a 20M resistor. Using 100 of 10M resistors to get 10 of 100M resistors is bad.

Ad 3.:

The parameters (LED current, duty, frequency) should depend mainly on easily measurable parameters - preferably values of passive components. "Nearly constant" voltages as V_BE of a transistor, forward voltage of a diode or a LED may be used too - it is possible to make a guess, measure result and change passives slightly to get the desired result. Characteristics which are highly variable (either part-to-part or temperature dependent) such as transistor gain or diode reverse leakage current should not be used.

Ad 4.:

The quiescent current should be so low that the circuit will keep some reasonable efficiency even at average current drain of 1-2 uA. Since 1 uA is about 10 mAh per year it means run time more than 10 years for one CR2032 cell should be possible.

  • BJT or (MOS)FET?

    Smajdalf07/10/2019 at 15:03 0 comments

    The answer seems easy - everyone knows BJTs are old and power hungry. They may have some marginal applications but FETs rule the world. Yet I believe BJTs may have important advantages over FETs.

    It is true a BJT needs constant base current to conduct while a FET needs only to charge a few pF of Gate capacitance to turn on. If the switching frequency is low (and we aim for very low frequency around 100Hz) FET is seemingly more efficient. But there is a catch - FET needs to be driven by a push-pull output. In discrete components for simplicity it is often realized by a pull-down resistor and an active circuit pulling up (or vice versa). But the power saving advantage is lost here - the pull-down consumes power all the time while the FET is turned on (or off). Very roughly speaking a BJT may be considered a FET with a resistor build in:

    Probably in typical situation using MOSFET still saves some current but the difference may be negligible - and using the BJT may save one resistor.

    There are other advantages in using BJTs:

    1. They are less ESD sensitive than FETs. Modern FETs have often some ESD protection build in but not all of them.
    2. BJTs are "ancient". They are commonly available in both THT and SMD package. Newer FETs are often SMD only. Common FETs available in THT are huge power MOSFETs mostly in bulky TO-220 package with large gate capacitances and high threshold voltages.
    3. BJTs have "unified" base-emitter voltage. It is around 0.6V. Of course it depends on transistor type and base current but in a given circuit replacing a BJT with similar one shouldn't change the V_BE voltage drop by much.

    Especially the point 3. is important for me. It is hard to find a FET that conducts with only 0.6V gate voltage. I do not know any available in THT. Also the region between fully closed and fully conducting is much wider and not well described in datasheets.

    Maybe it is only my lack of understanding but BJTs seem much easier to use than MOSFETs. If a circuit works well with one BJT, there is a good chance it will work with reasonable similar BJT too. This cannot be said for FETs - with the same gate voltage one is closed while another is fully open.

    Since replacing a BJT by a FET is quite straightforward I will use BJTs primarily and switch to a FET only when there is a good reason for doing so.

  • Choosing the Oscillator

    Smajdalf06/19/2019 at 11:50 0 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... Read more »

  • Using an Inductor or not?

    Smajdalf05/29/2019 at 19:32 0 comments

    Ted Yapo uses an inductor to generate the current pulse through the LED. It generates a sawtooth current wave - not optimal to drive the LED but still very efficient according to his simulations. It has two important advantages:

    1. Possibility to use lower supply voltage than the forward drop of the diode.
    2. Increased electrical efficiency

    When using a lithium battery with voltage 3V it should be high enough for any LED. Typical LED is most effective with currents less than its maximum current and it has considerably lower forward voltage than the rated voltage. If stepping up the voltage is still needed a charge pump may be used instead.

    Professionally made voltage converters claim efficiency up to 95%. IIRC Ted Yapo claims efficiency of his circuit is about 80%. With supply voltage 3V and forward voltage drop 1.5V when using a red LED efficiency of a circuit not using inductor may be up to 50%; for a green LED with forward voltage 2.2V the efficiency may be 70%. It is not so large difference. In fact I am not sure if the difference will be even noticeable. Anyway total efficiency of the circuit depends much more on the LED chosen than the electrical efficiency of the circuit driving it unless the driving circuit is very poor.

    Using an inductor has considerable disadvantages:

    1. To keep efficiency high the transistor driving it must be switched off quickly. Quick turn off time means strong base/gate driver - which will be either complicated or power hungry.
    2. Time of the pulse will be probably determined by an RC circuit. Due to component tolerances the time of the pulse cannot be determined exactly. When the pulse is used to charge an inductor its inductance tolerance adds another uncertainty to peak LED current and amount of energy delivered.
    3. To keep efficiency high you want minimal resistance in the inductor - transistor - LED path. Using some form of current limiting/monitoring resistor is impossible.
    4. And finally the worst part: the inductor forces difficult compromises. To minimize switching losses the blinking frequency should be low. With low blinking frequency the amount of energy in one blink must be high enough to keep overall light output. To store enough energy in the inductor large inductance or peek current is needed. Large inductance means large DC resistance of the coil increasing loses or bulky and expensive inductor. Large peek current needs large LED which keeps high efficiency at such current - again bulky and expensive.

    On the other hand NOT using an inductor "frees" the difference between battery voltage and LED forward voltage to anything we want - such as using a resistor for current sensing, or run the oscillator from this voltage effectively using all available battery current (not energy!) for the LED.

    I think it is obvious which way I consider better!

View all 3 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates