View Single Post
  #4   Spotlight this post!  
Unread 14-04-2016, 10:33
NickLD3753's Avatar
NickLD3753 NickLD3753 is offline
Registered User
FRC #3753 (BulahBots)
Team Role: Programmer
 
Join Date: Apr 2016
Rookie Year: 2015
Location: Louisiana
Posts: 1
NickLD3753 is an unknown quantity at this point
Re: Arduino + Jaguar Speed Controller + CIM Motor

Hi, I think what your issue is might be with the default pulse-width of the signal coming from the Servo library.

Some manufactures decide to vary their input range from the standard timings. Also, most RC servos (what the Library was made for) have a different range from what I have seen FRC Controllers use most of the time.

I did a quick look for the Jaguar Datasheet and found this:
http://content.vexrobotics.com/docs/...t_20130220.pdf

This is what the Datasheet says about the input range:

Minimum pulse width 0.67 ms
Neutral pulse width 1.5 ms
Maximum pulse width 2.33 ms

All We need to do now is convert the ms to us:

Minimum pulse width 670 us
Neutral pulse width 1500 us
Maximum pulse width 2330 us


Now the great thing about the servo library is the ability to skip the scaling of the normal RC servo range and just input the raw us timing values.

Code:
myservo.writeMicroseconds(UsTiming);
After that It should be pretty easy to map the values accordingly.

I hope that solves your issue!
Reply With Quote