Go to Post The season ended. Not cool. - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Events   CD-Media   CD-Spy   FRC-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 02-06-2002, 08:00 PM
J. Stofflett's Avatar
J. Stofflett J. Stofflett is offline
Registered User
FRC #0123
 
Join Date: Oct 2001
Rookie Year: 1997
Location: Michigan
Posts: 35
J. Stofflett has a spectacular aura aboutJ. Stofflett has a spectacular aura aboutJ. Stofflett has a spectacular aura about
Need help with PBASIC Code

We are working on refining our drive train on our robot and have encountered a problem with overloading the 30 amp breakers supplying power to the wheels. We are using a four-wheel drive setup with a tank drive to steer. We have changed the gear ratio once and will be changing it again but time is running out. We are very weak in the area of programming and wonder if anyone could help, is it possible to reduce the power output to the motors by changing the default code in the robot controller? We are running the 2 big black motors using speed controllers from PWM-1 and PWM-2. We have played with changing the default to tank steer with one joystick, using the changes found on Innovation First site. This gives us a sense that we can successful change the code and up load it to the controller if someone would be able to supply use with the changes that need to be made. Any suggestions or resources you could provide would be very helpful
  #2   Spotlight this post!  
Unread 02-06-2002, 08:24 PM
Unsung FIRST Hero
Warren Boudreau Warren Boudreau is offline
Registered User
FRC #0180 (Team SPAM)
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 1999
Location: Stuart, FL
Posts: 344
Warren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond repute
It sounds like your gear ratio is still too high.
The stall loads on these motors are a killer and if you try to accelerate too fast you might be blowing the breakers.
One thing that helps is to ramp up the speed. There are some white papers out there that talk about first order filters where the driver jerking the joystick around gets smoothed out on the way to the motors.

Good luck. Once our drive train is put together, I suspect I may be scratching my head on this as well.
__________________
Warren B

Don't be afraid to think outside of the box. As long as you stay in the frame perimeter.
  #3   Spotlight this post!  
Unread 02-06-2002, 08:48 PM
Curtis Williams Curtis Williams is offline
Registered User
#0588 (Team 588)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Jacksonville, FL
Posts: 122
Curtis Williams is on a distinguished road
Send a message via ICQ to Curtis Williams Send a message via AIM to Curtis Williams Send a message via MSN to Curtis Williams Send a message via Yahoo to Curtis Williams
Also, when you do trip a breaker, give it some time to cool down or it will trip more easily than before.
  #4   Spotlight this post!  
Unread 02-06-2002, 09:49 PM
Matt Reiland's Avatar
Matt Reiland Matt Reiland is offline
'The' drive behind the drive
None #0226 (TEC CReW Hammerheads)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1999
Location: Troy Michigan
Posts: 712
Matt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond repute
Here are some code bits to try

p1_xfilter VAR byte 'Filtered X input on Port 1
p1_yfilter VAR byte 'Filtered Y input on Port1 p1_xfiltercoef CON 100
p1_yfiltercoef CON 100

p1_yfilter=p1_yfilter+((256+p1_y-p1_yfilter)*p1_yfiltercoef/200)-(256*p1_yfiltercoef/200)
p1_xfilter=p1_xfilter+((256+p1_x-p1_xfilter)*p1_xfiltercoef/200)-(256*p1_xfiltercoef/200)
p1_y = p1_yfilter
p1_x = p1_xfilter

This will slow down the abrubt changes to the p1_x and p1_y values

I can give you code to slow it down a % of full but it sounds like you are getting a spike from either a big change in speed or there is too much load on steering (I can't help you on the second)

P.S. you can play with the coeficients to ramp slower or faster

I think this code came from MOE a few years ago
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
PBASIC 2.5 Code on the RC Goya Programming 2 01-12-2003 04:00 PM
Does your team use the Default code. Jeff McCune General Forum 2 01-09-2003 01:46 PM
2003 PBasic default code from Innovation First ttedrow Programming 0 01-06-2003 10:18 AM
emulationFIRST (aka PBasic emulator) Matt Leese Programming 5 06-30-2002 11:06 AM
BuzzWriter - PBasic Assistant archiver 2000 0 06-23-2002 09:58 PM


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

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


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