Monday, November 19, 2012

Real Breakthrough In Speed (again)

Hi,

I was looking for a way to make ADC more immune to noise and during this search I managed to increase the speed of the ADC routine to a level that now takes only 26us to sample each ADC channel (before 192us was spend in ADC sampling for each channel). The noise is eliminated now so I had to run some speed tests again to see the overall improvement.

With this improvement now, the total program cycle delay is only 200us average. The firmware now runs 5000 times per second (average) which is 5Khz, while the first release of this firmware was limited only to 1000 times per second (1Khz).

Not to mention that the above readings are with the LCD user menu active, running in realtime along the rest of the code.

















This is a capture with a logic analyzer of a serial packet (230kbps) along the program cycle speed.
















Wider view of the capture above to get a good idea how fast is the cycle speed now.


So now using ADC as position input feedback for the motors, the total loop is as fast as with digital encoders.

Thanks for reading this,

Thanos

No comments:

Post a Comment