Connect with us

Oscillator using AVR on chip comparator ?

Discussion in 'Electronic Design' started by richard mullens, Jan 30, 2005.

Scroll to continue with content
  1. The AT90S2313 has two pins which can be used as the inputs of an analogue comparator.

    I propose to create an LC oscillator by placing a parallel resonant tuned circuit across these pins and by supplying energy via
    a resistor from an output pin (which would normally be tristated) when the comparator switches state.

    I am thinking of a 20kHz frequency with a capacitor between 10nF and 1 micro Farad with a 3V supply.

    Do I need to protect the inputs from the stored energy in the tuned circuit when power is removed ?
    Would it be good (or bad) practice to include a resistor between the tuned circuit and a comparator input.
    The configuration I suggest leaves the comparator inputs floating - is this a bad idea and if so what should I do about it ?

    I would like to achieve a stable frequency - as I would like to detect changes in the frequency when metal comes into the
    vicinity of the coil. Should I be employing a different oscillator configuration - for example a "centre tapped" capacitor like
    in a colpitts oscillator.

    On a more theoretical note, presumably such an oscillator will generate electromagnetic radiation - which I suppose one could
    model by a resistor in series or across the tuned circuit. Is this a misunderstanding on my part - or is it so negligable that
    that is why one doesn't see it discussed in models of a tuned circuit.

    Many thanks for your comments.
  2. Or at the expense of software complexity driving L & C from the same pins configured temporarily as outputs.
  3. Gert Baars

    Gert Baars Guest

    A good quality L and C might take the AC swing in excess.
    Putting 2 zenerdiodes in antiseries over the LC combination
    will limit the AC voltage. Putting a resistor across will
    also lower the effect of metal.


    Gert Baars
  4. Gert,
    Many thanks for your reply, it hadn't occurred to me that I might drive the resonance above the power supply rails.
  5. Gert Baars

    Gert Baars Guest

    No big deal. If the opamp has J-FET inputs there is no
    significant load that's why. You might check for absolute
    maximum ratings.


    Gert Baars
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day