Imho, add a median filter to FILTER #1 (the one that works better). This will throw out values that exceed x before the filter is reached. You can implement this by lengthening the 'storage' in filter1. Make it a small vector instead of just 'old' and allow the update iff the new value exceeds the old by x for more than one sample. A two long 'store' vector may be enough but plan for three and surprize yourself. Peter -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads