Go to Post Looks like it will be to your advantage to keep the Refs happy. Remember, Donuts go a long way toward that end! - billbo911 [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 23-03-2004, 23:14
tophq's Avatar
tophq tophq is offline
mastr of autodsk (or not)
AKA: Chris Payk
#0703 (Inferno)
Team Role: Programmer
 
Join Date: Dec 2003
Location: Saginaw, MI
Posts: 19
tophq is an unknown quantity at this point
not quite sure...speed controller...spike.

ok, we just got back a couple days ago from Detroit Regional and now I have couple questions.

1. is it necassary to use a speed controller on ALL motors, or can i (legally) use a spike for the window motor?

2. if i have to use a speed controller, then what (for example) would i do to make a motor used to power a wench as far as coding goes? (ie, if i wanted to use the p2_sw_aux1 to retract the wench, would i say:
Code:
if(p2_sw_aux1 == 1)
     {
     pwm05 = 255
     }
else
     {
     pwm05 = 127
     }
when we used a speed controller, for some odd reason, the motor would activate and start retracting the wench. when we swapped it out for a spike (and changed the code accordingly), it worked out beautifully.

3. can anyone help out.

sorry if this post sounds jumbled, im kind of in a hurry. any help would be thanked greatly.
  #2   Spotlight this post!  
Unread 23-03-2004, 23:18
Max Lobovsky's Avatar
Max Lobovsky Max Lobovsky is offline
Fold em oval!
FRC #1257 (Parallel Universe)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Scotch Plains, NJ
Posts: 1,026
Max Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant future
Send a message via AIM to Max Lobovsky
Re: not quite sure...speed controller...spike.

This may or may not be related, but i have found that lots of joystick buttons seem to flicker IE not giving a constant stream of 1's when they are being pressed. Our code now checks the button over the period of 3 or 4 frames to make sure its really pressed. This is probably a good idea for a winch button anyway, you wouldnt want it accidentally pressed.
__________________
Learn, edit, inspire: The FIRSTwiki.
Team 1257


2005 NYC Regional - 2nd seed, Xerox Creativity Award, Autodesk Visualization Award
2005 Chesapeake Regional - Engineering Inspiration Award
2004 Chesapeake Regional - Rookie Inspiration award
2004 NJ Regional - Team Spirit Award
  #3   Spotlight this post!  
Unread 23-03-2004, 23:20
KevinB's Avatar
KevinB KevinB is offline
Registered User
AKA: Alum
no team
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2001
Location: AL
Posts: 188
KevinB will become famous soon enoughKevinB will become famous soon enough
Send a message via ICQ to KevinB
Re: not quite sure...speed controller...spike.

Quote:
Originally Posted by tophq
is it necassary to use a speed controller on ALL motors, or can i (legally) use a spike for the window motor?
You may use a Spike for the window motor.
Quote:
Originally Posted by tophq
2. if i have to use a speed controller, then what (for example) would i do to make a motor used to power a wench as far as coding goes? (ie, if i wanted to use the p2_sw_aux1 to retract the wench, would i say:
Code:
if(p2_sw_aux1 == 1)
     {
     pwm05 = 255
     }
else
     {
     pwm05 = 127
     }
This code looks valid, except you are missing semicolons at the end of the "pwm05 = XXX" statements. Also, I'm not sure if this applies to the new controller, but the old controller didn't like PWMs being set to 255 -- we were told to use 254 instead.


Quote:
Originally Posted by tophq
when we used a speed controller, for some odd reason, the motor would activate and start retracting the wench. when we swapped it out for a spike (and changed the code accordingly), it worked out beautifully..
I'd be willing to bet this was probably caused by some code error that you accidentally remedied when you changed to the Spike. If you posted the exact old and new code, we might be able to better help you.
  #4   Spotlight this post!  
Unread 23-03-2004, 23:23
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: not quite sure...speed controller...spike.

255 is not a valid output for pwms (victors) - it can make the communcation between your code and the layer above it lose synch

254 is the max you should ever output

that might be why your victor wacked out

or it could be it wasnt calibrated correctly - if you are certain you are sending it 127 and the motor is still trying to move, then it either needs to be recalibrated, or its not working correctly.

to answer your original question, it says in the robot section of the manual which motors you can use with spikes - Im almost certain a window motor would be ok.
  #5   Spotlight this post!  
Unread 23-03-2004, 23:52
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: not quite sure...speed controller...spike.

Quote:
Originally Posted by maxlobovsky
This may or may not be related, but i have found that lots of joystick buttons seem to flicker IE not giving a constant stream of 1's when they are being pressed. Our code now checks the button over the period of 3 or 4 frames to make sure its really pressed. This is probably a good idea for a winch button anyway, you wouldnt want it accidentally pressed.
wow! im impressed that you discovered that by yourself!

Its called 'switch bounce' - when you close a switch or pushbutton it takes about a 1/10th of a second for it to make solid contact - the surfaces actually do bounce a tiny bit - so if a fast microprocessor is polling the switch it will see it go 00001101010011110111111011111111111

and your timing is right - 3 frames is about a 100 mS

nice catch!
  #6   Spotlight this post!  
Unread 24-03-2004, 05:37
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: not quite sure...speed controller...spike.

I will add that, in our code we had values of 255 being output and weird things were happening. I chnaged it after I saw something on here and the problem went away. At the same time I also changed something else, so it may be a coincidence though.
__________________

  #7   Spotlight this post!  
Unread 24-03-2004, 06:28
N7UJJ N7UJJ is offline
Teacher
AKA: Allan Cameron
FRC #5465 (BinaryBots)
Team Role: Teacher
 
Join Date: Jan 2004
Rookie Year: 2002
Location: Phoenix, AZ
Posts: 253
N7UJJ has a reputation beyond reputeN7UJJ has a reputation beyond reputeN7UJJ has a reputation beyond reputeN7UJJ has a reputation beyond reputeN7UJJ has a reputation beyond reputeN7UJJ has a reputation beyond reputeN7UJJ has a reputation beyond reputeN7UJJ has a reputation beyond reputeN7UJJ has a reputation beyond reputeN7UJJ has a reputation beyond reputeN7UJJ has a reputation beyond repute
Re: not quite sure...speed controller...spike.

We had our winch motor controled by a spike. At the AZ regional inspection they told us all moters MUST be controlled by a controler, not a spike. We swapped them out and we use code like yours, except our max was 254.
  #8   Spotlight this post!  
Unread 24-03-2004, 06:56
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: not quite sure...speed controller...spike.

Quote:
Originally Posted by N7UJJ
We had our winch motor controled by a spike. At the AZ regional inspection they told us all moters MUST be controlled by a controler, not a spike. We swapped them out and we use code like yours, except our max was 254.
The seat motor and the window motor can be powered by a spike. (See http://www2.usfirst.org/2004comp/5-T...corporated.pdf, <R35>)

--EDIT--
Maybe they mean't all the motors on you robot.
__________________

  #9   Spotlight this post!  
Unread 26-03-2004, 13:43
tophq's Avatar
tophq tophq is offline
mastr of autodsk (or not)
AKA: Chris Payk
#0703 (Inferno)
Team Role: Programmer
 
Join Date: Dec 2003
Location: Saginaw, MI
Posts: 19
tophq is an unknown quantity at this point
Re: not quite sure...speed controller...spike.

ok, i guess then we'll stick with a controller. sorry about the code i posted above. i ALWAYS forget to place those semi-colons there, then when i try to build the code, it fails and i instantaniously know what happened. i should really get some help for that problem (anyone want to start a support group...lol). ok, i'll try to make those changes when we get to canada. man i wish i was a real programmer...lol. thanks people!
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
Speed Controller brake/coast setting steven114 Electrical 21 03-03-2004 13:05
How do you connect the speed controller fans? Iain Electrical 7 31-01-2003 07:05
Speed controller fan replacement Rickertsen2 Electrical 11 16-01-2003 08:46
Speed Controller Limits yaman Technical Discussion 11 15-01-2003 18:40
making speed controller digital CharlieWilken Electrical 4 01-03-2002 20:15


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

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