Let's Make Robots!

Rover 5 motors turn in opposite directions


Finally managed to complete the wiring on my Rover 5. I removed the tracks and elevated the chassis and uploaded a simple sketch to run each motor at 1/3 speed for 5 seconds each. Using a Spider and the Dagu 4ch motor controller. Powered by a 2s 3000mAh Lipo.

Motors 3 and 4 turn in the opposite direction to 1 and 2.

I rechecked the wiring and the sketch and all seems in order. I read that a previous builder found that the motor controller was incorrectly wired from the factory but this doesn't seem to be the case with mine.

I pulled the "dir" pin on Motor 4 to 0V and the "dir" pin on Motor 1 to 5V (to remove the sketch from the equation) and they both then turned in the same direction. So the "dir" pins are apparently working (but 3 and 4 seem to be back to front). I confirmed all voltages with a DMM and a Digital 'scope.

I haven't seriously started to debug this yet but I'd be grateful for any suggestions. Am I missing something obvious?



Comment viewing options

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


If the motors are rotating in oposit direction you wanted and you don't want to change de code, invert wire position of these motors :D

I'm not sure why you are disconnecting anything. Just leave the robot on and upload your code. Otherwise it would help if you posted a clear schematic showing how yo have connected everything. It is hard to offer good advice without good information.

Thanks for all your responses.

After re-reading my original post, I realised that I didn't make the intent of my question clear.

The manual for the 4ch controller (and the silk screening on the board) show the motor ports as Motor 1 on the lower left, Motor 2 on the lower right and 3 and 4 left to right on the top. If you adopt a logical approach and connect these ports to the corresponding motors ie 1 to the lower left motor, 2 to the lower right and so on, set all the "dir" pins to HIGH, then each pair of motors rotates in the opposite direction. After re-checking everything, I just swapped the connectors for 3 and 4, adjusted the #defines in the sketch and everything worked fine.

So, (and sorry for not making it clear), but I wasn't asking how to fix it as that was easy. I was really asking if this is the way the hardware was actually configured as it seems a little inconsistent to me. Bajdi's post suggests that it is.

Apologies for what is probably nit-picking but my programmer's brain tends to avoid gotchas that might bite me later.

Another question (possibly for OddBot). I followed your advice from a previous post and built up one of the LM2940CT based 5v regs in your walkthrough. The Lipo is directly connected to the Spider supply and to the motor supply on the 4ch controller (through a switch so I can power up the logic first) and also to the LM2940CT whose output feeds the 5V logic on the 4ch controller. This works fine. If I want to upload a sketch to the Spider, I'll (obviously) disconnect the battery and connect the USB. This will power up the Spider but not the 4ch controller. I'm probably being over-cautious, but is it safe to apply logic signals from the Spider to an un-powered 4ch controller (since all the digital pins will still be connected)?




For the robot to move forward or backward, the left and right motors do need to rotate in opposite directions. Just change which channels you use for left and right.

Wire the motors the other way round.

Pretty simple fix 

I had to change the connectors of the motors to get them all to turn in the same direction. The 'pins' in the white connectors (of the motors) can be easily switched around. You can carefully push them out by pushing on the pins on the side of the connector.

Hope this explanation makes sense :)