Diagonizer Design By Ashutosh Jaiswal

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Diagonizer Design By Ashutosh Jaiswal as PDF for free.

More details

  • Words: 3,258
  • Pages: 22
Contents Technical Information Users Manual

BY Ashutosh Jaiswal (Designer)

1

TECHNICAL INFORMATION Circuit Design and Implementation

2

I. Introduction The skin analyzer system uses about 6-8 UV lamps (10W-15 W6W; power of lamps vary) on either sides of the platform, where the analysis of the skin would take place. Every time the lamps go on the computer has to check for any fluctuations or defects in each of the lamp. It is not feasible to monitor each lamp individually as it would consume a lot of real estate and would result into unnecessary circuit implementation. In order to overcome this hurdle, all the lamps were connected in parallel and monitored collectively. The most effective way to monitor the lamps would be monitoring the current flowing through them. If a lamp is not defective then it would draw constant current depending on its power rating. If there is any fluctuation, or if the lamp goes defective, then the current also decreases proportionally. This change can be used to our advantage of detecting any malfunctioning of the lamp. If any of the lamps go defective, there would be a drop in the net current, which can be detected. II. Principle of Working The principle used for detecting the change in current is very simple. The current being measured is compared to a reference current. The reference current has the value equal to the total current, when all the lamps are working fine. So whenever there is a drop in the total current, it falls below the reference current and this is detected by the COMPARATOR. Comparators are generally used to compare voltages and not currents. In order to make our principle work for the comparator we have to generate a voltage which is always proportional to the current that is being measured. This can be done by using a “CURRENT TRANSFORMER”. Current transformers are transformers which use the measuring current as the current through 3

their primary winding. This induces a current in the secondary winding, which results into generation of voltage across its terminals. This voltage is proportional to the current that is being measured. So we use this voltage as a key to monitor the UV lights. III. Block diagram 1. Current Sensor: The current sensor, as mentioned earlier, is a current transformer which delivers an output voltage proportional to the current that flows through it. 2. Amplifier: As seen in the block diagram, the output of the current sensor (current transformer) has to be amplified. The output of the current sensor is about 6V for a 50W load. In our case the

Fig 1: System Block diagram

combination of lamps would constitute a load of around 50W. If any one of the lamp malfunctions then the drop in power is about 10W (proportional to the power rating of the lamp). This drops the voltage by a very small amount and such a small drop in voltage may not be detected by the comparator. So we

4

amplify the output at least 2 times so that the change in voltage also gets amplified and the comparator can detect this change easily. Another important factor about the amplifier is the type of amplifier that has to be used. A conventional amplifier amplifies the signal given to its input, which is generally referenced to ground. In sensors, the voltage generated at the output is differential, meaning that the voltage has no ground reference. In such a case we need to use Instrumental Amplifiers which help in amplifying differential voltages. 3. Rectifier: The next block shows a “Rectifier”. The rectifier helps in converting the AC voltage to DC voltage. This is required because the comparator being used works at a DC level. 4. Comparator: The comparator helps in comparing the sensed voltage to the reference voltage. Whenever, the measured current decreases, the voltage generated by the current sensor decreases, and hence the voltage at comparator falls below the reference voltage. This makes the output of the comparator active. 5. Triggering circuit: The comparator output may remain constantly active as long as one of the lamps is totally OFF. But in the case when there is a fluctuation the voltage level at input of comparator may keep shifting above and below the reference voltage, which would in turn make the output of comparator fluctuate between active and inactive voltage levels. Our aim is to detect the first change in the voltage, as this could be a result of fluctuation or a fused lamp, and we have to keep the output constantly active, when the first change in voltage is detected. In order to do this, we use the triggering circuit. Firstly, we choose a comparator whose output is active low. Then we design a triggering circuit which gets triggered and generates a constant HIGH output on an active low trigger at its trigger input. So, whenever there is first fall in voltage the triggering circuit gets triggered and the output remains constantly high, until it is reset back to initial state by using the reset option. 5

6. Digital Logic: Finally, we use some digital logic for the following reasons: 1) When we use more than one set of lamps in the design, we need to employ some digital logic. This is necessary because if we monitor large number of lamps with only one sensor then the change in current can be very small and this may not be detected by the sensor. So we divide the lamps into two sets and monitor each set individually. The final outputs of each of these sets can be logically OR’ed together to get the final output. 2) During power up, the fluorescent lamps flicker before they draw the maximum current. If the circuit had to be active during this phase then it would be detected as a flickering lamp, resulting into malfunctioning of the circuit. In order to avoid this, final output of the circuit can be logically AND’ed with another input (flag) that is controlled by the software of the computer. This flag input will go high 15 seconds after the lamps go on, and just before the flag is made high the circuit is reset by the software so that if at all the circuit has detected the flickering, it can be ignored. After 15 seconds and after reset, if the output still remains high then it will be AND’ed with the flag input and the final output will also be high, meaning that there is a fused lamp or there is a flickering in the lamps. IV. Circuit Design A Current Sensor: In this circuit a CS-1 current sensor is being used for current monitoring. The CS-1 current sensor has the ability to sense and measure AC current passing through the hole provided. Moreover, the CS-1 sensor outputs a current/voltage proportional to the load current. The actual output depends on the load current as well as the number

6

of times the load wire is passed through the current sensor. The figure below shows the connection diagram for the current sensor.

Fig 2: CS-1 current sensor- Connection Diagram

B. Instrumentation Amplifier: As mentioned in Section III, we have made use of an instrumental amplifier for the amplifier design. There are many designs available for an instrumental amplifier. The most commonly used is the two and three op-amp design. We have used the instrumental amplifier that is available as a single IC. The reason being that, it makes the design simpler and reliable. The IC being used in our design is AD623 which is produced by Analog Devices. The features of this IC are that is enables single power supply and has an option of adjusting the gain, which makes it apt for our application. The pin out diagram is shown in Fig 3.

Fig 3: Pin out for AD 623 (Instrumentation amplifier)

Pin 1 and 2 (RG+ and RG-) are used to adjust the gain of the amplifier. This is done by choosing the value of resistance according to Table 1. 7

As shown in Fig 3, the value of RG is chosen to be 100 K pot in order to have a variable gain. The gain can be tuned according to the sensitivity that is required for the lamps. A mini-potentiometer will be used for this purpose.

Table 1: Values of gain resistor according to the required gain

Circuit diagram:

Fig 4: Circuit diagram for Instrumentation amplifier

The REF pin is grounded in order to get the output voltage with reference to the ground. Vin is the voltage given to the input of the amplifier from the current sensor. The capacitors are provided to remove any ripple from the supply. 8

C. Comparator Circuit: In order to implement the comparator circuit we have used the comparator IC LM339. It is the most widely used IC for comparator applications. The pin-out for LM339 is shown in Fig 5. It also shows the internal configuration, based on which the circuit is designed.

Fig 5: Pin-out for LM 339 (Comparator IC)

Circuit diagram:

Fig 6: Circuit diagram for Comparator circuit

9

The circuit diagram shows two parts of the LM 339 as each part is used for one set of lamps (if two sets of lamps are used). Vin is the input to the comparator circuit from the amplifier (after rectification). The resistor divider network with 10K (pot) and 1K resistor determines the reference voltage. This voltage is manually set by the user in such a way that the input voltage is just above the reference voltage. This makes sure that the slightest drop in input voltage will trigger the output. The capacitor is provided to remove the ripple. Pin 3 is Vcc and pin 12 is for ground. The configuration shown above drives the output to ground level when a drop in Vin is detected; this means that the output of this circuit is active low. But we need an active high output, which remains high even if there is slightest fluctuation. This is accomplished by using the triggering circuit. D. Triggering Circuit: The triggering circuit is required to keep the output constantly high. In this design IC 555 is being used in bi-stable mode. In bi-stable mode IC 555 accepts the triggering input at its pin 2 and will change the output to active high (equal to Vcc) when a trigger (low going trigger) is detected at pin 2. The pin out for IC 555 is shown in Fig 6.

Fig 7: Pin-out for IC 555

10

The working of the circuit can be understood from Fig 8(b). Whenever there is triggering input at pin 2, the output of the circuit (at pin 3) goes high until a reset is given to make it low again. There are two options for a reset, a software reset and a manual reset. The software reset is used while initializing the system i.e. when the lights are switched on; the circuit is reset by software control in order to prevent any false detection of flickering. The manual reset is used for tuning the reference voltage as close as possible to the input voltage.

Circuit diagram:

(a)

(b)

Fig 8: (a) Circuit diagram for the triggering circuit (b) Wave form representation

E. Digital logic:

11

The digital logic will be required when more than two sets of lamps are being diagnosed. The very basic logic that will be used is as shown in Fig 9.

Fig 9: Basic digital logic to be used when more than two sets of lamps are used

As seen in above figure, triggering circuit 1 and 2 are the triggering circuits of each of the lamp sets. The supply used for the triggering circuit is 12 V, which makes its output voltage level 12V. But, the computer is compatible with TTL logic which is +5V for high and 0.3 V (or ground) for low. In order to accomplish this, each of the outputs of the triggering circuit is given to the LM7805, which is a voltage regulator. LM7805 helps in converting the voltage to +5V for high and ground level for low. Next, this output from LM7805 is given to an OR gate (which is again TTL compatible). This is done so that the output of the OR gate goes high if either of the triggering circuits given an active high output. The output of the OR gate is then given to an AND gate. The other input of the AND gate is from the computer (FLAG INPUT- software controlled). This is necessary so that the output of the AND gate does not go high when the lamps are just switched on. Once the lamps are fully on and the circuit is reset, the flag input is made high, which then makes the output of the AND gate valid for diagnosis. The software will be programmed to make the flag input active after about 15 seconds, to make sure that the lamps are fully on and are drawing the maximum current.

12

F. Relay circuit: Although we have not mentioned about the relay circuit in the previous sections, it is a very important part of the system as it is used to switch the lamps ON and OFF using the software control. The circuit configuration is shown in Fig 10.

Fig 10: Relay Circuit

Fig 9 shows the relay circuit in which the relay is controlled by a software input. Whenever, the software control input goes high the transistor is driven into saturation and the relay coil is connected to the ground. The diode 1N4001 is placed to isolate the two ends of the relay coil (to prevent short circuit). The resistor at the base of the transistor is a current limiting transistor. As seen in figure the relay has three terminals, 1) NO – Normally open 2) COM – Common 3) NC – Normally closed When the relay is inactive the COM is connected to the NC. So we connect the NC to the light or camera, which has to remain on when the lamps are off (for surveillance or lighting purposes). This keeps the light or camera (whichever is connected to NC) ON as long as the relay is inactive (lamps are OFF). Once the relay is activated by giving a high

13

pulse at Software Control, the relay coil activates and the COM gets connected to NO. So we connect the NO to the Lamps, which go on when the software control is given high and at the same time NC disconnects, so the light or camera goes off. V. Computer parallel port The interface of the hardware is done with the computer using the parallel port of the computer, which is very commonly used for printers. The parallel port makes it possible to send and receive signals at the same time and also simplifies the software program that will be used to control the port. The pin out of the printer parallel port is shown in Fig 11.

Fig 11: Parallel port configuration

14

Fig 11 shows the various pins that are used as INPUT or OUTPUT in a parallel port. For the diagnosis circuit, we will be using any of the pins 2 to 9 for output from the computer (software control, FLAG, RESET) and we will use the pin 11 for reading the output from the diagnosis circuit (Final Output). Pins 19 to 25 will be used for grounding. VI. Program flow Based on the circuit designed and the functionality of each of the blocks, we can describe the basic program flow/control for the diagnosis circuit board. Fig 12 shows the flowchart for the program flow, which will be used to implement the software for controlling the diagnosis board and detecting the malfunctioning of the lamps.

Fig 12: Flow diagram for software

As shown in Fig 11, the program starts by switching the lamps ON. A delay of 10 seconds is given in order to make sure that the lamps are fully ON and are drawing the maximum current. The circuit is then RESET in order to make sure that it is re-initialized and to ignore the detection of flickering of the lamps when they switch ON. Another delay of 5secs (optional) may be given after the RESET. Next the FLAG 15

output is made high, which makes the final output of the diagnosis circuit active. Next the final output is read till the lamps are ON and if there is an error in the lamps, it is detected and the entire system will be disabled for the next cycle of operation. The FLAG is de-activated in last 15 seconds as it is not important to diagnose the lamps in the last 15 seconds. The system will remain deactivated till the lamp is replaced and the diagnosis circuit is tuned precisely. VII Complete Circuit diagram The complete circuit diagram with all the above mentioned circuits is shown in Fig 13. It also shows the different control switches and trimmers that are being used in the design.

16

VIII. Parts information

17

The parts that have been used for the design can be obtained from the following vendors, 1) Analog devices, website: www.analog.com 2) Mouser Electronics, website: www.mouser.com 3) Radioshack, website: www.radioshack.com 4) Smart Home Inc, website: www.smarthome.com 1, 2 and 3 may be useful for ordering conventional parts like amplifier, comparator, rectifier etc 4 is useful for ordering the current transformer, which is used as a current sensor.

18

USERS MANUAL

19

The system is provided with the following accessories: •

Male-Male AC wire



Male-Male Parallel Port - Printer Cable



12V 800mA Adapter

The diagram for the box which contains the circuitry is shown in the following figure.

Fig: Lamp Diagnonizer

STEPS FOR CONNECTION AND TO SET THE REFERENCE VOLTAGE : 1) Connect the U.V Lamps, Display lamps and the Camera light to the respective ports. 2) Connect the Male-Male AC wire to the Mains Port and the MaleMale parallel port to the parallel port.

20

3) Connect the other end of the parallel port wire and the Mains to the computer and the Main Power supply (120V A.C) respectively. 4) Connect the 12 V adapter to the Power supply jack and make sure that the over ride switch is in OFF position before you plug this in. 5) When the power supply is given, the red LED (indicator) goes on. Switch on the over ride switch . This should switch ON the U.V lamps and the display lamps. 6) Press the reset button to see if the red LED goes OFF when the reset switch is released. If it does not go off then turn the POT in anti-clockwise direction to some degrees and try again. 7) When the LED goes OFF, turn the POT back very slightly in clockwise direction and try to detect the point where the LED just goes ON. 8) At this point, turn the POT anti-clockwise very slightly and press Reset again. Do this till the LED is OFF. 9) Remove a lamp from the set of UV lamps and see if the LED goes ON. If it goes ON, then replace the lamp and reset the system and again test removing the lamp. Repeat this several number of times to make sure that the reference voltage is set precisely. 10) Once the test is successful. Switch off the over ride switch. The LED will go ON at this time and will remain ON till the lamps go ON again and it is Reset.

21

22

Related Documents