When driving PWM to a motor with an H-bridge, we face with the choice of how to drive the off state. The options are tri-stating the drivers and shorting the output. If the drivers are tri-stated, the inductance of the motor forces the current to flow through the body diodes from the lower FET of a leg to the upper FET of the other leg, so effectively the bus voltage minus two diode drops is appled to the motor. The current decays fast. The current flows back to the source, captured by capacitors. If the low FET is left on for the off-state, effectively shorting the motor terminals, the current recirculates and the current decays slowly and dissipates in the motor resistance. So the torque would be smoother with the slow decay.
If synchronous rectification is used, the things can get a little more complex. If the current has completely decayed and the FETs are still on, the motor goes into the generator mode and the motor terminals are shorted, so the motor is braking.
Tuesday, November 12, 2013
Wednesday, October 2, 2013
74LS series on 3.3V
The good old 74LS series, once the staple of logic design, is all but forgotten, except that there might still be a lot lying around. These parts are only specified at 5V +/-5%. Can they run on 3.3V supply? When they run on 5V supply, their output is about 3.6V which is safe for the 3.3V logic. And they can still operate at 3.3V, the output is about 2V, which is still acceptable for 3.3V logic. Their inputs are 5V tolerant.
Wednesday, September 18, 2013
Vias: to tent or not to tent
A question sometimes comes up concerning whether to tent or not tent the vias on a PCB. Altium by default does not tent the vias. There are several considerations. The silkscreen can be visible over the tented vias. The bare vias can be used as test points and for reworks. The fanout vias for the BGA pads must be tented, otherwise shorts could happen. If a via is very close to the SMT pad, it is better to tent otherwise it is harder to solder. A large via cannot be tented completely. If only one side is tented, it could trap flux and cleaning fluids. Then there is the subtle question about outgassing: a tented via might outgas.
Fuses in Parallel
Occasionally, we may need fuses in parallel to achieve greater current rating. For instance, the Mini ATO fuses come maximum 30A; any more than that, two or more fuses are needed. So are parallel fuses advisable? Yes, it is better to stick with fuses of the same type and rating. The current will not distribute precisely equally among the fuses. But they will not differ two much before the self-balance nature of the fuse resistance. The circuitry should be as identical as possible. One company recommends, as a general rule, a minimum reduction in rated current of 10% for 2 fuses in parallel (20% for 3 or 4 fuses in parallel).
Sunday, July 14, 2013
Velocity Control
Consider the simplest case, a body is acted on only by the force that you control. You want to reach certain speed; how should you control the force. If we elect to use the proportion gain control, i.e. the force is proportion to the difference between the desired speed and the current speed. We would have an exponential speed profile, that approaches the desired speed asymptotically with a time constant of m/K, which m is the mass and K is the proportional constant.
If there is a constant force also acting on the body, such as the gravity, and we apply the proportional control, the speed profile is again an exponential with the same time constant. But now our final asymptotic speed is not the desired speed, but offseted by mg/K. So the proportional control results in a steady state error.
The common cure is to add another force that is proportional to the accumulated or integrated velocity error. Now we have a second order system. If the integrated gain is sufficiently high, we would have an oscillatory response.
If there is a constant force also acting on the body, such as the gravity, and we apply the proportional control, the speed profile is again an exponential with the same time constant. But now our final asymptotic speed is not the desired speed, but offseted by mg/K. So the proportional control results in a steady state error.
The common cure is to add another force that is proportional to the accumulated or integrated velocity error. Now we have a second order system. If the integrated gain is sufficiently high, we would have an oscillatory response.
Motor winding current and supply current
When the motor drive operates in the torque mode, a constant torque implies a constant current in the motor winding. But we see the supply current varies as the motor speed changes. The supply current is at the lowest when the motor stalls and the highest when the motor moves the fastest. The total energy provided by a constant voltage source is consumed by the winding resistive loss and the work done by the motor. When the armature current is constant, the resistive loss is constant. The work done by the motor is the torque multiplied by the motor speed.
How does the motor drive keep the winding current constant when the supply varies? When the load is greater than the motor torque, the motor slows down and stalls. If the drive keeps the same PWM on period, the current would increase; so the PWM duty cycle is reduced to keep the current constant by the current loop. The PWM duty cycle is proportional to the motor speed (assume the winding resistance is small). The drive circuit draws current from the supply during the on period of the PWM cycle. The peak current is same if the constant winding current is maintained. So the average supply current is smaller when the motor speed is reduced.
Therefore to infer winding current from the supply current, the PWM duty cycle has to be known.
How does the motor drive keep the winding current constant when the supply varies? When the load is greater than the motor torque, the motor slows down and stalls. If the drive keeps the same PWM on period, the current would increase; so the PWM duty cycle is reduced to keep the current constant by the current loop. The PWM duty cycle is proportional to the motor speed (assume the winding resistance is small). The drive circuit draws current from the supply during the on period of the PWM cycle. The peak current is same if the constant winding current is maintained. So the average supply current is smaller when the motor speed is reduced.
Therefore to infer winding current from the supply current, the PWM duty cycle has to be known.
Thursday, March 14, 2013
Noise Gain
The term "noise gain" is used a lot in designs with opamps. So what is noise gain and how is it useful?
If we model the opamp noise with a noise source at its non-inverting input, the noise gain is the closed-loop gain of the circuit (with signal sources disabled). Note that the noise gain is the same as the signal gain in the canonical non-inverting configuration. In the standard feedback configuration, the opamp open-loop gain is A and the feedback factor is b, then the closed-loop gain is A/(1+Ab), which reduces to 1/b when A is large. The stability of the circuit is depended on Ab; if we denote the noise gain n, we can analyze the stability from A/n, and in a Bode plot, the point of interception of the magnitude of A and n is where the magnitude of A/n equals to 1. The amount of phase shift at this point determines the stability. We can do a quick stability check by looking at the rate of closure of A and n: if A and n intercept with 20dB per decade, the circuit is stable; if A and n intercept at 40dB per decade, the circuit is likely unstable because it would have 2 poles contributing total180 degrees phase shifting.
We just consider the non-inverting configuration; for other configurations, the noise gain is not the same as the signal gain, but the noise gain plays the same role in determining the stability. There are ways to increase the noise gain without changing the signal gain to achieve greater level of stability.
If we model the opamp noise with a noise source at its non-inverting input, the noise gain is the closed-loop gain of the circuit (with signal sources disabled). Note that the noise gain is the same as the signal gain in the canonical non-inverting configuration. In the standard feedback configuration, the opamp open-loop gain is A and the feedback factor is b, then the closed-loop gain is A/(1+Ab), which reduces to 1/b when A is large. The stability of the circuit is depended on Ab; if we denote the noise gain n, we can analyze the stability from A/n, and in a Bode plot, the point of interception of the magnitude of A and n is where the magnitude of A/n equals to 1. The amount of phase shift at this point determines the stability. We can do a quick stability check by looking at the rate of closure of A and n: if A and n intercept with 20dB per decade, the circuit is stable; if A and n intercept at 40dB per decade, the circuit is likely unstable because it would have 2 poles contributing total180 degrees phase shifting.
We just consider the non-inverting configuration; for other configurations, the noise gain is not the same as the signal gain, but the noise gain plays the same role in determining the stability. There are ways to increase the noise gain without changing the signal gain to achieve greater level of stability.
Friday, January 4, 2013
Cheap Cen-Tech Multimeters
The Harbor Freight Cen-Tech multimeter is about $4 or less. It measures voltage to 1000V DC/750V AC, current to 10A DC, resistance to 2MOhms, diode voltage. It also has a battery tester (360Ohm load) and transistor tester for measuring gain. It has 3-1/2 digit LCD display. It is reasonably accurate (generally within 0.1%) and well worth the money. But keep in mind the input resistance for the voltage measurement is 1MOhms. The shunt resistance for 10A is about 0.016 Ohms.
Maybe it is a sign that the price cannot sustain; the more recent model starts to skimp on the probes with smaller conductors, adding 0.5Ohms to each of the probe. The probe wire feels warm when carrying a few amperes of current. The probe lead will fuse before the fuse does.
The battery tester load is convenient when you just need a small load for testing, such as checking an LED. The current measurement settings can also let you test connect two nodes with different resistances 1K, 100, 10, 1 and 0.01Ohms. You can use the 1MOhm input resistance of the voltage measurement settings for a weak pull-up or pull-down. The resistance settings can source voltages, but they are load dependent. You can use the 200-Ohm setting to turn on a logic input; it puts out 3V when the input resistance is at 50K or above and 2.5V at about 7K. Other settings can only output about 0.6V max. The diode setting outputs 1mA when measuring diode voltage; it outputs 3V max but at 0.5mA.
Maybe it is a sign that the price cannot sustain; the more recent model starts to skimp on the probes with smaller conductors, adding 0.5Ohms to each of the probe. The probe wire feels warm when carrying a few amperes of current. The probe lead will fuse before the fuse does.
The battery tester load is convenient when you just need a small load for testing, such as checking an LED. The current measurement settings can also let you test connect two nodes with different resistances 1K, 100, 10, 1 and 0.01Ohms. You can use the 1MOhm input resistance of the voltage measurement settings for a weak pull-up or pull-down. The resistance settings can source voltages, but they are load dependent. You can use the 200-Ohm setting to turn on a logic input; it puts out 3V when the input resistance is at 50K or above and 2.5V at about 7K. Other settings can only output about 0.6V max. The diode setting outputs 1mA when measuring diode voltage; it outputs 3V max but at 0.5mA.
Subscribe to:
Posts (Atom)