Problems with making a bang bang controller

Discussion in 'The Projects Forum' started by iownthefrench, Apr 6, 2010.

  1. iownthefrench

    Thread Starter New Member

    Apr 2, 2010
    2
    0
    Hey everyone,

    I have perused through the textbook you guys offer, and it's really helped me a lot. I have been trying to build a "bang bang" style controller with little success. I recently built the circuit in the attached jpeg.

    To describe the circuit, both opamps are LM741's. Both voltage sources are 9V batteries. The resistors connected to V2 are actually just a potentiometer, to allow me to emulate the changing sensor voltage (from a temperature sensor, the LM35) that was supposed to be the trigger voltage.

    The circuit with V1 attached is supposed to provide voltage boundaries for the bang bang controller (like a temperature sensor IC, piezoelectric, ion selective electrode, etc). The top op amp is supposed to provide the high voltage where the circuit turns off. The bottom op amp is supposed to provide the lower voltage where the circuit turns on. This is meant for a system where the environment naturally causes voltage to decrease unless the circuit is on (it is a heater, and the temperature sensor IC's voltage increases linearly with temperature).

    The inductor pictured was supposed to be a toggle relay, which I don't have the symbol for. At Vhigh, the toggle relay would be opened (GND at bottom op amp, V+ at the top op amp, toggle oriented so that it would switch open). At Vlow, toggle relay would be closed (V+ at bottom op amp, GND at top op amp, so reverse voltage as V high, pushing toggle switch the other way).

    This circuit does not work however. I set everything up as is. The last thing I add is V1. Upon connecting both terminals of V1 to the circuit, V1 begins to discharge as if there is a short circuit. The battery quickly loses voltage, which slowley returns upon rest. As a chemical engineering major, this represents the battery limiting its discharge due to likely a chemical gradient inside of the half cells, limiting the reaction. Also worth mentioning, a potential does form at the outputs of the op amps, regardless of the value of R4/R5, and these potentials compared to GND of V1 are +3.6V at the top Op amp output, and +1.7V at the bottom op amp output. These voltages slowly decline by about 0.01V/s.


    Perhaps you guys could point me in the right direction, offer me some tips or a schematic to a working bang bang controller, that I can understand? The few I have found online are generally based heavily on IC's and offer little to no explanation. Thank you!

    Also: The values of the resistors R1: 100kohm, R2: 250ohm, R3: 3800ohm. Both voltage sources are between 9 and 9.2V, and R4 and R5 are provided by a 5k linear potentiometer (correctly wired, checked with multimeter).
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
  3. iownthefrench

    Thread Starter New Member

    Apr 2, 2010
    2
    0
    Beenthere, thanks for replying, I'll take your advice and try and find that circuit. Usually IC circuits seem to have many many commercial features built in, that are usually hard to understand without context.

    I thought V+ and V- on an op amp were arbitrary, and that if V(non inverting) > V(inverting) then Vout = V+ (if there is no feedback). Likewise if V(non inverting) < V(inverting), then Vout = V-.

    Does V+ have to be connected to a positive voltage source, because of the fact op amps are made from NPN or PNP junctions or something similar? Likewise, does V- need to be a lower voltage (GND) or negative voltage for this same reason?

    If this is a stupid mistake, I apologize, and will reread the section regardless. I had previously used opamps mostly as comparators, and didn't seem to have this problem.
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    A single op amp in an 8 pin dip package follows the 741 pinout.
    Pin 1 - may be offset trim
    Pin2 - inverting input
    Pin 3 - non-inverting input
    Pin 4 - Negative supply voltage (must be -15 in a 741)
    Pin 5 - may be offset trim
    Pin 6 - Output
    Pin 7 - Positive voltage input ( must be +15 in a 741)
    Pin 8 - may be offset trim

    Some op amps may operate with ground applied to pin 4. If you need that, look for a notice of single supply operation.

    One really sincere suggestion - never use a 741. The design is 40 years old, and not much of a performer compared to just about any modern op amp. Use a comparator for a comparator. Many op amps do not work at all well as such.
     
  5. dksoba

    New Member

    Jan 8, 2010
    25
    0
    For the purpose of learning about circuits, what is a good general purpose op-amp?
     
  6. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Maybe something like an OP07 or a TL071. Get data sheets to see if they might suit.
     
Loading...