Go to Post "The hardest part about building the robot is figuring out what to build..." - Jeff Waegelin [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-04-2009, 13:40
solomason519 solomason519 is offline
Registered User
FRC #0519
 
Join Date: Jan 2009
Location: detroit
Posts: 16
solomason519 is an unknown quantity at this point
encoder help

hey, im tryin to program the e4p motor encoder sensors to control the wheels so that they wont slip. Im programming in labview so anh help wud be greatly appreciated..
  #2   Spotlight this post!  
Unread 01-04-2009, 14:03
Nikhil Bajaj Nikhil Bajaj is offline
MATLAB Fan
FRC #0461 (Westside Boiler Invasion)
Team Role: Mentor
 
Join Date: Feb 2003
Rookie Year: 2002
Location: West Lafayette, Indiana
Posts: 101
Nikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond repute
Send a message via AIM to Nikhil Bajaj
Re: encoder help

We'd be happy to help you.

But what exactly are you having trouble with? Reading in encoder data? Algorithms for controlling the wheel slip? What sort of physical setup do you have to work with (do you have non-powered wheels with feedback as well, or something else? Do you have an encoder on each wheel? What sort of drivetrain do you have?)

Please give us a better idea of the details of your situation and we'll try to help you.
  #3   Spotlight this post!  
Unread 01-04-2009, 14:17
solomason519 solomason519 is offline
Registered User
FRC #0519
 
Join Date: Jan 2009
Location: detroit
Posts: 16
solomason519 is an unknown quantity at this point
Re: encoder help

i have arcade drive. Each side has a gearbox and each gearbox has an encoder. I want to program them for Algorithms to control wheel slippage. Can u write me a simple code for me to accomplish this please? Thanks...
  #4   Spotlight this post!  
Unread 01-04-2009, 15:04
Nikhil Bajaj Nikhil Bajaj is offline
MATLAB Fan
FRC #0461 (Westside Boiler Invasion)
Team Role: Mentor
 
Join Date: Feb 2003
Rookie Year: 2002
Location: West Lafayette, Indiana
Posts: 101
Nikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond repute
Send a message via AIM to Nikhil Bajaj
Re: encoder help

We can't just give you a code to do it. I think you need to think carefully about the situation, decided on a programming strategy, and see if it accomplishes what you want. The reason I say this is that it is not necessarily straightforward to write wheel slip control code, especially with the sensor arrangement you have.

To help you get started, let's go through a hypothetical code design process.

1.) What do you want to accomplish?
--We came up with the idea to control the wheel slip in software, in order to help reduce the amount of wheel slip we have during matches so we can control the robot better.

Okay, great. That's where we are now, right?

2.) Brainstorming solutions.
--In a physical system like a robot that we have to program, we have to closely consider the physical behavior of the system and what information we have about it before just diving in to programming--we wouldn't know what to do! Unfortunately, Labview, C, C++, etc. don't really have "traction control" blocks or libraries and even if they were available we would want to know what they did for sure before using them on our machines.
--So in order to come up with a solution, lets think about what is happening when the wheels are slipping. We have a wheel, on the ground. How do we get the robot to drive forward? We have a motor, which turns some gears in a gearbox, which turns the output shaft a bit slower based on our gear ratio, which may go through some sprockets and chain to go slower (or faster) which turn our wheel. Our encoder is measuring the speed somewhere in the gearbox, so we'll have to adjust for the gear ratio...but we can effectively find the wheel speed using the encoder, just by multiplying. So let's say we know the wheel speed. But if I know the wheel speed, do I know if the wheel is slipping or not?
--The answer is...no, not really. We need more information. If the robot is rolling really fast on the ground without slipping, the wheel speed can still be high. So an encoder on the gearbox isn't strictly enough to let you do wheel slip control.
--A hint--you can still (and certainly should) use the information from those gearbox encoders to control your slipping, but you need other information in addition to that to accomplish the task. For example, there are many teams who use un-driven wheels (that aren't powered by the drivetrain, so they won't slip as much, they just roll on the ground) and have encoders on those, and so they try to match the speeds, so that the driven wheels don't slip as much. There are other methods you could use, like using an accelerometer to estimate your actual speed and comparing that to the wheel speed so that you could make those match. That way you wouldn't have to add more wheels. But it might not work as well and may be more difficult to do, because you'd have to learn how to use an additional kind of sensor.

I hope this helps--but don't be alarmed if this raises more questions than it answers--that was the point.
  #5   Spotlight this post!  
Unread 01-04-2009, 15:11
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: encoder help

What Nikhil said.


The first step in writing a program is to know what you want it to do. Then you have to figure out how to do it. Forget about software for a moment and think about how a human driver would control wheel slip. Once you have a good idea of what the driver needs to do, you can try to translate that into something the computer can do.
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Programming a Quadrature Encoder programmr Programming 17 20-06-2008 10:40
Encoder Help with VEX and MPLAB qnetjoe Programming 5 11-03-2007 21:04
Encoder help E_Unit Electrical 5 16-02-2007 11:02
Encoder help Windward Programming 21 14-01-2006 15:10
shaft encoder help stephenthe1 Programming 2 03-12-2004 16:09


All times are GMT -5. The time now is 02:00.

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