[sorta resolved, not seeking any more replies] Crystal oscillator circuit

Hey guys, I am building a clock using ATTINY13A. This micro doesn't have a crystal input, only a clock input, it can't use a resonator. Other than this issue, it is just what I need and it's super cheap, which is also really awesome, since I actually am considering making the thing into a soldering kit once it's all done... It also has extremely low power consumption (below 1uA@32khz).

Any other micros in this price range (~50c) don't operate at voltages this low and their power consumption is orders of magnitude higher. They usually also feature additional pins or functionality I won't be using. They are sometimes also bigger, which increases the PCB size and further increases the price!

So I was thinking about building an oscillator. I found this circuit:

I built it on breadboard. (well, not really, I changed some values, but it didn't really seem to change much).

The thing is, it's allegedly 1vpp with 1v offset @3V. I couldn't really confirm that, since the output impedance is so large my scope significantly affects it. In fact, it affects it in such a way, that it doesn't really even start without the scope there though, it seems... I tried to measure it with a multimeter, and it didn't really measure anything, so I suppose it needs some sort of larger load to start.

My question is:

Can I hope to be able to make some changes, which will make this (or similar) circuit a reliable clock source for tiny13a? The datasheet says it should have 50% duty cycle. I am not sure how to amplify this signal. Maybe I could high-pass it and then feed it into a mosfet. But I didn't find a cheap mosfet with less than 2V guaranteed gate threshold, and the batteries will go down to 1.8V... .-.
Hoofsorting mosfets to see which one is okay is kind of time consuming. Plus I am not sure if a mosfet (rumor has it those are electrostatic sensitive) would make a good part of a soldering kit. And I can't really hope to use a bipolar transistor, I suppose, right?

I was considering using a dual opamp, but I can't find any with idle power (current) consumption around 1uA in my price range.

Also, if this circuit can't be used, is there some similar with current consumption around 1-10uA? Couldn't find any... Thanks a lot!

Is the ATtiny85 not a better option? Similar size and has XTAL pins?

Johnny010:
Is the ATtiny85 not a better option? Similar size and has XTAL pins?

Hello! Attiny85 was my consideration as well. I love that chip. However, first off, it can only go down to 2.7 volts. Now, it's quite possible I could make it go lower, but I don't really think that's a good design... or is it? Maybe if I didn't need ADC, I could get away with it? I have tested it and from what I recall it can work down to around 1.8V, but it's not guaranteed anywhere... so maybe I was just lucky with my part?
Second off, I need the current consumption in idle mode to be few uA. Current draw @32khz is not in the tiny85 datasheet (at least I can't see it), but for internal 128kz it's almost 100uA - 100 times more than that of tiny13A...

Now I could get tiny85V that's guaranteed to work down to 1.8V - but that's CRAZY expensive and it doesn't solve the high current draw. :frowning:

I mean, if I could get 100khz crystal (which I am not sure is even possible) for tiny24, then it should only draw 0.01mA or so, so I guess it'd last around 2 years on CR2032, according to the datasheet, if I am reading it correctly (which I am not, cause I haven't added the consumption for the running timer, but that's not that much I think).

But I mean the tiny13A is such a fitting beats for this! I guess I'll give it a shot. :3

How about simply using an RTC IC?

Johnny010:
How about simply using an RTC IC?

Wow.

I... I have actually done that in the past and I even know a part that is around 8 cents...

I actually think this is viable... You see, my original design actually DID include rtc, but then I decided against it because I wanted to cut down on the parts count... Then I realised that my beloved tiny13a wouldn't actually work without additional parts and I started designing the oscillator, without realising why I ditched the RTC...

I kinda feel silly now. I mean... Yea, I can just use rtc. Sure, I'll probably have to do some nasty stuff to stuff everything in 1k ram, 64 bytes, but... hay, I CAN actually just use a darn rtc... this blows my mind. I have considered EVERYTHING. And now you come up with a trivial solution that is just ingenious. Thank you so much! (kinda makes me feel silly, as I've actually spent the whole day playing around with the oscillator...)

I do it all the time...spend too much time thinking of shortcuts, but at the end of the day, most things you now need are in pre-made tried and tested packages. It comes with your code already done and a stable oscillator, runs sub 2V and consumes in the nA range taking up under 1cm2 of board space as one component (+ a couple maybe).

Johnny010:
I do it all the time...spend too much time thinking of shortcuts, but at the end of the day, most things you now need are in pre-made tried and tested packages. It comes with your code already done and a stable oscillator, runs sub 2V and consumes in the nA range taking up under 1cm2 of board space as one component (+ a couple maybe).

Yup, it's absolutely perfect, it will reduce my power consumption, so it will last maybe several years or so... And I will be able to run the cpu on internal clock, so I will have plenty of time to do my nasty trick, where I use the attiny itself and a single inductor as a boost converter :smiley: Thanks a lot!

Have you seen the small solar ICs?

Food for thought ;)?

Or the like:http://www.linklightsolar.com/mini-watt-solar-panels.html

Replace the CR2032 battery with a supercap with one of these cells on it...

Johnny010:
Or the like:Mini Solar Panels, PET encapsulated mini solar modules.

Replace the CR2032 battery with a supercap with one of these cells on it...

Oh, neat idea! I think I have a spare 10F cap in my junkbin, and also a few solar panels, so I could try it. Probably not for the first production run though - I kind of want to keep the manufacturing price under a dollar :smiley:

First thing first, it may not be a good idea to use a 13A as a clock keeping chips, especially when you are doing something else with it because more interprets = more errors to the timing; but it can be done.

I will use a Colpitts oscillator and T0 as input:

The emitter and collector resistances are very high, so not surprised
a scope loads it a lot. Try R1 = 220k, R3 = 47k. R2 = 2.2M

Allan

flyandance:
First thing first, it may not be a good idea to use a 13A as a clock keeping chips, especially when you are doing something else with it because more interprets = more errors to the timing; but it can be done.

I will use a Colpitts oscillator and T0 as input:

Hello! Unfortunately I can't see the image... But I will just use an rtc as Johnny010 suggested. I was planning to use the timer overflow interrupt, my guess is that would be pretty accurate.

allanhurst:
The emitter and collector resistances are very high, so not surprised
a scope loads it a lot. Try R1 = 220k, R3 = 47k. R2 = 2.2M

Allan

Hello! Thank you! You are right, it is not surprising! However smaller R1 values would (from my understanding of the circuit which may be flawed) result in higher current draw... I will just use an RTC chip!

Yes it would - but given those values, no more that 10uA.

Another thought - modern digital watches (even the very cheapest) use an extremely low consumption chip and a 32k crystal at < 1.5v - could try one of them.A simple FET source follower would then take a minute current from the crystal and battery , and would drive anything you like

regards

Allan