delabs Circuits

Tuesday, December 16, 2008

Dual Polarity Analog Output Op-Amps

When you have to buffer and invert the polarity of mV input levels. This is the circuit you can use, as OP07 has uV offset. R9 and R10 can be 100K 1% MFR or better. Use a symmetrical dual supply.

Dual Polarity Analog Output

OP07: Ultralow Offset Voltage Operational Amplifier

Monday, December 15, 2008

Precision Amplifier with Digital uC Control

When Instruments are designed a analog front end is essential and also as most equipment have digital or microcontroller interface the analog circuit needs to have digital access. The Circuits DACT0008 and DACT0009 are both useful in building instruments which have digital control.

This circuit DACT0009 is similar to DACT0008 but gains of upto 100 can be realized in this configuration, this is useful for signal conditioning of low mV outputs of transducers. The gain selection resistors R3 to R6 can be selected by the user and can be anywhere from 1K to 1M and can also be trimpots for obtaining gains as required by user, the resistor values shown are for decade gains e.g. for an auto ranging DPM.

R1 and C1 reduce ripple in input and also snubs transients, ZD1 and ZD2 Zeners clamp input to +/- 4.7V the input current is limited by R1 lastly C1 and C2 are decoupling capacitors. The OpAmp U3 is used to increase the input impedance so that very low mV inputs are not loaded on measurement, the user can terminate the inputs with a resistor of his choice like 10M or 1M to avoid floating of the inputs when no measurement is being made. U5 is used as an Inverting buffer to restore polarity of the input and U4 is used as a buffer on the output of 4052 because loading it by resistance of value less than 1M will cause an error. An alternative is use R7 = R8 =1M and remove U4 but this may not be ideal. Gains of greeter than 100 may not be practical because at 100 gain itself a 100uV offset will be around 10mV at the output (100uV*100) this can be trimmed using the offset null option in the OP07, connect a trimpot between 1 and 8 and connect wiper to +5.

Precision Amplifier with Digital Control

For better performance use ICL7650 ( not pin compatible ) instead of OP07 and use +/- 7.5V instead of +/-5V supply.
Eight steps for gain or attenuation can be added by using two 4051 and by using Pin 6 Inhibit on 4051/52 limitless steps can be added by cascading many 4051,52,53 as Pin 6 works like a chip select.

Some extended applications of this circuits are....... Error correction in Transducer amplifiers by correcting gain. Auto ranging in DMM. Sensor selection or Input type selection in Process control. Digitally Preset power supplies or electronic loads. Programmable Precision mV or mA sources. PC or uC or uP based instruments. Data loggers and Scanners.

Vout = (Rf/Ri) * Vin -o- Gain = Av = Rf/Ri

Digital Inputs - Logic 0 is 0V Logic 1 is 5V
X Y Value
Gain Av

Sunday, December 14, 2008

InfraRed Detector for Proximity Switch

The proximity switch can work for a wide range of power, from 8v to 18v DC, D3 protects reverse power supply connections, and U1 regulates the supply to +5v , -5v is derived from U2 555 oscillator which serves dual purpose.

Circuit Operation

Part of - InfraRed LED Flasher for Optical Switch
The infra red diode D2 detector gets the reflected light from LED and some ambient light, The forward voltage drop of D2 will vary with the amount of light falling on it. Ambient light causes a DC component and the pulsing light from D1 causes an AC component.Proximity Switch - Driver Supply

The capacitor C6 blocks DC and only transfers AC pulses if any to opamp amplifier U3A whose gain is set by R18, D9 rectifies the pulses to DC and this DC voltage is used by opamp comparator U3B which drives Q1 through Q2 for an open collector output for relays. LED D7 turns on when relay Output is high.

R14 and R13 can be replaced with potentiometer for threshold adjustment if required.

Connect 12v DC supply to +V and GND Ports, Connect a relay coil Between OUT and GND Ports, you can use the relay contacts as you require to turn on a lamp, heater, fan or motor.

If all connections are ok and ICs are working you should see a +5V at U3 pin8 VCC and around -4 to -5 at U3 pin4 VDD.

The Optic switch can be used for both reflecting detection (retro reflective) or obstacle detection. The mechanical construction will decide this, for obstacle detection the diodes D1 and D2 could be put in two different tubes and can be kept far apart 2mts+ and both should be exactly opposite each other, any obstacle like a passing person will be detected. To make a retro reflective proximity switch this circuit is ideal, it can be housed in a cylindrical 30mm by 70mm metal unit with m30 threads and nuts for mounting, both D1 and D2 have to be fitted in the front of this tube on a plastic plug optically insulated from each other yet beside each other.

See also - Mixed and Interface Circuits

Optical Proximity Switch - Detector

InfraRed LED Flasher for Optical Switch

This circuit is used to detect objects by reflected infrared light. It can be built into a cylindrical enclosure just like an inductive proximity switch.

Part of - InfraRed Detector for Proximity Switch

This is also useful as a level detector for colored liquids like oil. This has some immunity to ambient sunlight as it detects ac pulses.

IC 555 is used as an astable oscillator and it flashes the Infra red LED D1 at a high speed, The object close to this LED reflects the light along with the ambient light which may also be sunlight.

Infra Red LED 555 Flasher
IR Led's and Diodes

The types available are various and polarity hard to detect even photo IR transistors can be used. The IR Led can be tested in diode mode of a DMM (battery should be in good condition) it should give around 1.1V drop in proper polarity.

Se a Related circuit here Optical Obstacle Switch.

An IR detector diode or photo diode can be tested in the same way the drop will be 0.5V at 1 feet from a 60W lamp (no sunlight), closing the IR photo diode with your hand will be an over range on DMM this will happen on proper polarity. the photo diode shows around 10k ohm resistance in daylight and in Mega ohms when covered also the photo diode detects light on reverse bias and used like that.

Thursday, December 11, 2008

Precision Attenuator for Digital uC Control

When Instruments are designed a analog front end is essential and also as most equipment have digital or microcontroller interface the analog circuit needs to have digital access. The Circuits DACT0008 and DACT0009 are both useful in building instruments which have digital control.

Precision Attenuator with digital control

The Circuit DACT0008 is a programmable attenuator and the digital control can be a remote dip switch, a CMOS Logic Output like the A-B-C-D outputs of a decade counter, or an I/O port of a uC like 80C31.

The heart of the circuit is the popular OP07 OpAmp with Ultra Low Offset in the inverting configuration, 4052 a CMOS analog multiplexer switch enables the gain change, the innovation of the circuit is that the on resistance ( around 100 ohms) of 4052 switch is bypassed so that no error is introduced by its use.

The resistors used R1 to R6 can be 0.1% 50ppm if you will use a 3 ½ DPM i.e. + /- 1999 counts ( approx. 11 bit ), but for 4 ½ DPM ( approx. 14 bit ) you may need to have trimpots2 in place of R3, R4, R5 & R6 gain selection resistors to properly calibrate to required accuracy but for testing or trials use 1% 100ppm MFR resistors but the errors will be around 1%.

To keep parts count (hence cost) to minimum the common or ground is used as the positive input and negative being one end of R1 this is because the OpAmp inverts the polarity as it is used in inverting configuration, this does not matter as the equipment will be isolated by the power supply transformer and all polarities are relative, but if common has to be negative then add U4 and U5 as shown in DACT0009.

The OP07 pin out is based on standard single OpAmp 741 and any other OpAmp like CA3140, TLO71, LF351 Can be used but with a lot off offset errors but for trials any OpAmp may do but the errors may be > 1% and this is not tolerable n precision instrumentation. OP07 has also equivalents like uA714 & LM607 ultra low offset < 100uV and low input bias <10nA and high input impedance >100M are the key requirements for a good instrumentation amp for DC inputs.

Precision Attenuator with digital control

Vout = -(Rf/Ri) * Vin -o- Gain = Av = Rf/Ri

Digital Inputs - Logic 0 is 0V Logic 1 is 5V
X Y Value
Gain Av

1 : A-B : A, B, C, D is 20 21 22 23 is 1, 2, 4, 8 respectively.
2 : trimpots : e.g. replace R6 1K by 200E trimpot + 900E MFR. 900E can be from 1K parallel to 10K MFR.

Design Background

a. Input 500 V max

1/4 W Rresistor can withstand 250V D1 and D2 Clamps the voltage to +/-0.5V therby protecting OpAmp. R1 and R2 Limit the current also.

D1 and D2 Clamps the voltage to +/-0.5V therby protecting OpAmp.

b. Output

Output connect to DPM 7107/7135 or any other A/D Convertor or OpAmp Stage. Use a buffer at output if output has to be loaded by a value less than 1Meg. Use an inverting buffer if input leads have to have polarity where gnd is -In. See DACT0009 for details.

c. 4052 CMOS Switch

The 4052/51/53 Analog Multiplexers have an on Resistance of around 100E the highlight of the circuit is that the CMOS on resistance comes in series with the opamp output source resistance, which produces no error at output.

Digital Control Options

A and B can be controlled by I/O port of uC, like 80C31 so that the uC can Control gain. A and B can be given to Counters like 4029/4518 to scroll gain digitally. A and B can be connected to DIP switch or thumbwheel switch.

Caution !!!

Circuit does not isolate only attenuates. When high voltage is present at input any part of circuit is a danger to touch.

Wednesday, October 15, 2008

2N2646 based Voltage controlled SCR Pulser

A Center tap 50Hz Step Down Transformer with two diodes is used to get a train of Positive Sine Pulses at 100Hz which is applied to Q6 base via R51. 2N2646 is a unijunction transistor(UJT) in a TO-18 metal package. The control voltage or voltage proportional to error is fed to R56-Q3, The UJT drives a pulse transformer which provides isolation from the Load which the SCR bridge is controlling. This phase angle control gives a near Linear closed loop control for a SCR bridge which may be used in Electroplating or a Preregulator of a big power supply.

2N2646 based Voltage controlled SCR Pulser

Thursday, July 03, 2008

AC-AC-SSR Solid State Relay

This is a AC Control Input AC Output SSR Solid State Relay. When a Process Controller has an AC output or a system generates an AC signal of above 100V AC to signal the load to turn on, this device can be used. A BTA40-600 and MOC3041 are used in this.

A high voltage plastic cap limits current to a bridge which generates a small DC from 230 V AC, this drives MOC3041. The rest is the same. It is better to use a DC control SSR where possible. This AC control SSR is used where only an AC control signal is available. The BTA series has the heatsink tab insulated from the Triac chip inside. The BTB needs electrical insulation to the heatsink.


These devices BTA40600 and MOC3041 make SSR's very simple. They have proved very reliable and rugged in the field, overrate your designs, use heat sinks and seal the SSR with thermally conductive epoxy. Alumina with ciba araldite without any other filler or dye is the best way to hermitically seal.

DC-DC SSR Solid State Relay

This is a DC Input DC Output SSR Solid State Relay. It was made for Printing or Photo Processing Equipment. It has an optical isolation and can be used for inductive loads.


The R1 Limits current and Z1 and D1 protects. The 2N3904 limits current in the Opto-Led. When the LED in CNY17-3 turns on, the Light passes thru a electrically insulating area and falls on the photo-transistor in the opto-coupler. This transistor conducts biasing Q2 PNP power transistor. Then Q2 drives Q3 to saturation, turning it on. Q3 is a High-Voltage and High-Power rugged device. This can derive a solenoid, DC motor or Lamp.

DC Load DC Control SSR

Normally Closed AC SSR

This is a Normally Closed PCB Mount SSR. That means when DC Control input is low, the triac is ON, the output passes the load current to turn on small heater-motor-lamp or a bigger contacter-drive etc.

NC Solid State Relay or SSR

When input DC is high the output is OFF. This is also Optically Isolated from Mains. A Microcontroller output which is buffered by some driver can drive this relay. It is better that in big systems these SSR Modules can be on another PCB, to avoid mains wiring near Logic circuits. But this cannot be used for medical electronics, or critical applications. More reliability and visual isolation of voltages may be required for such equipment.

NC AC Load SSR DC control

Circuits by Application

Analog Circuits

  1. Battery Level Indicator
  2. Simple Sample and Hold
  3. Sample and Hold Standby
  4. Voltmeter Attenuator
  5. Precision Current Source
  6. Opamp Supply Virtual Ground

SCR and Triac

  1. Solid State Relay
  2. Normally Closed AC SSR
  3. AC-AC-SSR
  4. DC-DC SSR
  5. 2N2646 based Pulser
  6. Drive SCR thyristor

Mains Power

  1. Flashing Neon Lamp
  2. Dimmer power control
  3. Edison Bulb Life Extend
  4. Mains Current LED
  5. Mains Voltage LED

Digital Circuits

  1. Simple Digital Counter
  2. Running Lights
  3. Frequency Divider
  4. Crystal Oscillator
  5. Simple High speed switch
  6. Differential TTL converter

Measureall DMM

  1. Ohmmeter Measure Resistance
  2. Precision Digital Attenuator
  3. Precision Amplifier

Mixed Circuits

  1. Monostable Multivibrator
  2. Digital to Analog
  3. LM311 Oscillator
  4. PLL using 4046
  5. VCO with LM331
  6. BCD Thumbwheel to Analog
  7. V to F Converter ICL8038
555 Circuits
  1. OR gate with two 555
  2. fixed frequency duty cycle
  3. Pulse width modulation
  4. Astable Multivibrator
  5. uC Reset Generator
  6. LM555 Voltage Doubler
  7. 555 Power Oscillator
Discrete Circuits
  1. Isolated dual supply
  2. Sound to light converter
  3. Water operated relay
  4. Telephone Indicator
  5. Passive volume control
  6. RS232 Opto-Isolation
  7. Voltage Level Indicator
  8. Relay Driver
  9. Constant Current LED
  10. Voltage Doubler
  11. FET Current Source
Opamp Circuits
  1. Three Opamp Differential
  2. Two Opamp Differential
  3. Buffer Opamps
  4. Differential Op-Amp
  5. Inverting Opamp
  6. Non Inverting Opamp
  7. Digital gain control
  8. Square Triangle Oscillator
  9. Dual Polarity Output Amps
  10. Ammeter Precision Rectifier
  11. Voltage / Current 4-20 mA
  12. Current Source for RTD
Power Electronics
  1. Dual Power Supply
  2. Single Power Supply
  3. Battery Backup Supply
  4. 5V 1A Supply LM2575
  5. 5V Power Supply L296
  6. Dual Power Supply
  7. Tubelight Electronic Choke
  8. Voltage Doublers Multipliers
  9. White LED Lamp on Ni-Cd

uC and uP

  1. PC RS232 with MAX232A
  2. Battery Backup SRAM
  3. watchdog uC uP systems
Instrumentation Circuits
  1. Mains monitor LM3914
  2. Simple Mains monitor
  3. single digit voltmeter
  4. High Resistance Meter
  5. Diode Thermometer
  6. Function Generator
  7. Diode Leakage Tester
  8. Analog LED Ohm Meter
  9. Millivolt Source Current Loop
Process Control
  1. AD590 - temperature
  2. Thermocouple Amplifier
  3. Linearizing Thermocouple
  4. Thermocouple Amplifier
  5. 0-1V to 4-20 mA
  6. 1-5V to 4-20 mA
  7. InfraRed - Optical Switch
  8. InfraRed Detector