Symmetrical triangle wave using BJT's? or?

Discussion in 'The Projects Forum' started by keithostertag, Oct 4, 2012.

  1. keithostertag

    Thread Starter Member

    Oct 4, 2012
    48
    2
    For fun and learning, I'd like to make a circuit which will drive a common analog meter back and forth, like a metronome. I'd like to do it with no IC's. I've asked around other forums and this seems to be (evidently) a tall order.

    I want to use easily available through-hole components (don't want to have to order something exotic to make this work).

    To be more specific, I want to use the meter movements in old analog VOMs. I want periods of 2 sec for smaller ones, 15 and 30 seconds for larger ones. Battery operated, so should be low power consumption. I expect to connect directly to the meter movements, and shunting across them as needed to give full scale movement.

    At first I thought I could simply use the current through one of the caps in a conventional BJT astable multivibrator. And in fact this works. Here is a 13 second YouTube movie showing it in action: http://www.youtu.be/8prnGxEwA_w

    But the rate at which the needle moves is, of course, not linear. So it doesn't have the smooth movement across the face as I'd like. This gets more pronounced with longer periods. So now I am on the search for a circuit to make a symmetrical triangle current I could use for this purpose. For my purpose it doesn't have to be mathematically exact, just visually smooth and at an even rate back and forth.

    The other problem is that the current must rise from zero to a positive amount, then back to zero, and repeat, as opposed to the movement centered from zero as in my movie using a center null meter. Analog meters do not like negative current :)

    I am inexperienced with circuit design. This is the first time I have ever made an oscillator circuit, though I have made other types of circuits. Some people have suggested I need to learn how to make an FET interface to a current mirror (which I had never even heard of). But after some reading, I don't see how they by themselves will solve the problem. So I am hoping you would have ideas/suggestions.

    If it turns out that doing this without an IC is too difficult, I will change course and use an IC. I see there are several threads in the archives discussing the use of IC circuits for triangle waves. However, I think it would be instructive to learn, and also appropriate, to use all analog circuitry with this analog meter toy.

    Thanks,
    Keith Ostertag
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,154
    3,060
    IMHO, you should move to a dual op-amp solution. One amp can generate the "clock", a square wave. The other can be arranged to integrate the square wave, which will give you a nice triangle wave. This will require very low power - beyond what is needed to drive the meter itself, and is very easy to set up. These are basic circuits for op-amps so you can find all sorts of references. FWIW, this is an analog solution.
     
  3. keithostertag

    Thread Starter Member

    Oct 4, 2012
    48
    2
    Hi Wayne-

    Thanks, I might do that if no one else has a better suggestion.

    BTW- isn't the current through the cap in the BJT astable multivibrator that I am currently using the integration of a square wave? If so, I am missing what difference the first op-amp would make. Maybe I should post a photo of it.

    I guess I was hoping there would be a relatively simple way to shape that into a triangle wave using BJT's.

    Thanks,
    Keith Ostertag
     
  4. crutschow

    Expert

    Mar 14, 2008
    13,052
    3,244
    Below is the simulation of a sawtooth circuit using an LM324 quad op amp as both comparators and an integrator with a CD4013 flip-flop, to give a linear sawtooth. It has the advantage of needing only one component change to vary the frequency. The values shown give a period of about 2 seconds. If you increase C2 to 10μF the period increases 10 times to about 20 seconds.

    You need to connect the power and ground to the flip-flop, which aren't shown on the schematic. Also connect all unused inputs of the flip-flop to common.

    5V power is shown but you can use three alkalines in series to give 4.5V which will work fine.

    The power consumption is about 0.2mA so AA alkaline cells should last for at least a year.

    You would attach the meter between "out" and common.

    Sawtooth.gif
     
  5. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    If you're still interested in a discrete version, check out the attachment.
    I can explain how it works if you are interested.
     
  6. crutschow

    Expert

    Mar 14, 2008
    13,052
    3,244
    I just noticed a problem with my design where C2 becomes reverse biased if the output goes above 1/2 the supply voltage (2.5V in this case). To avoid this and allow the use of an electrolytic for C2 I modified the circuit as shown below to keep the peak output below 1/2 the supply voltage. Notice also the polarity reversal on C2.

    Sawtooth.gif
     
  7. keithostertag

    Thread Starter Member

    Oct 4, 2012
    48
    2
    Hi Ron and Zapper-

    Thanks for the schematics.

    Zapper- I haven't yet looked up the datasheets- can I use 9 volts with your circuit? Or will I need to use a 5V zener with a 9V battery?

    Tom- yea, I'm a beginner, so I could use some explanation. Is the time constant controlled by C1 and R5? Or? Your circuit would requires two 9V batteries? Could that be lowered to two 4.5V batteries? And, how sensitive to transistor parameters is your circuit? I.e., will variations in the same type of transistor cause grief? Can other similar transistor types be used/mixed?

    Other than the difference in parts count and power requirements, what's gonna be the main differences between these two circuits, for my purpose?

    I'm concerned with stability- If I make this and give it away as a present/toy I wouldn't want the recipient to have to deal with something delicate or finicky...

    Thanks so much!
    Keith Ostertag
     
  8. crutschow

    Expert

    Mar 14, 2008
    13,052
    3,244
    Yes my circuit will operate fine at 9V with no changes. The battery life will be less, of course, perhaps a couple months. The output peak voltage will be approximately 1/2 the supply voltage.

    I just noticed that my previous mod changed the timing slightly. You need to increase R6 to about 1 megaohm for an approximately 2s (or 20s with 10μF) period.

    The obvious difference between the circuits is number of parts. My circuit should be quite stable and reliable. Haven't analyzed Ron's circuit so can't comment on that. My preference is always to go with the simplest circuit that will do the job, but it"s your call. ;)
     
    Last edited: Oct 5, 2012
  9. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    My design was strictly in response to the OP's statement:
     
  10. crutschow

    Expert

    Mar 14, 2008
    13,052
    3,244
    Of course. My intention wasn't to be critical. :) The OP asked which design might be better and that was just my opinion in response to his question, to indicate that his fear of ICs made for a more complex circuit to do the task.
     
  11. keithostertag

    Thread Starter Member

    Oct 4, 2012
    48
    2
    Hey Ron-

    Sorry, looks like I addressed you as "Tom" mistakenly. Could you go over the details of your circuit? Have you built something similar, did you design that?

    Thanks,
    Keith Ostertag
     
  12. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I designed it mostly in response to this statement:
    I always like a challenge. Attached is a block diagram.
    Assuming the Schmitt trigger feedback is at 0V, the current switch will be diverting the 100uA current source to GND, so the cap will discharge linearly through the 50uA current sink. When the triangle reaches the lower Schmitt threshold (0V), the Schmitt trigger threshold will abruptly switch to 5V, and the 100uA source will be switched to C1. This forces a net current of 50uA into C1, and the voltage starts to rise linearly. When the triangle reaches the upper Schmitt threshold (5V), the Schmitt trigger once again switches abruptly, the threshold is again 0V, and the cycle repeats.

    I don't like this circuit, because the frequency cannot be tuned with a single resistor while maintaining 50% duty cycle.
    The reason I chose to use two batteries is it made it easy to generate a triangle whose lower limit was 0V, making the interface to the analog meter simple (a single series resistor). I designed a circuit which I like better, but it also uses ±9V for power. You mentioned ±4.5V. How would you implement that?
     
  13. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    If you truely want to do this without an IC it is doable, however, the parts count goes way up. This is because you will be making this using the same block diagram as with the IC, only instead of the huge parts savings you would get from using the IC you now have to wire the equivalent design up. Personally it isn't worth the bother, IMO, neither in drawing nor in building, it is just creating work for the sake of work.
     
    Ron H likes this.
  14. keithostertag

    Thread Starter Member

    Oct 4, 2012
    48
    2
    Thanks Ron. ±4.5 V would be made with 6 cells, probably AA. I think AA's are more common in homes (and cheaper) than 9V batteries, but no big deal either way for those cases where space isn't a premium. But ideally, I'd prefer the power source to be a single 9V battery- I forgot to state that up front.

    Bill- I am not interested in "creating work for the sake of work." That's why I said I would change my course if it is much easier to do with IC's. It's just that as a beginner, I find discrete components sometimes easier to work with and understand. And I have lots of them in my junk box. Also, using discretes introduces me to basic building blocks to use as tools, where using IC's often obscures how things work. The final product isn't the most important thing to me here- the learning is.

    Of course, one thing I'm learning first-hand is that using IC's is much easier...:cool:

    I've repaired electronic stuff for years, but mostly just replacing parts- not really understanding the circuitry.

    Thanks- you guys are great!
    Keith
     
  15. crutschow

    Expert

    Mar 14, 2008
    13,052
    3,244
    If you want to learn about analog ICs, start with opamps, as they are rather the universal analog component. Read a few tutorials on the web about them ( Google "op amp" or start with Wikipedia). Once you learn the basics of those, you will be well on you way to understanding other circuits.
     
  16. keithostertag

    Thread Starter Member

    Oct 4, 2012
    48
    2
    To report back: Since I had all the parts for Ron's design in my junk box I put it together today. Here are some comments, if you feel like addressing them, great.

    I reduced C1 from 100uF to about 12uF in order to get a period of 2 seconds ( 1 up, 1 down).

    Attached is a photo of the triangle wave, taken from the base of Q4:

    The center grid line is ground reference.

    As you can see, it is not exactly symmetrical, but close. Also note that it doesn't decay all the way to zero. I guess I could tweak a few things to get there, though I'm not sure where I would start. In my haste I didn't (yet) check the square wave closely.

    Just for the archives, there seems to be a typo in Ron's block diagram- R1 should say R3, R2 should say R4 (unless I'm mistaken).

    The triangle wave does make a significant difference in the movement of the meter needle. Much better.

    I will put Zapper's circuit together in a few weeks when I get some parts ordered/received.

    Thanks!
    Keith Ostertag
     
  17. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I thought it was clear on the schematic and the block diagram that the output is on the emitter of Q4. I even showed the meter. Probe that point and report back - please.
    The triangle should get closer to ground, and be more linear. Your scope probe is loading the circuit when you put it right on the cap.
     
    Last edited: Oct 6, 2012
  18. keithostertag

    Thread Starter Member

    Oct 4, 2012
    48
    2
    Hi Ron- Yes, I goofed. Indeed, the schematic is marked clearly. The symbol used on the block diagram confused me. Thanks for correcting me.

    Attached is a photo of the trace taken from Q4e.

    Zapper- I don't have any quad opamps. OK if I use three 741's? For the CD4013B is it OK if I use a SN74ALS175N? Just what I happen to have in my junk box. And, can I correctly assume where you have marked "PRE" is the same as "Set"?

    Thanks,
    Keith Ostertag
     
  19. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    The high output voltage of LM324 is marginal for delivering a logic 1 to CD4000 logic when Vcc=5V.
     
  20. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Here's yet another way to do it. It uses a standard "function generator" circuit, with a Schmitt trigger and an integrator in a feedback loop.
    As I noted in the schematic, you can use practically any 5 volt CMOS op amps with rail-to-rail output capability. A dual op amp in an 8 pin DIP package is cheap. Microchip and TI have them, among a host of others.
    If you use a polarized cap for C1, connect the + terminal to the op amp -input.
    I added a 5V regulator, because
    (1) the frequency is a function of the supply voltage, and a 9V battery can work down to 6V or less, and
    (2) 5V CMOS op amps are common and cheap. Higher voltage ones exist, and some are not expensive, but your choices will be limited.

    The regulator shown can be replaced by an LM2936Z-5.0 (I think - I've never used one). It's a low-dropout regulator for low-current loads such as this circuit.
     
Loading...