Wednesday 7 September 2016

Firing of SCR using PUT

PUT: Programmable Uni junction Transistor

It is a part of the Thyristor family and has three terminals,
  1. Cathode (K)
  2. Anode(A)
  3. Gate(G).

The reason it is known as programmable is that the peak voltage, charging - discharging time of capacitor, etc can be programmed/controlled  by using external two resistors.

SCR: Silicon Controlled Rectifier


As the name says, the thyristor is made up of silicon, and rectifier illustrates that if the SCR is subjected to an Alternating Cycle (Sinusoidal Wave), it will conduct only in the positive half cycle in the presence of the Gate signal, which triggers the SCR. In the absence of the Gtae signal, the SCR will not conduct as it keeps the junctions J1 and J3 reverse biased and only junction J2 will be forward biased.

On the application of gate signal the junction J3 is forward biased and helps conduction, giving a heavy increase in charge carriers, which increases the current.
This is the reason why, Thyristors are included in High Power Switching families.


Circuit Diagram:


Figure 1: Final circuit Diagram




The demonstration video link: https://youtu.be/x36ljk17ZHo

Monday 20 June 2016

Robotic Fish

This project can be made for entertaining purpose as well as other productive functions like detecting breakage or leakage in pipes or the water storage wells, like pools. This can be done by interfacing a camera in the front, with the help the live feed which will process the data thereafter will be sent to the user via a transmitter and receiver at both ends. But this project is a prototype, where the model swims in water with the help of the motion of it's tail.
There were many challenges faced during this project, since, the body has to be submerged in water it requires insulation as there is internal embedded system and the electrical components facilitating the forward motion of the fish.


Embedded System:

The platform (controller) where the rotation of the motor has to be controlled precisely by a specific angle along with that it has no other component to control other than the motor, that is why Arduino Uno has been used, as less number of digital pins are required for connections. Also, it reduces the overall cost of the project. 

Servo Motor:

Servomechanism is basically a closed-loop system, consisting of a controlled device, controller, output sensor and feedback system. The term servomechanism applies to the systems where position and speed is to be controlled, thus requiring a feedback.

The internal block diagram of servo is as follows:
Figure 1.1: The internal block diagram of servo motor.


Here, the electrical energy is converted to mechanical energy, by looking at the diagram it can be seen that this is a closed loop feedback system. There is an internal DC Motor which is connected to a gear pair having low speed reduction ratio. This gear pair is further connected to another gear pair having the same number of teeth, which is then connected to the Potentiometer through a shaft, hence, the value of resistance changes. The output terminal of potentiometer is connected to the Non-inverting end of the Operational Amplifier (here, it is a comparator), and the Inverting end is given a Vref  voltage signal. Initially, when the DC motor is rotating the POT via the gears, the resistance or we can say the voltage changes which is being fed continuously to the comparator. The moment inverting and non inverting voltage of the Operational amplifier becomes equal, the output of comparator is 0 Volts, the DC motor stops and hence, the motor holds it's position the moment  V(+)=V(-).
The reference signal provided is nothing but the PWM signal which can be changed by adjusting the Turn ON and turn OFF time hence, the angle of servo motor can be controlled accordingly.
The resolution of the servo motor describes the accuracy of the angle, and hence it holds that position until the Vref is unchanged. The servo motor here changes it's position from 0 to 180 degrees in steps of 1 degree. hence, by changing the PWM duty cycle, the angle of rotation can be controlled.
Figure 1.2: The PWM Duty cycle given at Vref to get the accurate angle.

In this project, the servo is connected to the thermocol. And the specifications of the servo motor used is as follows: Provides 1.8kg/cm at 4.8V and 2.2kg/cm at 6V.

Body:

The body had to cut through the water, so we used the streamlined nature of the fishes.The streamlined body, helps in cutting through water and to facilitate a forward motion.Since we required the shape of a fish, we chose thermocol as the body material of the fish and also helped in cost reduction.
Hence, to cause the forward motion of the fish, the body was divided into 3 parts, 1 which held the Arduino Uno board, 11.1 Volts Li-Po battery and the connecting wires. And the other 2 parts had the individual servo motors attached.
Figure 1.3: The thermocol fish body, without insulation, having the respective placement of the servo motors and Arduino Uno.
Insulation:

The most challenging part of this project was to insulate the fish from water, else the components and the body would get damage by the water entering inside the electrical portion. To avoid the contact of water with the fish, the insulation here was done with the help of plastic which prevented penetration of water inside and also didn't hamper the movement of the tail.
Figure 1.4: The body of the fish after insulating it with plastic and proper placement of the Battery, Servo motors and Arduino Uno.

Weight:

It was difficult to balance the fish inside water as it would incline in either directions due to unbalanced centre of gravity, so the temporary weights were suspended along with it to make it balanced and also to immerse in water partially but not sink in water, so it was done with the concept of Centre of Gravity and Centre of Mass. 
Thermocol is lighter than water, it was required to be weighed down using weights or else the fish would be floating at the water surface.

Figure 1.5: The complete body of the fish before immersing it in water and the weights have being suspended.

The final demonstration:





Figure 1.6: Fish inside tub



To see the video demostration of this respective project, go to the following link: https://www.youtube.com/watch?v=TycD3QYpdko


The code will be available to blog followers upon request. :)


Water Level Controller using 89C51 microcontroller

 This project illustrates the construction and working of a water level controller. Such a closed loop system is used in tanks to indicate the level of liquids and take actions autonomously to fill it.
Figure 1. Proteus Simulation

Component used:
1. ATMEL 89C51
2.  LCD (LM016L)
3. Switches
4. simple DC Motor
5. Transistor 2n2222

Description:
Water Level Controller circuit works on the principle that water conducts electricity. A wire connected to VCC and four other wires are dipped in tank at different levels namely quarter, half, three-fourth, full and their output are taken on pins P1.1, P1.2, P1.3, P1.4   Port P2 is connected to data pins of LCD and P3.0 , P3.1 and P3.2 are respectively connected to RS, RW, and EN pins of LCD. The DC motor is connected to the P3.7 .

Initially when the tank is empty LCD will show the message EMPTY TANK, 30 MIN TO FILL. When this state is detected by the controller, it immediately switches ON the motor which pumps the water into the tank. As the tank starts filling up wire at different levels get some positive voltage, due to conducting nature of water (it has been shown by switches for simulation purpose).
The switches shown in simulation emulate the water sensors which are placed inside the tank. These sensors on sensing the water, transmits the signal to the controller in form of positive voltage. 
This voltage is then fed to their corresponding pins on controller. When level reaches to quarter level, LCD displays the message QUARTER, 20 MINUTES TO FILL. On further rise of level, HALF, 10 MIN TO FILL and 3/4 FULL, 5 MIN TO FILL are displayed on LCD. When tank gets full LCD shows the message FULL.
DC motor has been interfaced additionally to the microcontroller in such a manner that it will turn on when the tank is EMPTY and will run till the tank is FULL. Transistor is advised to be attached when working in real time conditions in order to avoid back emf generated in the motor, which can harm the microcontroller.



Advantages and Applications:
1. Water level Controller is used in applications like storage tanks, boilers etc. to indicate level of        water inside.
2.  Easily starts and stops the motor.
3. Low cost


Scope:

This circuit not only indicates the amount of water present in the overhead tank but also automatically starts and stops the motor. It helps to check overflow and wastage of water by warning the customer when the tank is about to brim. It also provides automatic control of pumps at a remote location.

1. Now no need to go on the roof to look the water level.
2. It shows the water level in your room like 1/4 tank, 1/2 tank,  3/4 tank and full tank.
3.  Motor stops as soon as tank becomes full.
4.  Suitable for every tank.


Simulation Circuit:
We have simulated the circuit using Proteus, and compiled using Keil.
In order to see the simulation, open the proteus file and upload the hex file in the controller. 
You need four things for running the project:
1. Hex file
2. Proteus simulation file
3. Code text file
4. Keil project file

The code will be available to blog followers upon request.:)

Derivative Action on Analog Signals

In this project, the analog waveform are generated through the integrated circuits, which generates SineTriangular and Square wave and further this signal is passed to the differentiator, and the output is observed accordingly.

Operational Amplifier:

An operational amplifier, also known as OpAmp, is an IC chip which works as a voltage amplifier, giving output in much amplified range, and this output can be set by setting or adjusting the gain of the OpAmp. It has got two differential inputs, that is, inputs of reverse polarity and a single output.

Differentiator:


A differentiator is nothing but an OpAmp, which gives the differentiated output of the respective input, just like the mathematical operation on a respective input.
A basic and ideal differentiator has a resistor in the feedback path and the negative input of the OpAmp has the capacitor while the reverse polarity is grounded.

The project:

There are two IC chips used in this respective project, and they are namely:
1.      LM741- A normal OpAmp which can be used as a differentiator.
2.    XR2206- A function generator IC which gives output as three waveforms, depending on the connections.

LM741 :


It is an 8 pin IC, having two inputs of opposite polarities, one output, two power supply pins (+Vcc and GND), two offset null pins and a no connection pin.
Figure 1.1: LM341 Pin configuration
Figure 1.2: LM341 operational amplifier pin connection at non-inverting end.
Connecting a resistor in the feedback path and a capacitor at the inverting input, makes up a differentiator circuit.

     Differentiator using LM741:

In this project,  we have generated three wave forms, namely:

  • Sinusoidal Wave, whose differentiation is a Cosine Wave.
  • Triangular Wave, whose differentiation  is Square Wave.
  • Square Wave, whose differentiation is Impulse peaks.


The circuit diagram of the differentiator circuit is as follows:
Figure 1.3: Differentiator circuit

where, Vin is the input to the Op-Amp
            R is the equivalent resistance
                      f is the frequency of the input signal
C is the capacitance.





Here the values of the components are:
1.      C = 33 pF
2.      R1= 470 Ω
3.      R2= 6.10 kΩ


 XR2206:

The wave forms are generated through XR2206, which is a function generator, and is a 16pin IC.

The pin diagram of XR2206 is:

Figure 1.4: XR2206 pin configuration


The pin description is as follows:
1.      AMSI- Amplitude Modulating Sinusoidal Input.
2.      STO- Sinusoidal or Triangular Output.
3.      MO- Multiplying Output, that is, 60mV for Sinusoidal wave and 160mV for Triangular Wave.
4.      Vcc- Power supply, which can be varied in the range from +12Volts to 24Volts.
5.      TC1 & TC2- A capacitor is connected between these two pins.
6.   TR1 & TR2- A resistor Rt1 or Rt2, has to be connected at this pin for generating the required frequency. Hence, a potentiometer is connected at TR2 in our circuit.
7.      FSK- Frequency Shift Key, used for selecting either Rt1 or Rt2.
8.      BIAS- A external capacitor of 10µF is grounded from this pin.
9.    SYNC- An open collector pin, tied to Vcc through a resistor. The square output is generated at this pin.
10.  GND
11. WAVEA1 & WAVEA2- Used for selection of output wave, by using a switch and a resistor connected in series.
     For the purpose of this project, the circuit that we have used is directly taken from the datasheet. The specifications are as follows:
   
Figure 1.5: XR2206 Connections circuit


   
Here,


·         R2= 10kΩ Potentiometer.
·         C= 1nF

  Final Circuit Diagram:
    
Figure 1.6:  Final circuit (output of XR2206 to the input of the LM741 differentiator)

For the signal verification, we have used a DSO for displaying the output for the various signals hereby, concerned with this project. DSO is an oscilloscope which stores and analyses the signal digitally rather than using analog techniques. It is now the most common type of oscilloscope in use because of the advanced trigger, storage, display and measurement features which it typically provides.
Understanding the output:
1. Triangular Wave: Since, a triangular wave is increasing and decreasing ramp signal, that is, 
r(t)=t or r(t)= - t
for some fixed interval, hence derivation of ramp signal is or ,
d r(t)/ dt = 1 or d r(-t)/dt = -1
hence the output will be a square wave or unit step wave.
2. Sine Wave: The derivation of sine wave is cosine wave with a phase shift of 90 degrees.
3. Square Wave: The derivation of square wave is impulse, that is , or , hence the output would be
      δ(t)  = 1;  for t=0;
       = 0; else

FINAL
OUTPUTS
Input Waveform
Output Waveform
1. Square Wave:

1. Impulse peaks:



      
2. Triangular Wave:


2. Square Wave(approx.):

3. Sinusoidal Wave:

3. Cosine Wave:


Here, in the wave forms the Cosine and square wave is clipped due to value of the potentiometer. and also due to noise interference.


Final Circuit:



Find the following documents attached with this mail:
  1. LM341 Datasheet:  https://www.sparkfun.com/datasheets/Kits/XR2206_104_020808.pdf
  2. XR2206 Datasheet: http://www.ti.com/lit/ds/symlink/lm341.pdf




Sunday 19 June 2016

Eye Tracking System Using Pattern Recognition Algorithm and LabView

As the technology advances, need for an interactive system has increased since then. A system which responds to bio signals transmitted by user is dream project of lot of scientist and engineers. Eye tracking is one of the essential components of that project. It is being employed in mobile phones and advanced computer for a plethora of applications.
Eye tracking requires vigorous image processing, as image constitutes various other variables apart from the eyes. All those variables are required to be filtered out and only the region of interest needs to be tracked down. Once a single image is filtered, a series of images are tested down for the same.
Our project has used these principles and implemented them using LabVIEW.
Initially user needs to define region of interest and later it tracks them in real time feed.

Here is the block diagrams, described individually there functions. We have used the vision tools available on LabView.

1.1 Continuous Acquisition

In this particular implementation, we have used Vision and motion basic palette functions like ‘Open camera’ and ‘Configure’.  
The output from the acquisition is divided in two parts. First to Snap, where the continuous stream is taken one frame at a time.

2.2 Snap (One frame at a time)

The Frame acquired is converted to grey scale image using ‘Cast Image’ block as shown in the figure. This image is saved in a local variable. Snap is taken only when the ‘Snap’ button is pressed by the user.
The image is saved in local variable.

2.3 Get ROI
The user then pressed Get ROI button, where separate widow pops up. Using the function ‘Select rectangle’, the eyes from the image is extracted and given to ROI descriptor. The ‘learn pattern’ function recognizes the ROI and saves it in a template.

2.4 Tracking
In this structure, the images are acquired directly from webcam, converted in grey scale using ‘Cast Image’. It is then carry forwarded to ‘IMAQ Setup Match Pattern’ where the template is matched with coming online feed, using ‘IMAQ match pattern 2’. Then we extract bounding box values and given to ‘IMAQ Overlay Rectangle’. This block will overlap the bounding box values on the online feed.  
The output generated is as follows:



Figure 1: The output of the eye tracking system.


The code will be available to blog followers upon request.