PWM translates to movement?

How does the PWM signal translate to turning on and off the MOSFETS in the H bridge on those victors? Can someone explain how that works? I know that 127 is neutral in PWM signals, but anything less translates to reverse or moving back. Do thoses pulses go directly to the FETs on the H bridge, or is there some kind of translation involved to determine direction first, then a seperate pulse driver is used to pulse the FETS? Im trying to experiment with PWM signaling as apposed to using digital signals. =D Making my own H-Bridge.:confused:

The PWM signal used for R/C cars (and in FIRST) is a coded signal, where a pule of 1.0 mSec width is considered “zero”, 1.5 mSec is considered “127” and 2.0 mSec is considered “255”. These pulses are sent every 20 mSec or so, but this timing can and does vary by application, and can be anything from about 4 mSec to 100 mSec, as reasonable values.

A piece of hardware (think “IC Chip”) is then used to translate the 0 - 255 signal to a motor drive signal. Using a Victor as an example, a 0 is full reverse, and 255 is full forward. Between those two extremes is where it gets interesting.

In the case of 3/4 forward, what the victor actually feeds the motor is 75% of the time a full forward signal, and 25% of the time a full reverse signal - flipping back and forth very fast, one or 2 thousand times per second (but this can be from dozens to tens of thousands per second). Because of the mass and inertia of the motor, it reacts as if you just sent 75% of the regular voltage, instead of actually reversing.

This means, the victor has only two output states: Full forward and full reverse. By switching between them very fast, the motor sees the ‘average’ and reacts accordingly.

This drive signal is also a kind of PWM, but really we call it is “Square wave” with a certain “Duty cycle”, which varies between 0% and 100%. You can have 2 kinds of drive: full reverse to full forward, or 0 to full but with a separate signal for direction.

An H Bridge circuit simply takes the duty cycle signal and amplifies it greatly, using the available supply voltage (such as 12 volts for a FIRST robot). You can make it go from 0% (stop) to 100% (Full) with just 2 transistors or FETs (one for + and one for -), but to reverse the current (like a Victor) you need four. If you don’t need variable speed, you can use 4 relays to make an H bridge, but variable speed is where the fun is (transistrs and FETs can switch on and off far faster than relays, so that’s what we use for variable speed).

Hope this gets you started, there’s a ton of info out there on H bridges and R/C PWM signals.

Don.

Edit: Beat me to it.

Post it anyway, there’s always a different way to explain the same thing - and people respond (and learn) differently.

Don

If an H bridge was designed to supply 40amps continous and a motor shorted out from a power supply that could only provide maximum 20 amps, would that damage the H Bridge? I know from experiment that if the power supply exceeded the continous current rating, smoke could be release, or even exploding FETs.

<<<In the case of 3/4 forward, what the victor actually feeds the motor is 75% of the time a full forward signal, and 25% of the time a full reverse signal - flipping back and forth very fast, one or 2 thousand times per second (but this can be from dozens to tens of thousands per second). Because of the mass and inertia of the motor, it reacts as if you just sent 75% of the regular voltage, instead of actually reversing.

This means, the victor has only two output states: Full forward and full reverse. By switching between them very fast, the motor sees the ‘average’ and reacts accordingly.>>>

I would hope that the output of the victor has four states,
full forward, full reverse, motor terminals open (coast) and
motor terminals connected to each other (brake).

Switching between full forward (or full reverse) and terminals
open would be a good thing, modulating the average torque of
the motor. Switching between full forward and full reverse
would be a bad thing…

Eugene

Don’s explanation is a good overview of the concept, but please don’t pay too much attention to the details of what he said. He’s essentially correct for some H-switch circuits, but the Victors don’t work the way he described. Eugene is correct in that there are four states, corresponding to various combinations of plus voltage, minus voltage, or open circuit on each of the two output terminals.

The Victor circuitry is very fancy. It doesn’t use the PWM signal to drive its output directly. Instead, it actually measures the PWM input, turns the pulse width into a number, and uses that number to control the outputs with an internally generated pulse width and direction control signal.

Here’s more than you needed to know:

The IFI control system assigns a value from 0-254 (not 255) to the range of pulse widths from 1.0 to 2.0 milliseconds, with 127 corresponding to 1.5 ms. The Victor nominally turns a measured 1.5-2.0 ms into a 0-100 forward value, but the output actually stays at zero for at least the theoretical 0-6 range, and it reaches 100 with an incoming pulse width that is somewhat less than 2.0 ms. It turns 1.0-1.5 milliseconds into a 100-0 reverse value, with the same holding at zero until it reaches 7 or so, and getting to 100 before the pulse width gets down to 1.0 ms. Experiments have shown that the Victor’s center value is not precisely 127; it’s actually more like 134. So the Victor output isn’t symmetrical around the theoretical neutral value of the IFI system.

I got everything you explained except this part:

“but the output actually stays at zero for at least the theoretical 0-6 range, and it reaches 100 with an incoming pulse width that is somewhat less than 2.0 ms. It turns 1.0-1.5 milliseconds into a 100-0 reverse value, with the same holding at zero until it reaches 7 or so, and getting to 100 before the pulse width gets down to 1.0 ms.”

Could you explain that a little more, what is the theoretical 0 - 6 range? does this mean there there is another IC chip that translates the pwm signals to a seperate pulsed signal that contains forward and reverse for the FETs? are there IC chips out there that are already programed to do that? I don’t want to run into programming it etc…

Also, if I am switching current on a solenoid quickly, to prevent arcing, is it possible that I hook up two diodes in parallel but in opposite directions? is there a better solution to this other than using diodes? I know people use diodes to lessen the EMF from the collapsing field, but if im constantly creating, destroying fields, how would I handle the EMF? with currents up to something like 40 amps…

General,
There are diodes built into the MOSFETs that are used in the Victor output stages. Don’t add any diodes externally. If it helps, the Victor acts more like four switches. If you can visualize the letter H the four switches are the vertical lines above and below the horizontal line. If a motor is inserted in place of the horizontal line and the top of the “H” is tied to plus power supply and the bottom to negative power supply then the four switches can control the motor. For one direction, two diagonally opposed switches close and current flows through the motor in one direction. (i.e. from top left to bottom right) For direction reversal, close the other two switches instead (i.e. from top right to bottom left) and the motor current is reversed. Open all switches and the motor coasts and close just the bottom switches and the motor is attached to a dead short or is in brake. What takes place during operation is the switches for a particular direction are turned on and off at the duty cycle for less than full on. The switching frequency of the Victor is about 120Hz. IFI has programmed the Victor to convert the input 0-254 steps to 94 distinct steps plus direction between zero and full on. The brake selection determines the action of the output when the joystick input is at zero (the deadband or 127 +/- 10).
Onto your original question, rarely will designers use a motor speed controller to operate solenoids. Since solenoids generally just turn on or off, the designer will use a simple switching device to energize the solenoid. Since the current flows in only one direction (for DC solenoids, diodes are not used on AC devices) to actuate the solenoid, the collapsing field causes a current to flow opposite the actuating current. It is this current that the diodes will clamp when used. They are always wired to conduct when the energizing current is removed. (i.e. cathode to the more positive terminal of the solenoid.)
Now, I know what you’re thinking, motors act like solenoids don’t they? And the answer is Yes. But we still need the motors for our design so we put up with the arcing caused by the generated EMF. It is the current generated by the rapidly collapsing field that causes the arc you see at the brushes in a motor. When the arc produces problems (like generated electrical noise and RF interference) then designers use capacitors to try and squash the generated pulses. FIRST allowed caps for the first time this year to be placed across the motor leads. Some motors caused some significant problems in the servo PWM feeds to cameras. The caps were allowed to try and solve that problem. I have not received any reports but one team that used this approach and it was not conclusive.

2 parallel diodes in oppposite orientations is a dead short. Do not do this unless you plan on letting out the magic smoke.

There are a few ways of lessening EMF:

The first is setting up a lowpass RC filter. This will allow the DC through while lowering the HF that would cause interference with other devices around. The tradeoff here is that you will slow down the time to full voltage / 0 voltage.

The second option is a faraday cage around the EMF producing device (IE motor). If set-up properly (as a flux conductor) you can retrieve most of the expended EMF energy. The drawback here is that you cannot hook this to your frame as it will conduct measurable energy on the frame which is against FIRST rules.

Also, if I am switching current on a solenoid quickly, to prevent arcing, is it possible that I hook up two diodes in parallel but in opposite directions? is there a better solution to this other than using diodes? I know people use diodes to lessen the EMF from the collapsing field, but if im constantly creating, destroying fields, how would I handle the EMF? with currents up to something like 40 amps…

I would recommend a transorb/transient voltage suppression diode. In fact the circuit symbol is two diodes attached in series with opposing polarity.
http://en.wikipedia.org/wiki/Transorb

FIRST allowed caps for the first time this year to be placed across the motor leads. Some motors caused some significant problems in the servo PWM feeds to cameras. The caps were allowed to try and solve that problem. I have not received any reports but one team that used this approach and it was not conclusive.

Capacitors do help with the EMF from motors. I have measured this with an oscilloscope and a current sensor. The current waveforms improved when I placed the capacitor and degraded when I removed them. Of course this wasn’t with any motor that FIRST uses and the capacitor bank was fairly large.

Those ranges are for the factory setting, correct?

No, since only 20 Amps will flow (theoretically)

Not really, but I agree switching to Open would be less bad

Eh, close enough. I was thinking of H bridges in general, not specifically the Victor, but I wrote as if it was the Victor… My Bad.

Don

oops, in the above I meant to say using 2 diodes in series, not parallel. I guess that would work. In brushless motors, how do they change the current directions in the stator? Im attempting to do essentially the same thing but using H-Bridges because they can handle high currents.

Also, theres something else im not really clear, is that, if a mosfet had already been turned on so that it conducts, and current is then applied at the source after. will the mosfet heat up? From what I’ve read, its the point when the mosfet conducts (rise/fall) when current is present at the source that heats up the mosfet. But say it the current wasnt there when it conducts, will that heat up the mosfet? The other thing is, will it even work if there is no current present at the source terminal?

Anyone know a good PWM chip I can use directly without programing, like the PWM IC chip in the Victors. Also, I’ve noticed that the MOS Drivers only require 2 miliamps for their source I believe any higher would damage them, so I am wondering how I can get that sort of current if I connect it directly to the high current power supply(without the use of a seperate power supply, like our victors).

Also, theres something else im not really clear, is that, if a mosfet had already been turned on so that it conducts, and current is then applied at the source after. will the mosfet heat up? From what I’ve read, its the point when the mosfet conducts (rise/fall) when current is present at the source that heats up the mosfet. But say it the current wasnt there when it conducts, will that heat up the mosfet? The other thing is, will it even work if there is no current present at the source terminal?

Actually, there are some applications that switching between full-forward and full-reverse (Locked-Anti phase) are more advantageous than full-forward/reverse and float/brake (Signed-Magnitude). It normally offers more linearity in motor RPM vs Duty Cycle. This is probably because the motor coasts for different periods of time depending on the shaft’s velocity prior to turning off power to the motor and this relation is not linear.

I’m not sure I competely understand your question.

The transistor will only heat up when there is current through it (just like anything else). P=IV; no current, not heat. In a MOSFET, all current is between the drain and source. So, Idrain=Isource. No source current means no drain current, which means no current at all.

To turn the transistor on, it must be biased correctly. The main part is that Vgs (gate to source voltage) must be above the threshold voltage for the transistor (usually a few volts). However, Vds (drain to source voltage) also needs to be higher than Vgs. I’d have to think about it a little more, but I don’t think it’s possible to properly bias it while also cutting the current.

At risk of showing my age…

Think of a MOSFET as being a Voltage Controlled Resistor.

The MOSFET’s ‘transfer function’ sez you apply a voltage to the gate. That will control the resistance of the MOSFET, somewhere between completely open and completely closed.

BTW, a vacuum tube has a transfer function a lot like a MOSFET.

In your application you are operating this thing complete like an on/off switch and just varying the duty cycle. When the switch is complete on, the resistance doesn’t go completely to zero, but a very low value. The better the MOSFET, the lower the value.

If you motor stalled or shorted, or (even if it isn’t shorted) there is a voltage drop, and I squared R loss across the device, that turns into heat. It you can dissipate the heat and stay within the operating limits of the device then it will be fine. You just have to move the heat off the silicon.

That is pretty much the trick for reliability. Keep all you signals, spikes, heat loads, etc well withing the device parameters. Just like you would design a building or a bridge (no pun intended).

FYI,

MOSFETs have a ‘transfer function’. It is a mathematical thing (often times graphed) that shows the relation between the input and output of the device.

If you operate this thing over it’s ‘linear region’ you can build an amplifier. Nearly all guitar, PA, stereo amplifiers are built around mosfets. Broadcast transmitters now use mosfets in all stages on most transmitters or drive final tube stages on the largest transmitters.

Years ago mosfets (the gates failed) were pretty fragile but modern mosfets are amazingly tough. These broadcast transmitters have to be because they get really banged around with those big lightning seeking iron sticks in the backyard.

Ed

General,
Sorry for the late reply. Brushless DC motors first. These fall into a couple of categories. One is used in fans, and effectively uses switched DC as an AC simulator for an AC motor. Another is a multiphase driver. This type uses several coils spaced around the motor rotor and current is switched on and off simulating a multiphase AC supply. This is the type that is used in VCR video head motors where coils are mounted directly to the circuit board. Often this type of motor has the drive circuitry and power devices integrated inside the motor and need only an error voltage and power supply to operate. Stepper motors are very similar to this type of motor and can be manufactured to be very precise in their rotational position and torque.
The rest of your questions likely come from the article you read about MOSFET behavior in a particular application. Modern CPUs generate heat even though they use MOS technology. The reason is that the devices pass through a linear region as they switch from high to low. It is during this transition that the device is neither open nor shorted (source to drain) and some power is lost as heat. Since these transistions occur rapidly in a CPU and in a very confined space (think GHz and millions of transistors), there is significant heat buildup. This will occur no matter how the device is used. As I explained earlier, the IRL MOSFET device has an “ON” resistance that is very low. At high current some heat develops due to the current through this low resistance.
As others have pointed out, MOSFETs are used in a variety of devices but a designer must still take into account the benefits vs. hazards when using any device. Many semiconductors are tailored for a particular application. The MOSFETs used in the VHF transmitter I work on are already becoming inefficient at the high end of the VHF band (Channel 11) and have significantly less gain at 200 MHZ than at 100 MHz or less. Although they are 300 watt devices, they are not very useful at UHF. The type of modulation is also a big factor and reguires different techniques for different modes. Video (both analog and digital reguire high linearity and low distortion) transmitters use class AB1 while analog audio (TV and FM) can use class C and don’t require a device that is extremely linear. AM broadcasting is another application altogether. Although these devices have become very robust over the years (a static discharge from an operator stroking their hair could kill a MOSFET in the first few years) lightning discharge must be handled outside the transmitter for best results.