Community Question

I have the DAGU 4 channel motor controller. Has anyone connected it to the EZ-B v3?


*Message from EZ-Robot: We re-wrote your message. Do not write in all caps. Please ask questiosn with proper grammer and provide detail. Please use proper subjects. Use our re-write as an example to write messages in the future. Sadly, if your messages are not written correctly then no one will respond and it clutters the forum.
DJ Sures
Commented February 2014
I used the search feature and found this: http://www.ez-robot.com/Community/Forum/posts.aspx?threadId=4383

Hope that helps!
Jeremie
Commented February 2014
Hello @rd550F,

No
need to yell, we hear you loud and clear :)

Here's a picture of the Dagu 4 channel motor driver with a description of it's input/outputs:

User-inserted image

I would draw you a diagram but it'll be faster to explain it, you'll want 2 of the EZ-B digital pins hooked up to each of the CH1 direction & PWM, CH2 direction & PWM, CH3 direction & PWM, and CH4 direction & PWM pins on the motor controller. You'll probably want your full battery voltage (as long as it's between 4.5V to 12V) to be hooked up to the Motor supply line and regulated 5V from the EZ-B hooked up to the 5V input and don't forget to connect the grounds of the 2 boards together. All that's left is to hook up the motor output connections to your DC motors.

You could connect up some other items like the current and encoder pins but we'll keep it simple for now.

So to control it from the EZ-B you'll need to send a high or low to each Direction line to switch directions and send a PWM signals to each PWM line to control the speed for each motor, you can do this with adding PWM and Digital pin controls, or you could write a test script something like this:

Code:


Set(D0, HIGH)
PWM(D1, 50)
Set(D2, HIGH)
PWM(D3, 50)
Set(D4, HIGH)
PWM(D5, 50)
Set(D6, HIGH)
PWM(D7, 50)
Sleep(2000)
Set(D0, LOW)
PWM(D1, 50)
Set(D2, LOW)
PWM(D3, 50)
Set(D4, LOW)
PWM(D5, 50)
Set(D6, LOW)
PWM(D7, 50)
Sleep(2000)
GetDigital(D0)
GetDigital(D2)
GetDigital(D4)
GetDigital(D6)



The GetDigital command turns the EZ-B outputs to inputs (High Impedance) which should stop the motors.

Hope that helps, and my apologies if your capslock button was jammed.

Jeremie
Commented February 2014
Wow, maybe I should have browsed before I answered, lol :D

I keep forgetting how great a resource this forum is for all kinds of Robotic solutions!
Rich
Commented February 2014
I love this driver yet still haven't got round to ordering one. It was a little bit of a challenge getting one working through forum posts originally but it's all explained in the post DJ linked to and the original discussions which should give a lot of insight in to how I managed to work it out.

I also made a few projects for testing purposes. This one was fun :) Although some scripts may be old syntax (I'm not 100% sure) so you may need to check it.

While it's not the same, the theory behind movement will be similar to the L298n H-Bridge. This tutorial may be of some use and may explain the theory and methods behind the movement.


It may not be realistic or feasible but native EZ-Builder support for the Dagu 4 channel driver (with additional current sensors) could be a nice addition in a future update? I know it's one of the lesser used drivers but for 4 wheel drive, in my opinion it is one of the better drivers to use. Just a suggestion to add to the bottom of that list :D
rb550f
Commented February 2014
Thanks for fast response..Again thank you.
Question
Avatarrb550f
Asked on Thursday, February 6, 2014