Friday, March 19, 2010

Color Sensor



Colour sensor is an interesting project for hobbyists. The cir- cuit can sense eight colours, i.e. blue, green and red (primary colours); magenta, yellow and cyan (secondary colours); and black and white. The circuit is based on the fundamentals of optics and digital electronics. The object whose colour is required to be detected should be placed in front of the system. The light rays reflected from the object will fall on the three convex lenses which are fixed in front of the three LDRs. The convex lenses are used to converge light rays. This helps to increase the sensitivity of LDRs. Blue, green and red glass plates (filters) are fixed in front of LDR1, LDR2 and LDR3 respectively. When reflected light rays from the object fall on the gadget, the coloured filter glass plates determine which of the LDRs would get triggered. The circuit makes use of only �AND� gates and �NOT� gates.
When a primary coloured light ray falls on the system, the glass plate corresponding to that primary colour will allow that specific light to pass through. But the other two glass plates will not allow any light to pass through. Thus only one LDR will get triggered and the gate output corresponding to that LDR will become logic 1 to indicate which colour it is. Similarly, when a secondary coloured light ray falls on the system, the two primary glass plates corres- ponding to the mixed colour will allow that light to pass through while the remaining one will not allow any light ray to pass through it. As a result two of the LDRs get triggered and the gate output corresponding to these will become logic 1 and indicate which colour it is.
When all the LDRs get triggered or remain untriggered, you will observe white and black light indications respectively. Following points may be carefully noted :
1. Potmeters VR1, VR2 and VR3 may be used to adjust the sensitivity of the LDRs.
2. Common ends of the LDRs should be connected to positive supply.
3. Use good quality light filters.
The LDR is mounded in a tube, behind a lens, and aimed at the object. The coloured glass filter should be fixed in front of the LDR as shown in the figure. Make three of that kind and fix them in a suitable case. Adjustments are critical and the gadget performance would depend upon its proper fabrication and use of correct filters as well as light conditions


Battery Tester Project

Battery Tester Project Using LM3914 IC

This objective of this project is to design and build a battery tester that is able to test various types of dry cell and rechargable battery with a voltage of less than 2V. Configured as a bar graph battery level indicator, the LM3914 IC from National Semiconductor senses the voltage levels of the battery under test and drives the 10 LEDs to ON or OFF based on the voltage that is detected. The current driving the LEDs is regulated by using the external resistor R1 and hence limiting resistors are not required.

The schematic shows the simple connections where the reference voltage at pin 8 of U1 can be adjusted by adjusting the variable resistor VR1. The voltage at pin 8 will set the maximum scale of the LED. In testing dry cell battery of 1.5V, set the voltage at pin 8 to 2.0V. Each of the LED will thus represent 200mV when lighted up.

If testing of rechargable battery such as NiCd or NiMH is required, set the reference voltage to a lower value such as 1.5V as the typical voltage of a rechargable battery is approximately 1.2V.

When testing the battery, take note of the polarity of the probe to the terminals of the battery. T1 is to be placed on the positive terminal and T2 the negative terminal of the battery.



Parts List

The parts list of the project is as shown below.

Constructing TTL/CMOS Logic Probe

The purpose of a logic probe is to examine the logic states at a particular point in an electronic circuit. It is usually used in fault finding and testing but it can also be used to find out how a piece of electronic equipment works or to assist in electronic design. There are many circuits for this type of probes. Some are very simple while others have added so many features the probe has become too big. At a minimum any probe should be usable with both CMOS and TTL logic families. In this design a pulse detection circuit has been added because the detection of electronic pulses is so important today in many electronic circuits.

Logic Probe Circuit Description

1. There are two main logic families used in electronics: CMOS and TTL. For CMOS the supply voltage may be anywhere between 3V and 15V and the logic levels used are taken as a proportion of the supply voltage. Levels quoted by different manufacturers vary so the the probe should be calibrated for the most extreme cases.)

For CMOS the extreme limits are:

HIGH -- greater than 73.3% of supply voltage

LOW -- less than 26.6% of supply voltage

For TTL the supply voltage should be 5 volts and the logic levels are:

HIGH -- greater than 2 volts

LOW -- less than 0.8 volts

At a minimum a logic probe should be usable over the full range of CMOS circuit voltages. In practice this is from 5V to 15V. If the probe takes its power supply from the circuit under test (as most do) then all components in the probe must operate over the 5 to 15 volt range. Some electronic equipment may have different voltage circuits within it so you must connect to the correct one that you want to test. A good logic probe should be able to detect both positive and negative pulses. It should be able to detect the brief pulses which can switch CMOS and SCR devices. The minimum width of these pulses is of the order of 50 ns (50 nano seconds, 50 x 10-9 seconds.) In this project we have incorporated a high speed, dual polarity pulse detection and stretching circuit which can capture these pulses. Detection is no good without audible and visual indication of what is detected. Audible indication is necessary so that you do not have to take your eyes off where you are working with the tip of the probe. Three different coloured 3mm LED's give a visual indication. The table gives the various combinations of logic levels and pulse widths which can be detected.

2. Logic Probe Circuit Description - Level Detector.

This circuit consists of a dual op-amp and two resistor divider networks which can be selected by a switch. One network selects the voltage levels for CMOS, the other for TTL. The resistor dividers are not protected because the nonlinearity of the diode would affect the level references. The LM358 wide range, single supply, dual op-amp was selected so that it can operate over the full range of CMOS supply voltages. Amp A detects the high level. The inverting input (pin 2) is set to the high level reference. If the noninverting input (pin 3) rises above that level then the output (pin 1) switches to high. This high activates the high level indicators until the level of the input signal is reduced below the high level reference. Amp B performs a similar function for the low level. This time it is the noninverting input (pin 5) that connects to the reference. Accordingly the amp switches high when the input from the probe (pin 6) falls below the low level reference. The low level indicators are then activated until the input voltage is raised above the low level reference again.

3. Logic Probe Circuit Description - Pulse Detector.

This circuit consists of 4 CMOS inverters (in the 4049/14049) and some passive components. Start at pin 7. Usually R15 holds pin 5 low which makes pin 4 high, which in turn makes pin 7 high via diode D4 leakage. If pin 7 is pulled down by a negative pulse from C2 or C3 the pulse travels through the first inverter (and becomes high), then to C4 and the second inverter to arrive at pin 4 as a low. The low holds pin 7 low via diode D4. Pin 6 is now high. Pin 5 is therefore held high until C4 discharges through R15. When pin 5 falls to the CMOS low level pin 4 goes high again and the latch is released. The pulse indication time is set by the time constant C4.R15. When a pulse is detected it is stretched to about a second during which time the orange LED is turned on and a tone sounds. The tone will be a medium tone unless the final level is low. In this case the tone will be a low pitch. Before the pulse detector circuit are two inverters. They perform a number of functions. They shape the level change into a sharp pulse and put out signals at rail voltage. Any change of level (low to high or high to low) at the probe will cause one inverter to go high and the other to go low. By adding the diodes D2 and D3, when a level change occurs the output going from low to high is blocked temporarily until its leakage current charges the 100pF series capacitor. However, the output going from high to low is not blocked because its diode is then forward biased and a negative going pulse arrives at pin 7. As describes in the previous paragraph a negative pulse at pin 7 causes a pulse detection signal. If the input to the logic probe is not in a defined state (that is, if it is in the range 26.6% to 73.3% of the supply voltage for a cmos circuit, or 16% to 40% of the supply voltage for a TTL circuit) then it is in the floating level. However, the cmos gate connected to the probe will still recognise the input as high or low. Normally it will switch at 50% so normally we could call 26.6% to 50% of the supply voltage floating low, and 50% to 73.3% floating high. The implications of this are:

a) that pulses to and from the floating range will only be detected if they cross the switching level for the cmos gate.

b) that TTL pulses to marginal positive levels may not be detected by the pulse detector (but will still show up on the level detectors if they are not too fast)

c) that the pulse detectors will show what users usually want to know, namely whether any transients are going to cause switching in cmos devices. If the probe is floating (that is have an undetermined input) then it will be floating either high or low. If it is floating high then it will not detect a positive going pulse because it is not a true pulse as far as the probe is concerned. Similarly, if it floating low then it will not detect a negative pulse. All these conditions are illustrated in the table and diagrams as below.

4. Logic Probe Circuit Description - Indicators.

The visual indicators are provided by the LED's. The audible indicators are provided by an audio frequency relaxation oscillator driving a piezo element via CMOS inverter buffers. The relaxation oscillator consists of a PUT (programmable unijunction transistor) fed by a variable time constant supply. The PUT acts like an open circuit if the gate voltage is higher than the anode voltage. It avalanches to a short circuit if the anode voltage reached the gate voltage. If any of the indicator signals are high the high charges C5 through the corresponding resistance (R12, R13 or R14.) When the PUT triggers it discharges C5 which restores the PUT and charging recommences. The resistance in the charge circuit determines the charge time which in turn determines the oscillator tone.

HOW TO USE THE LOGIC PROBE

Determine the supply voltage of the logic elements to be tested. Connect the positive and ground (or negative) leads correctly. Place the tip of the probe on the point you want to test. If the circuit has switches to control its operation and you want to see what happens when you change settings hold the probe in place while you make the changes. Be careful not to short out components on the board under test. The indicators will tell you if you are in the immunity band (no signal.) A HIGH level will bring on the RED LED and a high pitched sound. A LOW level will bring a low pitched sound and the GREEN LED. A fast pulse will light the YELLOW LED and a medium pitched sound for about a second. A slow pulse will combine the fast pulse signals with a pulse of the relevant level indicators. A level change will combine the pulse signals with the relevant leval signal. If the level change is very slow the pulse signal may not coincide with the start of the level signal. The Table on the next page lists the typical states and transitions that the logic probe will detect. The Conditions are shown the Diagrams.

LOGIC PROBE ASSEMBLY INSTRUCTIONS

LOGIC PROBE assembly is straight forward and components may be added to the PCB in any order. Note that there are two links to be added to the PCB. The metal probe for the Logic Probe must be soldered to the large pad where indicated underneath the PCB. Use a cut piece of wire from one of the resistors as the probe, Power for the probe is derived from the circuit under test. The GROUND and POSITIVE pads at the right side of the PCB are where power is connected to the board. Two tie holes have been drilled next to each pad so that the wires may be tied down and reduce mechanical strain on the wires as the probe is moved around during use.















Electronic Design Circuits Touch Switch

Electronic Design Circuits Touch Switch

In this Electronic Design Circuits Touch Switch project, a CMOS quad 2 input NOR gate IC is used as a latching circuit to switch a LED ON and OFF by physically touching the ON metal plate or OFF metal plate. The CD4001BC integrated circuit is a monolithic complementary MOS (CMOS) IC that are constructed with N- and P- channel enhancement mode transistors. Its input are protected against electrostatic discharge with diodes to VDD and VSS.

The circuit below shows the schematic diagram of the touch circuit of which the NOR gates are configured as a simple latching circuit. When the skin contact is made between contacts T1 and T2 or T3 and T4, the LED switches ON and OFF respectively. The latching circuit is to ensure that the output will not fluctuate between ON and Off.

When the T1 and T2 contacts are bridged through the skin contact, the output of U1-a will go to logic "0" and caused the output of U1-b to go to logic "1". This output will in turn caused NOR gate U1-c to go to logic "0" causing transistor Q1 to turn ON, and hence LED will turn ON. The circuit will remain latched with the LED ON until contacts T3 and T4 are bridged of which the output of U1-a will go to logic "1", output of U1-b will go to logic "0", output of U1-c will go to logic "1" and the transistor Q1 will turn OFF. The LED will then turn OFF.



It is important to ensure that 9V battery is used as its DC source. If one uses the mains supply to step down the voltage using a transformer for rectification and filtering to get the 9V DC supply, ensure that the transformer is designed in such a way that it follows the safety standard requirement of UL. This is important to ensure the safety of the user that is using the metal contacts to ON/OFF the LED.

Parts List


Touch Switch/Contact Switch Free Electronic Circuits

Touch Switch Free Electronic Circuits

The main part of the Touch Switch Free Electronic Circuits are the two NAND gates of the 4011 Integrated Circuit which are connected as a flip-flop. Pins 9 and 13 are the ON and OFF contacts. The two gates are connected to the positive rail by the two 10M resistors. Shorting one of the gates with the ground rail by touching it (this is equivalent to connecting about 50K between the gate and ground) FLIPs the output to that state. Shorting out the other contact FLOPs it back.

The output of the flip-flop drives a transistor connected as a switch. It switches an LED and a relay. The relay is a 12V relay and commonly available SPDT type 240VAC can be used to switch ON or OFF a lamp or other electrical appliances. However, make sure that the current and voltage of the device are within the contact relay specifications. Connecting the two 1K resistors connects the other two NAND gates of the IC into the flip-flop and makes it much more sensitive to touch. The touch plate may in fact work with only the first two gates connected. But it will be much more sensitive with all four gates connected as a flip-flop.

Ensure that an isolating transformer is used when the power supply comes from the mains before being rectified to 12V DC for safety purposes. The schematic diagram of the circuit is as shown below.



Parts List