last year I built my first robot based on Rover 5 platform and controlled by Arduino. I used it as an R & D platform an stacked it with various sensors, boards and electronics. It finally weighed 2.5 kg. Too much for the Rover 5 engines (7.2V DC / load current <160 mA / gearbox ratio: 86.8:1 / speed: 1 km/hr). The thing became annoying slow ;-).
Now I'm considering to make a second robot. One with mecanum wheels and heavier engines. The robot must not make too much noise. Should be relatively fast (+/- 5 km/hr) and should easily be able to accelerate. I expect that the robot will weigh about 3 kg.
**4 channel motor shield & robot control (DX8 or Ipad/Wifi) **
The first decisions are taken. This afternoon I ordered the Nexus Robot mecanum wheels and the motors suggested by Duane ( Pololu 12V DC , 150 rpm , 67:1 metal gearbox and an integrated quadrature encoder ) .
I am going to use an Arduino microcontroller. If I know better what functionality I want to make I decide on the type ( Uno , Due or Mega ). Now I am thinking about the motor shield and the robot controller.
For my first robot (Rover) I used two 2A Motor Shields of Dfrobot . Worked fine , but two shields . For my new robot I consider the Dagu 4 channel motor controller. Good choice? What can you recommend me?
For my first robot I made a remote ( APC220 + Arduino joystick + Arduino Pro) . For the new robot I doubt between:
Spectrum DX8 + AR8000 receiver ( I now use for my quadcopter ) .
Ipad using wifi connection
What are your thoughts on this? Or should I keep it simple and start with my current remote and try to master mecanum control first?
Today I looked into motor controllers suitable for my motors (12V, stall current @ 12V: 5A peak). First thing I noticed is that they are quite expensive. Eventually I ended up with the same controller that Duane has mentioned earlier “dual MC33926 motor” (http://www.pololu.com/product/1213). Relatively compact, relatively inexpensive and able to supply up to almost 3 A continuous current per channel, and able to tolerate peak currents up to 5 A per channel for a few seconds. I plan to use a 3S Lipo battery (3200mA 35C). Since the 11.1 V of the Lipo is slightly lower than the max voltage of the motors (12V) I expect the maximum motor peak current to be less than 5A, the maximum peak level of the driver. Does this make sense and what do you think my choices (lipo and controller)?
Problem I had with my previous robot was the motor speed resolution. The motor only spinned at PWM-values in the range 220 - 255. What can I expect from the configuration described above? Will I be able to use the full PWM-range?
I started thinking about mecanum motor / drive control. Google provided me with a number of useful links.
Today I had contact with a local model racing shop about the 3s LiPo in relation to the 12 V maximum of the motors. They also indicate that a little too high voltage is no real problem for the engines. Therewith also my choice is made for motor controllers and battery.
Next point is the mecanum control. I am studying at it at the moment and it is giving me a headache;-) And I have not even thought about converting the algorithm to an actual implementation.
Slowly I start to get a grip. Still no idea however for the incorporation of the encoder feedback (correct for slippage, measuring the actual speed, PID loop). Some hints would be appreciated.
I expect the first components sometime next week. Then also the physical work can begin.
a. Other kind of relation. Only used to turn the robot in stationaty state?
Duane addressed #1 and #2. “You want to compute the velocity vector based on the joystick position. The distance the joystick is from the center position is proportional to the speed. The angle the robot will travel is the angle of the joystick”.
It is my understanding that distance corresponds to Vd and angle to Θd. Correct? What about VΘ?
The assumption herby is that the orientation of the robot remain unchanged if only the translation joystick is used (no turning, only translating). What is the desired behavior if the rotation stick is used (#a)? Is the robot then standing still and turning on its axis (direction and angle => derived from the rotation joystick)? And how is that related to the formulas “behind the link” (or are they not related)?
And what about the desired behavior if both joysticks are used? Is the robot then (a) translating according to the translation joystick and (b) at the same time turning on his “translation path”?
Thanks for the explanation. My understanding at this point is as follows.
I thought atan2 was not available in Arduino but I was wrong and now know that it is available via math.h. Theatan2() function computes the principal value of the arc tangent of __y / __x, using the signs of both arguments to determine the quadrant of the return value. The returned value is in the range [-pi, +pi] radians). So we are clear on Θd.
Θd = atan2 (y / x)
all three variables of the type double.
x and y are the values of the translation joystick (respectively roll and pitch).
Vd is the desired robot speed, proportional to the distance the joystick is from the center position.
Vd = sqrt (x^2 + y^2)
same x and y as mentioned above
VΘis the rotation speed of the robot and is controlled by the second joystick (the rotation joystick, yaw).
yaw-value < midpoint : turn left
yaw-value > midpoint : turn right
yaw-value = midpoint : do nothing
whereby rotational speed is proportional tot yaw-value
Assumption in the above is that both joysticks operate independently of each other. Is that correct? Are the signals of the rotational joystick (roll, pitch) indeed not mixed with those of the translational joystick (yaw)? And if that is true: what is the desired behavior if both joysticks are used at the same time?
Ok, that’s enough preparation on this topic. Next step is to actual convert our analysis into a physical implementation. I’ll start with that after reception (and “installation”) of the motor controller and Mega board. Hopefully this weekend. To be continued.