Let's Make Robots!

Rover 5 - Dagu Spider and 4 Channel Motor Controller

Ok so i recently purchased the Rover 5 Kit from Robotsavvy by Dagu.

With Help from Oddbot i have put wires from the encoder into the Motor Controller (in the right place i think)

But i have no idea which pins go to the arduino and also where on the arduino they go to.


Image of what ive done and the question :


Any help would be appreciated.




(P.S. I hope this is in the right area)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

The wires on the left side are what i am presuming go to the arduino.

As im unsure what goes to the arduino and what doesnt. 

I dont have much experience with the arduino but in a programming sense ive worked with C# for about 4 years now.

In an electronic sense ive only been working with the arduino for about 5 days and dont really have a great knowledge of electronics/circuitry.

I suppose im looking for a quick solution which i know is not the best way and then learning backwards after it works.

I have been looking as some basics in electronics on youtube which is again no the best way to learn but i work alot and dont have time for anything time consuming.


I just looked up and read the manual and it seems pretty straight forward.

Current output:
Each channel has a current sensing circuit. The output of this circuit is approximately
1V for each amp the motor draws (5V maximum). This output can be connected
directly to the analog input of any 5V micro controller.

Control logic:
The built in control logic allows each motor to be controlled by 2 pins. Driving the
direction pin high or low will cause the motor to run forward or reverse. The PWM pin
is used to control the motor speed. When this pin is low, the motor is off. When this pin
is high the motor is at full power. To vary the speed of the motor this pin must be Pulse
Width Modulated.

Is there any of the above that is not clear to you?

ok so if im using say Channel 1 - i connect the Cur pin to an Analog pin (A0 - A9) on my Spider, the PWM to a Digital Pin (D2 – D13 and D44 – D46)

The Gnd would obviously go to the GND on the board and im unsure about the Dir pin.

Dig it.

Forget about the current pin for now --For testing, KISS is better. Less wires and fewer connections are good things. Connect then if you would like, they will neither help nor harm and will do nothing until the Arduino is coded to read them.

From there, you basically got 2 pins (connections) per motor. In the most simple set-up, if one is high and the other low, the motor will rotate (full speed) one direction. Reverse the high/low and the motor will reverse direction. This same system exists when one of those pins is connected to a PWM output on the Arduino. [do some searches for PWM] The idea is that the PWM output on the arduino is flicked on-and-off, wicked fast (thousands of times a second) and the percentage of time that the "pulses" are either on or off, controls the speed. Lets say it is at a %50 duty cycle --The PWM pin will be high 1/2 the time and low 1/2 the time thus, 1/2 speed. This would also be around 1/2 brightness if one were dimming a LED via the same method.

In the end, you will have one pin per motor going to a PWM output and one pin per motor going to a digital pin. The PWM controls the speed and the digital pin will toggle your FWD/REV.

That's about it.


ok so looking at http://www.arduino.cc/en/Tutorial/PWM

to control the speed i write analogwrite(Pin, 0-255)

and to control the Direction i write digitalWrite(Pin, HIGH or LOW)

so i wrote a quick bit of sample code but its not working:

int DirPin = 11;

int PWMPin = A0;

void setup() {

  pinMode(DirPin, OUTPUT);

  pinMode(PWMPin, OUTPUT);  


void loop() { 

 digitalWrite(DirPin, HIGH);

  analogWrite(PWMPin, 255);



Is A0 a PWM output? --Be sure it is.

In your main loop, you have dirpin HIGH and the PWM pin maxed out to 255. This is HIGH/HIGH and will not allow your motor to run. I would try a PWM speed of 127 to test.

More about PWM --This one might be a bit funny in your head. Lets assume you have a 75% duty cycle --High for 3/4 of the time and low for 1/4 of the time. Lets also assume your direction pin is low. This will result in 75% speed in that you will have a high/low (on) situation 75% of the time and low/low (off) 25% of the time. Now, lets change that direction pin to high instead to change direction. With this same 75% duty cycle, you will now have a high/high (off) 75% of the time and a low/high situation 25% of the time --this will result in 25% power the other direction. It seems counter-intuitive but to get your 75% power the "other direction" you actually need a 25% duty cycle.

Play around a bit and it should become clear.

wahey i have movement.

I had my power in the wrong places. Ive now forwarded power from my Spider to the Motor controllers Logic and then added the Battery Pack to the Motor supply (if that makes any sense) lol.

So thats 1 wheel/4 moving :D

Every ground should be connected to every ground.

It looks like a big mess of wires but i have all 4 Wheels spinning :D

Thanks alot for your help :)

I did a mock up of how my circuit looks for the sake of it.


Let me know if anything is fatally wrong please. It seems to be working though.