Arduino Forum

Products => Arduino Due => Topic started by: maddumagewaruna on Mar 25, 2018, 11:58 am

Title: High speed encoder, data acquisition, save data 13kHz
Post by: maddumagewaruna on Mar 25, 2018, 11:58 am
Hi,

I have a quadrature encoder which generates 400 pulses per one rotation (1 x 100 ppr).
I'm trying to use this encoder to measure the angle of rotation of a motor.
The speed of the motor varies from 500 rpm to 2000 rpm.

At max speed of the motor, I need to capture 13,000 pulses per one second.

I need to count the number of pulses and save the number of pulses against a time stamp.
So basically, I need to save the number of pulses against time for every pulse. 

which means I will have to save data at least at a rate of 13kHz. (13,000 information per one second)

What is the method I can use to store my data at such a rate.??
Title: Re: High speed encoder, data acquisition, save data 13kHz
Post by: ard_newbie on Mar 25, 2018, 01:10 pm
I bet for an X-Y problem.  Usually a quadrature decoder is used to provide an accurate input for a PID, recording the time for each and every edge is useless.

Is it a school assignment?

What is the final goal of your project?

There are several ways to record data, depending on the final goal:

- log data inside SRAM (96 Kbytes ) if recording don't last too much.
- SerialUSB.write() to a PC , then record on the PC.
- SDFAT Library.
- More exotic, record on an SD card via the HSMCI peripheral :

http://forum.arduino.cc/index.php?topic=188360.0 (http://forum.arduino.cc/index.php?topic=188360.0)

(https://upload.wikimedia.org/wikipedia/commons/7/71/Cross_correlation_animation.gif)