Have you ever been using the modem or fax and someone else picks up the phone, breaking the connection? Well, this simple circuit should put an end to that. It signals that the phone is in use by lighting a red LED. When the phone is not in use, a green LED is lit. It needs no external power and can be connected anywhere on the phone line, even mounted inside the phone. Note: This circuit may cause problems for some when used. You may want to build a different circuit.
Parts
R1 3.3K 1/4 W Resistor
R2 33K 1/4 W Resistor
R3 56K 1/4 W Resistor
R4 22K 1/4 W Resistor
R5 4.7K 1/4 W Resistor
Q1, Q2 2N3392 NPN Transistor
BR1 1.5 Amp 250 PIV Bridge Rectifier
LED1 Red LED
LED2 Green LED
MISC Wire, Case, Phone Cord
Notes
This is a very simple circuit and is easily made on a perf board and mounted inside the phone.
LED1 and LED2 flash on and off while the phone is ringing.
Do not worry about mixing up the Tip and Ring connections.
The ring voltage on a phone line is anywhere from 90 to 130 volts. Make sure no one calls while you are making the line connections or you’ll know it. 🙂
In some countries or states you will have to ask the phone company before you connect this to the line. It might even require an inspection.
If the circuit causes distortion on the phone line, connect a 680 ohm resistor in between one of the incoming line wires and the bridge rectifier.
With this circuit you can monitor your telephone line. You are able to detect if any telephone in the same line is busy with the help of a LED. This circuit does not affect the telephone’s line provider, so it’s trouble free but you use it at your own risk.
It connects in parallel with the telephone line. The bridge rectifier (D1…D4) at the input protects the circuit from reverse polarity. When none of the telephones of this line is used then the voltage across the line is about 50-60V. This voltage with the help of the bridge and R1/R2 voltage divider affects the gate of BF256B so it stays in non conductive mode. When a telephone is used the voltage across the line drops suddenly and Τ1 goes to conductive mode so the Led lights up, giving us the “in use indication”.
In Τ1 the current which flows through LED is about 10mΑ. The zener diode D5 prevents gate’s voltage to excess 10V and C1 works like a filter for unwanted pulses. If your circuit doesn’t work ok , you can replace R1 with another, but no more that a 220ΚΩ one.
The circuit works ok with a 9V battery and you can put it into a plastic box.
Attention: 50V from the telephone line can become dangerous under some circumstances so take precautions when handling it.
U1a operates as a low-noise microphone preamp. Its gain is only about 3.9 because the high output impedance of the drain of the FET inside the electret microphone causes U1as effective input resistor to be about 12.2K. C2 has a fairly high value in order to pass very low frequency (about 20 to 30Hz) heartbeat sounds.
U1b operates as a low-noise Sallen and Key, Butterworth low-pass-filter with a cutoff frequency of about 103Hz. R7 and R8 provide a gain of about 1.6 and allow the use of equal values for C3 and C4 but still producing a sharp Butterworth response. The rolloff rate is 12dB/octave. C3 and C4 can be reduced to 4.7nF to increase the cutoff frequency to 1KHz to hear respiratory or mechanical (automobile engine) sounds.
The U4 circuit is optional and has a gain of 71 to drive the bi-colour LED.
U5 is a 1/4W power amplifier IC with built-in biasing and inputs that are referred to ground. It has a gain of 20. It can drive any type of headphones including low impedance (8 ohms) ones.
MIC1Two-wire Electret Microphone J111/8″ Stereo Headphones Jack LED1Red/green 2-wire LED Batt1, Batt229V Alkaline Battery SW12-pole, single throw Power Switch Misc.1Stethoscope head or jar lid, Rubber Sleeve for microphone.
Assembly
Assemble the circuit using Veroboard (stripboard) or a PCB.
Use a shielded cable for the microphone as shown on the schematic.
Fasten the microphone to the stethoscope head with a rubber isolating sleeve or use a short piece of rubber tubing on its nipple. A thick jar lid can be used as a stethoscope head. The microphone must be spaced away from the skin but the stethoscope head must be pressed to the skin, sealing the microphone from background noises and avoiding acoustical feedback with your headphones.
The microphone/stethoscope head must not be moved while listening to heartbeats to avoid friction noises.
Protect your hearing. Keep the microphone away from your headphones to avoid acoustical feedback.
Using a Veroboard mother-board about the same size as the battery holder, a daughter-board was added to hold the remaining parts.
Schematic
Parts List
IC1 . CD74HC132
B1 … Two AAA alkaline cells, with holder
C1, C3 1nF (0.001uF) or 2.2nF (0.0022uF)
C2 … 100uF/16V electrolytic
C4 … 220nF (0.22uF)
R1 … 470K (all resistors 1/4W, 5%)
R2, R4 100K
R3 . 3.9M
R5, R6 .. 680
R7 . 15
R8 . 47K
D1 . 1N4148 or 1N914
D2 . MV8191 or HLMP-D101A
Q1, Q2 .. 2N4403 or 2N3906
Circuit Description
IC1D is a CMOS Schmitt trigger oscillator at about 2KHz. It starts and continues to oscillate with a supply down to 1.24V (the lowest output voltage of my LM317 variable power supply) or less.
IC1A is an inverter.
IC1B is a Schmitt trigger NAND gate. Its output is low only when both inputs are at, or higher than the upper Schmitt trigger threshold voltage. With 47 ohms or less between the probes, an input is always low, so the output is always high. With a resistance of only R8 between the probes, the voltage across C3 is high most of the time, so the gates output is low for ½ the oscillators period. With a resistance that is halfway, then C3 is charged high by that resistance when the oscillators output is high, then is discharged when the oscillators output is low. When C3 is being discharged, then pin 12 of the gate is high, and pin 13 is also high until the discharging voltage of C3 reaches the lower Schmitt threshold voltage. During this time, the gate’s output is low. So the low time of the gates output depends on the value of the resistance between the probes. This is Pulse-Width-Modulation of the low output of the gate.
IC1C is another CMOS Schmitt trigger oscillator at about 2Hz. D1 and R4 discharge C4 quickly so that its output is low for only about 15ms with a 3V battery, and about 25ms with a 2V battery.
The series connection of Q1 and Q2 performs like a NOR gate, so that the LED lights only when both inputs to the transistors are low.
R7 is a current-limiting resistor for the 1.8V LED. With a 3V battery, the LED current is about 35mA.
Circuit Operation
When the soil is very dry, the LED flashes brightly, since the soils resistance is very high.
When the soil has been watered a few days before, but is drying, the LED flashes dimly,
When the soil is damp because it has been recently watered, the LED is off.
Note that different soils have a different resistance. Also, sometimes, watered soil will continue to have a high resistance until the soil absorbs the water, a delay of about one hour.
Although the LEDs current is 8mA with a 3V battery, it is lighted for only a maximum of only about 1/64th of the time, so its maximum average current is only 550uA. The remainder of the circuit draws 200uA. The total is 750A for new batteries, and about 250uA for run-down batteries. Therefore the exponential current of 300uA will continue with 1000mA/hr batteries for 2000 hours, or about 4.6 months.
The LEDs current is logarithmic with the soils resistance, so that when the resistance is one-half, then the LEDs current is one-tenth. If you water the plants when they need watering, then the average LED current will be very low, and the batteries should last for about one year.
Project Assembly
Try to obtain the very bright and wide-angle LEDs that are listed. Samples are available from Fairchild.
Use tinned copper 1.5mm diameter buss-bar wire about 8cm long for the probes.
Use silicone caulking to attach and seal the Veroboard to the battery holder, and to seal the battery holders contact holes.
Perhaps the project can be mounted in a plastic bottle for pills, available from a pharmacy (chemist?), with the probes sticking out of its lid.
Project is based on Holteks IC HT7610A, which is a CMOS LSI chip designed for use in automatic PIR lamp, flash or buzzer control. It can operate in 3-wire configuration for relay applications. In our project we have used relay instead of Traic to connect any kind of load in output, HT7610B IC is suitable for traic and HT7610A for Relay application. The chip is equipped with operational amplifiers, a comparator, timer, a zero crossing detector, control circuit, a voltage regulator, a system oscillator, and an output timing oscillator.
Its PIR sensor detects infrared power variations induced by the motion of a human body and transforms it to a voltage variation. If the PIR output voltage variation conforms to the criteria (refer to the functional description), the lamp is turned on with an adjustable duration. The circuit doesnt required step down transformer and can work directly by applying 110V AC or 220V AC (Capacitor C7 needs to change for 220V AC (0.33uF/275V) and 110V AC (0.68uF/275V)
Features:
Supply Input 110V or 220V AC ( Capacitor Value needs to Change)
No Step Down transformer required
IC Operating voltage: 5V~12V
Load Current 80mA when relay is on.
Standby current of the IC: 100uA
On-chip regulator
Adjustable output duration
40 second warm-up
ON/AUTO/OFF selectable by MODE pin
Override function
Auto-reset if the ZC signal disappears over 3 seconds
On Board Relay to connect output Buzzer or Flash
On Board LDR to Detect Day/Night operation
J1 to Set the Mode
PR1 to set the Sensitivity of the sensor
PR2 to set the output Turn On Duration
CDS R11 for Auto Day/Night detection
(HIGH Voltage On Board) Do Not touch the PCB while power is on.
Schematic
Mode (Jumper J1):
This project offers three operating modes (ON, AUTO, OFF) which can be set through the MODE pin. While the chip is working in the AUTO mode the user can override it and switch to the TEST mode or manual ON mode, or return to the AUTO mode by switching the power switch. J1 Jumper is to set the desired modes.
J1 Jumper
Operating Mode
Description
VDD
ON
Output is always On: Output is high RELAY ON
VSS
OFF
Output is Always Off: Output is low RELAY OFF
Open
Open
Outputs remain in the off state until activated by a valid PIR input trigger signal. When working in the AUTO
mode, the chip allows override control by switching the ZC signal.
CDS-LDR (Light Dependent Resistor):
CDS is a CMOS Schmitt Trigger input structure. It is used to distinguish between day time and night time. When the input voltage of CDS is high the PIR input is enabled. On the other hand, when CDS is low the PIR input is disabled. The input disable to enable debounce time is 5 seconds. Connect this pin to VDD when this function is not used. The CDS input is ignored when the output is active.
LDR Operations
CDS PIN (LDR)
Status
PIR
Low
Day Time
Disabled
High
Night Time
Enabled
LDR Operations
OSCD is an output timing oscillator input pin. It is connected to an external RC to obtain the desired output turn-on duration. Variable output turn-on durations can be achieved by adjusting variable resistor or setting various values of RC.
Power-on Initial
The PIR signal amplifier requires a warm up period after power-on. The input should be disabled during this period. In the AUTO mode within the first 10 seconds of power-on initialization, the circuit allows override control to enter the test mode. After 40 seconds of the initial time the chip allows override control between ON and AUTO. It will remain in the warm up period if the total initial time has not elapsed after returning to AUTO. In case that the ZC signal disappears for more than 3 seconds, the chip will restart the initialization operation. However, the restart initial time is always 40 seconds and cannot be extended by adding CRST to the RST pin as shown in the circuit.
The HT7610A offers mask options to select the output flash (3 times) when changing the operating mode. The output will flash 3 times at a 1Hz rate each time it changes from AUTO to another mode and flash 3 times at a 2Hz rate when it returns to the AUTO mode. However the output will not flash if the mode is changed by switching the MODE switch. Options for effective override: Once or twice Off/On operation of power switch within 3 seconds. Options for output flash to indicate effective override operation. Flash for the circuit.
Test mode control
Within 10 seconds after power-on, effective ZC switching will force the chip to enter the test mode. During the test mode, the outputs will be active for duration of 2 seconds each time a valid PIR trigger Signal is received. If a time interval exceeds 32 seconds without a valid trigger input, the chip will automatically enter the AUTO mode
Note:
The output is activated if the trigger signal conforms to the following criteria:
More than 3 triggers within 2 seconds
A trigger signal sustain duration
0.34 seconds >/2 trigger signals within 2 seconds with one of the trigger signal sustain 0.16 seconds.
The effective comparator output width is selected to be 24ms.
The output duration is set by an external RC that is connected to the OSCD pin
Override control
When the chip is working in an AUTO mode (MODE=open), the output is activated by a valid PIR trigger signal and the output active duration is controlled by an OSCD oscillating period. The lamp can be switched always to ON from the AUTO mode by either switching the MODE pin to VDD or switching the ZC signal by an OFF/ON operation of the power switch (OFF/ON once or twice within 3 seconds by mask option). The term override refers to the change of operating mode by switching the power switch. The chip can be toggled from ON to AUTO by an override operation. If the chip is overridden to ON and there is no further override operation, it will automatically return to AUTO after an internal preset ON time duration has elapsed.
This override ON time duration is 8 hours. The chip provides a mask option to determine the output flash times (3 times) when changing the operating mode. It will flash 3 times at a 1Hz rate each time the chip changes from an AUTO mode to another mode or flash 3 times at a 2Hz rate when returning to the AUTO mode. But if the AUTO mode is changed by switching the MODE switch it will not flash.
Clap switch/Sound-activated switch designed around op-amp, flip-flop and popular 555 IC. Switch avoids false triggering by using 2-clap sound. Clapping sound is received by a microphone, the microphone changes the sound wave to electrical wave which is further amplified by op-amp.
555 timer IC acts as mono-stable multi-vibrator then flip-flop changes the state of output relay on every two-clap sound. This can be used to turn ON/OFF lights and fans. Circuit activates upon two-clap sound and stays activated until another sound triggers the circuit.
In this project we design low cost high performance programmable home security system and there is no need to contact a company like Safemart home security for setup. This system uses a few LDR’s as input sensors. When above sensor(s) get triggered system may dial the user specified phone number (using build-in DTMF generator) and activate the high power audio alarm and lights. All the parameters of DTMF generator, audio alarm and light interface are programmed through the RS232 serial interface.
Current firmware of this system presents interactive control system through the RS232 interface. This control system consist with the menu driven configuration options, self tests, system report generators, etc. This system also contain 5W (with 4Ω speaker) audio alarm with three selectable tone configurations, which include Police siren, Fire engine siren and Ambulance siren.
System Features
Touch tone phone dialing interface
5W High powerful audio alarm
2 sensor interface with separate sensitivity adjustments
Programmed through the RS232 interface
Build-In intelligent light ON/OFF switch
Integrated Circuits
This system uses a Microchip’s PIC16F877A as a main controller, LM339 as sensor interface, UM3561 as a tone generator and μPC2002 as a speaker driver (audio amplifier). LM7805, LM7812 and LM317 voltage regulators are used to obtain +5V, +12V and +3V respectively.
Assembly
The PCB design given with this article makes the assembly much simpler. As PCB contain 230V AC main lines care must be taken while assembling the circuit. As shown in the fig.1 all the photoelectric sensors, some of the switches and alarm speaker are connected with the circuit through the connector bars.
External connectors and controls
DC Power input : Attach DC power supply with 18V – 25V (2A Max.) output. RS232 Connector : Connect RS232 serial cable to the port to configure the system. Do not use RS232 Null Modem cable with this port. PHONE/LINE connector : Attach standard RJ12/RJ11 telephone cable connector to this port. One port is need to use with the phone line and remaining port is for the phone (and it is optional). 3V LASER supply : 3V supply line for LASER diode assembly. Connectors for Sensor 1/2 : Attach high sensitive LDRs for these ports. To get the maximum sensitivity it is recommended to use EG&G VACTEC LDRs. Status Indicator : Indicate run, program and sensor trigger modes. Reset Switch : Press this button to reset entire alarm system. This button enable only when the audible alarm get activated. It is not possible to use this function at the phone dialing/ringer states. Phone dialer enable switch : Turn on this switch to enable the phone dialing feature of this system. Environment Sensor : In-circuit LDR to detect light conditions of the environment. Alarm Volume Control : Use this to control the output power (volume) of the audible alarm. 230V Light connector : Attach 230V AC light (or related peripheral) to these terminals. Tone Selector : Configure the master alarm tone from this jumper as follows,
1-2 : Fire Engine Siren
2-3 : Ambulance Siren
Open : Police Siren
(Do not connect jumper terminal 1-3, this combination may permanently damage the entire system) Beeper : Produce beeps (e.g: at the input error, etc.) Program / Run Switch connector : Attach switch to this header to select Program or Run mode. Alarm Audio Output : Attach 8Ω (8W) or 4Ω (10W) speaker to this connector.
Calibration and Testing
Once everything is assembled take following steps to calibrate the system,
Remove IC1, IC2, IC3 and IC4 from the IC bases.
Apply 18V ( to 22V Max.) DC source to the power connector (J3).
Check the voltage between Pin12 (GND) and Pin3 of IC2. It need to be 4.8V – 5.1V DC.
Check the voltage between GND and E$4 jumper. It need to be 11.7V – 12.3V DC.
Check the voltage between Pin1 and Pin3 (GND) of JP1. It need to be 2.5V – 3.1 V
If all the above Step 3, 4 and 5 are correct, disconnect the power supply and insert IC1, IC2, IC3 and IC4 in to the appropriate IC bases. Attach suitable speaker to the X4 and connect RS232 cable to the system.
Close the jumper J2 (Program Mode) and power on the system.
Download and install PuTTY on to the target computer and setup the “Serial” connection with 9600 baud rate (see Fig. 3).
Press “2” and enter into the “Parameter Setup” mode. Configure all the parameter options with the appropriate settings.
Attach phone line to the PHONE/LINE connector and fix photoelectric LDR sensors to the X1 andX2 connectors.
Press “3” and execute “Self Test”.
Adjust R4*, R6* and R8* preset controls, if the sensors are not trigged as expected.
Adjust R11 preset to control the “Day” and “Night” mode detection.
Open the Jumper J2 and press 5 to return to the Run mode.
Shutdown the power supply and disconnect the RS232 cable.
Fig.3 – PuTTY configuration setup for Programmable Home Security Alarm System
The objective of this project is to use inexpensive PIR sensor to detect if a human has moved. To build this project I use a PIC18F25K20 microcontroller to detect if the sensor had change state and it will emit a sound from the speaker or piezo, the MCU also detect the voltage of the battery in the startup, the algorithm it´s very simple it use an interrupt on change to detect the change on the PIR sensor.
PIR Sensor
PIR sensors allows you to sense motion, almost always used to detect whether a human has moved in or out of the sensors range. They are small, inexpensive, low-power, easy to use and don’t wear out. For that reason they are commonly found in appliances and gadgets used in homes or businesses. PIRs are basically made of a pyroelectric sensor, which can detect levels of infrared radiation. Everything emits some low level radiation, and the hotter something is, the more radiation is emitted. The sensor in a motion detector is actually split in two halves. The reason for that is that we are looking to detect motion (change) not average IR levels. The two halves are wired up so that they cancel each other out. If one half sees more or less IR radiation than the other, the output will swing high or low.
PIR sensor I had use in this project
Schematic
Power Supply
I use a 9V battery and it´s connect to a switch and as a voltage regulator I use an L317T and it will have an output of 3,3V to make that possible I use two resistors R1 and R2 to set the output, i use this equations to calculate R1 and I set R2 to 240 ohms:
POR (Power on reset)
I had to add a RC delay on VPP pin because when I switch on/off the circuit there was a voltage drop because the PIR Sensor and that would generate an unknown state when the MCU was restarted to solve that I add a RC delay, you can use this equations to calculate the delay
Speaker or Piezo
I use an 8 ohm speaker but you can use a piezo, i use a transistor BC338 (Q1) because the sound wasn´t too loud and should be able to ear that from a different division, with that transistor i get a HFE = 35. You can calculate ic with this equation.
PIR Sensor
This PIR Sensor works with only 3.3V like the MCU so it´s connect to the output of LM317T it can be connect to a voltage of 8V to 24V, because I use a 9V battery and if the battery gets lower than 8V the PIR sensor wont work that is why I connect the output of LM317T. The Vout of the sensor it is connected to PORTB.0 and when it occurs a change it will cause an interrupt I use a pull down resistor to make sure the PORTB.0 it is in a low state. The sensor takes 10 to 12 seconds to cause another interrupt and the range is between 2m and 3m. There are the graphs of this sensor and the delays.
Algorithm
At startup both LEDs are on and then it will test the battery if is good Led1(Green) will switch on/off three times, if battery it is low Led2(Blue) will switch on/off three times, next it will put the Led1(Green) on, if PORTB.0 doesn´t change state the circuit will remain the same until a change happen and when a change happen it means the sensor detects some movement and a interrupt will occur and Led1 will be turn off and Led2 will be on and a sound will be generate during 5 seconds and then Led2 will switch off and return to the main routine.
Last week I had a big flood in my house. A water tube broke in the middle of the night making lots of damage. Wooden floor, furniture, small electronic appliances, all damaged due to the water. This made me think on a project that would sense water on the floor and trigger an alarm.
The detector should be able to sense water and trigger an alarm. Also it should be small and battery operated. Battery‘s voltage should be checked also.
Schematic
Parts
R1 10K ohms resistor
R2 10K ohms resistor
R3 10K ohms resistor
R4 1K ohms resistor
R5 10K ohms resistor
R6 1K ohms resistor
C1 100nF cap
Led1 5mm green led
Led2 5mm red led
D1 4V7 zener diode Piezo Piezo HPE-120
VR1 78L05 regulator
IC1 12F683 SOIC microcontroller from Microchip
S1 Push button
Others:
Box
9V battery clip
PCB
Metal strips
Hex program for the microcontroller
PCB
The PCB used for this Project is single layer and its size is 27.02 mm x 32.41mm. The SOIC version of the microcontroller helps to reduce the size of the PCB.
Box and probes
I tried to find a small box that would fit both circuit and box. This way it would be more discrete.
The box that I used did not had enough room for all components, so I had to place both leds and piezo on the exterior of the box. That detail didn’t make any difference since the leds should stay visible and the piezo free to make the loudest sound possible.
The probes can be made from any conductive material, but I preferred not to use copper because it deteriorates with time. In my opinion a good material to be used is stainless steel or aluminium. However, maintenance should be done from time to time checking the probes and testing them with water.
Also, the probes should be placed not to far apart from each other and they never should touch each other. The more probe area available for water sensing the better.
The probes I used in my project are made from aluminium.
The probes are bent 90º and glued to the box. They must be parallel to each other always.
The final assembly looks like this:
The detector is placed on the floor. It’s possible to use some double side tape and stick the detector against the wall or just leave it like the picture below. The probes are on the bottom of the box touching the floor and the leds on the top.
Hex program
The Hex program must be saved in the microcontroller’s memory before soldering on the PCB. Download hex in the download section below.
Testing
Turning on the circuit, both leds and piezo are tested. Also the probes are checked. If the probes are sensing water or any kind of leakage it will turn on the red led and it will trigger the piezo.
After everything is checked ok the detector will enter it’s normal state.
Every 10 seconds it will check the probes and the battery’s voltage.
If water gets between the probes the detector will enter the alarm mode where the red led will turn on and the piezo will start making a loud sound. The detector will keep itself in alarm mode until S1 is pressed.
If the battery’s voltage is good, the green led will flash every 10 seconds but if the voltage reaches 7V the red led will flash every 10 seconds and the piezo will make a short sound to indicate it’s time to change the battery.
The water detection time is less than 10 seconds. Since the microcontroller enters a low consumption state between readings to preserve battery life, this state is always 10 seconds long. If water reaches the probes while being in the low power state it will have to wait until it finishes the sleep state before it can trigger the alarm.
Conclusion
This is a simple but effective water detector. I have built 2 units and have one inside the kitchen and one inside the bathroom. It’s possible to replace the 9V battery with any 9V wall power supply.