Totem Pole PWM With Dead Time
Part of why I haven't been out taking pictures much lately is this - Science!
The other part is that it's beastly hot out whenever the sun happens to be up. So, nothing for it for a pasty easily-burnt sort like me but to stay inside and Scientificate.
I need to figure out how to photograph an oscilloscope properly - this turned out OK, but I had to image-tweak the screen separately from the rest of the shot (and did so a bit sloppily, as you can see around the edges).
I've taken on a little project which will be useful to me in the future, but is also intended to ease me into analog design and o-scope use.
All I need is a little circuit which will pump out a steady negative 12 volts DC at up to 10 milliamps, given a 5 volt DC input. Several manufacturers make chips that do exactly that, but I want to design this myself. It's a lot like doing my old Physics homework, only more fun.
There are circuit designs all over the place relating to different ways to do stuff like that, so I picked one and got building. I went for the Cockcroft-Walton type voltage multiplier, just because I've always wanted to build one of those. It will need an alternating-current power source providing more current than a microcontroller can directly supply, so I'll be driving it with a discrete bipolar-transistor-based push/pull arrangement, also known as a "totem pole" from the way it looks in a schematic diagram.
A totem pole uses two transistors - one to push voltage/current to the load from the positive voltage rail, and the other to pull the load down to ground. To get an AC source going, your control circuitry has to switch the transistors on one at a time, push-pull-push-pull and so on, at some frequency determined through mathematics and cleverness.
It's very bad if both the transistors are on at the same time. They form a short circuit from the positive voltage rail to ground, allowing a ton of current to flow, and the Magic Smoke is released from one or both of them. By trying to be clever and do things the easy way, I've burned up two transistors in the last two days, something I haven't done since college. It's all part of learning! And hell, the transistors I'm using are dirt cheap.
Happily, the microcontroller I'm using to juggle all this provides a mechanism for safeguarding against this exact problem. It can cause two of its pins to emit triggering pulses that are opposite to one another and spaced apart by a small delay, and that's what you see on the scope here. The top two rows of dashes are the output from one of the pins, the bottom two are the output from the other. You can see that the dashes in the upper row of each set are shorter than the dashes in the lower rows, and an upper-dash for one pin is nicely bracketed by a lower-dash for the other. Those upper-dashes are what cause each of the totem pole transistors to switch on, so the little delay in between, the "dead time", ensures they don't come on at the same time and pop.
Totem Pole PWM With Dead Time
Part of why I haven't been out taking pictures much lately is this - Science!
The other part is that it's beastly hot out whenever the sun happens to be up. So, nothing for it for a pasty easily-burnt sort like me but to stay inside and Scientificate.
I need to figure out how to photograph an oscilloscope properly - this turned out OK, but I had to image-tweak the screen separately from the rest of the shot (and did so a bit sloppily, as you can see around the edges).
I've taken on a little project which will be useful to me in the future, but is also intended to ease me into analog design and o-scope use.
All I need is a little circuit which will pump out a steady negative 12 volts DC at up to 10 milliamps, given a 5 volt DC input. Several manufacturers make chips that do exactly that, but I want to design this myself. It's a lot like doing my old Physics homework, only more fun.
There are circuit designs all over the place relating to different ways to do stuff like that, so I picked one and got building. I went for the Cockcroft-Walton type voltage multiplier, just because I've always wanted to build one of those. It will need an alternating-current power source providing more current than a microcontroller can directly supply, so I'll be driving it with a discrete bipolar-transistor-based push/pull arrangement, also known as a "totem pole" from the way it looks in a schematic diagram.
A totem pole uses two transistors - one to push voltage/current to the load from the positive voltage rail, and the other to pull the load down to ground. To get an AC source going, your control circuitry has to switch the transistors on one at a time, push-pull-push-pull and so on, at some frequency determined through mathematics and cleverness.
It's very bad if both the transistors are on at the same time. They form a short circuit from the positive voltage rail to ground, allowing a ton of current to flow, and the Magic Smoke is released from one or both of them. By trying to be clever and do things the easy way, I've burned up two transistors in the last two days, something I haven't done since college. It's all part of learning! And hell, the transistors I'm using are dirt cheap.
Happily, the microcontroller I'm using to juggle all this provides a mechanism for safeguarding against this exact problem. It can cause two of its pins to emit triggering pulses that are opposite to one another and spaced apart by a small delay, and that's what you see on the scope here. The top two rows of dashes are the output from one of the pins, the bottom two are the output from the other. You can see that the dashes in the upper row of each set are shorter than the dashes in the lower rows, and an upper-dash for one pin is nicely bracketed by a lower-dash for the other. Those upper-dashes are what cause each of the totem pole transistors to switch on, so the little delay in between, the "dead time", ensures they don't come on at the same time and pop.