Slowing a transistor switch

Started by mth5044, March 26, 2014, 10:06:46 PM

Previous topic - Next topic

mth5044

Is there a way to variably control the time that it takes for a transistor to open and close? For example, imagine 9v > LED > resistor > Transistor C, E > gnd. A voltage is applied to the base of said transistor and it opens up, turning on the LED. The voltage is currently from a ucontroller which only has high or low states, so I'm looking for a way to do this externally. I thought there might be a way to do it with a capacitor, but that wouldn't be variable.

Seems like the opposite of something you'd normally want to do, but oh well. Bonus points for a controller that can work on multiple transistors at once, but let's see if there is a way to work with one transistor first.

Thank yins.

Digital Larry

I would combine several micro controller outputs (4, 6, or 8 for example) into an R-2R ladder to form a primitive DAC.

Something like this: http://www.ikalogic.com/8-bit-digital-to-analog-converter-dac/

You could either use a transistor after the op-amp as a voltage follower (op-amp connected directly to B, C connected directly to Vcc) with the LED and resistor to ground from the emitter.  Or maybe a current amplifier?  But it would be dependent on the current gain of the transistor.

Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

PRR

I like the DAC idea.

You can also PWM, with one pin per output, and many nano-brains have in-built PWM functions.
  • SUPPORTER

R.G.

If all you want to do is slow it down, use a series resistor (which you'd need anyway to limit base current) and a biggish capacitor from collector to base. This turns the transistor into a crude "integrator" during the active transition time. It's a trick I've used many times for slowing down the speedy voltage change and coupling that transient out - which is almost certainly what you're trying to do here.

If you want to do it in steps, stages, or accurately stop in the middle, the other ways work. But for just slowing it down, a collector-base cap and a resistor to the base work well.

At the risk of sounding repetitive, this is illustrated in the "slow-down" circuits for several of my programmable foot switchers and geofex.com.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

PRR

> what you're trying to do here

I read it as he wants to change the time on the fly?

> variably control the time
> there might be a way to do it with a capacitor, but that wouldn't be variable


Some folks might not realize to "change the cap to change the time", but I think Matt grasps that and wants a way that does not mean solder, plugs, switches, etc., suggesting "change at whim".

We'll see what he really wants.
  • SUPPORTER

R.G.

Oh, yeah - "that wouldn't be variable".  Missed that.

If he wants variable, modestly precise, and tracking, I'd go for either PWMing outputs or driving a switched-capacitor "resistor" into the transistors.

More to follow, I'm sure.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

mth5044

Thanks for all the wonderful replies! I seem to always start out threads as vaguely as possible for some reason... I assume you all can read my mind, I guess.

The purpose of this is to 'gliss' between eight outputs of a sequencer. Rather than the rigid 1, 2, 3, 4 goose-steps - have one fade out as 2 fades in. The sequencer is based on a PICAXE 20M2 and I can program it to have the output of the sequencers overlap a bit, but it would still be a hard on and off rather than a smooth transition. So my thought went to altering what the sequencer was controlling: an array of 8 transistor switches that control LED's and a vactrol. While the ucontroller is happily ticking away it's highs and lows, the transistors would be switching on and off at variable (but unison) speed. A problem might be if the sequencer goes too fast, the transistors won't be able to keep up and only slightly open until the pin is low again, but that is the Carquinez bridge after we cross the Golden Gate. Or the bay bridge I guess, if we are looking at a map.

Quote from: Digital Larry on March 26, 2014, 10:18:51 PM
I would combine several micro controller outputs (4, 6, or 8 for example) into an R-2R ladder to form a primitive DAC.

Something like this: http://www.ikalogic.com/8-bit-digital-to-analog-converter-dac/

You could either use a transistor after the op-amp as a voltage follower (op-amp connected directly to B, C connected directly to Vcc) with the LED and resistor to ground from the emitter.  Or maybe a current amplifier?  But it would be dependent on the current gain of the transistor.
Quote from: PRR on March 26, 2014, 10:47:02 PM
I like the DAC idea.

I'll have to read up on this area - very unfamiliar! Thanks for the reference.

Quote from: PRR on March 26, 2014, 10:47:02 PM
You can also PWM, with one pin per output, and many nano-brains have in-built PWM functions.

I had thought of that as well from the time between the first post an now. The chip I'm using is a PICAXE 20M2 which has 4 PWM outputs. Perhaps there is a way to set up the sequencer to determine what output goes to what pin as the sequencer ticks along. I was referred to look into a charlieplexing approach using the PWM for a 'light house' type circuit using the PWM, perhaps there is a bit of gold to mine from that.

Quote from: R.G. on March 27, 2014, 09:35:07 AM
Oh, yeah - "that wouldn't be variable".  Missed that.

If he wants variable, modestly precise, and tracking, I'd go for either PWMing outputs or driving a switched-capacitor "resistor" into the transistors.

More to follow, I'm sure.

Variable is key at this point, but it's good to know that the capacitor idea was on the right track. I suppose worst case scenario is use a big old rotary switch with a few caps to have some preset fading options.

R.G.

That helps.

Next bit is - what are you sequencing? Control voltage to a synth?

I had a similar issue back when I was building my "morpher", a device to fade from channel to channel. That had its own set of little problems.

But if you're fading between DC levels, consider simply using digital potentiometers for your fading elements, not transistors or DACs. The uC will be a lot busier - which just means it won't sit in its wait loop as much.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

mth5044

Thanks for the reply, RG. I'm sequencing control voltages to an LED/LDR setup.