I am using the attached circuit to detect the presence of an object inside the coil. The output is connected to the ICP on an Attiny84. The firmware measures the period of the output and toggles a pin based on the measured period.
The difficulty I am having relates to the amount of drift that occurs with this circuit. For example, if on power up the oscillator cycles at 30khz it will increase by 1.5khz over the next 20mins. After that it is fairly stable.
The power to the oscillator is regulated to 9VDC. The regulator is fairly small in size but it never appears warm to the touch. I have measured the change in temp with an infra-red thermometer and only see a temp increase of 2 degC.
1. Is there any way to increase the stability of this ckt?
2. Is there a more stable oscillator that can be used?
3. Can this initial drift be attributed to anything besides temperature?
On the bench I could weed this out in firmware but in the field I have no control over the temperature. It may need to function in the range of 60 to 120 degF.
I appreciate any feedback.