2004-04-02 04:59 AM
2004-03-15 09:59 PM
I use a IR reflection to detect objects.
In the hardware is a RC network to block high frequency > 200Hz. Basic of software: IR TX off and measure 16 times IR RX level with AD ____(every sample at 0,5mS) ____Calculate the mean of the 16 samples IR TX on and measure 16 times IR RX level with AD ____Calculate the mean of the 16 samples calculate the difference in IR RX between IR TX on and off block negative values Set or reset bit in register. (with hysteresis) Push value in table of 5 bytes. 5 times an 0, reset output 5 times an 1, set output 5x ((16*IR_on)+(16*IR_Of))=80mS=12Hz I have problems with light in the sensor of high power lamps (150W) Do anyone have a good algoritme to filter 100Hz noise on analog data. I want to solve it in software and not in hardware! [ This message was edited by: Moppie on 16-03-2004 11:31 ]2004-03-22 11:11 PM
Nobody made a low pass filter?
I hope you don't take one adc shot and use the data! You can get a lot off EMC trouble. I made a low pass filter by adding some samples at a steady sample rate. Also i made a slew rate in the AD input. So it respons slowly by a surge or spike. Hopely somebody respons how to made noise free AD samples2004-04-02 04:59 AM
Good trick.
Averaging is a kind of low-pass filter. also you can reject the values out of range by software. if you already know frequency, you know the time to take minimum number of samples and reject values out of range. Great isnt it ) let me know if u succeed.