Go to Post Guys, Can we agree that "we used it in the past" is not a response. Thanks. - Al Skierkiewicz [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 26-02-2004, 04:14
outofcontrol outofcontrol is offline
Registered User
#1310
 
Join Date: Feb 2004
Location: Toronto
Posts: 1
outofcontrol is an unknown quantity at this point
PWM problem in autonomous

I'm sorry for the newbie post but we just finished trying our robot out for the first time. (It's 4am!) We are a rookie team and we have most things working except autonomous mode. This may have come up before but I don't have time to scan every autonomous thread. If someone would be kind enough to explain why our motor speed controllers flash the orange light (no signal on PWM outputs?) and don't work in autonomous mode. They work fine in manual mode. I checked the code and it seems fine. I stripped the default routinesfast routine down to just moving forward and it won't do that. We can't test any of our code because of this. Help!
  #2   Spotlight this post!  
Unread 26-02-2004, 06:59
Chris Bright's Avatar
Chris Bright Chris Bright is offline
Registered User
#1023 (Bedford Express)
Team Role: Webmaster
 
Join Date: Feb 2003
Rookie Year: 2003
Location: Temperance, MI
Posts: 54
Chris Bright will become famous soon enough
Send a message via AIM to Chris Bright
Re: PWM problem in autonomous

we had the same problem but first released an updated default code on tuesday. download it at innovationfirst.org. it initialize the relays and motors.
and generates pwm signals. Hope that helps and good luck.
__________________
2003 - National Rookie All-stars
2003 - Great Lake Rookie All -stars
  #3   Spotlight this post!  
Unread 26-02-2004, 07:29
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: PWM problem in autonomous

255 is the reset command. Use 254
  #4   Spotlight this post!  
Unread 26-02-2004, 12:10
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: 354
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
Re: PWM problem in autonomous

We found that if your motors are on PWMs 13-16 and you have more than one interrupt, the PWMs lose signal (blinking orange light on speed controllers) when both interrupts trip. Don't know why, but we moved the motors to PWMs 9-12 and the problem went away.
__________________
Warren B

Pool Noodles. They're not just for bumpers anymore.
  #5   Spotlight this post!  
Unread 26-02-2004, 13:39
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: PWM problem in autonomous

Quote:
Originally Posted by Warren Boudreau
We found that if your motors are on PWMs 13-16 and you have more than one interrupt, the PWMs lose signal (blinking orange light on speed controllers) when both interrupts trip. Don't know why, but we moved the motors to PWMs 9-12 and the problem went away.
From the infrared beacon and tracking FAQ:

Q: I merged the code from the tracker codebase into my code for non-autonomous driving, including dropping the replacement user_routines_fast.c in place of the default one, and things got weird. The trackers would run okay, but the motors, connected to PWM 13 and PWM 15, started running and stopping with a jerking motion. Having read that there is something different about PWMs 13 through 16, I connected my motors to PWM 10 and PWM 11, turned all the tracking code back on, and everything worked nicely! Can you tell me why changing the motors from 13 and 15 to 10 and 11 changed the behavior from erratic to normal? What's going on here?
A: PWMs 13 through 16 are different because they're controlled by the user processor. I saw the wacky behavior you described while developing the receiver and tracking code. The problem isn't with my code (as far as I know). The IFI folks know about this and wrote it up.


Q: We're seeing wacky behavior like that described above, but we're not using PWMs 13 through 16. What's up?
A: Your interrupt handler(s) might not be saving enough context information. I altered the code to be more conservative in this regard. Get the latest version of the code or just alter the #pragma interruptlow line in user_routines_fast.c to look like this:


#pragma interruptlow InterruptHandlerLow save=PROD,section("MATH_DATA"),section(".tmpdata")

If this change causes problems for you (e.g. your encoders stop working correctly), there are other options that you can try. Read section 2.9.2 of the PIC18 compiler user's guide for more information.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #6   Spotlight this post!  
Unread 27-02-2004, 11:58
EricS-Team180's Avatar
EricS-Team180 EricS-Team180 is offline
SPAM, the lunchmeat of superheroes!
AKA: Eric Schreffler
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Apr 2002
Rookie Year: 2001
Location: Stuart, Florida
Posts: 561
EricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond repute
Re: PWM problem in autonomous

Thanks for the heads up Kevin.
What's interesting, is that we'd been experimenting with 128/rev encoders and you're Quadrature code (sweet find!) for a few nights....seeing if they swamped the processor with interrupts...(they did). And we did not see this effect, at first. Then , last Saturday, we divided down the signals to lower the rate/rev. After that, we could use one encoder but not two. With the chasis up on blocks, we could spin one encoder by hand, but as soon as we turned the second encoder, the signals to the speed controllers on 13-16 would stop. ....very strange indeed.

We switched pwms and put on 64bit/rev encoders,took out the divider circuit, and things "give the appearance of working"

Thanks again
Eric Schreffler
__________________

Don't PANIC!
S. P. A. M.
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
Urgent!!! Problem concerning Backup battery and autonomous. Code\\Pilot Programming 3 26-02-2004 16:44
pwm 13-15 wayne 05 Programming 2 04-10-2003 12:08
PWM and burning out motors patrickrd Technical Discussion 7 19-06-2003 15:30
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11
Autonomous Kill Switch UCGL_Guy Programming 8 15-01-2003 17:39


All times are GMT -5. The time now is 15:46.

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