I got an oscilliscope in January, a tool I've wanted for a while. Unfortunately, the second channel of the two-channel 'scope wasn't properly calibrated, so back it goes for repair. I should have it back in March. Before I sent it back to the shop, I limped along with one channel to do some speed controller debugging.
Halo (like Rott-bot before it) has three independent power systems.
Now, in Halo, I used the output of the phototransistor in the optoisolator to drive the base of this push-pull directly. The collector of the phototransistor is attached to 12V through a 1K resistor; the emitter is attached directly to the push-pull bases and to ground through a 100K resistor. Turn on worked adequately -- there's just about 12mA (12V/1Kohm) driving the bases of push-pull, so the Ic flow on the top NPN can be as high as 600mA (4401 beta is at least 50). Of course, as Ve gets higher, Vb gets higher too, so the Ib current flow drops, dropping Ic as well. However, turn off is another story. The capacitance of the gate (about 3000pF) and the high resistance on the ground path (100Kohm) give an RC time constant of 300 microseconds. The switching period is only 256 microseconds! So the gate voltage only sags down a small amount before the next pulse comes in and switches it on hard. For any non-zero duty cycle, the FET mostly stays switched on. If I try to fix it by using a smaller resistor on the ground path, the voltage-divider effect of the pull-up and pull-down resistors on the phototransistor becomes more pronounced, and the base voltage on the push-pull pair can't get high enough to turn the FET fully on. If I try to fix that by decreasing the collector resistor on the phototransistor, I start to exceed its maximum Ic. |
The solution to the "slow turnoff" problem was to put in another stage of amplification, with two more NPN transistors hooked up more or less as a Darlington pair between the phototransistor and the push-pull pair. Actually, that's the design I used in Rott-bot, but I thought I could simplify the circuit when I made Halo. Duh! I don't think I actually need the to-ground resistor at the push-pull base -- collector-emitter conduction from the transistor there should be enough to make the circuit work. Apologies for the low quality of the schematics; they're just video captured from my notes. I don't use any schematic software (just layout software for the boards), so I don't have high-quality images to offer. |
Next time I'll explain why this circuit still doesn't work, and how wonderful it is to have an oscilloscope.
Previous: Dead On Arrival |