Products for USB Sensing and Control
It is currently Sat Apr 19, 2014 4:40 pm

All times are UTC - 7 hours [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Tue Jan 10, 2012 3:22 pm 
Offline
Phidgetsian

Joined: Tue Jan 10, 2012 3:13 pm
Posts: 6
Hi, I have two US Digital E2-500-156-I-H-D-B encoders attached to the 1047. I opened the demo program from the Phidgets control panel and they seem to work but the numbers I'm getting are weird. First the position goes into the tens of thousands after only a quarter turn. The index is usually a couple thousand less then the position until in picks a point where it only changes past the first 3 digits, like position 390833 index 389788, and the index stays a few thousand counts lower but the first three never change. so next rotation is approx, position 648294 index 647788. I'm not sure what is going on.

So why are the counts so high and why does the index not seem to really work?

Thanks,
Andrew


Top
 Profile Send private message  
 
PostPosted: Wed Jan 11, 2012 9:22 am 
Offline
Engineering

Joined: Thu Nov 19, 2009 4:41 pm
Posts: 190
The index works by returning the position the encoder was at when the index was triggered, so it is typical for the index to appear to lag behind the actual position.

As for your large count values... it is really hard to know why that would be happening. with that encoder you should be getting 2000 for one revolution, so that is quite strange behaviour. A start is to make sure your cable is hooked up correctly. Try using it in a different port, and try using the 2nd encoder you bought to see if it has the same behaviour


Top
 Profile Send private message  
 
PostPosted: Wed Jan 11, 2012 4:07 pm 
Offline
Phidgetsian

Joined: Tue Jan 10, 2012 3:13 pm
Posts: 6
hi fraser, well it's behaving the same way for both, I don't know if that's a good sign.

I understand the index should lag behind, but it also changes every time I turn the wheel, even if it's just a little bit, but the first three digits stay the same, just past the thousands place changes

It should be connected properly according to the pinout on the US Digital site. I didn't install the encoder, it came attached to the motor assembly. I could flip the connector on the encoder and see if that fixes it, but would that damage it if it's already in the correct position, ie if it's already correct then flipping the connector would apply 5v to the index pin. pinouts here http://www.usdigital.com/assets/general ... heet_4.pdf


Top
 Profile Send private message  
 
PostPosted: Wed Jan 11, 2012 4:52 pm 
Offline
Engineering

Joined: Thu Nov 19, 2009 4:41 pm
Posts: 190
oh i think i know whats going on. I didnt know it was already attached to a motor assembly. Likely what is happening, is that your motor is geared down, making it so the load shaft of the motor turns at a slower rate than the shaft attached to the encoder. Does your motor specify a gear ratio? if your getting 10000 counts on a quarter-turn, then the motor's internal gear ratio would likely be 1:20 or so.

Also, the index only triggers once per revolution, which would be every 2000 counts, so thats why you only see index update in the thousands range.


Top
 Profile Send private message  
 
PostPosted: Wed Jan 11, 2012 11:26 pm 
Offline
Phidgetsian

Joined: Tue Jan 10, 2012 3:13 pm
Posts: 6
yep, I think your right. Or at least then the numbers make since. I'm using a drive system I bought years ago but didn't use much at the time. I have these motors http://www.globe-motors.com/15sp_in.pdf, not sure of the gear ratio since I think they changed there part number, mine is a 455A1018. Sent Globe Motors an email for the part specs.

But I think that's the issue, once I know the exact gear ratio I can calculate the counts/revolution. I guess the Index isn't that useful then :(

but thank you fraser :)


Top
 Profile Send private message  
 
PostPosted: Wed Jan 11, 2012 11:42 pm 
Offline
Phidgetsian

Joined: Tue Jan 10, 2012 3:13 pm
Posts: 6
huh, just thought of something, it looks like a revolution is about 255,000 counts, and since the encoder only goes up to 250,000 counts per second I can't even count 1 rev/sec :( I actually bought the 1047 to replace two 1057s, which can handle 500,000 counts/sec, I guess I should have kept them on


Top
 Profile Send private message  
 
PostPosted: Wed Jan 11, 2012 11:44 pm 
Offline
Phidgetsian

Joined: Tue Jan 10, 2012 3:13 pm
Posts: 6
does the 250,000 counts/sec apply for what the microcontroller on the board can keep track of or what can be fired over USB? In the application I'm using the encoders would be polled by the API, eg getPosition, at 25-50 hz


Top
 Profile Send private message  
 
PostPosted: Thu Jan 12, 2012 9:37 am 
Offline
Engineering

Joined: Thu Nov 19, 2009 4:41 pm
Posts: 190
The measurable counts/sec is restricted by the size of the memory registers in the FPGA, which does all of the work on the 1047. So reducing throughput of data wouldn't resolve the issue.

From the specs you mentioned, it seems the motor you have has a reduction ratio of 127.78, since your approximated 255000 rotation divided by the 2000 count encoder is 127.5

What sort of speeds were you hoping to use this motor at? An encoder like the one you are using is usually intended for high precision position feedback rather than high speeds. If the encoder on the motor is easily removable, you could try replacing it with another encoder with lower counts/rev.

In your application, are you trying to track position or speed or both? because if you only want to track speed, you could technically use the index to measure it. You can also use the index to track your position when travelling beyond 1rev/sec, and when your motors needs to slow down and stop, switch back to using the encoder counts when within the 1rev/sec limit.


Top
 Profile Send private message  
 
PostPosted: Thu Jan 12, 2012 11:38 am 
Offline
Phidgetsian

Joined: Tue Jan 10, 2012 3:13 pm
Posts: 6
I need to use the encoders to produce a velocity output for robot odometry. But I may be ok, I have to see what the max speed the robot can go under typical load. The wheels are 15cm, so one revolution is a little over a foot and a half. I think I once calculated the max speed at 40-something feet per minute, so this may not actually be a problem.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group