Showing posts with label controller. Show all posts
Showing posts with label controller. Show all posts
Friday, November 14, 2014
WATER LEVEL CONTROLLER USING 8051
A water level controller based using 8051 is shown in this article. A lot of water level controller projects have been published in this website but the is the first one based on a microcontroller. This water level controller monitors the level of the overhead tank and automatically switches on the water pump whenever the level goes below a preset limit. The level of the overhead tank is indicated using 5 leds and the pump is switched of when the overhead tank is filled. The pump is not allowed to start if the water level in the sump tank is low and also the pump is switched off when the level inside the sump tank goes low during a pumping cycle. The circuit diagram of the water level controller is shown below.
The level sensor probes for the overhead tank are interfaced to the port 2 of the microcontroller through transistors. Have a look at the sensor probe arrangement for the overhead tank in Fig1. A positive voltage supply probe goes to the down bottom of the tank. The probes for sensing 1/4, 1/2, 3/4 and FULL levels are placed with equal spacing one by one above the bottom positive probe. Consider the topmost (full level) probe, its other end is connected to the base of transistor Q4 through resistor R16. Whenever water rises to the full level current flows into the base of transistor Q4 which makes it ON and so its collector voltage goes low. The collector of Q4 is connected to P2.4 and a low voltage at P2.4 means the overhead tank is not FULL. When water level goes below the full level probe, the base of Q2 becomes open making it OFF. Now its collector voltage goes high and high at P2.4 means the tank is not full. The same applies to other sensor probes (3/4, 1/2, 1/4) and the microprocessor understands the current level by scanning the port pins P2.4 ,P2.5, P2.6 and P2.7. All these port pin are high (all sensor probes are open) means the tank is empty.
Port pin P0.5 is used to control the pump. Whenever it is required start pumping, the controller makes P0.5 low which makes transistor Q6 ON which in turn activates the relay K1 that switches the pump. Also the LED d6 glows indicating the motor is ON. LED D7 is the low sump indicator. When the water level in the sump tank goes low, the controller makes P0.7 low which makes LED D7 to glow. The circuit diagram of the water level controller is shown in the figure below.
Circuit Diagram
![]() |
| Fig. 1 |
Program
MOV P2,#11111111B // initiates P2 as sensor input
MOV P0,#11111111B // initiates P2 as the output port
MOV A,#00000000B
MAIN : ACALL SMPCK // checks the level of the sump tank
MOV A,P2 // moves the current status of P2 tp A
CJNE A,#11110000B,LABEL1 // checks whether tank is full
SETB P0.1
SETB P0.2
SETB P0.3
SETB P0.4
CLR P0.0 // glows full level LED
SETB P0.5
LABEL1 : MOV A,P2
CJNE A,#11111000B,LABEL2 // checks whether tank is 3/4
SETB P0.0
SETB P0.2
SETB P0.3
SETB P0.4
CLR P0.1 // glows 3/4 level LED
LABEL2 : MOV A,P2
CJNE A,#11111100B,LABEL3 // checks whether tank is 1/2
SETB P0.0
SETB P0.1
SETB P0.3
SETB P0.4
CLR P0.2 // glows 1/2 level LED
LABEL3 : MOV A,P2
CJNE A,#11111110B,LABEL4 // checks whether tank is 1/4
SETB P0.0
SETB P0.1
SETB P0.2
SETB P0.4
CLR P0.3 // glows 1/4 level LED
JB P0.6,LABEL4
CLR P0.5 // switches motor ON
LABEL4 : MOV A,P2
CJNE A,#11111111B,MAIN // checks whether tank is empty
SETB P0.0
SETB P0.1
SETB P0.2
SETB P0.3
CLR P0.4 // glows EMPTY LED
JB P0.6,MAIN // checks whether sump is low
CLR P0.5 // switches motor ON
SJMP MAIN
SMPCK : JB P0.6,LABEL5 // checks whether sump is low
SETB P0.7 // extinguishes the sump low indicator LED
SJMP LABEL6
LABEL5 : SETB P0.5 // switches the pump OFF
CLR P0.7 // glows sump low indicator LED
LABEL6 : RET
Thursday, November 6, 2014
Paraphase Tone Controller
As opposed to the widespread Baxandall circuit (dating back to 1952!) a ‘paraphrase’ tone control supplies a straight frequency response as long as the bass and treble controls are in the same position. This unique property makes the ‘paraphase’ configuration of interest if only treble or bass needs to be adjusted - it is not possible to adjust both at the same time! Essentially, it’s the difference in setting of the tone controls that determines the slope of the frequency response, and the degree of bass/treble correction. The circuit is simplicity itself, based on two networks C1-C2-C3/R9-R10-R11 and C5-C6-C7/R12-R13-R14.
Paraphase Tone Controller Circuit Picture:
The first is for the high frequencies (treble) response, the second, for the low frequencies (bass). The roll-off points have been selected, in combination with C4 and C8, for the sum of the two output signals to re-appear with a ‘straight’ frequency response again at the output. Roughly equal output levels from the networks are ensured by R6 = 7.15 k and R8 = 6.80 k. However, the operating principle requires the input signals to the two networks to be in anti-phase. For best operation the networks are driven by two buffers providing some extra gain.
Paraphase Tone Controller Circuit diagram:
The gain of IC1.D is slightly higher than that of IC1.C to ensure the overall response curve remains as flat as possible at equal settings of the tone controls. Because each network introduces a loss of about 1.72 (times), IC1.D and IC1.C first amplify the signal. The gain is set at about 8 (times) allowing input signal levels up to 1 V to pass the circuit at maximum gain and distortion-free. The gain also compensates the attenuation if you prefer to keep the tone controls at the mid positions for a straight response.
Parts and PCB layout:

To audio fans, the circuit is rewarding to experiment with, especially in respect of the crossover point of the two networks. R3 and R4 determine the control range, which may be increased (within limits) by using lower resistor values here. The values shown ensure a tone control range of about 20 dB. IC1.B buffers the summed signal across R15. C9 removes any DC-offset voltage and R16 protects the output buffer from the effects of too high capacitive loads. R17, finally, keeps the output at 0 V. The choice of the quad opamp is relatively uncritical. Here the unassuming TL074 is used but you may even apply rail to rail opamps as long as they are stable at unity gain. Also, watch the supply voltage range. A simple circuit board was designed for the project. Linear-law potentiometers may be fitted directly onto the board. Two boards are required for a stereo application. The relevant connections on the boards are then wired to a stereo control potentiometer.
Specification:
- Current consumption (no signal) 8 mA
- Max. input signal 1 Veff (at max. gain)
- Gain at 20 Hz +13.1 dB max. –6.9 dB min.
- at 20 kHz +12.2 dB max. –7.6 dB min
- Gain (controls at mid position) 2.38 x
- Distortion (1 Veff, 1 kHz) 0.002% (B = 22kHz) 0.005% (B = 80 kHz)
COMPONENTS LIST
Resistors
R1-R4 = 10k
R5,R7 = 1k
R6 = 7k15
R8 = 6k80
R9,R10,R11 = 8k2
R12,R13,R14 = 2k2
R15 = 1M
R16 = 100R
R17 = 100k
P1,P2 = 100k preset or chassis-
mount control potentiometer, linear law
Capacitors
C1,C2,C3 = 47nF MKT, lead pitch 5mm
C4 = 68nF MKT, lead pitch 5mm
C5,C6,C7 = 10nF MKT, lead pitch 5mm
C8,C10,C11 = 100nF MKT, lead pitch 5mm
C9 = 2µF2 MKT, lead pitch 5mm or 7.5mm
Semiconductors
IC1 = TL074
Miscellaneous
K1,K2 = line socket, PCB mount, e.g.
T-709G (Monacor/Monarch)
R5,R7 = 1k
R6 = 7k15
R8 = 6k80
R9,R10,R11 = 8k2
R12,R13,R14 = 2k2
R15 = 1M
R16 = 100R
R17 = 100k
P1,P2 = 100k preset or chassis-
mount control potentiometer, linear law
Capacitors
C1,C2,C3 = 47nF MKT, lead pitch 5mm
C4 = 68nF MKT, lead pitch 5mm
C5,C6,C7 = 10nF MKT, lead pitch 5mm
C8,C10,C11 = 100nF MKT, lead pitch 5mm
C9 = 2µF2 MKT, lead pitch 5mm or 7.5mm
Semiconductors
IC1 = TL074
Miscellaneous
K1,K2 = line socket, PCB mount, e.g.
T-709G (Monacor/Monarch)
Sunday, September 14, 2014
Soldering iron temperature controller
In most cases I need the stabilize heat for different components like transistor ,IC’s and other semiconductor devices which cannot abide the heat may be it will be damage . Then I make the simple but the important schema for control the heat of soldering iron.
Circuit diagram:
The schema consists of diac, triac, diodes, resister, potentiometer and capacitor.
Parts List:
R1 = 15 Kilo-Ohm
P1 = 250K potentiometer
C1 = 823K, 250V
D1, D2 = 1N4004 or 1N4007
D3 = Diac, bilateral trigger type
Q1 = Triac 500V/25A, BT136
Circuit Operation:
The schema works on RC time constant. The triac is connected in series with soldering iron the reason of choosing the triac is that it work on any polarity so the MT1 (main terminal one) is connected with live wire of 220VAC and MT2 (main terminal two) is connected with soldering iron heater or any of them the diac is connected in series with the gate of triac. It is use for trigger on the gate the R1 and capacitor C1 is the RC time constant and potentiometer is use for changing the trigger or pulses which control the heat of soldering iron manually. The diodes are just for enhancing the ability of charging and discharging and provide protection to diac.
Monday, September 8, 2014
Making PC USB LCD controller project
Schematic circuit and PCB design
source | link
Subscribe to:
Posts (Atom)
