OCCRA
Go to Post According to Merriam-Webster the definition of lurker is an FRC Q&A person. - marshall [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-05-2017, 04:26 PM
ttnn58 ttnn58 is offline
Registered User
FRC #4586
 
Join Date: Jun 2016
Location: earth
Posts: 51
ttnn58 is an unknown quantity at this point
flywheel counter rate stuck at 0

hi!
we are trying to program a PID flywheel shouter with a one channel encoder (ie counter, ya know).
the hardware is connected well, but when the flywheel speed goes above 10 rotations per second the rate from the getRate() method of the counter just stops and turn to 0, so we can't track the wheel's speed.
we want about 25-30 RPS so it is a bit of a problam now. the sensor can sense in this frequency, and i am pretty sure the roborio can handle it as well... what could be the problem?
thanks in advance
Reply With Quote
  #2   Spotlight this post!  
Unread 12-05-2017, 04:30 PM
Daniel_LaFleur's Avatar
Daniel_LaFleur Daniel_LaFleur is offline
Mad Scientist
AKA: Me
FRC #2040 (DERT)
Team Role: Engineer
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Peoria, IL
Posts: 2,063
Daniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond repute
Send a message via MSN to Daniel_LaFleur
Re: flywheel counter rate stuck at 0

Quote:
Originally Posted by ttnn58 View Post
hi!
we are trying to program a PID flywheel shouter with a one channel encoder (ie counter, ya know).
the hardware is connected well, but when the flywheel speed goes above 10 rotations per second the rate from the getRate() method of the counter just stops and turn to 0, so we can't track the wheel's speed.
we want about 25-30 RPS so it is a bit of a problam now. the sensor can sense in this frequency, and i am pretty sure the roborio can handle it as well... what could be the problem?
thanks in advance
What is the number of ticks per revolution?
__________________
"We are not now that strength which in old days moved earth and heaven; that which we are, we are;
One equal temper of heroic hearts, Made weak by time and fate, but strong in will
To strive, to seek, to find, and not to yield. "
- Tennyson, Ulysses
Reply With Quote
  #3   Spotlight this post!  
Unread 12-05-2017, 04:41 PM
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 4,898
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: flywheel counter rate stuck at 0

We had a drive encoder do something similar (though at a lower speed). At some point, the encoder wheel would get caught on something in the enclosure and disengage from the shaft.

Whether it's that or something else, if you have an oscilloscope or even a multimeter with a frequency counter, you can see if your encoder is actually generating the electrical signal or not, helping zoom in on the problem.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
  #4   Spotlight this post!  
Unread 12-06-2017, 12:30 AM
ttnn58 ttnn58 is offline
Registered User
FRC #4586
 
Join Date: Jun 2016
Location: earth
Posts: 51
ttnn58 is an unknown quantity at this point
Re: flywheel counter rate stuck at 0

Quote:
Originally Posted by Daniel_LaFleur View Post
What is the number of ticks per revolution?
50 ticks per revolution
Reply With Quote
  #5   Spotlight this post!  
Unread 12-06-2017, 12:41 AM
EricH's Avatar
EricH EricH is offline
New year, new team
FRC #1197 (Torbots)
Team Role: Engineer
 
Join Date: Jan 2005
Rookie Year: 2003
Location: SoCal
Posts: 20,896
EricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond repute
Re: flywheel counter rate stuck at 0

Quote:
Originally Posted by ttnn58 View Post
50 ticks per revolution
So you're running at 1500 ticks/second at the upper end of your desired speed, but the encoder falls to 0 at about 500 ticks/second.

I'm wondering if you're running up against something in software, or the encoder just isn't rated for that kind of tick speed.

What encoder are you using? That could help inform recommendations.
__________________
Past teams:
2003-2007: FRC0330 BeachBots; 2008: FRC1135 Shmoebotics; 2012: FRC4046 Schroedinger's Dragons

"Rockets are tricky..."--Elon Musk


Reply With Quote
  #6   Spotlight this post!  
Unread 12-06-2017, 03:11 AM
ttnn58 ttnn58 is offline
Registered User
FRC #4586
 
Join Date: Jun 2016
Location: earth
Posts: 51
ttnn58 is an unknown quantity at this point
Re: flywheel counter rate stuck at 0

Quote:
Originally Posted by EricH View Post
So you're running at 1500 ticks/second at the upper end of your desired speed, but the encoder falls to 0 at about 500 ticks/second.

I'm wondering if you're running up against something in software, or the encoder just isn't rated for that kind of tick speed.

What encoder are you using? That could help inform recommendations.
Not an actual encoder, but a photo microsensor with a round steel plate with 50 holes in it on the shaft of the wheel. (Not "homemade", the holes are accurate)
The sensor is from this series:
https://www.ia.omron.com/products/family/436/
they are rated for a response frequency of 1khz, but the thing is that on our last robot we have been able to maintain a speed of 29 rotations per second with exactly the same hardware, using the same method in code, but now it wont work above 12 RPS... i will try to measure it with an osiloscope or something as soon as i can, but do you have any idea what could be the problem if it isn't the sensor's abillity?
Reply With Quote
  #7   Spotlight this post!  
Unread 12-06-2017, 07:03 AM
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 4,898
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: flywheel counter rate stuck at 0

Note that the spec sheet says "repsonse frequency * 2", which implies counting both rising and falling edges. You're right at the rated minimum response frequency when you drop out. You may just have a sensor that is down at the min rather than the average of 3 kHz. If so, either get a faster sensor, or use fewer holes.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.

Last edited by GeeTwo : 12-06-2017 at 07:05 AM.
Reply With Quote
  #8   Spotlight this post!  
Unread 12-06-2017, 07:43 AM
ttnn58 ttnn58 is offline
Registered User
FRC #4586
 
Join Date: Jun 2016
Location: earth
Posts: 51
ttnn58 is an unknown quantity at this point
Re: flywheel counter rate stuck at 0

Quote:
Originally Posted by GeeTwo View Post
Note that the spec sheet says "repsonse frequency * 2", which implies counting both rising and falling edges. You're right at the rated minimum response frequency when you drop out. You may just have a sensor that is down at the min rather than the average of 3 kHz. If so, either get a faster sensor, or use fewer holes.
Thanks everyone for your help!
I will try to find a faster sensor. Its still weird that this sensor worked for so long XD
Reply With Quote
  #9   Spotlight this post!  
Unread 12-06-2017, 08:18 AM
Daniel_LaFleur's Avatar
Daniel_LaFleur Daniel_LaFleur is offline
Mad Scientist
AKA: Me
FRC #2040 (DERT)
Team Role: Engineer
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Peoria, IL
Posts: 2,063
Daniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond repute
Send a message via MSN to Daniel_LaFleur
Re: flywheel counter rate stuck at 0

Quote:
Originally Posted by ttnn58 View Post
Thanks everyone for your help!
I will try to find a faster sensor. Its still weird that this sensor worked for so long XD
The 'average' sensor of that type will handle 3K ... which translates to 30rpm.

It just so happens that this sensor is at the minimum (1K) of the spec.


There is a good lesson here about tolerances and what area of the spec you should be looking at
__________________
"We are not now that strength which in old days moved earth and heaven; that which we are, we are;
One equal temper of heroic hearts, Made weak by time and fate, but strong in will
To strive, to seek, to find, and not to yield. "
- Tennyson, Ulysses
Reply With Quote
  #10   Spotlight this post!  
Unread 12-06-2017, 09:03 AM
ttnn58 ttnn58 is offline
Registered User
FRC #4586
 
Join Date: Jun 2016
Location: earth
Posts: 51
ttnn58 is an unknown quantity at this point
Re: flywheel counter rate stuck at 0

Quote:
Originally Posted by Daniel_LaFleur View Post
The 'average' sensor of that type will handle 3K ... which translates to 30rpm.

It just so happens that this sensor is at the minimum (1K) of the spec.


There is a good lesson here about tolerances and what area of the spec you should be looking at
wait, let me get this straight: the manufacturer wrote 1K as a minimum frequency while the avarage sensor of the same model can reach 3K or more?
we have at least another 3 of those exact sensors lying around, should i try another one?
Reply With Quote
  #11   Spotlight this post!  
Unread 12-06-2017, 11:52 AM
Daniel_LaFleur's Avatar
Daniel_LaFleur Daniel_LaFleur is offline
Mad Scientist
AKA: Me
FRC #2040 (DERT)
Team Role: Engineer
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Peoria, IL
Posts: 2,063
Daniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond repute
Send a message via MSN to Daniel_LaFleur
Re: flywheel counter rate stuck at 0

Quote:
Originally Posted by ttnn58 View Post
wait, let me get this straight: the manufacturer wrote 1K as a minimum frequency while the avarage sensor of the same model can reach 3K or more?
we have at least another 3 of those exact sensors lying around, should i try another one?
I would try another, yes.

But in the real world, when choosing a part to put into a product, I would take worst case scenario (in this case 1K) and give a safety margin.
__________________
"We are not now that strength which in old days moved earth and heaven; that which we are, we are;
One equal temper of heroic hearts, Made weak by time and fate, but strong in will
To strive, to seek, to find, and not to yield. "
- Tennyson, Ulysses
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 05:37 PM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi