Go to Post We do not pursue awards, we pursue greatness and the awards follow. - Sunshine [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 01-18-2016, 05:35 PM
johnny_Bet johnny_Bet is offline
Dark Lord of Code
AKA: Johnny Bettencourt
FRC #4643 (Thunderbird Robotics)
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2015
Location: United States
Posts: 11
johnny_Bet is infamous around these parts
Wink Motor Twitch...

Hello people of Chief Delphi! I'm the programmer for team 4643. We are experiencing difficulties with twitching motors. When code is disabled the motors don't twitch, leading me to conclude that it's a programming issue. I will be putting my code on github soon as well as a link to the repository but I can't right this second. Any help is appreciated!
Reply With Quote
  #2   Spotlight this post!  
Unread 01-18-2016, 05:41 PM
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,569
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Motor Twitch...

Quote:
Originally Posted by johnny_Bet View Post
Hello people of Chief Delphi! I'm the programmer for team 4643. We are experiencing difficulties with twitching motors. When code is disabled the motors don't twitch, leading me to conclude that it's a programming issue. I will be putting my code on github soon as well as a link to the repository but I can't right this second. Any help is appreciated!
Are you controlling your motors via PWM or CAN? Poorly wired robots can occasionally generate or pick up electrical noise that can make PWM controlled motors twitch.

If it's not electrical, then the next most popular option is commanding the motor multiple times in a control loop. As soon as you call motor->Set(x), the output is set. Calling motor-Set(0) later will largely insure that the motor won't move much since the 0 will be active longer, but it could still twitch from the momentary setting to an actual value.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #3   Spotlight this post!  
Unread 01-19-2016, 01:39 PM
CryptoStorm's Avatar
CryptoStorm CryptoStorm is offline
EIC Tech
AKA: Joshua Stilwell
FRC #5056 (MegaHurtz)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2004
Location: Buchanan MI
Posts: 26
CryptoStorm is an unknown quantity at this point
Re: Motor Twitch...

what are you using for your user input? You may need to add a deadband for your neutral input.

here are a couple ways:
http://www.chiefdelphi.com/forums/sh...=joystick+dead

Last edited by CryptoStorm : 01-19-2016 at 02:21 PM.
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 09:16 AM.

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