# DIY Pierce Oscillator not working

I'm building a simple pierce oscillator for fun and trying to read the frequency using an arduino uno and the freqcount.h library (I don't have an oscilloscope). However, I'm consistently getting a reading of 0 Hz when the resonator I'm using is labeled as 4.096MHz. Below is the circuit I put together, the top part is a simple inverter and the rest is from a diagram of the pierce oscillator I found on wikipedia. I calculated the values for the capacitors based on the 20pF capacitance of the resonator (and assuming 5pF capacitance of the inverter and stray capacitances). Even if my values were off, however, why would I get a reading of 0Hz? Please be gentle, I'm a beginner. Thanks. simulate this circuit – Schematic created using CircuitLab

• Your oscillator may very well be oscillating, but at too-low amplitude for the Arduino to recognize. You'd like to have the average collector voltage to be somewhere close to half the DC supply voltage of +5V. – glen_geek Jul 1 at 20:24
• It's not oscillating. You have 1 Megohm in series with the base; that means too little base current to turn the transistor on to drive 1k. 100k might work if Hfe >= 200. – Brian Drummond Jul 1 at 20:55
• Too many phase shift sections and ditto what they said. – Andy aka Jul 1 at 20:59
• Thank you all this helped a lot – omzrs Jul 1 at 22:35
• What is the highest frequency the Arduino can measure? I'm afraid that it's quite smaller than 4 MHz. – the busybee Jul 2 at 11:55 