|
|
|
Forum Guru
      
Group: Forum Members
Last Login: Saturday, August 20, 2011 7:44 PM
Posts: 50,
Visits: 711
|
|
| Hi I have a traxster II with the std motors that come with it From looking at the serializer library it looks like I have several different methods to control the motors:- 1) DifferentialMotorController 2) PIDMotorController 3) PWMDCMotorController 4) DCMotorController Can someone explain in simple terms the differences and why I should use one over the other, as a bit confused as to why 4 different ways to do one thing?? Thanks!
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: Friday, April 22, 2011 6:18 PM
Posts: 153,
Visits: 547
|
|
Hello wingers,
I will try to answer your question.
The RoboticsConnection Serializer is a DCMotorController.
It controls DC motors (within its spec's) speed and direction.
Pulse Width Modulation (PWM) is used to drive the onboard H-bridge.
PWM is a more efficient method than varying DC current or voltage
to control a motor. The On-time of the positive going pulse determines
the speed of the motor. A 50% on time with a 50% off time
under ideal conditions delivers half speed by the motors.
Your Traxter II has two motors with Encoders for a closed loop
motor rotation feedback. The encoders are used in the PID portion
of the motor controller to vary speed and power depending on the PID
settings. More on the Serializer PID can be gleaned from the manual.
Simplified, the PID variables set motor torque, startup ramping
speed and other items that allow for smooth motion. The encoders
allow you to keep track of the Traxters position or how much a motor has
spun. With this info you can make accurate 45 or 90 degree turns
as an example. You can read the encoder count to see how far your bot
traveled. The encoders can work in conjunction with the PID to manage
speed and direction.
The two motors allow for Differential motor control
allowing the motors to turn at any speed in any direction
simultaneously. This works because the Serializer has two
independent motor control outputs, motor (1) and motor (2).
I realize my answers are brief but you can learn much more.
You might search this fine forum for the PID and PWM terms for more information.
Or googling PID DC motor control and PWM if you want more information.
There is a mind boggling amount of info out there.
Perhaps someone will chime in and help clarify better than I have. And
if I made any mistakes I do hope they will be corrected.
Enjoy your Traxster,
Don Lewis
|
|
|
|
|
Forum Guru
      
Group: Forum Members
Last Login: Saturday, August 20, 2011 7:44 PM
Posts: 50,
Visits: 711
|
|
| Right thanks Don I certainly get that using PIDmotorcontroller allows me to move specific distances, turn set angles etc and that is great I still don't really get why I would used DifferentialMotorControl over PWMDCMotorController or vice versa as they both seem to do the same thing?
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640,
Visits: 819
|
|
| Hey guys, Thanks Don for the excellent explanation... You will be better off using the PIDMotorController for your Traxster, which, as you know, allows you to control distance and speed. If however, you weren't interested in that, you could use the DifferentialMotorController object, since this object is designed for robots that use two drive motors for differential steering. The main difference between DifferentialMotorController and PWMDCMotorController is that the DifferentialMotorController object sends one atomic 'pwm' command to the Serializer, with settings for BOTH motors. Whereas the PWMDCMotorController object only sends a 'pwm' command for ONE motor. This means that the DifferentialMotorController object allows the motors to start driving at the same time, whereas if you used the PwmDCMotorController object to send two commands to drive two different motors, then one motor would start before the other (undesired). The PWMDCMotorController object is handy for any other situation where the Serializer is controlling a DC motor, and it doesn't have to be coupled w/ another motor.  Lastly, the Serializer .NET lib is object oriented. 99% of all users can use the current motor control objects to control their robot. However, we provide the DCMotorControlBase, which provides a base class (with speed, id, etc. properties), that users can inherit their own classes from and create an entirely new object. This allows them to tap into the Serializer library functionality for sending/receiving commands, but add their own 'twist' to the motor control classes. The PWMDCMotorController inherits from DCMotorControlBase actually. Hope that helps! Best Regards!
Jason Summerour President, Summerour Robotics Corporation www.roboticsconnection.com
|
|
|
|
|
Forum Guru
      
Group: Forum Members
Last Login: Saturday, August 20, 2011 7:44 PM
Posts: 50,
Visits: 711
|
|
| Thank you both - that explained it perfectly for me!!!
|
|
|
|
|
Forum Guru
      
Group: Forum Members
Last Login: Saturday, August 20, 2011 7:44 PM
Posts: 50,
Visits: 711
|
|
| am I right in thinking the speed can be anything between 1 and 100? if so if I set it to 50 or less it will struggle to even move (is traxster base with netbook on top so not too heavy), the minimum to move seems to be about 60-65, is this correct or do I have a problem?
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: Sunday, October 18, 2009 8:47 AM
Posts: 23,
Visits: 169
|
|
wingers (2/16/2009)
am I right in thinking the speed can be anything between 1 and 100? if so if I set it to 50 or less it will struggle to even move (is traxster base with netbook on top so not too heavy), the minimum to move seems to be about 60-65, is this correct or do I have a problem? Thats about the same response I get from my Traxster with a 7.2volt 3500 mAh battery on it (no netbook though, just compass, sonar and ir distance sensors)
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640,
Visits: 819
|
|
Yeah, you can go up to 100%, if at 100% you're getting below 8V or so. This depends on the output voltage of your battery of course. If it's a 7.2V battery, you can go to 100%, but if the voltage is higher, you'll want to back off from 100% so you don't send too much voltage to the motors. There are several other posts explaining why.Best Regards!
Jason Summerour President, Summerour Robotics Corporation www.roboticsconnection.com
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: Friday, April 22, 2011 6:18 PM
Posts: 153,
Visits: 547
|
|
Well I am glad Jason got on and made the correct answer. I feel kinda silly
now for approaching the question from a hardware point of view. My logical
mind working overtime again
Don Lewis
|
|
|
|
|
Forum Guru
      
Group: Forum Members
Last Login: Saturday, August 20, 2011 7:44 PM
Posts: 50,
Visits: 711
|
|
| A couple of more queries along the same sort of line:- 1) If i use say a speed value of 65 with DMC it produces a slower speed than it does if I use that same speed value of 65 with PWM - any reason for that? why are they different? 2) If i use the PIDMotorController example I cannot get the angle rotation to work properly, if I enter 180 degrees I would expect the robot to turn on the spot and face the opposite direction, but it doesn't seem to do a full 180, same with any other angles I tried - any ideas? Thanks
|
|
|
|