Speed Controller Design

I’ve been looking at designs for speed controllers (mostly Jaguars, because I can get my hands on those schematics). Frankly, they’re overpriced, and if I want to build my own robot (outside of FIRST), I’d much rather design my own (or at least make a hearty attempt).

Attached is the schematic to the Jaguar Speed Controller. The majority of the actual motor controlling portion of the design is on the 2nd page on the right. Basically, it’s an H-Bridge, controlled by two MOSFET drivers (one for each side) and each leg of the H-Bridge is made up of 3 MOSFETs.

My issue is this: By looking at the design and not knowing what signals CTRLA, CTRLB, PWMA, and PWMB are (since they’re coming out of the microcontroller, I don’t know what they are unless I were to have the uncompiled firmware for the Jaguar), I can’t see this thing working in theory. After carefully studying the datasheet for the MOSFET driver, I learned that if the signal coming into PWM is high, HDRV is high (opening the MOSFETs it controls) and LDRV is low (closing the MOSFETs it controls).

Knowing this, given the following situation (set up the same as a Jaguar, only simplified for understanding)
http://img.skitch.com/20100831-kin17jnmtr5g7jkfh6g1mju91s.jpg

Assuming the PWM square waves are aligned, when the PWM signal is HIGH, both Q1 and Q2 are on, but since Q3 and Q4 are not, there is no current flow. Similarly, when the PWM signal is LOW, Q3 and Q4 are on and Q1 and Q2 are not, and there is still no current flow.

If the PWM square waves are inverse of each other (or any other alignment), when one is high and the other is low, current will flow (e.g. when the left side is high and the right is low, current will flow from Q1 to Q4). However, since the wave then inverts, it would then switch which MOSFETs are open, thus switching the motor direction, which doesn’t sound like it would work out too well…

There is one other possibility still: What if they aren’t putting a PWM input into the PWM pin, but rather the OD (Output Disable) and a HIGH or LOW into PWM, depending on motor direction?

OD pulls both HDRV and LDRV low (closing their MOSFETs) if it is low.

http://img.skitch.com/20100831-dgeuxc3k9ax8km3p3h7cmd5ece.jpg

When PWM is HIGH on the left side, then Q1 is open and Q3 is closed. If it is LOW, Q1 is closed and Q3 is open. The same goes for the other side. Then the PWM into OD would close whichever is open when it is low. This would essentially create a magnified PWM power source, which is the goal of a speed controller.

The second setup works, but I’m skeptical to believe that is how it functions, because that is not the specified use for OD in the datasheet. However, it doesn’t seem to work any other way. Anyone know what’s going on for a fact, or have an oscilloscope and a Jaguar and is willing to test this out?

Jaguar Schematic Rev B.pdf (56 KB)


Jaguar Schematic Rev B.pdf (56 KB)

The Jaguar is “overpriced” for your application because it provides more features than you need (CAN feedback is a major one).

An iPad is an overpriced e-reader, yet it also provides many other functions.

(For what it’s worth)

Yes I can agree with that, and I still respect the Jaguar a ton, I just feel like it’s a bit much for most applications. A 50 MHz MCU is pretty powerful, especially for just driving a speed controller. But at this point I’m more concerned with getting what I need and nothing more. The one I’m “designing” (basically, I’m working off the Jag design) will be I2C controlled, because I prefer it. Also, I don’t care about a casing, whereas the Jag has a pretty custom plastic injection molded case to go along with it.

Please don’t see this thread as a criticism of the Jaguar, but more or less a query of its design.

I feel extremely comfortable with disagreeing with you on this point, but instead lets agree to ammend the statement with “for your purposes”.

The firmware for the non FRC specific version is freely available for download on the RDK CD.

My laptop is broken, so I can’t spend much CD time these days. I’d be happy to walk you through this when I get a replacement.

I understand what you’re saying; there doesn’t seem to be an input to chose between HDRV and LDRV. The reason is, they’re both used together.
If you look at the datasheet for the PWM driver, it says the low is 180 degrees out of phase of the high. That means the “off” period for HDRV is the “on” period for LDRV. On the Jaguar (unlike the Victor) the H-bridge switches between 12v and 0v, not 12v and “open”.

There are then two ways to stop the motor: brake (driving both sides at 50% duty cycle, or 6v) or coast (using the OD pin).

What’s especially interesting about this is that you don’t need to dedicate a microcontroller output to each side; you just swap the high and low on one side of the h-bridge, and you can use the same PWM signal to control both PWM drivers.

You are absolutely right that you could make a less expensive speed controller with less features. Something like that might actually be quite useful. Let me recommend that you use an aluminum heat sink instead of just a fan. A little thermal mass is useful in preventing accidents.

Okay I’m starting to get there… but still a bit confused.

If I were to want to run at half speed, so about 6V, I would think I should use a 50% duty cycle, but that runs the motor in forward 50% of the time and reverse 50% of the time, thus braking as you stated. The same holds true for any other speed; The time the PWM is low, the motor is doing the opposite of what I want. So, to run at half speed, would I do what I tried explaining and hold PWM high and then send a 50% duty cycle to OD? Or is there something I’m still missing?

To run at half speed forward, you have a 75% duty cycle. Backward at half-speed, you have a 25% duty cycle.

Okay, that makes sense. It just seems odd that it’s running forward 75% of the time and backwards 25% of the time to go forward at 50%… wouldn’t it make more sense to just go forward 50% of the time?

Marshal,

Have you confirmed the above experimentally?

**

No, I haven’t.
Every Jaguar that I haven’t fried I’ve kept together. However, it seems to be what makes sense.
I believe there is a thin conformal coating on the Jaguar, so I would not be able to probe the microcontroller directly. However, I can probe the Jaguar output if you like.

If you’re asking about the PWM drivers, all the MOSFETs are identical (all N-channel), and so switching the high and low should work fine.

I have. It is referred to as “locked anti-phase”, and is usually used when you need fine control while nearly off.

EDIT:
Locked anti-phase is only applicable with high chop frequencies. Locked anti-phase could work on a Jaguar, but not on a Victor.

Is this the default operation mode of the Jaguar ?

**

I’m pretty sure this is the only option on the Jaguar.
Even in coast mode, when I take a motor down from full speed to 10%, it goes down like it was braked. (It also draws a lot of current in doing so, tripping the crowbar on my 9A power supply, even if the motor is free-running. It performs fine on battery.)

Is this with open-loop (voltage) control, or with closed-loop speed control ?

**

Okay, for the sake of education (and that I’ve exhausted the extent of Wikipedia’s ability to have a page on every minuscule topic) could someone please give a better definition of locked antiphase? I understand that it’s using a PWM where a 50% duty cycle is brake, 100% is full forward, 75% half, 25% half reverse, etc. But maybe an illustration or something to that effect? I’m kinda swimming in all these terms…

Also high chop frequency. I have only a very slight idea of what that is, and how it affects Victors and Jaguars differently.

Thanks!

The Jag’s output PWM frequency is 15,000 Hz. The Victor’s is 150 Hz.

**

That only makes too much sense, thanks. Where would you possibly draw the line for what works with locked antiphase?

Since you’re in control of the design, you might try designing it so that it can work with a variety of chop rates and different output methods and see if you can answer the questions in the following thread: http://www.chiefdelphi.com/forums/showthread.php?t=77297 and this thread: http://www.chiefdelphi.com/forums/showthread.php?t=83973

Black jags switch different than tan jags. The tan jags are high side switchers. The black jags are locked antiphase. Allegro makes a nice fet full bridge automotive driver chip. The A3941K. The data sheet gives a good description of the different ways the Fet bridge can be driven. May be it will help.
http://www.allegromicro.com/en/Products/Part_Numbers/3941/3941.pdf
Warning to understand this chip requires allot of back ground Knowledge but the diagrams and tables help with the fundamentals. This chip is used on some of Pololu Robotics motor controllers. http://www.pololu.com/
The Jags really are a deal for FIRST teams compared to many other less capable drivers.

Well that’s certainly useful to be aware of. Maybe black Jags shipped to FRC teams should come wrapped in yellow caution tape with a warning to this effect.

**