Let's Make Robots!

4 channel motor cotroller with encoder mixing circuit


AttachmentSize
4_Channel_instruction_manual.pdf1.42 MB
Vendor's Description: 


This is the 4 channel motor controller from DAGU. Although designed for the Rover 5 chassis this controller is suitable for any small robot using Omni or Mecanum wheels.

Features:
4x low resistance FET "H" bridge rated for 4.5A stall current each.
4x Current sensing circuit with an output of aproximately 1V per amp of current draw.
4x Quadrature encoder mixing circuit.

The built in mixing circuitry mixes the 2 inputs from the quadrature encoder into a single output of twice the frequency. This allows a single interrupt pin to monitor both outputs of a quadrature encoder. Speed and distance can also be measured with twice the resolution compared to monitoring a single output. See the attached instruction manual for more details.

Comment viewing options

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

I ordered one of these motor controllers recently to use with the rover5. I connected everything up as instructed and wrote a simple sketch just to make the motors rotate. However as soon as all the motors started to rotate smoke stream out and it quickly stopped. I thought it was a faulty controller so I get a replacement from the seller however the second one did the same..... 

When the Arduino is connected to my PC via USB and no battery pack is connected i can get one motor to rotate slowly (obviously only getting minimal power from the USB port), I am only able to get the motor to rotate in one direction. When the direction pin is low the motor rotates however when it is HIGH it does not.....

When I connect up the battery pack (I am using the battery pack supplied with the controller), there is enough power to cause the components to burn out, it only seems to do it when all four motors are running. I have checked all the connections several times and everything is correct. On both motor controller boards it has been CH4 / CH3 that have burnt out not CH1 or CH2


My code consists of the following

 digitalWrite(4,LOW);
 analogWrite(5,254);
  digitalWrite(7,LOW);
 analogWrite(6,254);
  digitalWrite(8,LOW);
 analogWrite(9,254);
  digitalWrite(12,LOW);
 analogWrite(10,254);

delay(1000);

 digitalWrite(4,HIGH);
 analogWrite(5,254);
 digitalWrite(7,HIGH);
 analogWrite(6,254);
 digitalWrite(8,HIGH);
 analogWrite(9,254);
 digitalWrite(12,HIGH);
 analogWrite(10,254);

I am currently testing this without the tracks on so i can see each motor rotating. When the burn out happens there is no drag on any motor so it is minimum load.... Any help would be great.

Cheers

Incorrect code cannot cause this problem.

The boards are factory tested. The fact that you have had the same problem with two different boards indicates you have either made a mistake in your wiring or there is a short.

Note: you must supply the board with +5V for it's logic as well as +V to drive your motors.

Please post a clear photo of your setup. What is your battery voltage?

I have done some more testing with a different motor controller (DFROBOT) this controller is only rated for 1A continuous and 2A peak, this also only controls two motors however it worked perfectly.... I was thinking could there be an issue where I am powering the Arduino using the Vin from the battery pack and using the same battery pack to power the VBatt for the motor controller. Could there be something strange happening where the Motor controller 5v logic comes from the arduino 5v rail when the arduino and motor controller are powered by the same power supply? Should I be using a seperate powersupply for the Arduino and the Motor controller?

No, a single battery supply is all you need. My mecanum puppy robot using the Rover 5 and mecanum wheels just used 6x 1.2 NiMh batteries.

http://www.youtube.com/watch?v=r-V2uHWQObI

Since you say only channels 3&4 short with both 4ch controllers I still think you have a problem with your wiring. Try using insulated washers on your brass mounting post in case they are shorting something on the PCB.

Either I am missing something or there is something really wrong with the two motor controllers I have. I now have a motor controller that isnt burnt out but I still get the issue where the motors only run in one direction..... I have simplified everything I just have the power and one motor connected directly with jumper cables. I can make the motor rotate in one direction by setting the DIR pin to LOW and the PWM pin to HIGH. I then attempt to make the motor rotate in the other direction by setting the DIR pin to HIGH and the PWM pin to HIGH. At this point the motor just stops rotating..... As you can see from the image below everything is insulated by sitting on a sheet of foam. I really am considering moving to another motor controller I cannot see why I am having so many issues everything it exactly how the documentation describes.

Right I have now discovered what the problem was with the direction. As per the documentation I was setting the DIR pin to HIGH for one direction and LOW for the other using digitalWrite(4,HIGH); and digitalWrite(4,LOW); This does not work. It seems you have to use a PWM signal for the direction i.e. analogWrite(4,255); and analogWrite(4,0); this works. Can you confirm if you think this is correct?

Seems that you forget to declare the pin as output in your program.

pinMode(4, OUTPUT);

Using analogWrite pinMode isn't necessary.

In your earlier post you said that upon receiving your replacement board you hooked it up and it started smoking as well. I would say that you have already damaged the second controller and that is why it will only drive the motor in one direction.

 

 

 

Yes but neither controllers have ever worked in both directions I have only ever got them to work in one direction....

Is this antistatic foam under your boards? This is not a good idea because antistatic foam is electrically conductive.

How did you mount your motors? All together in a metal frame? This is also not a good idea. The motor housing can cause a short circuit.