Accurate ADC sampling with in-accurate clock

adcjitterlow-powertimertiming

Im building a datalogger with a LPC11xx as CPU. It needs to wakeup at 256hz to take ADC samples, but this CPU has very in-accurate timed wakeup from deep-sleep, causing jitter on the sampled data.

So is there a very cheap component that can toggle a GPIO very accurately at 256hz, that wakes up the CPU from deep-sleep (using external interrupt)?

Or maybe even better: do there exists ADC's that have their own build-in clock, so that I can stay in deep-sleep for a whole second, and then read out 256 samples via I2C and go to sleep again?

Best Answer

There are several possibilities for you to consider for this.

1) Look into a somewhat ancient CMOS chip that can still be readily purchased called a CD4536. This device includes an oscillator capability, a programmable divider chain and a one shot pulse output. I have successfully used these in very low power applications with a 32.768kHz crystal attached to the oscillator pins. The divider on this part can then programmed via the strap pins to use 9 stages of divider to get to the desired 256Hz rate. (Or other rates faster or slower if so desired). The output would be connected to the wakeup control pin on your MCU.

2) Another choice is to use any one of a number of popular 8-pin RTC chips. These are very low power and will run off a 32.768kHz crystal. Select an RTC that as a programmable output pin that can generate a square wave signal at a selected frequency. The popular ST M41T81S RTC chip can have its output pin be programmed to generate an exact 256 Hz output frequency. The output would be connected to the wake control pin on your MCU. Some MCUs need a pulse on their wake input that is shorter that the time the MCU expects to stay awake and so it may be necessary for you to capacitively couple the RTC output to the MCU with an RC circuit to produce a narrow pulse off one edge of the RTC square wave output.