New MC33932 Dual Motor Shield!

Hey Guys, once again wanted to share a new shield that we have designed around the MC33932 Dual H Bridge by Free scale. Each H-bridge in the 33932 is able to control inductive loads with currents up to 5.0A peak. The main traces on this shield are much wider than on the Ardumoto, which makes this shield much more forgiving to beginners. This is a great little board (all necessary hardware is included) and we have posted some Arduino Code to quickly get started with this shield!

Main Features:
8.0V to 28V continuous operation (transient operation from 5.0V to 40V)
3.3V and 5.0V (TTL / CMOS) logic compatible inputs
Over-current limiting (regulation) via internal constant-off-time PWM
Output short-circuit protection (short to VPWR or GND)
Temperature-dependant current-limit threshold reduction
All inputs have an internal source/sink to define the default (floating input) states
Sleep Mode with current draw < 50?A

Here is the link to the product page: Store | Jaycon Systems

Any questions and comments are Welcome!
Thanks Guys!

Jay

Why made this circuit, PWM-ing the tri-state pins. In data sheet they warned you. This way you are not able to dynamic brake, tristating them, and self induction energy gives spikes, because breaking the freewheel circuit.

All you need to drive is IN1 and IN2. IN1 - PWM non-inverting mode, IN2 - LOW, acts as a buck converter if PWM'ed. If Reversed IN1 - PWM inverting mode, IN2 - HIGH.

We use them in MiniSumo robots since 2008: 33886, 33887, 33932

And tried to find better Idea in controlling algorithm, but were not able to find any.

Here I present my methods for controlling the drivers:

void SetSpeed(signed int SpeedLeft, signed int SpeedRight){
//Constrain speed values
SpeedLeft=constrain(SpeedLeft, -100, 100);
SpeedRight=constrain(SpeedRight, -100, 100);
//Direction control
if(SpeedLeft >= 0){
//Clear OC1B on Compare Match, set OC1B at BOTTOM, (non-inverting mode)
TCCR1A = TCCR1A & 0b11101111;
digitalWrite(IN2, LOW);
}else{
//Convert negative to positive value
SpeedLeft=-SpeedLeft;
//Set OC1B on Compare Match, clear OC1B at BOTTOM, (inverting mode).
TCCR1A = TCCR1A | 0b00110000;
digitalWrite(IN2, HIGH);
}
if(SpeedRight >= 0){
//Clear OC0A on Compare Match, set OC0B at BOTTOM, (non-inverting mode)
TCCR1A = TCCR1A & 0b10111111;
digitalWrite(IN4, LOW);
}else{
//Convert negative to positive value
SpeedRight=-SpeedRight;
//Set OC1B on Compare Match, clear OC1A at BOTTOM, (inverting mode)
TCCR1A = TCCR1A | 0b11000000;
digitalWrite(IN4, HIGH);
}
//Mapping and correction of speed values
if(SpeedLeft>0) SpeedLeft=map(SpeedLeft, 1, 100, 38, 254);
if(SpeedRight>0) SpeedRight=map(SpeedRight, 1, 100, 30, 254);
//Output
analogWrite(IN1, SpeedLeft);
analogWrite(IN3, SpeedRight);
}

And if you get a Status Flag, toggle the D1 or EN/D2:

void StatusFlag(){
boolean driverStatus=digitalRead(SFA)&digitalRead(SFB);
if (driverStatus==LOW && driverState==HIGH){
Serial.print ("Fail Status: ");
Serial.print (digitalRead(SFA), BIN);
Serial.println(digitalRead(SFB), BIN);
Serial.println("DRIVERS_DISABLE");
DRIVERS_DISABLE();
Serial.println("DRIVERS_ENABLE");
DRIVERS_ENABLE();
}

#define DRIVERS_ENABLE() driverState=HIGH; digitalWrite(EN, driverState);
#define DRIVERS_DISABLE() driverState=LOW; digitalWrite(EN, driverState);

Hi DarK_AlximinK,

A quick read of the datasheet shows that you can use the disable pin for PWM.
In fact if you look at some other Freescale breakout boards (Pololu - MC33926 Motor Driver Carrier) they recommend PWMing the disable pins.

" IN2 HIGH The logic input control of OUT2. PWM can be applied to this pin (typically done with both disable lines inactive).
IN1 HIGH The logic input control of OUT1. PWM can be applied to this pin (typically done with both disable lines inactive).
PWM / D2 LOW Inverted disable input: when D2 is low, OUT1 and OUT2 are set to high impedance. A D2 PWM duty cycle of 70% gives a motor duty cycle of 70%. Typically, only one of the two disable pins is used, but the default is for both disable pins to be active.
PWM / D1 HIGH Disable input: when D1 is high, OUT1 and OUT2 are set to high impedance. A D1 PWM duty cycle of 70% gives a motor duty cycle of 30%. Typically, only one of the two disable pins is used, but the default is for both disable pins to be active."

We have been using this shield in many of our classes without any problem. Perhaps for the second revision, we will remove the 74HC1G04 inverters' so customers like yourself can also control it using the IN1 and IN2 pins.

Jay

P.S constructive criticism is welcomed but no reason to call anyone an idiot.

Hello Jayjay

Sorry for my bad comments 3 years ago

Must have been a bad day