This blog is for circuit hungry people. Those people that are interested in practical work rather than software. This blog is for Engineers and Technicians who chooses either Electrical, Electronic, Telecom as there field. From basics to High Level Projects circuit diagrams with details are given in this blog that not only helps in developing practical knowledge but also strong the theoretical knowledge of students.
Sunday, October 19, 2014
Thursday, April 28, 2011
Universal Preamplifier
Audio Amplifier systems with preamplifiers have various characteristics that includes low gain linear response for tuners, high gain RIAA equalization for magnetic phone cartridges and high gain liner response for magnetic microphones.
To meet this broad requirement, most amplifier designers include a single universal preamplifier circuit. Basically a high-gain linear amplifier, its characteristics can be altered by switching alternative resistor filter networks into its feedback system.
For example, when the selector switch is set to the Mag phono position, alternative input sources can be selected by S1-a, and appropriate linear-response gain control feedback resistors 220K, 470K, and 1M are now selected by S1-b. Those feedback resistor values are selected between 10 kilo ohms and 10 megohms to suit individual listener tastes. Circuit gain will be proportional, to the feedback resistor value.
Wednesday, August 26, 2009
Sunday, August 2, 2009
Simple power down
This circuit adds a power down function to analog I/O ports (for example, the AD7769 and AD7774). Moreover, the diodes ordinarily needed to protect the devices against power-supply missequencing can be
eliminated
In the circuit, MOSFETs Q1 and Q2 switch the +5- and +12-V supplies, respectively, in a sequence controlled by two cross-coupled CD4001 CMOS NOR gates (U1C and U1D). The sequence in which power isapplied is important: The controlled circuits may be damaged anytime Vcc exceeds Vdd+0.3V. Consequently, the NOR gates must be powered from a 12-V supply throughout the power-down sequence. [...]
Arduino Perpetual Pendulum
Basic Idea
I wanted to set up a pendulum with a small magnet on its end, place an electromagnet beneath where the pendulum would swing, and then energize the electromagnet briefly from time to time to "nudge" the pendulum so that it would swing "forever". (Note that the electromagnet works best if under the swing of the pendulum, not at the end of the swing, mounted so that it would be hit by the pendulum if it were to swing just a little "too far".)
That's about all there is to it! The project is almost that simple. Why bother to make one? To be sure I could, and the spot I have in mind for this toy is a two story high atrium, and a suitable pendulum gently swinging back and for there will, I think, look rather nice. And be a relaxing sight.
Details....
Definition: Reed switch: Usually two tiny metal leaves in a sealed glass tube, arranged so that when a magnet is near, the leaves come together and electricity will flow through the device. When there is no magnet nearby, the leaves spring apart, and no electricity flows. Usually a single pole, single throw switch.
If, in addition to the electromagnet, you also put reed switches under the arc through which the pendulum swings, then you can use their closures (as the pendulum and its magnet swing over them) to time when the electromagnet is energized. If it isn't turned on and off at the right times, you don't get good results. You might think that one reed switch would do... but using only one gives rise to problems. (You might want to try to figure out what they are before the answer is given farther down the page.)
If your skills are up to it, I suspect that using LEDs and phototransistors to detect the pendulum passing a certain point would give better results. But I used reed switches, and made them work.
I would suggest putting the switches and the electromagnet near the point the pendulum would be over if it were hanging, still, not swinging. This has pros and cons, which I invite you to explore for yourself, if only in your mind. Be sure the reed switch nearest the electromagnet is not so near that turning on the electromagnet will cause the reed switch to close.
The following diagram should merely recap what you already know. The green arrows (pointing down) represent the five wires which lead away from the pendulum/ switches/ electromagnet to the place where you have the Arduino and other electronic elements. Don't be tempted to combine the two "earth" wires. (More on this later.) "SWouter"and "SWinner" are just shorthand names for the two switches.
Building it... mechanical....
You cannot spend too much time making sure you have a good pendulum. If it isn't well mounted, so that it will swing consistently, you will spend the rest of the time you spend on this project being annoyed. In other words you don't want the setup of switches and electromagnet I had in the prototype!!
(The blurred vertical at the left is the pendulum, the vertical on the right supports the pendulum.)
The longer your pendulum is the better, within reason.
A heavy weight near the bottom will be helpful. It will help if the center of the weight's gravity coincides with the center of the magnet mounted on the end of the pendulum. (If this is not done, the pendulum will try to twist when the electromagnet pulls on the pendulum magnet.)
I used quite a dinky disk magnet, and mounted it "flat", i.e. with the flat faces horizontal when the pendulum is at rest. Having said that, it is a modern (strong) "dinky" magnet, and I was lucky enough to have a good electromagnet to hand. Neither is a critical element, just use the best of each that you can obtain easily.
The precise positioning of the two reed switches and the electromagnet is critical to the satisfactory working of this toy. You will do yourself a favor if you mount them in a way that facilitates fine adjustments. One of the advantages of the broken- light- beam approach to detecting the pendulum's position accurately, with less effort on the mechanical side, become easier. The spacing between the two reed switches isn't critical... you will probably get away with anything that isn't silly. Put them far enough apart, though, that there will be at least a little time when neither is activated when the pendulum is between them.
Both the Coriolis effect and forces arising from elements in the design can deflect the swing of the pendulum from a nice simple "back and forth" in one plane. So mount your pendulum such that it resists any attempts to deviate.
How you hang the pendulum is up to you; I doubt you need my help, but I've posted a few ideas on the page the link will take you to, if you are interested.
Building it... electrical/ electronic....
The following gives you most of what you need....
N.B.: I would love to build the whole thing with just one power supply, and it "should" be possible. However, there's something called "field collapse" which you need to know about. Consider the electromagnet in this project. When you connect it to a voltage, electro-magnetism builds up around the electromagnet. When you dis-connect the voltage, that magnetism "collapses" in on the coil, and gives rise to a pulse of high voltage. That much I know and understand. That is why the diode (D2) is present. It is inserted the way it is so that no electricity flows through it when the voltage from PSU2 is applied across the electromagnet. (You'll cause all sorts of problems... unless PS2 is short circuit friendly... if you connect things up with the diode the wrong way 'round.) When the voltage from PSU2 is removed, the role of the diode is to "drain off" the voltage arising from the collapsing field. All of that logic also applies to D1, by the way. Whenever you have a relay in a circuit, you put a diode across the coil thus. 1N4004s work well... just be sure to use something like that, capable of handling significant current. Some of the small "signal" diodes may not be up to the strain.
Continuing the story of why there are two power supplies (PSUs): Years ago, I set out to built a computer controlled model railway. I had a PIC (poor man's Arduino) programmed to control the voltage supplied to the train track. That voltage went into the motor of the train. A motor is, in many ways, just a special electromagnet. And I "blew up" (permanently fried) a number of PICs. I never did figure out why I was destroying my PICs. I looked into a number of things, I took great care, I built protection into everything... and still I destroyed PICs.
You "should" be able to build something like my Perpetual Pendulum without needing two power supplies... but I didn't want to risk damaging my Arduino, hence my cautious, two PSU, design.
One of the LEDs (LEDspare) isn't used at all. You don't need the LEDs for the project to work... but the visual indication of what the Arduino is "seeing" and "doing" can be very useful during troubleshooting, and "costs" nothing. If you decide to dispense with one or more of the LEDs, you can still run the program just as published below.
Electromagnet: I was lucky... I had a nice 12volt solenoid in my junk box. I left its actuator in place, taped to the retracted position. That made a nice iron core to focus the magnetism. I put the current through the coil so that the magnet on the end of the pendulum is attracted to the electromagnet when it is energized. This was to avoid having the pendulum pushed sideways, out of a nice straight arc. If your electromagnet is repelling your magnet, you only have to reverse the connections to the electromagnet. Be sure to do it "downstream" (distal from) the diode... you want to reverse the direction of current flow through the coil, but still present the voltage to the diode as before.
If you have to build your own electromagnet, be careful that the load it places on PSU2 isn't too high. Another component that will be under some strain is the relay. The electromagnet will be energized again and again and again. And when it is energized, there will be what amounts to a brief almost short circuit across the contacts... high current. If your pendulum stops working after a few days or weeks, the relay is the first thing I'd check, assuming that the swing of the pendulum still takes it over the reed relays properly.
There's no reason to site the Arduino right next to the pendulum. The five wires between the electromagnet and the two switches and everything else can be quite long.
So! that's about all I have to say about the system. Here's the software. (There will be a few comments on the software after it....)
/*
Pendulum01
ver 29 May 08
Hardware: 3 LEDs for data output:
LEDInnerRS: Announces state of reed switch nearest center
of pendulum swing
LEDOuterRS: Announces state of reed switch farthest from
center of pendulum swing
LEDElectMag: Announces state of output to relay
One output line to control relay to control electromagnet
Two inputs from reed switches.
*/
#define LEDOuterRS 13 //no ; here.
#define LEDInnerRS 11 //no ; here.
#define LEDElectMag 9 //no ; here.
#define LEDSpare 7 //no ; here.
#define SWInner 10 //no ; here.
#define SWOuter 12 //no ; here.
#define ElectMag 8 //no ; here. This output will be used
// to turn electromagnet on.
//Set up values for the variable LastSwitched
#define inner 0 //no ; here. Not "necessary" but makes code
#define outer 1 //no ; here. more readable
int LastSwitched = 0;
void setup()
{
pinMode(LEDInnerRS,OUTPUT);
pinMode(LEDOuterRS,OUTPUT);
pinMode(LEDElectMag,OUTPUT);
pinMode(LEDSpare,OUTPUT);
pinMode(ElectMag,OUTPUT);
pinMode(SWInner,INPUT);
pinMode(SWOuter,INPUT);
digitalWrite(SWInner, HIGH);//Turn on internal pull up resistor
digitalWrite(SWOuter, HIGH);
}
void MagnetOnBriefly()
{
/*The LED is not a necessary element, just helpful in
diagnostic work.*/
digitalWrite(ElectMag,HIGH);
digitalWrite(LEDElectMag,HIGH);
delay(290);
digitalWrite(ElectMag,LOW);
digitalWrite(LEDElectMag,LOW);
return;
}
void loop()
{
if (digitalRead(SWOuter)==HIGH)
{digitalWrite(LEDOuterRS,LOW);}
else
{digitalWrite(LEDOuterRS,HIGH);
LastSwitched=outer;
};
if (digitalRead(SWInner)==HIGH)
{digitalWrite(LEDInnerRS,LOW);}
else
{digitalWrite(LEDInnerRS,HIGH);
if (LastSwitched==outer){MagnetOnBriefly();};
delay(40);//debounce
LastSwitched=inner;
};
}//End "loop"
==== Discussion of program.... ====
Remember the conundrum set earlier? "Why two switches?"
For the sake of discussion... it didn't happen, really!.... let's imagine that at first I only one switch. Why can't we trigger the electromagnet each time the pendulum goes over it?
You'd be half right. Assuming things are arranged as in the first diagram, and assuming you've wired things so that an energized electromagnet attracts the pendulum, then yes, you want to energize the electromagnet when the pendulum is swinging left- to- right.... which it will be doing half of the time it passes over the switch But! What about the times when the pendulum is swinging away from the electromagnet! You don't want to "call it back" at those times, do you?
By having two switches, you can ask where the pendulum was a moment ago. Do yourself a little table showing the sequence of "switch ons" you get from the two switches as the pendulum swings. Assuming a pretty wide swing, you'll see that the switch that is on goes...
I(nner), O(uter), O, I, I, O, O, I, I....
The right time to turn the electro-magnet on briefly is when the inner switch is on immediately after the outer switch has been on.
Just as a little aside: In this project (and most Arduino work, as far as I'm aware) we are working with the states of the inputs at specific moments. In some electronic control work, we are able to look for and work with "edges", instead of what we're doing here, working with "levels". "Edges" occur when the state of an input changes. A change from low to high is called a rising edge, and the other change is a falling edge. While working with edges is nice in some ways, they are nasty in others. In particular, edges are very brief, so you usually have a way to ask "has an edge occurred since I last asked?" In our Perpetual Pendulum project, we only concern ourselves with levels, and we check and re-check the states of the inputs so often that there will not be a case where one goes high and then low again so quickly that we won't have looked at least once during the brief (in human, but not computer, terms) time it was high.
=== Further discussion... ===
To get you Perpetual Pendulum working well, you'll have to adjust the following to get what is right for whichever you chose to change first....
- Position of electromagnet
- Position of inner switch
- Position of outer switch
- Length of debounce delay*
- Length of time electro-magnet is switched on
Re- the "debounce delay", marked "*" in the list above. It is the one inside the "loop" function. To be honest with you, I'm entirely quite sure why this delay is needed... but it does make a difference to the way the program performs. I suspect it prevents the program from "seeing" the switch close more than once for one pass of the pendulum overhead... although 40ms seems an awfully short time to accomplish this. It works, so I used it!
The length of time the electomagnet is switched on is controlled by the delay in the "MagnetOnBriefly" function. Too long, and when the pendulum is swinging widely, the electro-magnet will limit the swing, as it will pull back on the pendulum after the pendulum has swung past the electro-magnet, and is trying to go out on its swing to the right. If the electromagnet is not on for a long enough period, the magnet on the pendulum will be relatively far away from the electro-magnet for the whole time it is energized. And therefore the attraction between the two will only be minimal.
=== Further discussion.... ===
You may have found the....
#define inner 0 //no ; here. Not "necessary" but makes code
#define outer 1 //no ; here. more readable
... unexpected. During the program's execution, we need to know which switch was last seen to close. As far as the program is concerned, "0" is a code standing for the inner switch, and "1" is a code standing for the outer switch. We store, say, 0 in the variable "LastSwitched" when the inner switch is seen to close. Once we've done that, we only need to say "if LastSwitched==0...." to set up something to happen if the last switch seen to close was the inner switch.
Because of my defines, we can use the words "inner" and "outer" in place of "0" and "1". The English equivalents for the numerical codes are a little easier for our gray cells to process.
With "inner" and "outer" defined, we can say things like "LastSwitched=inner" and "if (LastSwitched==inner)..."
=== Further discussion.... ====
The heart of the program, shown below, is deceptively simple. If you take out everything except the two lines starting "if", can you rebuild the code to do what has to be done? It would be an excellent challenge for a programming class. I'm not even sure that it is "perfect"... but it does work. I did get some odd behavior for a while (before the delay was added). That odd behavior might also have stemmed from the electro-magnet's magnetism "spilling over" and causing one or both reed switched to close.
Heart of program.....
if (digitalRead(SWOuter)==HIGH)
{digitalWrite(LEDOuterRS,LOW);}
else
{digitalWrite(LEDOuterRS,HIGH);
LastSwitched=outer;
};
if (digitalRead(SWInner)==HIGH)
{digitalWrite(LEDInnerRS,LOW);}
else
{digitalWrite(LEDInnerRS,HIGH);
if (LastSwitched==outer){MagnetOnBriefly();};
delay(40);//debounce
LastSwitched=inner;
};
Extensions....
=== Things which might be fun.... Count swings
Add some code so that the number of swings is counted. The easy thing to do would be to put an accumulator in the "MagnetOnBriefly" function... but this is not a good answer! (If you want to pursue one of the other extensions which I'm going to mention in a moment.
It will probably be simplest to count the instances of SWinner being on immediately after SWouter being on.
Once you have started counting the swings, if you want to connect an LCD panel (or other means of output) to the Arduino you can list that, just to amaze people, and/ or try to display a time of day derived from the time-keeping capability of the pendulum. Of course you then have to introduce ways of setting the time of day at the start. All beyond what amuses me... but easy enough to do! (Speaking of "amaze": I have an anemometer (wind speed sensor) which may have turned 10 million times since it's counter was last reset. This figure is a little worrying... the counter's figure sometimes "jumps" due to electrical noise... but the program that monitors it has executed 610,000 passes though its main loop since the last time... not long ago... the program was reset, so who knows?)
=== Things which might be fun.... Auto-restart
From time to time "things" happen. The cat plays with the pendulum, there's a power outage, whatever.
The software given above works while it works, but if things go wrong, the pendulum will stop swinging, and not start again without human intervention. In particular, if for some reason the outer switch doesn't close for a few swings, the electro-magnet doesn't energize for a few swings, and before long the swings are too short for the magnet to reach the outer switch and we are headed towards a dead pendulum.
It would not be beyond the wit of programmer-kind to include some extra code which would "do things" when the outer switch wasn't being closed. The normal system, with its feedback circuit, allows for optimal swinging. But an alternative, "crude", system might be able to get the pendulum swinging well enough for the feedback-driven alternative to start working again.
If such a system were built, then a solar powered (see below), runs-just-when-the-sun-is-out version of the Perpetual Pendulum becomes do-able.
=== Things which might be fun.... Alternate power
Depending on the match (or lack thereof) between your electro-magnet and it's PSU, the strain of supplying adequate voltage to the electro-magnet may be over-stressing the PSU.
You could solve this, and perhaps also get better overall performance, by using PSU2, through a resistor, to charge a capacitor. The electro-magnet would then be powered by the charge in the capacitor when the relay closed.
Such a circuit will "save up" electricity in the capacitor, and "deliver" it in a burst when the contacts of the relay close.
If you had enough photovoltaic solar cells to generate a suitable voltage, it wouldn't matter if the current supplied was weak. Of course, the system would need a night light or other to see it through the night.
With the capacitor circuit, a new problem arises. How often do you close the contacts on the relay? The fun of design work is in imagining and exploring the alternatives, weighing up their pros and cons.
The "close how often" question has many possible answers.
If your power supply, though weak, is at least constant (i.e. not solar power!), you could program the system to zap the electro-magnet once every, say, five swings. Or more or less, depending on your PSU.
If you want to get fancier, you could monitor the voltage marked V-CAP on the diagram. As the capacitor charges up, that voltage will rise. Now... if you have overcome the problems discussed previously about keeping the voltages in the Arduino strictly separate from the power for the electro-magnet, you could monitor V-CAP with one of the Arduino's analog inputs.
You could also, with a transistor or so, put an extra "switch" in series with the contacts of the relay. The Arduino would "ask" for an electro-magnet pulse on every swing of the pendulum, but the transistor(s) would prevent that from happening until there was adequate charge in the capacitor. Again, this would tap into V-CAP to know when the capacitor ware adequately charged.
If the solar power idea is attractive, you can combine a few things for a "full" answer....
I'd still go with two power supplies... one for the Arduino, one for the electro-magnet. Each would involve, in essence, the circuitry found in emergency lights. During the day, solar cells would be used to charge batteries. Voltage regulators would allow power to pass to the Arduino and electro-magnet as needed, and "extra" electricity would be passed for storage to the batteries to see the system through the night.
FM Wireless Microphone by BC557
FM Wireless Microphone by BC557
July 27th, 2009Advertisements
FM Wireless Microphone has been a very popular project with beginners and experienced constructors alike. It has been used inside guitars and as the basis of a remote control system. I do however, receive many requests for a higher powered circuit and better microphone sensitivity. Now I can introduce the new FM Wireless Microphone (v5), which also has a better frequency stability, over 1Km range (under ideal conditions) and is good on microphone sensitivity. This has been achieved by adding an RF amplifier buffer (with 10dB gain) and an AF preamplifier to boost the modulation a little.
AM-CW ham bands transmitter
This is a small transmitter is a good stable QRP transmitter, which has many uses, from the HF bands AM transmitter, radio control models, or AM / CW ham-band transmitter. Circuit is almost ridiculously simple, and construction is even simpler. It is basically a single transistor oscillator with very low output impedance, suitable for driving the base of another transitory stage amplifier. Oscillator uses a single coil and crystal. The coil is tuned to a frequency output, which may correspond to the crystal frequency, or harmonics.
Wednesday, July 29, 2009
Simple Car Battery Charger
This very simple circuit uses a transformer ,two diodes , a capacitor and an ammeter.
To charge a battery just connect the + and - terminals of the circuit to the corresponding terminals of the battery.
When the battery is not charged, the ammeter reading shows 1-3 amps.
When the battery is fully charged the ammeter reads Zero or nearly zero, after which the battery should be removed from the
charger.
The circuit is a full wave rectifier using 2 diodes for rectification. The capacitor is used for smoothing.
I think the circuit works fine without the capacitor since the battery itself acts a BIG capacitor. But when you are using the
circuit to supply 12V (as a battery eliminator) the capacitor needs to be present.
Care should be taken NOT to reverse the + and - terminals while connecting it to the battery.
Automatic Speed Controller for fans & Coolers
During summer nights, the temperature is initially quite high. As time passes, the temperature starts dropping. Also, after a person falls asleep, the metabolic rate of one’s body decreases. Thus, initially the fan/cooler needs to be run at full speed. As time passes, one has to get up again and again to adjust the speed of the fan or the cooler.The device presented here makes the fan run at full speed for a predetermined time. The speed is decreased to medium after some time, and to slow later on. After a period of about eight hours, the fan/cooler is switched off.Fig. 1 shows the circuit diagram of the system. IC1 (555) is used as an astable multivibrator to generate clock pulses. The pulses are fed to decade dividers/counters formed by IC2 and IC3. These ICs act as divide-by-10 and divide-by-9 counters, respectively. The values of capacitor C1 and resistors R1 and R2 are so adjusted that the final output of IC3 goes high after about eight hours.The first two outputs of IC3 (Q0 and Q1) are connected (ORed) via diodes D1 and D2 to the base of transistor T1. Initially output Q0 is high and therefore relay RL1 is energised. It remains energised when Q1 becomes high. The method of connecting the gadget to the fan/cooler is given in Figs 3 and 4.
| |
| |
It can be seen that initially the fan shall get AC supply directly, and so it shall run at top speed. When output Q2 becomes high and Q1 becomes low, relay RL1 is turned ‘off’ and relay RL2 is switched ‘on’. The fan gets AC through a resistance and its speed drops to medium. This continues until output Q4 is high. When Q4 goes low and Q5 goes high, relay RL2 is switched ‘off’ and relay RL3 is activated. The fan now runs at low speed.Throughout the process, pin 11 of the IC is low, so T4 is cut off, thus keeping T5 in saturation and RL4 ‘on’. At the end of the cycle, when pin 11 (Q9) becomes high, T4 gets saturated and T5 is cut off. RL4 is switched ‘off’, thus switching ‘off’ the fan/cooler.Using the circuit described above, the fan shall run at high speed for a comparatively lesser time when either of Q0 or Q1 output is high. At medium speed, it will run for a moderate time period when any of three outputs Q2 through Q4 is high, while at low speed, it will run for a much longer time period when any of the four outputs Q5 through Q8 is high.If one wishes, one can make the fan run at the three speeds for an equal amount of time by connecting three decimal decoded outputs of IC3 to each of the transistors T1 to T3. One can also get more than three speeds by using an additional relay, transistor, and associated components, and connecting one or more outputs of IC3 to it.
In the motors used in certain coolers there are separate windings for separate speeds. Such coolers do not use a rheostat type speed regulator. The method of connection of this device to such coolers is given in Fig. 4.
The resistors in Figs 2 and 3 are the tapped resistors, similar to those used in manually controlled fan-speed regulators. Alternatively, wire-wound resistors of suitable wattage and resistance can be used.
Alternating Flasher
This circuit uses three easily available 555 timer ICs. All three work as astable multivibrators. The first 555 has an on period and off period equal to 1 sec. This IC controls the on/ off periods of the other 2 555s which are used to flash two bulbs through the relay contacts.
The flashing occurs at a rate of 4 flashes per second.
The diodes are used to protect the 555 ICs from peaks. The relays should have an impedance greater than 50ohms i.e, they should not draw a current more than 200mA.
The flashing sequence is as follows:
The bulb(s) connected to the first relay flashes for about 1 sec at a rate of 4 flashes per second. Then the bulb(s) connected to the second relay flashes for 1 sec at a rate of 4 flashes per second. Then the cycle repeats.
The flashing rates can be varied by changing the capacitors C3 and C5. A higher value gives a lower flashing rate.
Note that the values of C3 and C5 should be equal and should be less than that of C1.
The value of C1 controls the change-over rate ( default 1sec). A higher value gives a lower change-over rate.
If you use the normally open contacts of the relay, on bulb will be OFF while other is flashing,and vice versa.
If normally closed contacts are used, one bulb will be ON while the other is flashing
Audio Light Modulator
Audio light modulations add to the enjoyment of music during functions organised at home or outdoors. Presented here is one such simple circuit in which light is modulated using a small fraction of the audio output from the speaker terminals of the audio amplifier. The output from the speaker terminals of audio amplifier is connected to a transformer (output transformer used in transistor radios) through a non-polarised capacitor. The use of transformer is essential for isolating the audio source from the circuit in The sensitivity control potentiometer VR1 provided in the input to transistor T1 may be adjusted to ensure that conduction takes place only after the AF exceeds certain amplitude. This control has to be adjusted as per audio source level. The audio signal Proper earthing of the circuit is quite essential. The diode bridge provides pulsating DC output and acts as a guard circuit between the mains input and pulsating DC output. Extreme care is necessary to avoid any electric shock
Automatic Room Lights
An ordinary automatic room power control circuit has only one light sensor. So when a person enters the room it gets one pulse and the lights come ‘on.’ When the person goes out it gets another pulse and the lights go ‘off.’ But what happens when two persons enter the room, one after the other? It gets two pulses and the lights remain in ‘off’ state. The circuit described here overcomes the above-mentioned problem. It has a small memory which enables it to automatically switch ‘on’ and switch ‘off’ the lights in a desired fashion. The circuit uses two LDRs which are placed one after another (separated by a distance of say half a metre) so that they may separately sense a person going into the room or coming out of the room. Outputs of the two LDR sensors, after processing, are used in conjunction with a bicolour LED in such a fashion that when a person gets into the room it emits green light and when a person goes out of the room it emits red light, and vice versa. These outputs are simultaneously applied to two counters. One of the counters will count as +1, +2, +3 etc when persons are getting into the room and the other will count as -1, -2, -3 etc when persons are getting out of the room. These counters make use of Johnson decade counter CD4017 ICs. The next stage comprises two logic ICs which can combine the outputs of the two counters and determine if there is any person still left in the room or not. Since in the circuit LDRs have been used, care should be taken to protect them from ambient light. If desired, one may use readily available IR sensor modules to replace the LDRs. The sensors are installed in such a way that when a person enters or leaves the room, he intercepts the light falling on them sequentially—one after the other. When a person enters the room, first he would obstruct the light falling on LDR1, followed by that falling on LDR2. When a person leaves the room it will be the other way round. In the normal case light keeps falling on both the LDRs, and as such their resistance is low (about 5 kilo-ohms). As a result, pin 2 of both timers (IC1 and IC2), which have been configured as monostable flip-flops, are held near the supply voltage (+9V). When the light falling on the LDRs is obstructed, their resistance becomes very high and pin 2 voltages drop to near ground potential, thereby triggering the flip-flops. Capacitors across pin 2 and ground have been added to avoid false triggering due to electrical noise. When a person enters the room, LDR1 is triggered first and it results in triggering of monostable IC1. The short output pulse immediately charges up capacitor C5, forward biasing transistor pair T1-T2. But at this instant the collectors of transistors T1 and T2 are in high impedance state as IC2 pin 3 is at low potential and diode D4 is not conducting. But when the same person passes LDR2, IC2 monostable flip-flop is triggered. Its pin 3 goes high and this potential is coupled to transistor pair T1-T2 via diode D4. As a result transistor pair T1-T2 conducts because capacitor C5 retains the charge for some time as its discharge time is controlled by resistor R5 (and R7 to an extent). Thus green LED portion of bi-colour LED is lit momentarily. The same output is also coupled to IC3 for which it acts as a clock. With entry of each person IC3 output (high state) keeps advancing. At this stage transistor pair T3-T4 cannot conduct because output pin 3 of IC1 is no longer positive as its output pulse duration is quite short and hence transistor collectors are in high impedance state. When persons leave the room, LDR2 is triggered first followed by LDR1. Since the bottom half portion of circuit is identical to top half, this time with the departure of each person red portion of bi-colour LED is lit momentarily and output of IC4 advances in the same fashion as in case of IC3. The outputs of IC3 and those of IC4 (after inversion by inverter gates N1 through N4) are ANDed by AND gates (A1 through A4) are then wire ORed (using diodes D5 through D8). The net effect is that when persons are entering, the output of at least one of the AND gates is high, causing transistor T5 to conduct and energise relay RL1. The bulb connected to the supply via N/O contact of relay RL1 also lights up. When persons are leaving the room, and till all the persons who entered the room have left, the wired OR output continues to remain high, i.e. the bulb continues to remains ‘on,’ until all persons who entered the room have left. The maximum number of persons that this circuit can handle is limited to four since on receipt of fifth clock pulse the counters are reset. The capacity of the circuit can be easily extended for up to nine persons by removing the connection of pin 1 from reset pin (15) and utilising Q1 to Q9 outputs of CD4017 counters. Additional inverters, AND gates and diodes will, however, be required
Emergency Light
The circuit of automatic emergency light presented here has the following features: 1. When the mains supply (230V AC) is available, it charges a 12V battery up to 13.5V and then the battery is disconnected from the charging section. 2. When the battery discharges up to 10.2V, it is disconnected from the load and the charging process is resumed. 3. If the mains voltage is available and there is darkness in the room, load (bulb or tube) is turned on by taking power from the mains; otherwise the battery is connected to the load. 4. When the battery discharges up to 10.2V and if the mains is not yet available, the battery is completely disconnected from the circuit to avoid its further discharge. The mains supply of 230V AC is stepped down to 18V AC (RMS) using a 230V AC primary to 0-18V AC, 2A secondary transformer (X1), generally used in 36cm B&W TVs. Diodes D1 through D4 form bridge rectifier and capacitor C5 filters the voltage, providing about 25V DC at the output. Charging section includes 33-ohm, 10-watt resistor R2 which limits the charging current to about 425 mA when battery voltage is about 10.2V, or to 325 mA when battery voltage is about 13.5V. When the battery charges to 13.5V (as set by VR2), zener diode D17 goes into breakdown region, thereby triggering triac TR1. Now, since DC is passing through the triac, it remains continuously ‘on’ even if the gate current is reduced to zero (by disconnecting the gate terminal). Once the battery is fully charged, charging section is cut-off from the battery due to energisation of relay RL2. This relay remains ‘on’ even if the power fails because of connection to the battery via diode D10. S4, a normally closed switch, is included to manually restart the charging process if required. Battery disconnect and charging restart section comprises an NE555 timer (IC2) wired in monostable mode. When the battery voltage is above 10.2V (as indicated by red LED D15), zener diode (D16) remains in the breakdown region, making the trigger pin 2 of IC2 high, thereby maintaining output pin 3 in low voltage state. Thus, relay RL3 is ‘on’ and relay RL4 is ‘off.’ But as soon as the battery voltage falls to about 10.2V (as set by preset VR1), zener diode D16 comes out of conduction, making pin 2 low and pin 3 high to turn ‘on’ relay RL4 and orange LED D13. This also switches off relay RL3 and LED D15. Now, if the mains is available, charging restarts due to de-energisation of relay RL2 because when relay RL4 is ‘on,’ it breaks the circuit of relay RL2 and triac TR1. But if the mains supply is not present, both relays RL3 and RL1 de-energise, disconnecting the battery from the remaining circuit. Thus when battery voltage falls to 10.2 volts, its further discharge is eliminated. But as soon as the mains supply resumes, it energises relay RL1, thereby connecting the battery again to the circuit. Light sensor section also makes use of a 555 timer IC in the monostable mode. As long as normal light is falling on LDR1, its resistance is comparatively low. As a result pin 2 of IC3 is held near Vcc and its output at pin 3 is at low level. In darkness, LDR resistance is very high, which causes pin 2 of IC3 to fall to near ground potential and thus trigger it. As a consequence, output pin 3 goes high during the monostable pulse period, forward biasing transistor T3 which goes into saturation, energising relay RL5. With auto/bypass switch S2 off (in auto mode), the load gets connected to supply via switch S3. If desired, the load may be switched during the day-time by flipping switch S2 to ‘on’ position (manual). Preset VR3 is the sensitivity control used for setting threshold light level at which the load is to be automatically switched on/off. Capacitors with the relays ensure that there is no chattering of the relays. When the mains is present, diode D8 couples the input voltage to regulator IC1 whereas diode D10 feeds the input voltage to it (from battery) in absense of mains supply. Diode D5 connects the load to the power supply section via resistor R5 when mains is available (diode D18 does not conduct). However, when mains power fails, the situation reverses and diode D18 conducts while diode D5 does not conduct. . The load can be any bulb of 12 volts with a maximum current rating of 2 amperes (24 watts). Resistor R5 is supposed to drop approximately 12 volts when the load current flows through it during mains availability . Hence power dissipated in it would almost be equal to the load power. It is therefore desirable to replace R5 with a bulb of similar voltage and wattage as the load so that during mains availability we have more (double) light than when the load is fed from the battery. For setting presets VR1 and VR2, just take out (desolder one end) diodes D7, D10 and D18. Connect a variable source of power supply in place of battery. Set preset VR1 so that battery-high LED D15 is just off at 10.2V of the variable source. Increase the potential of the variable source and observe the shift from LO BAT LED D13 to D15. Now make the voltage of the source 13.5V and set preset VR2 so that relay RL2 just energises. Then decrease the voltage slowly and observe that relay RL2 does not de-energise above 10.2V. At 10.2V, LED D15 should be off and relay RL2 should de-energise while LED D13 should light up. Preset VR3 can be adjusted during evening hours so that the load is ‘on’ during the desired light conditions
Automatic Dual output Display
This circuit lights up ten bulbs sequentially, first in one direc- tion and then in the opposite direction, thus presenting a nice visual effect. In this circuit, gates N1 and N2 form an oscillator. The output of this oscillator is used as a clock for BCD up/down counter CD4510 (IC2). Depending on the logic state at its pin 10, the counter counts up or down. During count up operation, pin 7 of IC2 outputs an active low pulse on reaching the ninth count. Similarly, during count-down operation, you again get a low-going pulse at pin 7. This terminal count output from pin 7, after inversion by gate N3, is connected to clock pin 14 of decade counter IC3 (CD4017) which is configured here as a toggle flip-flop by returning its Q2 output at pin 4 to reset pin 15. Thus output at pin 3 of IC3 goes to logic 1 and logic 0 state alternately at each terminal count of IC2. Initially, pin 3 (Q0) of IC3 is high and the counter is in count-up state. On reaching ninth count, pin 3 of IC3 goes low and as a result IC2 starts counting down. When the counter reaches 0 count, Q2 output of IC3 momentarily goes high to reset it, thus taking pin 3 to logic 1 state, and the cycle repeats. The BCD output of IC2 is connected to 1-of-10 decoder CD4028 (IC4). During count-up operation of IC2, the outputs of IC4 go logic high sequentially from Q0 to Q9 and thus trigger the triacs and lighting bulbs 1 through 10, one after the other. Thereafter, during count-down operation of IC2, the bulbs light in the reverse order, presenting a wonderful visual effect
Light Flasher
This is a very basic circuit for flashing one or more LEDS and also to alternately flash one or more LEDs.
It uses a 555 timer setup as an astable multivibrator with a variable frequency.
With the preset at its max. the flashing rate of the LED is about 1/2 a second. It can be increased by increasing the value of the capacitor from 10uF to a higher value. For example if it is increased to 22uF the flashing rate becomes 1 second.
There is also provision to convert it into an alternating flasher. You just have to connect a LED and a 330ohm as shown in Fig.2 to the points X and Y of Fig.1. Then both the LEDs flash alternately.
Since the 555 can supply or sink in upto 200mA of current, you can connect upto about 18 LEDS in parallel both for the flasher and alternating flasher (that makes a total of 36 LEDs for alternating flasher).Programmable Digital Code Lock
A programmable code lock can be used for numerous applications in which access to an article/gadget is to be restricted to a limited number of persons. Here is yet another circuit of a code lock employing mainly the CMOS ICs and thumbwheel switches (TWS) besides a few other components. It is rugged and capable of operation on voltages ranging between 6 and 15 volts. The supply current drain of CMOS ICs being quite low, the circuit may be operated even on battery.
The circuit uses two types of thumbwheel switches. switch numbers TWS1 through TWS8 are decimal-to-BCD converter type while switch numbers TWS9 through TWS16 are 10-input multiplexer type in which only one of the ten inputs may be connected to the output (pole). One thumbwheel switch of each of the two types is used in combination with IC CD4028B (BCD to decimal decoder) to provide one digital output.Eight such identical combinations of thumbwheel switches and IC CD4028 are used. The eight digital outputs obtained from these combinations are connected to the input of 8-input NAND gate CD4068.For getting a logic high output, say at pole-1, it is essential that decimal numbers selected by switch pair TWS1 and TWS9 are identical, as only then the logic high output available at the Specific output pin of IC1 will get transferred to pole-1. Accordingly, when the thumbwheel pair of switches in each combination is individually matched, the outputs at pole-1 to pole-8 will be logic high.This will cause output of 8-input NAND gate IC CD4068b to change over from logic high to logic low, thereby providing a high-to-low going clock pulse at clock input pin of 7-stage counter CD4024B, which is used here as a flip-flop (only Q0 output is used here).The output (Q0) of the flip-flop is connected to a relay driver circuit consisting of transistors T1 and T2. The relay will operate when Q0 output of flip-flop goes low. As a result transistor T1 cuts off and T2 gets forward biased to operate the relay.Switch S1 is provided to enable switching off (locking) and switching on (unlocking) of the relay as desired, once the correct code has been set.
With the code set correctly, the NAND gate output will stay low and flip-flop can be toggled any number of times, making it possible to switch on or switch off the relay, as desired. Suppose we are using the system for switching-on of a deck for which the power supply is routed via the contacts of the relay. The authorised person would select correct code which would cause the supply to become available to the deck. After use he will operate switch S1 and then shuffle the thumbwheel switches TWS1 through TWS8 such that none of the switches produces a correct code. Once the code does not match, pressing of switch S1 has no effect on the output of the flip-flop.Switches TWS9 through TWS16 are concealed after setting the desired code. In place of thumbwheel switches TWS1 through TWS8 DIP switches can also be used
Ultrasonic Pest Repeller
It is well know that pests like rats, mice etc are repelled by ultrasonic frequency in the range of 30 kHz to 50 kHz. Human beings can’t hear these high-frequency sounds. Unfortunately, all pests do not react at the same ultrasonic frequency. While some pests get repelled at 35 kHz, some others get repelled at 38 to 40 kHz. Thus to increase the effectiveness, freque- ncy of ultrasonic oscillator has to be continuously varied between certain limits. By using this circuit design, frequency of emission of ultrasonic sound is continuously varied step-by-step automatically. Here five steps of variation are used but the same can be extended up to 10 steps, if desired. For each clock pulse output from op-amp IC1 CA3130 (which is wired here as a low-frequency square wave oscillator), the logic 1 output of IC2 CD4017 (which is a well-known decade counter) shifts from Q0 to Q4 (or Q0 to Q9). Five presets VR2 through VR6 (one each connected at Q0 to Q4 output pins) are set for different values and connected to pin 7 of IC3 (NE555) electronically. VR1 is used to change clock pulse rate. IC3 is wired as an astable multivibrator operating at a frequency of nearly 80 kHz. Its output is not symmetrical. IC4 is CD4013, a D-type flip-flop which delivers symmetrical 40kHz signals at its Q and Q outputs which are amplified in push-pull mode by transistors T1, T2, T3 and T4 to drive a low-cost, high-frequency piezo tweeter. For frequency adjustments, you may use an oscilloscope. It can be done by trial and error also if you do not have an oscilloscope. This pest repeller would prove to be much more effective than those published earlier because here ultrasonic frequency is automatically changed to cover different pests and the power output is also sufficiently high. If you want low-power output in 30-50 kHz ultrasonic frequency range then the crystal transducer may be directly connected across Q and Q outputs of IC4 (transistor amplifier is not necessary
Simple IF Signal Generator
Here is a versatile circuit of IF signal generator which may be of interest to radio hobbyists and professionals alike.Transistors T1 and T2 form an astable multivibrator oscillating in the audio frequency range of 1 to 2 kHz. RF oscillator is built around transistor T3. Here again a 455kHz ceramic filter/resonator is employed for obtaining stable IF. The AF from multivibrator is coupled from collector of transistor T2 to emitter of transistor T3 through capacitor C3. The tank circuit at collector of transistor T3 is formed using medium wave oscillator coil of transistor radio, a fixed 100pF capacitor C5 and half section of a gang capacitor (C6).
The oscillator section may be easily modified for any other intermediate frequency by using ceramic filter or resonator of that frequency and by making appropriate changes in the tank circuit at collector of transistor T3. Slight adjustment of bias can be affected by varying values of resistors R6 and R7, if required