Friday, November 12, 2010

High Frequency PWM Generator

PWM Generator is an important piece of equipment used to control a wide range of devices like DC motors, Thermo-electric coolers, LEDs etc. It is widely used in control applications at industrial level as well as domestic level. Here we have demonstrated the construction of a calibrated PWM Generator which provides accurate pulse widths on a frequency range from 100 KHz to 1 MHz with a constant resolution of 7 bits. The highlight of the system is that the user can independently tune Ton and Toff, and the error in the output time period is 1 part in 1000. Towards the end, the device  is employed in a a variety of applications such as varying intensity of LEDs, speed of DC motors, and interfacing Peltier Coolers to regulate the temperature of electronic systems.  Here are some pictures of the initial stages and the debugging stages.

  
Development Stage


Hardware Ready to be Tested

Peltier Cooler

The device comprises of a heat sink (black), a thick piece of Aluminium and between them lies the Peltier Cooler. It consists of pn junctions doped with Bismuth Telluride. When a DC current is passed through the Peltier device in 1 direction ; one plate gets heated up and the other one cools down. The difference in temperature is controlled by the current flowing through the device. I used an H Bridge to switch the direction of current either ways, so that I keep both the plates either hot or cold. During the final assembly I deliberately passed current through the Peltier Device in such a way that the system coupled with the Al uminium plate cools down gradually. (Now I cant put up pictures of the Peltier device coupled with the system to be cooled down because this project was created in LASTEC, DRDO and there are confidentiality issues associated with it).

PID Control on Line Follower

Here I have designed a light weight line follower based on differential wheel drive using Atmega8 and 5 IR pairs. The IR pairs can distinguish between black and any other light color easily ie they provide a nice clean digital output when subjected to varying shades of color. Hence the have been used to detect the the track (black) and the background (light brown).



The system moves using 2 small DC motors (roughly 100 RPM 9V). I have used Zeigler Nicholas algorithm on this circuit to tune the control parameters. The PID system employed on the line follower adapts to new environments by resetting its Kp Ki and Kd everytime the system is turned on. We have obtained some amazing results and are still trying to improve the speed of the robot without comprising the accuracy of motion.

8x8 Matrix of Red Green LEDs


The circuit on the top is STK500 and the bottom one is my 8x8 Red Green LED matrix. 128 LEDs (64 Red and 64 Green) are multiplexed together with an Atmega644 as the brain in the circuit. This circuit can be used for virtually anything. It has an absolutely amazing controller operating at 20 MHz with 64 KB of Program Memory (Imagine!!!!) and a lot of free analog and digital I/O pins which can be used for interfacing other stuff. Moreover each I/O pin has a Pin Change interrupt, which makes this controller one of the most superior controllers in the AVR family.

I have used this circuit to built a variety of applications like the Scrolling Message Display, Simulator of 2 Random Die, Cross & Naughts, Snake, Gravity based Hour Glass which is animated using an accelerometer i.e. the sand inside it responds to the orientation of the circuit w.r.t earth.



Hope you enjoyed this. More videos will soon come your way!!!!

Low Frequency Waveform Generator

A function generator is an important piece of equipment used in every electronics laboratory. It is widely used to test op-amp circuits, digital to analog converters and vice versa. Here we demonstrate the construction of a low frequency function generator whose range is from 1Hz to 1KHz and can synthesize various types of waves. This is an inexpensive form of a function generator. The output obtained from the device is spectrally pure as verified using a spectrum analyzer. Here are a few snaps of development and final stages of the project.

The circuit uses AT89S52 as the central brain. It also houses a DAC, an op-amp, an LCD and a set of switches. The LCD and switches are for user interfacing. The  circuit employs a method called DDS (Direct digit Synthesis) for generating analog signals. The low frequency limitation of the project stems from the operation of 8051 controller used in the project. It has a clock frequency of 11.0592 MHz but since it contains 12 T-States for every instruction; the instruction cycle duration becomes 9.02 us. Unlike many of its contemporary micro controllers like PIC AVR MSP 430 etc. 8051 also has many instructions that occur in multiple instruction cycles which further degrades the speed of operation.

The circuit can generate all types of analog signals like square wave, sawtooth, ramp, staircase, etc. with variable amplitude (from 0 - 5V) and variable time period (1 - 1000 ms)


Low Frequency Waveform Generator in action....producing a sawtooth wave of of amplitude 4V and frequency ~1 KHz.

Interfacing 7 segment displays

This is a pretty basic application of microcontrollers. Here, 2 Common Cathode 7 segment LEDs have been driven by an Atmega8 (Atmel's AVR Micro controller). The circuit has 2 npn transistors BC547 acting as current sinks for the LEDs. The circuit employs multiplexing to drive the two LEDs (saves the number of pins). The underlying concept is Persisence of Vision ie the eye cannot distinguish motion which has a frequency greater than 24 Hz. Hence each LED is run at a frequency which is significantly greater than the 24Hz. Hence it seems as if the LEDs are running simultaneously even though they are being lit individually in quick succession.

Series Regulated DC Power Supply


Power supplies are required everywhere, from industries to every household whether in urban areas or villages. They form the root of every digital as well as analog electronic item. Here, the construction of a conventional power supply using electronic components like diodes, BJTs FETs etc is demonstrated. The approach is easy to follow and can be used in many other applications. The chosen output voltage is +5V, since majority of the digital circuits nowadays require this for operation. To prevent any damage to the circuit and the load it is driving, protection techniques have been incorporated.


The power supply starts with a transformer – bridge – peak filter network cascaded with a voltage regulator network. The regulator network includes LM 723 and additional circuitry which helps us in achieving DC 5V. The LM 723 serves as 2 operational amplifiers cascaded with each other, which are under negative feedback

produce desired results with the help of external impedance. The 1st op-amp has a temperature independent band gap reference (generated within the IC) of 5V connected to the non inverting input,At the inverting input the output voltage is fed back. The negative feedback attenuates the unregulated signal  and gives the output by reducing the ripple in the waveform. The 2nd op-amp simply acts as a buffer and results in bringing down the output impedance and increasing the voltage regulation. The circuit so far can only source a limited amount of current, thus,we use an external pass transistor  (2N3055) in Darlington configuration with the output transistor. This increases the output current capability to nearly 1A.

Add-on protection circuitry has to be used to detect accidental shorting of supply terminal with ground, since the consequential surge of current is potentially dangerous to the supply as well as the load. Hence we use a voltage divider at the current limit - current sense transistor base so that we are able to choose at what value of output current, fold back circuit becomes active. Fold back circuit steals the input base current from the Darlington circuit, which reduces the output current. After forming the supply, it is tested on passive load as well as active load. We observed that the output curves closely followed the ideal trend which confirms that the circuit is functioning well and is ready for practical use.