Go Down

Topic: Details for the Encoder (Read 210 times) previous topic - next topic

arduardu2

An example of the encoder is here:
https://www.arduino.cc/en/Tutorial/VidorEncoder


Does anyone know the following information:

a) Is it reading out in X1, X2 or X4 counts ?

b) What is the maximum no. of counts and maximum number of counts / second it can measure ?


Thanks alot.

DarioPennisi

Hi,
encoders are counting at each edge of each signal, so it should be x4.
counters are 32 bit and signals are sampled at 100 MHz so realistically we should be able to handle input toggle rates of 20 million toggles per second, which i suppose is more than enough for any application...

arduardu2

Thanks!

This makes this Arduino a pretty low-cost high performance quadrature encoder that can be easily configured to dump the data onto a serial port.

DarioPennisi

Hi,
not only... actually the idea is to create a high performance controller as we also have pretty flexible PWMs and we can synthesize many more peripherals. PWMs are able to produce, from a single counter, multiple phases each with its own independent phase and duty, moreover we're planning to make a PID "soft-ip" running in the soft processor so that you can close the loop in real time while leaving SAM D21 free to do anything else. of course any suggestion is more than welcome!

AustinClark

Hi,
not only... actually the idea is to create a high performance controller as we also have pretty flexible PWMs and we can synthesize many more peripherals. PWMs are able to produce, from a single counter, multiple phases each with its own independent phase and duty, moreover we're planning to make a PID "soft-ip" running in the soft processor so that you can close the loop in real time while leaving SAM D21 free to do anything else. of course any suggestion is more than welcome!
That's precisely what I had in mind!
I'm working on a robotics platform with a small group, and we're using the 4000 board for controlling peripherals, motors, and whatever other real-time tasks we end up implementing in the future.

I'm still really new to FPGA's, so right now I'm implementing the PID control loop in software, and using traditional PWM peripherals. However, I hope to implement everything on the FPGA as you described soon.

I'm currently pouring over the SAM timer/counter documentation to play with. I want to play with PWM frequencies so the motors aren't so loud, and hopefully to get better torque at lower speeds. I'm also running a fairly tight loop, and updating the pwm duty cycle so frequently probably isn't working well.

Anyway, I'm extremely excited for this platform to take off. How are there not a thousand or more projects/videos on youtube already? Maybe I should slap the first one together, and upload tomorrow :)

Go Up