Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited

Dagu 4Ch Motor Controller(Rover 5) Assistance Needed!

hello all,
im in the process of building my first ez robot and ive realized how much i truly have to learn at once. anyway when i ordered my rover 5 chassis (4 motor w/ encoders model) i opted to go with the dagu 4ch motor driver since it supported the encoders. i now realize that as a beginner wanting to jump in head first this wasnt the best idea. im fairly certain ive figured out how to correctly connect the driver to ez-b and both to my 6v sla power source, but if anyone has a diagram of how to do this properly i would feel more comfortable. my major problem is scripting a custom control panel to drive this thing. i have no clue what im doing and a push in the right direction would be greatly appreciated.

maybe DJ will add this motor controller in a future update? as i understand it ez-robot works very closely with dagu and carrys the rover 5 in store so it seems likely. ill cross my fingers.


Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

AI Support Bot
Related Content
this is my obstacle. can anyone help? ive posted my problem in a few related threads and i almost got help once.
United Kingdom
I can't see why, especially as the script in the project I set up sets the same on or off and PWM as required. I can only suggest attempting it since it seems to work for @RobertL184

If you can diagram it as a schematic just to ensure everything is as thought that would be great. www.CircuitLab.com is simple to use and free if you don't have any other software or aren't familier with any other. Or ExpressPCB is a free schematic application.

I'm eager to get this set up and working for you. It'll ultimately decide if I go for this controller or the L298 (since this one is out of stock where I was going to get it hence not having it yet).
I hooked up +5V input power on the dagu controller board to the ez-b +5V external power and run power to the ez-b and Dagu controller motor power from the ez-b battery pack. I added a switch to the plus side of the battery pack. The whole thing comes up at once just fine. When I first set it up I used Standard AA batteries. I have since switched to NiMH batteries. Mine has a slight pull to the right over longer distances on a straight course, but this isn't unusual. I'm hoping when ez-b eventually supports encoders to be able to compensate. My brother has the same setup running as well.
United Kingdom
Haven't got any input on this yet, but I have a Dagu R5 (4x4) and a Dagu 4channel motor controller arriving next week. I'll try setting it up as per Rich's suggestion, then we can rule out the setup as the problem. (I.E, hardware error or user error)
United Kingdom
That'll be great Bill. I've put a project in one of the posts in this topic too to save you having to set all that up.
United Kingdom
Super, will get it downloaded. Expecting the dagu and controller to arrive on Tuesday or Wednesday.:)
United Kingdom
Where did you get it Bill? I was after one but it was out of stock when I looked so hung fire on it.
So big news! My original wireing was done with a jumper wire starter pack, and being short on proper sizes I had pieced quiet a few together with different lengths. Today I bought proper lenght jumpers and decided I'd first try rewiring from @Rich s original layout in case the franken-jumpers were to blame. I ran the test project again and to my amazement it worked! Well mostly, the motors now do change directions and the back to the future script did vary the speed ( Pwm sliders also work) but none of the commands stop the motors. The only way I can stop them is to drag the pwm to a very low number, wait a sec, then drag to 0. I don't know still of it was the jumper mess or me messing up but it's much cleaner now and it works! Now how do I stop it?
My Stop Script reads:


D14 is the PWM output on my EZ-B that drives the Motor Speed on the DAGU controller.

I have a FWD Script, LEFT Script, Right Script, BACK Script, and a STOP Script.
United Kingdom
@Rich : Purchased mine from RoboSavvy. You can buy from their website or their Ebay store.

The website prices are lower, but I think the shipping is higher. I guess it probably balances out.
United Kingdom
@Bill Thanks.

@RoboHobo great news:)

To stop, it looks like you will need to use @RobertL184's script.
Thank you all very much. @Rich especially for taking so much time to help me. Project post within the week I'd say. =)
United Kingdom
You're more than welcome. Looking forward to see the project:)
United Kingdom
Okay! So my dagu+board turned up today, and after work I set about getting it all wired together. I followed Rich's example from the first forum page, then figured out how to wire the power on and what went where.

So, did it work? Well, yes. Ish.

Problem 1, the plugs on the Dagu chassis' motors are backwards. They are one-way only plugs, so connect only one way to the board. But when plugged in thusly, the red wire is on the gnd pin, not the red one. Without un-crimping/re-crimping the plugs, they will always be backwards. Thankfully, as I udnerstand, that doesn't matter really. It just means everything backwards.

Anywho, problem 2...

With all 4 motors hooked up, the pairs need their directions reversed relative to each other, otherwise the script fails.

If we say for arguments sake, the motors are labelled thusly;
| |
| |
| |

(Warning, weird pseudo-code coming up!)

In this case, motor 1 has to be set Dir(0) with motor 2 Dir(1), otherwise they both turn opposite directions, resulting in a whole lot of unhappy motor-fairies. Could this be a result of the weird plugs, I don't know. The same goes for 3 and 4. As a result, the custom Movement Panel doesn't work (It sets all to off or on). Obviously, this fix is quick and simple.

Problem 3... For some reason, when using the Stop button on the custom movement panel, none of the motors stop turning. In addition, if you slide quickly from ON to OFF on a PWM slider, the motor doesn't stop. Only when going gradually from top to bottom does it shut off. It's almost like it needs to hit 1% then 0% to turn it off. I don't know if this is a Dagu issue or an EZB issue.

Anywho, I'm exhausted from work, so I'm going to fiddle again tomorrow.

Hope some of this makes sense!:D

- Bill.
United Kingdom

I so should've read the rest of the forum post before putting up my post. I see from Robert's script that he already addressed the stopping issue.

Makes me wonder, why is this the case? Is it dagu or ezb based, and would kicking it help?;)
United Kingdom
I'm wondering, (It's early, forgive me!).. Can everything share a common ground? Could I, for example, take D0 gnd to a breadboard, and put all the grounds on to that? With the way Robert has it, one channel for PWM (Makes sense, you want them all going the same speed in the end), then the channels paired off (1,3 / 2,4) for dir, and then a common ground, it'll require only three EzB outputs to be used?
United Kingdom
..So I thought before re-wiring, I would try editing Rich's script, to try and get the directions right etc. I hooked up the logic power, then connected the motor power and had an unexpected encounter with Puff the Magic Smoke. :/ Thankfully from the Dagu board, not the EzB. No idea why, though. Checked, double-checked, triple-checked the wiring, everything okay.

Unhooked everything, plugged in Logic power, then motor power and a second coming of Puff, some more magic smoke. :/


- Bill.
so awesome! drove it around my livingroom for too long (if you test it 3 times, your playing with it).

one question though, when i was putting things back together more permanatly i forgot to plug the +5v and gnd from the ez-b to power the logic. It was unplugged the entire time i was scripting the rest of the custom Movement Panel and through all the "testing" i did once i had it right. what exactly is this powering?
United Kingdom
That's concerning Bill, can you send it back under warranty?

Great news Robohobo. I have no idea what it powers though. It may be +5V to supply the microcontroller as I have recently learnt some other controllers have... but I'm guessing.
United Kingdom
It's difficult; I can't, in good conscience, completely rule out user error. I should really know better than to fiddle with complex things when it's stupid-o-clock and I've just got up.

Thankfully, the dagu boards aren't expensive, so another one is already on it's way. With a nothing-before-10am ban on it lol

Any idea on the common ground thing btw?
I grounded everything as @Rich originally suggested (the ports that control pwm and dir are grounded to Gnd of the corresponding channel on the dagu board) and it works great! Why exactly is it done this way? can anyone steer me to where i can learn more about proper grounding?