Dagu Rover 5 chassis robot demo

I would like to know if this Motor driver board will work with Arduino Due ? ( 3.3V Due)

I don't know for sure. I don't have a Due, so I suggest you email the makers (or suppliers) of the board.

The designer of most Dagu products posts on the letsmakerobots.com forum. You could ask him there...

Another question:

Any idea what is the type of 4 white JST connectors for motors? Got the board, trying to connect motors.

Not really. The motor and the driver board happened to have matching connectors.

Thank Nick you for the sample sketch!

I've manage to put together a small rover based on same motor control board and Leonardo.
Only one difference I have 4WD, so I will modify it in order to handle all 4 wheels, if you don't mind.

I solve my problem with JST by just wrapping bare wire around prongs, no pretty by will work for now.

Looks good. :slight_smile:

Hi Nick,
This is quite a long lasting thread. Like the rest, I've recently bought a 2-motor Dagu 5 rover and I also have the motor shield you seem to be using.
Firstly, I have a bit of a problem. Just to test out the Rover, I hooked up the rover to my Arduino Uno just like you have, also neglecting the encoders and I ran your code. When the rover drives, it favours the right rear motor (making it veer to the right). Any ideas on how to remedy this?

Secondly, my rover needs to navigate an obstacle course and hence needs to know approximately where it is. You mentioned above about using the encoders to determine the no. of revolutions of each wheel. Now, I'm what you would call a 'complete novice' when it comes to Arduino and the like and I was wondering how you would go about using the encoders for this purpose. If you had any instructions for me, or could point me in the direction for some help, I would be greatly appreciative. Cheers!

... it favours the right rear motor ...

I doubt the motors all have identical performance, so it is quite likely it would veer a bit. You could try to determine what factor to increase/decrease that motor by to compensate.

You mentioned above about using the encoders to determine the no. of revolutions of each wheel.

I have a snippet (small example program actually) in the section "Reading the rotary encoders". You could incorporate that to find out whether one wheel is moving faster than the other and perhaps use that as a motor compensation.

However this will be thrown out if the track spins, which it tends to a bit, because if one spins a bit as it comes up to speed the number of counts won't reflect which way it is going.

If you are negotiating an obstacle course a proximity sensors might help keep it going straight. For example, sideways mounted IR emitters/detectors could be used to make sure it is in the middle of the current lane. I haven't tried this, it's just a suggestion.

Compensate by adjusting the PWM value of a particular motor? That's a good idea!

What kind of battery would you recommend to power the motor shield? At the moment, whilst I'm getting my bearings I'm just playing around with 6 regular Alkaline AA batteries but what I've heard is that these may provide an unreliable current/ current drops off quite quickly. I looked at LiPo but they seemed quite expensive at JayCar (~$70 for 12V 3600mAh). Is a regular 9V battery ok for supplying power to the Arduino board?

Thanks for you're help!

I used the 7.4V 3300 mAH battery from JayCar.

Sure you can use AA batteries but don't expect them to last very long.

What do you mean by 9V battery exactly? Not the sort you put in smoke alarms?

Yep, the type you put in smoke alarms. They're no good?

Also, I seem to remember reading somewhere that you can't disconnect the power supply to the Arduino board whilst the power supply to the motor board is still connected. Will this damage my Arduino board?

Those smoke-alarm batteries certainly won't driver the motors. They might power the Arduino for a while.

I don't see any harm in turning the Arduino power off even if the motor board is on.

Yeah, I was just going to use (for now) a 9V smoke alarm battery to power the board and 6 AA batteries for the motor.
So I was thinking to engage the Arduino board to cycle through the program I write I'd just slap a swith between the Arduino power supply and the Arduino board. So I would have a flip switch or something similar. Do you think this would suffice?

Yes, that is what I have. Not even a switch, I just plug the battery in.

Thanks Nick, I think that covers all of my concerns for this project (for now!). You've been a massive help!
Doubtless I will have more questions arising in the future though. Cheers

Hi Nick,
I just wanted to run some things past you and get your opinion.
So for the power supply of our rover (the motor shield and the arduino uno board) I'm using a 12 V 1300 mAh Sla battery which is run through a voltage regulator and so the output is a steady 9 V. This is then wired into both the Arduino and into the motor shield.

We are only running the two motor dagu 5 rover and hence we have two channels on the 4 channel motor shield unoccupied. We need to run a third dc motor to raise an lower a bridge but the stall current for the dc motor we have is 6.18 A (this is the motor http://www.mabuchi-motor.co.jp/cgi-bin/catalog/e_catalog.cgi?CAT_ID=fk_260sa). The manual for the shield says that a dc motor with stall current greater than 4.5 A should not be used, else we could damage the shield. My question is can we use this motor with the shield ensuring that we read the current pin for that channel and turning the dc motor off when the current exceeds, say 4 A?
Or can we somehow just hook it up through the arduino chip, bypassing the shield? Or do we need to get a motor with a lower stall current?

Thanks for your help.

Hey nick, i bought the same motor drive shield but im running a 4WD robot, im receiving a command throught a TCP server to move the robot in any direction, i wrote this code and want your opinion (Mind my low programing skills), this code is a test code.

#define motorpin0 2 // Direction ch1 front right motor
#define motorpin1 3 // Direction ch2 front left motor
#define motorpin2 4 // Direction ch3 back right motor
#define motorpin3 7 // Direction ch4 back left motor
#define speedpin0 5 //Speed Ch1
#define speedpin1 6 //Speed Ch2
#define speedpin2 9 //Speed Ch3
#define speedpin3 10 //Speed Ch4
int count=0;

void setup() {
//the motor control wires are outputs
pinMode (motorpin0, OUTPUT);
pinMode(motorpin1, OUTPUT);
pinMode(motorpin2, OUTPUT);
pinMode(motorpin3, OUTPUT);
//PWM Pins are outputs
pinMode(speedpin0, OUTPUT);
pinMode(speedpin1, OUTPUT);
pinMode(speedpin2, OUTPUT);
pinMode(speedpin3, OUTPUT);

}

void loop() {
  
    analogWrite(speedpin0,255);
    analogWrite(speedpin1,255);
    analogWrite(speedpin2,255);
    analogWrite(speedpin3,255);
    
  switch (count)
  {
    case 0: //forward
    digitalWrite(motorpin0,1);
    digitalWrite(motorpin1,1);
    digitalWrite(motorpin2,1);
    digitalWrite(motorpin3,1);
    delay(10000);
    count++;
    break;
    
     case 1: //Turn right
    
    analogWrite(speedpin0,50);
    analogWrite(speedpin2,50);
    
    digitalWrite(motorpin0,1);
    digitalWrite(motorpin1,1);
    digitalWrite(motorpin2,1);
    digitalWrite(motorpin3,1);
    delay(1200);
    count++;
    break;
    
    case 2: //backward
    
    digitalWrite(motorpin0,0);
    digitalWrite(motorpin1,0);
    digitalWrite(motorpin2,0);
    digitalWrite(motorpin3,0);
    delay (5000);
    count++;
    break;
    
   
    case 3: //Turn left
    
    analogWrite(speedpin1,50);
    analogWrite(speedpin3,50);
    
    digitalWrite(motorpin0,1);
    digitalWrite(motorpin1,1);
    digitalWrite(motorpin2,1);
    digitalWrite(motorpin3,1);
    delay(1200);
    count++;
    break;
}
}

Ill replace the count with the incoming command to move the vehicle as requested, im not using any encoders, also to rotate the vehicle i used the PWM, by reducing the cycle from 255 to 50 on right motoros to move it right, vice versa for the left.

hi everybody im a newbie can any one help me with a sketch to control this with a Futaba 7cap transmitter ..
what i want it to do is move with the x and y axis of the right stick on the controller ...
any and all help will be great... thanks

ollie_d:
We are only running the two motor dagu 5 rover and hence we have two channels on the 4 channel motor shield unoccupied. We need to run a third dc motor to raise an lower a bridge but the stall current for the dc motor we have is 6.18 A (this is the motor http://www.mabuchi-motor.co.jp/cgi-bin/catalog/e_catalog.cgi?CAT_ID=fk_260sa). The manual for the shield says that a dc motor with stall current greater than 4.5 A should not be used, else we could damage the shield. My question is can we use this motor with the shield ensuring that we read the current pin for that channel and turning the dc motor off when the current exceeds, say 4 A?
Or can we somehow just hook it up through the arduino chip, bypassing the shield? Or do we need to get a motor with a lower stall current?

I know this was addressed to nick, but I also have the Dagu 4 motor controller and rover (4 motor version). As long as you code it correctly and wire it to check the current on that specific motor/channel, you can absolutely have it stop when it reaches a specific amperage.
You could probably even put in a 4amp fuse on the motor if you weren't sure of your code. A failsafe to protect your hardware. But it is pretty straight forward and easily done with the the 4 motor controller, so that might be overkill. Just write it to operate that specific motor while the current is less than 4amps (while loop) .
I do something similar with the wheels. Stop the motors and display a message on the screen.