Oscillator using AVR on chip comparator ?

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.

Reply to
richard mullens
Loading thread data ...

Or at the expense of software complexity driving L & C from the same pins configured temporarily as outputs.

Reply to
richard mullens

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.

Regards,

Gert Baars

richard mullens wrote:

Reply to
Gert Baars

Reply to
richard mullens

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.

Regards,

Gert Baars

richard mullens wrote:

Reply to
Gert Baars

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.