Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Half Shell on September 08, 2009, 09:14:42 PM

Title: How do you delay an analog signal by milliseconds?
Post by: Half Shell on September 08, 2009, 09:14:42 PM
I have a signal from an accelerometer that I wish to slow down by at least a millisecond. I am going to take this delayed signal and feed it into a micro controller's comparator with the "live" signal in - essentially creating a signal for the derivative from the interval. I have a few theories on how to do this, but I wanted to know if anyone knew a good way to delay an analog signal like this.

Thanks in advance for any help.
Title: Re: How do you delay an analog signal by milliseconds?
Post by: airman00 on September 08, 2009, 09:23:17 PM
Buffer it in your code?
Title: Re: How do you delay an analog signal by milliseconds?
Post by: Half Shell on September 08, 2009, 09:40:49 PM
Buffer it in your code?

I'll be doing this to at least three accelerometers. The micro controller will be taxed doing other things - I do not want to try and delay an analog signal constantly - it's too much.

I believe an analog delay can be introduced - purposeful propagation delay of sorts. I want to do it in the most efficient way, however.
Title: Re: How do you delay an analog signal by milliseconds?
Post by: Soeren on September 09, 2009, 01:32:18 PM
Hi,

Look up "Bucket Brigade Delay Line".
Perhaps study the delay from a color TV?
Title: Re: How do you delay an analog signal by milliseconds?
Post by: Admin on September 09, 2009, 05:30:59 PM
Which microcontroller?

Quote
I believe an analog delay can be introduced - purposeful propagation delay of sorts. I want to do it in the most efficient way, however.
First, set the ADC prescaler to as high as you can. For example, in AVRlib, you'll see:
#define ADC_PRESCALE_DIV128      0x07   ///< 0x07 -> CPU clk/128


Also, you can set up an interrupt that reads the ADC occasionally, while the rest of the time your processor is busy at work.