The project Color Identification SYSTEM is aimed to make a break through into industrial automation & control through the use of latest technology to solve complex problems. Colors play a very important role in our daily life. Color detection systems are rarely used in introductory SYSTEMics courses due to the lack of reliable inexpensive color detection methods. In this project we try to develop an accurate color detection scheme that costs little to build and easy to implement.
COLOR DETECTION:-
The Blue surface when exposed to green light shines very bright, however in the presence of red light appears to be black. An orange surface, on the other hand, displays reflection characteristics that are opposite of this property and create a system where a CDS cell can be used to differentiate between colors.
MATERIALS:-
1) Microcontroller AT89C51RD2
2) ADC 0804
3) DC Motor
4) Electromagnet
5) Bright LEDs
6) Resistors
7) CDS Cells
8) Capacitors
9) Voltage Regulators
10) Step Down Transformers
11) PCBs etc
The circuit is a simple voltage divider circuit. A output port of a microcontroller is used to turn on and off the LED. The measured signal is taken between the CDS cell and the resistor. A CDS cell is a passive element where the resistance across the components leads is directly proportional to the intensity of light shown upon the surface. A large voltage range is desirable in order to increase the resolution of our sensor. Assuming the CDS cell has linearly varying resistance for our region of operation, we can evaluate for an R that will allow a maximum voltage range.
1) Vrange(CDSmin,CDSmax,R) = (CDSmax/CDSmax+R)-(CDSmin/CDSmin+R)
2) d/dR(Vrange)(CDSmin,CDSmax,R) → -(CDSmax/(CDSmax+R)2)+(CDSmin/(CDSmin+R))2
3) 0 = d/dR(Vrange)(CDSmin,CDSmax,R)
4) R→[CDSmin.CDSmax]1/2/-[CDSmin.CDSmax]1/2
Where CDSmin = The minimum resistance of the CDS cell
CDSmax = The maximum resistance of the CDS cell
R = The resistor which should be chosen
Vrange = The max and minimum signal
An array of different color LEDs is used for data collection. The array I built consists of 4 collimated Red, Blue, Green and White LED’s. The columns are used to guard the CDS cell from direct expose to the LED light.
DATA COLLECTION & EVALUATION:-
Obtain a unique vector of data for each color we wish to distinguish using the method explained below.
1) Turn ON LED 1, Turn OFF ALL others.
2) Record the sample
3) Turn ON LED 2, Turn OFF ALL others
4) Record the sample
5) Turn ON LED 3, Turn OFF ALL others
6) Record the sample
7) Turn ON LED 4, Turn OFF ALL others
8) Record the sample
Finally we can calculated the unknown color by calculating the Euclidean Distance against each of our known vectors. The vector producing the shortest Euclidean Distance will have the greatest likelihood of being the unknown color.
CONCLUSION:-
The above method has been implemented successfully on a SYSTEM we designed in our lab. The SYSTEM is capable to go and pick up the desired color object on place.
Simulation
Part 1:
To simulate the full wave rectifier circuit as shown in Figure 1, the following components should be used:
- Input AC voltage (Vin): Vin is a 10 Vpeak and 60 Hz sinusoidal wave. Use VSIN with the setting: VOFF = 0, VAML = 10 and FREQ = 60
- Full wave rectifier (FWR): The full wave rectifier is constructed in the form of bridge rectifier using four diodes (D1N4004).
- Load resistor: 200 Ω and 500 Ω resistors are used to understand the effect of load resistor on the performance of the DC power supply.
Simulation results required in your lab report:
- Output voltage for Rload = 200 Ω
- Output voltage for Rload = 500 Ω
All the simulations in this project are in transient mode with run time = 35ms. On the simulation results, you should indicate the maximum output voltage (Vmax), the minimum output voltage (Vmin) and the ripple voltage Vr (Vmax – Vmin).
To simulate the filtered full wave rectifier circuit as shown in Figure 2, the filter capacitor is chosen from 100 uF, 470 uF and 1000 uF.
Simulation results required in your lab report:
- Output voltage for Rload = 200 Ω and C1 = 100 uF
- Output voltage for Rload = 200 Ω and C1 = 470 uF
- Output voltage for Rload = 200 Ω and C1 = 1000 uF
- Output voltage for Rload = 500 Ω and C1 = 100 uF
- Output voltage for Rload = 500 Ω and C1 = 470 uF
- Output voltage for Rload = 500 Ω and C1 = 1000 uF
Part 2:
To design and simulate a filtered full wave rectifier with a shunt regulator, the following design steps should be followed:
- To design a shunt regulator, first pick up a 3.3 volts zener diode (a particle diode, part number 1N5226) and plug it into the curve tracer. Caution: zener diode should be reverse biased. The cathode of the zener diode (the end with a black ring) should be connected to the “A” of the diode test port. Menu Settings: type – diode; Vd – 5 volts; Id – 20 mA; Rload – .25 ohm; Pmax – 2 Watt). Choose any two points in the linear region and use CURSOR function to display Id and Vd of the two points. Print out from the screen and it should look like that in Figure 6 except in the first quadrant.
- Calculate the effective zener resistance Rz and effective zener voltage Vzo from the equation or Rz = (Vz2 – Vz1)/(Iz2 – Iz1) and Vzo = Vz1 – Iz1*Rz.
- Calculate the value of the series resistor R (R5 in Figure 4) for the shunt regulator with the equation
– Vin(min) is the minimum input voltage, Vin(min) = Vp – 2*0.7 – Vr, Vp is the peak input voltage or 10 volts in this lab, 0.7 volt is the voltage drop across one diode, Vr can be used as 2 volts for an estimation
– Vzo and Rz are obtained in step 2
– Iz(min) is the minimum current needed for the zener diode to operate properly, for example, 5 mA is a good rating
– IL(max) is the maximum load current and determined by Vo/Rmin. The output voltage of the shunt regulator is about the zener voltage used, Rmin is the minimum load resistance. In this lab, Vo ~ 3.3 volts and Rmin = 200 Ω
- Get a practical resistor with a value close but smaller than the resistance R calculated above. Use this value for R in all the following calculation and simulation.
- Calculate the capacitance required for the filter using C = Vp/(2*f*Vr*R).
- Create a FWR and shunt regulator circuit in OrCAD-Capture as shown in Figure 4. R5 and C1 in Figure 4 should use the value of R and C obtained in step 4 and step 5, respectively. Dz1 is the 3.3 volts zener diode (D1N5226).
- Simulate the circuit with Rload = 200 Ω. Obtain a capture of the output voltage.
- Simulate the circuit with Rload = 500 Ω. Obtain a capture of the output voltage.
Measurements
Part 1:
- Build the hardware circuit of a full wave rectifier as shown in Figure 1. The input voltage Vin is a 10 volts peak, 60 Hz sinusoidal wave. Vin is stepped down from line voltage (60 Hz and 110 Vrms) using a 15:1 turns-ratio transformer. Use 1N4004 diodes to construct your bridge rectifier. Observe the output voltage across the load resistor on the scope for Rload = 200 Ω. Capture the output into a Word file. Repeat for Rload = 500 Ω and obtain a capture.
- Add a capacitor C = 100 uF to form a filtered full wave rectifier. Be careful of the polarity of the capacitor when you connect the circuit. “Positive” of the capacitor goes to “positive” of the DC output of the bridge rectifier. Capture the output voltages for both Rload = 200 Ω and Rload = 500 Ω.
- Repeat step 2 for C = 470 uF and C = 1000 uF and capture the output voltages for both Rload = 200 Ω and Rload = 500 Ω.
All the measurements on the scope in this project should have Vp-p, Vavg and frequency displayed.
Part 2:
- Modify your circuit as Figure 4. R5 and C1 should be the values obtained in the simulation part. The zener diode is 1N5226 and Rload = 200 Ω. Capture the output voltage.
- Repeat step 1 for Rload = 500 Ω and capture the output voltages.