Pages: [1]   Go Down
Author Topic: COM-11102 Spark Fun Encoder Question  (Read 324 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 85
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Greetings,

I am building a hobby Coordinate Measuring Machine with four 1024 pulse rotary encoders from the spark fun website www.sparkfun.com item #11102. it is basically a four segment arm with no motor just encoders. I'm not really going into any reverse kinematics as my arm, hand and brain will be my feedback loop.

These devices output 1024 pulses per rotation. I will be using 4 of them. The regular arduino has a sampling rate of 15 khz do you think with hand motion (rpm max) that a regular Arduino UNO could keep up with these or do I need to use something like a DUE?

Also has anyone used that specific encoder before? Example code is always my best friend. Or has anyone ever attempted this?

Thanks !
Logged

Brisbane, Australia
Offline Offline
Edison Member
*
Karma: 29
Posts: 1074
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

There's a link on the product page for that encodeer that talks about this problem, and offers a solution (here).  Did you check that out? Looks promising.

Geoff
Logged

"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

0
Offline Offline
Shannon Member
****
Karma: 162
Posts: 10523
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The regular arduino has a sampling rate of 15 khz do you think with hand motion (rpm max) that a regular Arduino UNO could keep up with these or do I need to use something like a DUE?

15kHz?  No, that can't be right, digitalRead() takes about 5us or so, so reading two pins takes 10us - 100kHz rate.
analogRead is limited to about 10kHz, perhaps that's what you were thinking of?

With direct port reading you can read up to 8 pins simultaneously in 125ns or so...  The response time of the interrupt
handler will be the limiting factor, and again that is a few us.

I think with 4 encoders you'll need to look at using pin-change interrupts to drive the encoder reading, and
direct port reading.  There are probably examples of both on here if you search for them.
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: