Need a single transistor to gradually ramp emitter voltage to 98% supply voltage

Discussion in 'The Projects Forum' started by mosspa, Sep 9, 2015.

  1. mosspa

    Thread Starter New Member

    Sep 9, 2015
    16
    0
    Application: I'm a neuroscientist who knows just about enough about electronics to get myself in trouble. I'm trying to built a biological DC stimulator that works the way I want it to. This involves getting an appx. 54V DC input signal to be slowly modulated between 0V and appx. 54V with control sequencing dictated by me. In short, I need to know how to modulate the output of an NPN transistor such that the emitter voltage is proportional to the supply voltage from near 0V to near the collector voltage (+54V) or even if it can't be done and I'm wasting my time.

    Problem: I don't know what to call such a circuit, hence it is difficult to find answers to questions I have for constructing it.

    Synopsis: I need to design a small circuit that will ramp a voltage from 0 to 98% of supply V up or down. In my particular case, the supply voltage (also the collector voltage) is +54-58VDC (six 9V batteries connected in series, with fresh batteries this yields about 58VDC). I would like to use an NPN transistor such that the CE voltage can be adjusted from near 0V to at least 98% of the supply voltage by changing the current to the base. The current in the circuit after the power supply is regulated to 2.5mA at 54-58V by a current regulator diode. So, there are no particular current handling issues that I predict. The current in the control part of the circuit will always be 2.5mA. In the final working system, the signal to the transistor base will be supplied by an Arduino Due 10-bit DAC (which I think is 1024 steps between 0V and 5V). So, I would like to be able to get the Arduino's DAC to be able to ramp the voltage of the requested circuit's output up and down between 0V and 54V at relatively slow speeds (> 1sec for full ramp). I'm not worried about the DAC output, and how to handle it to do what it needs to do. What I need to know is, how to control the proportion of the supply voltage that gets output from the transistor's emitter. So, for the breadboard circuit, I can use a pot to simulate the output of the Arduino's DAC.

    When I first sat down and tried to lay this out in a simulator, I thought it should be an easy task. I soon realized, however, that my knowledge of the workings of an NPN transistor is apparently very limited when applied to DC analog circuits. So, I would appreciate suggestions as to the circuit I'm trying to build, or where to go to learn what I need to know to do it on my own.
     
  2. pwdixon

    Member

    Oct 11, 2012
    488
    56
    You need to specify what current or load is on the output.

    The Arduino doesn't have a DAC unless you have either built a bit-banged D/A or you get an additional D/A module. What the Arduino pretends is an analogue voltage output is really a PWM output that averages out to an equivalent DC output.

    An amplifier may well be a better choice but there are many factors.
     
  3. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    Since you mention the transistor's emitter several times, it sounds like you are envisioning an emitter-follower output stage: as the base is slowly ramped up to 54.6 V, the emitter is ramped up toe 54.0 V (-ish). Pretty simple so far, lotsa 100 V transistors out there. What is the pull down on the emitter? Not the external load, but what the circuit needs to be stable. A high value resistor to GND? A pull-down transistor like a totem pole output stage in an audio amplifier? As above, the big missing piece is the max load current and the true nature of the load the circuit will see. Also, how many output channels do you need at one time?

    Anyway, assuming no big surprises, relatively simple amplifier with a gain of 12 or 13 will take a 0-to-4V input and turn it into a 0-to-50V output. First thought is a standard low-power rail-to-rail opamp with an external voltage booster inside a feedback loop.

    Another option is all-in-one in a high-voltage opamp. TI and Apex have parts under $10 each at Digi-Key. They will need a small negative supply (an extra 9V battery) to allow the output to go to 0 V, and draw 5 to 10 mA quiescent current so they are not low-power, but if you are comfortable with a traditional opamp circuits (and have lotsa batteries) they are out there.

    ak
     
    atferrari and absf like this.
  4. #12

    Expert

    Nov 30, 2010
    16,247
    6,742
    The way I read this, you are asking for what you want instead of what you need. Back up a step. There are several ways to deliver 98% of the power supply voltage at the output terminal.

    Did you say the final output is limited to 2.5 ma? Or is that the advertised limit of the DAC? Or is the final transistor supposed to refuse any emitter current in excess of 2.5 ma? Need some clarification.
     
    atferrari likes this.
  5. mosspa

    Thread Starter New Member

    Sep 9, 2015
    16
    0
    This is not true, I don't believe (unless I have been reading things incorrectly). The Arduino Due has the PWM pins of the Uno, but also has a 12-bit true ADC (I remembered it to be 10 but it appears to be 12).
     
  6. mosspa

    Thread Starter New Member

    Sep 9, 2015
    16
    0
    The end load is between 12-30kOhms (it is the resistance across living brain tissue in a petri dish). For any single preparation the resistance at the output will remain stable. The output current will always be between 0.5-2.3mA. Maybe I can be clearer in what I envision. What I am ultimately interested in is passing current between 0.5 and 2.5mA through slices of rat brain cultured in a petri dish. Depending on where the electrodes are placed in the slice determines the resistance. Once the electrodes have been placed the resistance remains constant at 12-30kOhms. My idea, and hence the transistor, was that I control the current across the load by manipulating the voltage. I guess I derived the circuit max voltage (i.e., the supply voltage) using Ohms law to specify voltage needed to maintain 2.5uA at the output given the resistance.

    Right now, I am manually providing current through the brain slice using said 54V supply through a 20-turn 10kOhm linear taper pot and monitoring the output current through the current limiting diode with a Fluke 179. This is about as simple as it gets, and it works fine for manual adjustment. However, in the course of my experiments I noticed some anomalies in the endogenous electrical activity of the tissue (i.e., it's brain tissue and thus exhibits electrical activity of its own that I measure using microelectrodes piercing the outer membrane of individual neurons so I can observe changes in potential voltage of the inside of the neuron with the outside), when the current was being varied. Since there is no way to turn a pot the same way every time (I actually thought about trying to automate this with a DC motor at one time), I thought I would put it under processor control. Keeping everything about the same as it currently is, which BTW would be a good thing, so I came up with the transistor idea. In my mind, the transistor would be a 'valve' through which current (at a voltage) would flow from collector to emitter. What I thought I could do was open and close the valve through some signal to the base of the transistor. That is the part I don't appear to have a clue about. This seems like it should be simple enough, since transistors replaced vacuum tubes (valves), and unless I am missing something is what they are used for in analog circuits when they aren't switching things on and off.

    The reason I did not provide the application use is that I thought the neurophysiology would force overly complicated answers to what I think is a relatively simple question because I'm working with cells that generate their own electrical signals. But, if knowing what the circuit is doing is important, I hope I've explained it sufficiently above. Thank each of you for responding so quickly.
     
  7. mosspa

    Thread Starter New Member

    Sep 9, 2015
    16
    0
    As per the verbose answer above, the current is being limited by a 2.5mA current limiting diode. As mentioned, this part works fine controlling it with a 10kOhm pot. What I want to do is to control it with the voltage output of a DAC. Essentially, what I am wanting to do is to control current through my slice preparation by varying voltage through the current limiting diode only, instead of doing it by turning a pot, controlling it with the output of a DAC, hopefully using one transistor.
     
  8. crutschow

    Expert

    Mar 14, 2008
    12,973
    3,219
    The simplest approach would be a high voltage op amp suggested by ak in Post #3.
    Does that seem feasible to you?
    Otherwise you could use a low voltage op amp controlling a high voltage transistor but that is a more complicated circuit and likely will require some loop compensation for stability.
     
    absf likes this.
  9. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    OK, we're getting closer. What you have now is something in between two standard output stage designs. As #12, suggested, forget what you want and think about what you need. Do you need:

    1. A precisely regulated output current, where the output voltage adjusts itself automatically to whatever it takes to make that current through the load, even as the load varies second-to-second.

    2. A precisely regulated output voltage that will hold its output value even when the current drawn by the load varies second-to-second.

    3. Something else, like a constant-voltage output in series with a fixed current limiter so that the output voltage will sag if the current tries to exceed 2.5 mA.

    Even with the high voltage requirement these are not difficult or complex designs. Also, I (and others around here) have built a lot of stuff for university research environments, so bring on the details. They *always* help. BTW, so would a sketch of your present setup. Nothing fancy, a pencil sketch and cell phone photo is enough. Finally, what output accuracy/precision/repeatability do you need?

    ak
     
    Last edited: Sep 9, 2015
  10. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    I've got a prelim schematic worked up, ready to tweak as the OP refines his req. Been a while since I've used a high voltage opamp, so I did a quick search through DK and hit a few datasheets. I'm glad to see more players in the field, but the critters still are finicky, expensive, hungry, and require a Vee supply. For now I'm sticking with a LM358 plus Zetex.

    ak
     
  11. mosspa

    Thread Starter New Member

    Sep 9, 2015
    16
    0
    Thank you. The idea is to make this as simple as possible. I'd prefer to not use an op-amp because I'm just not comfortable with linear circuits. I'm not adverse to learning, but right now I need to solve a manipulation problem in my laboratory. If I'm way off in my transistor control idea, just let me know that. I'm sure there are billions of ways to solve my problem, but I'm a neuroscientist, not an electrical engineer. I would like to understand the circuit I am using, not just build something somebody suggests. So, will a simple 80V NPN transistor work as I describe above? If not, why not?
     
  12. mosspa

    Thread Starter New Member

    Sep 9, 2015
    16
    0
    1. The load does not vary once the poles of the electrodes are embedded in the tissue slice. If the initial resistance is 19.217kOhms, it remains so, within the measurement error of the Fluke for the duration of the experiment.

    2. The load is not really variable on the tissue slice end. Since the resistance remains constant, any change in current between the electrodes should only be reflective of current provided by the circuit, no? So, increasing the voltage of the signal through the fixed resistor path increased the current.

    3. I am already doing this manually, all I want to do is to substitute a transistor for my hand and a pot. So yes, maybe I'm describing what I want, because what I now have is a manual version that works fine, and I'm a believer in not reinventing wheels that don't need to be reinvented.

    I have class preparation to get to, so I can't take a picture right now. Imagine a small petri dish sitting in a warm water bath. Above the dish there are two arms that have alligator clips (for holding the tissue stimulating electrodes). This part, which is the part that is connected to the circuit. It is crude, although it works. I lower the arms so the surface of he electrodes dimples the tissue slice. Then I slap my hand down hard, and the electrode enters the slice. Where I position the two electrodes in the slice determines the resistance, which remains constant throughout the duration of the experiment.

    Here is the simple circuit I'm using now 54V ----> 10kOhm Potentiometer ----> 2.5mA current limiting diode ----> brain slice anode The cathode from the slice goes back to ground. As Ive said, it works to the degree of precision to which I can turn the knob of the pot two times the same way. Any DAC control would have to be an improvement over that. Accuracy .02mA would do and I achieve bettefr than that with my hand so I don't think this should be a problem. Same for reputability.
     
  13. mosspa

    Thread Starter New Member

    Sep 9, 2015
    16
    0
    I thank you for doing all of this ak, but you're scaring me with thoughts of high power op-amps. While there appears to be consensus that I need an op-amp circuit, nobody has told me why, nor why a simple 80Vce NPN transistor would not work.
     
  14. ian field

    Distinguished Member

    Oct 27, 2012
    4,412
    782
    Presumably you already know that nerves have a "critical-mass" type of response to electrical stimulation and will acclimatise to steadily rising voltage.

    Some mass produced TENS units simply pulse an inductor to generate a flyback pulse, the faradic muscle excercisers I was involved with years ago used a modified blocking oscillator with pulse secondaries of about 500t.

    Slow moving voltages over about 9V or more cause iontophoresis, and can cause scarring if localised.
     
  15. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    As noted above, the output of an Arduino is not a true linear voltage, but a waveform that must be processed to yield what you want. But to your question, if the Arduino somehow makes a 0 V to 4 V output, and you want a 0 V to 54 V output, you need an amplifier with a fixed gain of 13.5. You can not get that plus rail-to-rail output compliance plus linear operation at both rails in a single transistor circuit, so your basic idea will not work. We can launch into basic transistor operation and how that affects your application, but the bottom line is that a transistor is not a very linear amplifier, whipping one into shape takes parts, ad at some point getting most of the parts in a chip is less work. For overall simplicity's sake, the circuit almost certainly will have an opamp in it. It may sound like a move in the wrong direction, but it is not. And I've explained way more complicated circuits to people with way less tech background than you.

    Also, your application uses a relatively high voltage in that it is greater than 36 V, but normal opamps can handle 20 mA and you need only 2. The parts are called high voltage opamps, but your application is only medium voltage and very low current. Calm...breathe...go to your green space...

    The constant-current diode will require a bit more discussion to make sure you realize the true nature of what you now have. A CC diode is a JFET circuit, basically one transistor with two leads connected so that it looks like a diode, but with a non-standard current-to-voltage relationship. When it is used in series with a voltage source as you describe, it adjusts its forward voltage (Vf) soh that the current through it does not exceed its design value. For the series arrangement you describe, the voltage at the cathode end of the diode will change with changes in the slice, even though the voltage at the anode (the pot end) stays constant. Also, there is a voltage drop across the diode that is much larger than that of a standard rectifier.

    What time zone are you in?

    ak
     
  16. crutschow

    Expert

    Mar 14, 2008
    12,973
    3,219
    Okay you wanted transistors.
    Below is the LTspice simulation of a transistor amp whose output goes from 0V to near the supply voltage for a 0-5V input which uses feedback to give a stable gain of slightly over 10.
    A three transistor complementary circuit is used to get sufficient drive for the desired output load with low quiescent current.
    The gain is approximately R3/R1.

    BJT Amp.GIF
     
    Last edited: Sep 9, 2015
    AnalogKid and absf like this.
  17. mosspa

    Thread Starter New Member

    Sep 9, 2015
    16
    0
    Actually, that first comment is not quite correct. When you depolarize the field with a DC potential it just brings neurons closer to their thresholds for firing. I'm actually recording from neurons in various places in the field. Some are far enough away from the electric field ([.e., imagine the 'American' football shaped field of the DC current, and some cells on the 'laces') so that they are barely modulated by 2mA DC resting potential shifts.

    Neurons aren't like muscles. The way neurons work is much more like an analog computer than a digital one. Each neuron has a threshold voltage for "firing" the neuron to produce an action potential. The threshold works like a comparator in an analog computer. All of the inputs and outputs of the neuron are summed at the place where the soma becomes the axon (the axon is the part of the neuron that carries the action potential from one place in the brain/periphery to another) and when the sum total increase in voltage meets the comparator's voltage (i.e., the threshold of excitation) the neuron fires an action potential down the axon.

    The biophysics of membrane depolarization are a bit beyond the discussion here. As I have said, I have been doing what i need using a potentiometer and a current limiting resistor. The reason I didn't really discuss the actual application in my original post was to avoid having to worry about what engineers might think may be a problem because neurons are electrically active cells. I'm already doing what I want to get done, I just want to automate it as simply as possible.
     
  18. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    More questions:

    What is the largest voltage ever measured across a test slice?
    What is the maximum current you want to pump through a slice?
    Why is the CLD in the circuit? I suspect it is because someone said it is necessary, probably to protect a slice from accidental exposure to excessive current if Rp is set too low.

    While at the gym I thought through another way to explain things so you can see what you have from our point of view. What you have is a simple series circuit with 4 elements and no external gorp hanging on and confusing things. Because of this, all 4 elements are commutative. You can arrange them in any order (paying attention to the diode polarity), and the current through the loop and the voltages across each element will not vary. Because of this, we can rearrange things to show more clearly what you have.

    Rearranging things, you have a battery and diode that form the power supply, and two resistors in series. The battery and diode form a current-limited voltage source, and the two resistors form a simple voltage divider, what the audio people call an L-pad. Rp is the series leg and Rs is the shunt leg. Note that the s stands for slice, not shunt.

    First, some definitions:

    Vb = V-battery = 54 V
    Vd = V-diode = the voltage across the CLD (current-limiting diode) = 0 to 2 V (ish)
    Rp = R-pot = 0 to 10K Ohms
    Rs = R-slice = ? to ??? Ohms depending on slice preparation and probe placement

    Vout = the voltage at the cathode of the CLD, the "output voltage" of the power system.
    Il - I-loop = the loop current that flows through all circuit elements

    Basic Ohm's Law analysis tells us that if Rp is set to 0, any value of Rs greater than 20.8K will mean the diode is not in current limiting mode, and is just a voltage drop of somewhere between 0 V and 2 V depending on the actual current. With Rp at 10K, the max Rs for current limiting is 10.8K.

    With medium to low values of Rp and Rs, the CLD will leap into action. It becomes a current-dependent variable resistor, decreasing Vout such that the total voltage across the two resistors is whatever it takes to maintain 2.5 mA through them. So for low values of Rp and Rs, Vout might be10 or 20 V. Because it is based on a FET, the limit value of a CLD is very poorly defined. +/-15% is a common value. If you want tight current limiting, a very simple transistor circuit will give much better regulation.

    The final circuit element is you, the experimenter, acting as a feedback control loop. You take an input (voltmeter reading) process it against static and dynamic variables, and adjust the pot to bring the reading to a desired condition. Because that condition is based on a voltmeter, it is safe to say that you turn this collection of semiconductors and resistors into a voltage regulator or (after some arithmetic) current regulator.

    Digest that, and I'll pile on more. Awaiting your answers to the questions.

    ak
     
  19. #12

    Expert

    Nov 30, 2010
    16,247
    6,742
    You didn't want to worry about what you imagined somebody might think about what might be a problem?
    Not the best way to get a correct answer quickly.
     
  20. mosspa

    Thread Starter New Member

    Sep 9, 2015
    16
    0
    Eastern Time (Florida)

    As for the Arduino, I'm talking about an Arduino Due that has real DACs (2 of them, in fact). "DAC1 and DAC2. These pins provides true analog outputs with 12-bits resolution (4096 levels) with the analogWrite() function." from https://www.arduino.cc/en/Main/ArduinoBoardDue. By that statement, I'm assuming that if you write "2047" into the register you get half the voltage you would if you wrote "4096" in. What else would "true analog outputs mean"?

    Nothing says that anything along the voltage/current continuum across the slice needs to be linear. In fact 32 usable steps (5-bits) would suffice for my needs, as long as "0" provides close to zero current and 4096 provides about 2.3mA. If it takes an DAC register value of "1017" to produce 0.5mA, a value of "3190" to produce 1.0mA, a value of "3920" to get 1.5mA and "4096" to get 2.3mV, that would be OK. After all I get to program the register to ramp the way I want it. Also, all current measurements are done across the slice, so it really doesn't matter too much what is varying elsewhere. Building in a current monitoring feed back loop that the processor can access would provide, all the adjustment. In addition, the ramping of the signal is not important either. When the current is increased gradually, the built-in hysteresis in the living slice provides some smoothing. If the changes in current were too abrupt, couldn't I use a capacitor cascade to slow the changes down?

    As far as "rail-to rail=output compliance" goes, I don't understand this, because I don't see the second rail. I have one voltage source and one load, so I don't see how this applies to what I'm trying to accomplish. Either that, or I really don't understand the concept enough. I've always looked at the spec on op amp data sheets as a marketing ploy and not really applicaple for anything I have ever used an op-amp for (although, I think I've used an op-amp in a circuit maybe five times in my life.:)

    As far as current regulator diodes go, I know more about them then I really need to know. By observing the ones I have been using under real-world conditions, all I needed to know was learned. They work for what I want to do. Again, the resistance across the slice does not change over time, and what else would affect the overall current through the slice if the resistance is constant? Capacitance is not an issue, because the signal is basically conducted by sodium ions in the exrteacellular environment. So, except that the cells themselves provide a bit of rapid change current buffering, once the medium becomes stable at some current (in mS), it simply doesn't change as a function of the slice.

    I'm not trying to be a pain. I'm just starting to feel that I'm asking for the time and you want to tell me how to build a clock. That's not meant to be an insult, it just reflects the difference in outlook paradigms used by engineers and scientists. Also, if nothing else, I'm learning a lot by doing searches on concepts I find I really don't know much about.
     
Loading...