Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/01/08 13:49
Read: times


 
#152830 - Adding hysteresis on top of my sampling
I used a previous example from help from a member for my ADC conversion based on sampling the ADC inputs from 0 to 3.3VDC from the wiper arm of a pot.

I'd like to add some software hysteresis to account for some system noise. The sampling routine works great as it is, is there an easy way to do some math function....

Typically all hysteresis I've ever done was in the hardware not the software, I did some searching on 8052, I read the dead zone vs hysteresis thread, but nothing sticks for makes sense for my application

Here is my sample program that is working as I like:

for (index = 0; index<NUM_SAMPLES; index++) //Sample ADC for current pot position value
	{value += AD1DAT2;} 
	level = value/NUM_SAMPLES;


I figured sampling would be good enough, but doesn't account for the noise spikes I'm seeing on the input from the crappy power supply in which i can not modify or change.

Anything simple to implement based on this function or easy direction?

Thanks

List of 12 messages in thread
TopicAuthorDate
Adding hysteresis on top of my sampling            01/01/70 00:00      
   my method            01/01/70 00:00      
   For this to work...            01/01/70 00:00      
      adaptive delta ... ?            01/01/70 00:00      
      All data is keep in eeprom            01/01/70 00:00      
         What does the oscilloscope tell you?            01/01/70 00:00      
         not a good ides            01/01/70 00:00      
   Median filter ?            01/01/70 00:00      
   are you using an RC low pass before the ADC?            01/01/70 00:00      
      check here            01/01/70 00:00      
      Found a minor issue in hardware...not dealbreaker            01/01/70 00:00      
   Low Pass Filter in Software            01/01/70 00:00      

Back to Subject List