Maker Pro
Maker Pro

micro power square wave oscillator

J

Jonathan Kirwan

James Arthur wrote:

[...]
I missed the part where we were designing a watch oscillator
with a 5-year life, 100kHz +/- 5ppm 0-40ºC. (If we wanted to
do that the lower frequency makes 2n3904s sing even sweeter :)

I thought we--Jim, John Fields and I--were just having some
fun with a nonsense requirement. Yeah, I could
do any and all of what you want, but that's not the
assignment.

Wanna play? Post your favorite circuit.

Ok, example:


3.3V 3.3V
| |
\ \
/ 1M /
\ 1M \
/ /
| |
| |
o-------o-------. '-------o-------o
| | | 2.2p| | |
| \ --- --- \ |
| / --- --- / |
| \ 2M |2.2p | \ 2M |
| / | | / |
| | | | | |
\| --------)---------' | |/
|-----' | -o-----|
<| '---------------' |> BFP620
| BFP620 |


GND GND
(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)


Forgive the lousy schematic, I am not used to these ASCII editors.
Anyhow, 3.3V is beyond the BFP620's 2.3V limit but there are similar
oens that reach there. Uses around 5uA in SPICE. Thing is, with a 2N3904
this won't work at all. It's capacitances snuff it out. Of course this
is rather hokey in terms of stray capacitance and would need the usual
"anti-RF" precautions such as ferrite beads or at least small resistors
in front of the bases.

Here's the same version, generated by a program I wrote directly from
an LTSpice schematic. No need to work with an ASCII editor:
: V+ V+
: V+ | |
: | \ \
: | / R3 / R4
: | \ 1Meg \ 1Meg
: --- / /
: - V1 | |
: --- 3.3V | |
: - +-----+-------, ,--+------+
: | | | | | | |
: | | \ | | \ |
: | | / R1 | | / R2 |
: gnd | \ 2Meg | | \ 2Meg |
: | / | | / |
: Q2 c\| | | | | |/c Q1
: PN5179 |---+ | | +----| PN5179
: e<| | | | | |>e
: | | | | | |
: | --- C1 | | --- C2 |
: | --- 2.2p | | --- 2.2p|
: | | | | | |
: gnd '-----------' | gnd
: | |
: '------'
: .tran 100u
:
: .model PN5179 NPN (Is=69.28E-18 Xti=3 Eg=1.11 Vaf=100
: + Bf=282.1 Ne=1.177 Ise=69.28E-18 Ikf=22.03m Xtb=1.5
: + Br=1.176 Nc=2 Isc=0 Ikr=0 Rc=4 Cjc=1.042p Mjc=.2468
: + Vjc=.75 Fc=.5 Cje=1.52p Mje=.3223 Vje=.75 Tr=1.588n
: + Tf=135.6p Itf=.27 Vtf=10 Xtf=30 Rb=10)

Note that everything I used is included. I could add comments and
those would be included on the ASCII version, as well. Also, boxes
and so on, too, if I'd used them to 'enhance' the schematic.

By the way, I used the PN5179 here, which is available and in stock at
Mouser and costs 8 cents each if you only buy one at a time.

http://www.mouser.com/Search/ProductDetail.aspx?qs=FITO//QgYDloC2us%2bTmgRg==

Jon
 
E

ehsjr

Joerg said:
The temp range won't do in watch apps. Just wanted to point out that
such requirements are not always nonsense.



Maybe but first I'll have to crawl underneath the house some more. I
finally fixed out little valve problem just to be replaced by a new
problem: Water hammer. Darn!

On the off chance that you haven't seen one: they make
water hammer arrestors. It's just an air chamber in a Tee
off the water line. I used one that is a sphere, maybe
the size of a grapefruit, but they usually (?) are
cylindrical. Anyway, it was a perfect solution for me.
You *might* not have to install one near the "offending"
valve, possibly you could save yourself another crawl.

Ed
 
J

Jonathan Kirwan

You automated creation of an ASCII schematic directly from LTspice??

How did you do that?

The program directly reads the .ASC schematic and uses an ASCII
library of symbols. It handles rotated parts just fine, wires, etc. I
am working on a newer version that will also go read up the graphic
symbol file descriptions and, without the use of an ASCII library at
all, automatically produce optical ASCII representations of the
graphical images. I use a virtual ASCII tablet and some of the logic
involved is... a bit involved. But it works darned well. For
example, the BJT symbol file uses vector drawings but my routines can
draw these onto the ASCII tablet and reproduce exactly what you would
expect in ASCII, but entirely automatically and without any human
intervention.

Jon
 
J

Joerg

ehsjr said:
On the off chance that you haven't seen one: they make
water hammer arrestors. It's just an air chamber in a Tee
off the water line. I used one that is a sphere, maybe
the size of a grapefruit, but they usually (?) are
cylindrical. Anyway, it was a perfect solution for me.
You *might* not have to install one near the "offending"
valve, possibly you could save yourself another crawl.

Yes, they also make srping-types that don't lose the air pocket. But
it'll be a crawl because of the long pipes. I am thinking about ripping
the whole chebang out and doing it right. Sometimes I wonder what trade
license are good for. Heck, they even screwed a brass valve into a brass
tee using a steel nipple. #%^&*!!
 
J

Joerg

Jim said:
Joerg wrote: [snip]
Maybe but first I'll have to crawl underneath the house some more. I
finally fixed out little valve problem just to be replaced by a new
problem: Water hammer. Darn!
On the off chance that you haven't seen one: they make
water hammer arrestors. It's just an air chamber in a Tee
off the water line. I used one that is a sphere, maybe
the size of a grapefruit, but they usually (?) are
cylindrical. Anyway, it was a perfect solution for me.
You *might* not have to install one near the "offending"
valve, possibly you could save yourself another crawl.

Ed

What type name and where?

They are made by Sioux Chief. You can either get or order them at a
hardware store. Looks like this:

http://www.terrylove.com/mini-rester.htm
 
J

Jonathan Kirwan

<snip>
Have you considered writing schematic conversion programs, say PSpice
to Cadence Composer, or PSpice to SPE? I would pay real money for
that ;-)

I don't have a professional need for schematic capture and simulation
programs, not where either I or a client would pay for a license for
me, anyway. So I've no experience with PSpice, Cadence Composer
(somehow 'Composter' sprung to mind), or SPE and don't know what's
involved. Don't they provide conversions, since these programs are
competing for customers?

In any case, what I spent time doing was converting vector graphics
and text to ASCII schematic art. I don't imagine the key technology
in doing that (mostly figuring how to make reasoned human-perception
choices of ASCII to represent vector drawings) is much value mapping
one kind of schematic file to another kind. I suspect that is more a
compiler that reads one kind of source to generate another. Easier in
some ways, I imagine, but possibly complicated by realities I'm also
not aware of.

Still, I'm not one to turn down a fast buck. ;)

Jon
 
J

Joerg

Jonathan said:
I don't have a professional need for schematic capture and simulation
programs, not where either I or a client would pay for a license for
me, anyway. So I've no experience with PSpice, Cadence Composer
(somehow 'Composter' sprung to mind), or SPE and don't know what's
involved. Don't they provide conversions, since these programs are
competing for customers?

In any case, what I spent time doing was converting vector graphics
and text to ASCII schematic art. I don't imagine the key technology
in doing that (mostly figuring how to make reasoned human-perception
choices of ASCII to represent vector drawings) is much value mapping
one kind of schematic file to another kind. I suspect that is more a
compiler that reads one kind of source to generate another. Easier in
some ways, I imagine, but possibly complicated by realities I'm also
not aware of.

Still, I'm not one to turn down a fast buck. ;)

The LTSpice to ASCII conversion would also be nice. Maybe you can't make
a buck with that because LTSpice is free but if you have it post your
name with it you'll increase you visibility. I find drawing ASCII
schematics directly a bit cumbersome. Sometimes you can move parts,
sometimes you can't. Sometimes lines connect, sometimes they don't.
 
J

Joerg

Jim said:
But LTspice is like Adobe Reader, it's free, and the schematic format
is text, so why bother?

No everyone has it. ASCII art is practical especially when at anotehr
person's PC that doesn't have LTSpice loaded. Such as a hotel computer.
 
J

Jonathan Kirwan

No everyone has it. ASCII art is practical especially when at anotehr
person's PC that doesn't have LTSpice loaded. Such as a hotel computer.

Also, it's practical for another reason. I use Verizon as my DSL
service. They recently (in the last few months) completely disabled
all alt.* newsgroups.

I can't access alt.binaries.schematics.electronic, for example. Of
course, I can purchase another service to get it. But then, that
would be a monthly expense for a very occasional use.

Jon
 
J

Jonathan Kirwan

The LTSpice to ASCII conversion would also be nice. Maybe you can't make
a buck with that because LTSpice is free but if you have it post your
name with it you'll increase you visibility. I find drawing ASCII
schematics directly a bit cumbersome. Sometimes you can move parts,
sometimes you can't. Sometimes lines connect, sometimes they don't.

It's already available and I've posted a link several times before.
I'll make some quick changes and post up a new link, soon. You can
use all of the drawing capabilities of LTSpice, including the stretch
and move feature, before submitting it to my tiny program for
conversion to ASCII.

I'm also thinking about including the ability to access the .RAW files
and to include ASCII plots of chosen data, as well. But that isn't
in, yet.

Jon
 
K

krw

On the off chance that you haven't seen one: they make
water hammer arrestors. It's just an air chamber in a Tee
off the water line. I used one that is a sphere, maybe
the size of a grapefruit, but they usually (?) are
cylindrical. Anyway, it was a perfect solution for me.
You *might* not have to install one near the "offending"
valve, possibly you could save yourself another crawl.

It's just as easy to take a 'T' and a cap to make a vertical column
in the line somewhere.
 
F

Frank Buss

Jonathan said:
It's already available and I've posted a link several times before.
I'll make some quick changes and post up a new link, soon. You can
use all of the drawing capabilities of LTSpice, including the stretch
and move feature, before submitting it to my tiny program for
conversion to ASCII.

I'm also thinking about including the ability to access the .RAW files
and to include ASCII plots of chosen data, as well. But that isn't
in, yet.

I don't think this is useful. If you want to post an image, it is better to
press Alt-Print, for capturing the selected window, then paste it to
MS-Paint or Gimp or something like this, save it as an image and finally
upload it with http://img1.imageshack.us/ or to another free image hosting
provider. Needs only some seconds and every reader can easily see the
schematic and plots, without the need to decipher ASCII graphics.

Nevertheless, ASCII is nice for doing some fun stuff with it, like an
animation I wrote in Lisp:


ANSI art is cool, too, like used some decades ago as intro screens when
login to BBS:

http://flickr.com/photos/cumbrowski/2413350736/sizes/o/

I enjoyed playing some ANSI games, like an implementation of Risk with my
14400 baud modem (I think it was not an approved telecommunications device
by the Post :)
 
J

Jonathan Kirwan

I don't think this is useful.

You could be right about that. Frankly, it's all just an experiment
to me.

Just that if someone is doing up a quick schematic to 'make a point'
and post it, it might be nice to also include a short display of the
pertinent curve underneath or beside it, also in ASCII. That way not
only is the schematic absolutely clearly stated and taken directly
from a simulation work-up but also the data being discussed is also
explicit and unambiguous, as well, in the post.

Probably has limited use, of course. But it's not much of a problem
to do and it may improve the clarity of what someone is talking about
when they write, without having to spend inordinate time framing their
words, with painful care, or else having one's point misunderstood and
all manner of posts following it trying to repair failed communication
and play catch-up on the intended details.

Jon
 
Not bad, and frequency stays pretty constant over delta Vcc.

All that's left is to get the frequency up to 100kHz,

Easy enough. I did it when I woke up this morning and realised that
I'd set up the circuit for 10kHz rather than the 100kHz asked for

Version 4
SHEET 1 2848 1240
WIRE -576 576 -736 576
WIRE -112 576 -576 576
WIRE -576 608 -576 576
WIRE -112 608 -112 576
WIRE -576 704 -576 688
WIRE -464 704 -576 704
WIRE -384 704 -464 704
WIRE -240 704 -320 704
WIRE -112 704 -112 688
WIRE -112 704 -240 704
WIRE -736 720 -736 576
WIRE -464 736 -464 704
WIRE -240 736 -240 704
WIRE -576 832 -576 704
WIRE -112 832 -112 704
WIRE -496 880 -512 880
WIRE -464 880 -464 816
WIRE -464 880 -496 880
WIRE -448 880 -464 880
WIRE -384 880 -320 704
WIRE -320 880 -384 704
WIRE -240 880 -240 816
WIRE -240 880 -256 880
WIRE -208 880 -240 880
WIRE -176 880 -208 880
WIRE -208 912 -208 880
WIRE -496 928 -496 880
WIRE -576 1008 -576 928
WIRE -496 1008 -496 992
WIRE -496 1008 -576 1008
WIRE -208 1008 -208 976
WIRE -112 1008 -112 928
WIRE -112 1008 -208 1008
WIRE -736 1040 -736 800
WIRE -576 1040 -576 1008
WIRE -112 1040 -112 1008
FLAG -112 1040 0
FLAG -576 1040 0
FLAG -736 1040 0
SYMBOL RES -592 592 R0
SYMATTR InstName R1
SYMATTR Value 1000K
SYMBOL res -128 592 R0
SYMATTR InstName R2
SYMATTR Value 1000K
SYMBOL cap -384 864 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName C1
SYMATTR Value 1.5p
SYMBOL cap -256 864 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName C2
SYMATTR Value 1.5p
SYMBOL VOLTAGE -736 704 R0
SYMATTR InstName V1
SYMATTR Value 5
SYMBOL npn -176 832 R0
SYMATTR InstName Q1
SYMATTR Value BFR92A
SYMBOL npn -512 832 M0
SYMATTR InstName Q2
SYMATTR Value BFR92A
SYMBOL res -256 720 R0
SYMATTR InstName R3
SYMATTR Value 4700K
SYMBOL res -480 720 R0
SYMATTR InstName R4
SYMATTR Value 4700.1K
SYMBOL cap -512 928 R0
SYMATTR InstName C3
SYMATTR Value 0.68p
SYMBOL cap -224 912 R0
SYMATTR InstName C4
SYMATTR Value 0.68p
TEXT -768 1176 Left 0 !.tran 0 150u 50u startup
TEXT -776 1224 Left 0 ;This example schematic is supplied for
informational/educational purposes only.
TEXT -480 1176 Left 0 !.model BFR92A NPN(IS=0.1213E-15 VAF=30 BF=94.73
IKF=0.46227 XTB=0 BR=10.729 CJC=946.47E-15 CJE=10.416E-15
TR=1.2744E-9 TF=26.796E-12 ITF=0.0044601 VTF=0.32861 XTF=0.3817
RB=14.998 RC=0.13793 RE=0.29088 Vceo=15 Icrating=4m mfg=Infineon)
the output to be a square wave (50% duty cycle)

Easy enough, but it means decreasing R1 and R2, which increases the
current drain - today's circuit draws 7uA at 5V (which presumably
means 3uA at 2V), and a square output would appear to be an
unattainable luxury within the current budget (at least for this
circuit).

Complementary astables can - in theory - do better than the classic
collector-coupled astable, which is why I posted the pointer to patent

http://www.freepatentsonline.com/3705362.pdf
and to drive something that'll drive an
unspecified load with a total of <= 10µA from the oscillator's supply..

Just for grins, lets say the eventual load looks like 50 ohms.

What would you suggest?

Get real. You can't drive an unspecified load at 100kHz within a
specified current budget - it may strike you as funny to suggest that
one could, but the absurd isn't aways comical.

Since the OP didn't specify what he needed to drive there's not a lot
of point in worrying about potential loads.

And while we are getting real, the largest commecially available
inductor I can find is the Toko 10RB-181LY-124, which offers 120mH
with a self-resonant frequency of 80kHz, equivalent to a parallel
capacitance of 33pF. It doesn't work in your circuit. The
10RB-181LY-563, which has a self-resonant frequency of 120kHz, does
work even after I plugged in a parallel capacitance of 31.5pF and a
series resistance of 58R, though I had to jack up C1 to 39pF to get
the frequency more or less right. The lumped parameter model of the
inductor is rather crude so I don't actually trust the results.
 
F

Frank Buss

Jonathan said:
Probably has limited use, of course. But it's not much of a problem
to do and it may improve the clarity of what someone is talking about
when they write, without having to spend inordinate time framing their
words, with painful care, or else having one's point misunderstood and
all manner of posts following it trying to repair failed communication
and play catch-up on the intended details.

Maybe a good idea would be a collaboration schematic web application,
something like a "schematic graphics wiki"? This could lead to an open
schematics format, for easier interchaning and modifying ideas.

Currently when I see a schematic on the web (for which the author says it
is free to use), most of the time I have to create it manually in Eagle.
And creating the packages and symbol library is a pain, too. I assume much
time is wasted, because the same packages are created by many users over
and over again (but sometimes there is some support, e.g. the download
pages with user contributed libraries on the Cadsoft homepage), multiplied
by different EDA programs, because they can't use libraries of other
programs (at least Eagle can't do it). An open format could lead to a
solution, where the manufacturer produces the needed files, and the user
just downloads it for including in their EDA programs, like with PSpice
models, which are provided by some manufacturers.
 
J

Joerg

krw said:
It's just as easy to take a 'T' and a cap to make a vertical column
in the line somewhere.

According to plumbers the air is slowly absorbed into the water until
that type of "poor man's arrester" no longer works.
 
J

Joerg

Jonathan said:
It's already available and I've posted a link several times before.
I'll make some quick changes and post up a new link, soon. You can
use all of the drawing capabilities of LTSpice, including the stretch
and move feature, before submitting it to my tiny program for
conversion to ASCII.

That would be nice. It's so much easier to draw in LTSpice.

I'm also thinking about including the ability to access the .RAW files
and to include ASCII plots of chosen data, as well. But that isn't
in, yet.

Plots may not be so easily visible in ASCII. Only basic waveforms but
not glitches and such.
 
J

Joerg

Frank said:
I don't think this is useful. If you want to post an image, it is better to
press Alt-Print, for capturing the selected window, then paste it to
MS-Paint or Gimp or something like this, save it as an image and finally
upload it with http://img1.imageshack.us/ or to another free image hosting
provider. Needs only some seconds and every reader can easily see the
schematic and plots, without the need to decipher ASCII graphics.

Problem with those is that many links expire at some point and sometimes
a whole web site goes belly up. Then when one of our grandkids finds
that post 10-20 years from now, thinking that this is the solution
they've been looking for, all they get it a http error message.

Nevertheless, ASCII is nice for doing some fun stuff with it, like an
animation I wrote in Lisp:


Cool. When you watch that long enough it can make you dizzy. Don't watch
it after half a dozen Koelsch beers ;-)

ANSI art is cool, too, like used some decades ago as intro screens when
login to BBS:

http://flickr.com/photos/cumbrowski/2413350736/sizes/o/

I enjoyed playing some ANSI games, like an implementation of Risk with my
14400 baud modem (I think it was not an approved telecommunications device
by the Post :)

When I was a kid I built some dinosaur-age game consoles. Playing was
never fun, only designing and building was. Usually after trying whether
it works I either dismantled it to recycle the parts for the next
project or I just gave it away.
 
J

Joerg

Jim said:
krw said:
[email protected] says... [snip]
It's just as easy to take a 'T' and a cap to make a vertical column
in the line somewhere.
According to plumbers the air is slowly absorbed into the water until
that type of "poor man's arrester" no longer works.

Yep. Been there, done that. Some 35 years ago. Added two valves,
one at bottom, one at top of vertical column, to allow periodic
draining.

Considering the cost of PVC pipes today (made with crude oil ...) a real
hammer arrester seems like a deal and usually you don't have to worry
about remembering the drainage routine for many years.
 
Top