Radio Transmitter

For your comments, suggestions, or your looking for a circuit or design, or a electronics designer, please send you Inquiries to pcb1001@gmail.com. We are happy to help and attend to your concerns.
Showing posts with label Logic Application. Show all posts
Showing posts with label Logic Application. Show all posts

Wednesday, April 8, 2009

Automatic Room Lights

n 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.

Running Message Display

Light emitting diodes are advan- tageous due to their smaller size, low current consumption and catchy colours they emit. Here is a running message display circuit wherein the letters formed by LED arrangement light up progressively. Once all the letters of the message have been lit up, the circuit gets reset. The circuit is built around Johnson decade counter CD4017BC (IC2). One of the IC CD4017BE’s features is its provision of ten fully decoded outputs, making the IC ideal for use in a whole range of sequencing operations. In the circuit only one of the outputs remains high and the other outputs switch to high state successively on the arrival of each clock pulse.



The timer NE555 (IC1) is wired as a 1Hz astable multivibrator which clocks the IC2 for sequencing operations. On reset, output pin 3 goes high and drives transistor T7 to ‘on’ state. The output of transistor T7 is connected to letter ‘W’ of the LED word array (all LEDs of letter array are connected in parallel) and thus letter ‘W’ is illuminated. On arrival of first clock pulse, pin 3 goes low and pin 2 goes high. Transistor T6 conducts and letter ‘E’ lights up. The preceding letter ‘W’ also remains lighted because of forward biasing of transistor T7 via diode D21. In a similar fashion, on the arrival of each successive pulse, the other letters of the display are also illuminated and finally the complete word becomes visible. On the following clock pulse, pin 6 goes to logic 1 and resets the circuit, and the sequence repeats itself. The frequency of sequencing operations is controlled with the help of potmeter VR1.

The display can be fixed on a veroboard of suitable size and connected to ground of a common supply (of 6V to 9V) while the anodes of LEDs are to be connected to emitters of transistors T1 through T7 as shown in the circuit. The above circuit is very versatile and can be wired with a large number of LEDs to make an LED fashion jewellery of any design. With two circuits connected in a similar fashion, multiplexing of LEDs can be done to give a moving display effect.

Electronic Scoring Game

You can play this game alone or with your friends. The circuit comprises a timer IC, two decade counters and a display driver along with a 7-segment display.

The game is simple. As stated above, it is a scoring game and the competitor who scores 100 points rapidly (in short steps) is the winner. For scoring, one has the option of pressing either switch S2 or S3. Switch S2, when pressed, makes the counter count in the forward direction, while switch S3 helps to count downwards. Before starting a fresh game, and for that matter even a fresh move, you must press switch S1 to reset the circuit. Thereafter, press any of the two switches, i.e. S2 or S3.

On pressing switch S2 or S3, the counter’s BCD outputs change very rapidly and when you release the switch, the last number remains latched at the output of IC2. The latched BCD number is input to BCD to 7-segment decoder/driver IC3 which drives a common-anode display DIS1. However, you can read this number only when you press switch S4. The sequence of operations for playing the game between, say two players ‘X’ and ‘Y’, is summarised below:

Player ‘X’ starts by momentary pressing of reset switch S1 followed by pressing and releasing of either switch S2 or S3. Thereafter he presses switch S4 to read the display (score) and notes down this number (say X1) manually.
Player ‘Y’ also starts by momentary pressing of switch S1 followed by pressing of switch S2 or S3 and then notes down his score (say Y1), after pressing switch S4, exactly in the same fashion as done by the first player.
Player ‘X’ again presses switch S1 and repeats the steps shown in step 1 above and notes down his new score (say, X2). He adds up this score to his previous score. The same procedure is repeated by player ‘Y’ in his turn.
The game carries on until the score attained by one of the two players totals up to or exceeds 100, to be declared as the winner.

Several players can participate in this game, with each getting a chance to score during his own turn. The assembly can be done using a multipurpose board. Fix the display (LEDs and 7-segment display) on top of the cabinet along with the three switches. The supply voltage for the circuit is 5V

Monday, April 6, 2009

Computer Controlled Frequency Counter/Logic Probe

This circuit is a stable frequency counter accurate to 5 significant digits. The range is 0 - 30MHz with an input sensitivity of greater then 100mV. The probe connects to the PC serial port. So by using the crystal oscillator already present on your PC serial card and software calibration, the Probes' external circuitry is kept to a minimum. Probe 9 can also be used as a logic probe/analyzer using included software (LPROBE92.EXE).


Parts

  • R1,R2,R3,R4---- 4 100K 1/4W Resistor
  • R5 ------------ 1 10M 1/4W Resistor
  • R6, R7 ------- 2 3.3K 1/4W Resistor
  • R8 ----------- 1 390 Ohm 1/4W Resistor
  • R9 ----------- 1 1M 1/4W Resistor
  • C1, C4 ------- 2 0.1uF Ceramic Disc Capacitor
  • C2, C3 ------- 2 100uF 16V Electrolytic Capacitor
  • D1 ----------- 1 1N4148 Signal Diode Any 200mA silicon signal diode
  • D2, D3 ------- 2 3.3V Zener Diode
  • D4 ----------- 1 6.2V Zener Diode
  • U1 ----------- 1 74HC00 Quad Highspeed NAND Gate
  • U2, U3, U4 ---- 3 4021 8 Stage Shift Register
  • U5 ----------- 1 74HC393 Dual Highspeed 4 Bit Counter
  • U6 ----------- 1 4040 12 Stage Binary Counter
  • MISC --------- 1 PC Board, Wire, Suitable Probe, DB9/DB25 Connector

  • The software to use this probe can be downloaded using the following link. Note that this software is compiled for Intel x86 platforms and runs under DOS, Win95, Win98 and WinMe. It does not run under any Windows version based on NT including Windows NT 3.51, WinNT4, Win2K, Win2K3, WinXP and Windows Vista. This is because NT based operating systems do not allow direct hardware access.

Probe Software, Zipped, 19K

  • SETPROBE.EXE is the frequency counter calibration program. To give accurate readings the Probe must be calibrated to your PC. SETPROBE.EXE calculates the constant error correction factor for the particular PC serial card the probe is to be used on. The frequency counter corrects for this slight constant error in crystal frequency by using the correction factor contained in PROBE.DAT. To calculate this correction factor, a reliable oscillator of known frequency (eg 2MHz Crystal Oscillator) is required. When CALIBRAT.EXE is run, the Probe will sample the frequency and then ask for the true frequency value in HZ. The frequency entered must be to 1 Hz accuracy (no decimal points) or an error will occur (for example "200123" not "200123.34" or "2003.421 kHz"). The program then calculates constant error correction factor and stores it to PROBE.DAT. Calibration is only necessary once.
  • LPROBE92.EXE is the logic analysis program . Logic states are displayed in real time. This program runs best under DOS (not a DOS window). The sampling speed is adjusted by using the left and right arrow keys.

The three triggering modes are:

  • TRIG: Starts each scan (left-right of screen) on a negative going edge of logic signal.
  • KEY TRIG: Waits for a key to be pressed before beginning each scan.
  • FREE RUNNING: Not triggered.

  • To Toggle between these use the UP / DOWN arrow keys. To quit from LPROBE press escape.
  • FPROBE92.EXE is the frequency counter program. The measured frequency is displayed in Hz with commas indicating KHz and MHz. To quit from FPROBE press any key.
  • Serial port pinouts are as follows.