Firstly, what do we mean by digital modulation? Typically the objective of a digital communication system is to transport digital data between two or more nodes. In radio communications this is usually achieved by adjusting a physical characteristic of a sinusoidal carrier, either the frequency, phase, amplitude. This is performed in real systems with a modulator at the transmitting end to impose the physical change to the carrier and a demodulator at the receiving end to detect the resultant modulation on reception. We begin our discussion by three basic types of digital modulations:
- ASK [Amplitude Shift Keying]
- FSK [Frequency Shift Keying]
- PSK [Phase Shift Keying]
All of these techniques vary the parameter of a sinosoid to represent the information we wish to transmit.
A sinusoid has three parameters that can be varied, these are amplitude ,phase and frequency.
- In FSK we change the frequency in response to information. One particular frequency for ‘1’ and another frequency for ‘0’.

- In PSK, we change the phase of carrier signal to indicate information.

23:56 |
Posted in
BASIC ELECTRONICS,
Communication Basics,
Digital Communication System,
Digital Modulation,
How Stuff Works?
|
Read More »
Here is how the resistive touch screen looks like. A transparent screen having four wires coming out of it for its interfacing. Though transparent, but consists of 2 resistive layers lying parallel to each other one above the other having an air gap (a kind of insulation) in between. What happens is, that when the user touches the touch screen, the two resistive layers gets connected and a voltage divider resistive network is established. Here is the pictorial view of how the resistive network is established.

Now, we need to know the location, where the user have interrupted the touch screen. In order to know that, we will have to calculate the co-ordinates. To calculate the coordinates on the touch screen where the user has touched, we play with four wires coming out of the touch screen. The two wires indicating the x-axis and the other two indicating the y axis. (x and y axis here are the relative directions. So, after the formation of a potential divider network, we apply voltages to X+ and X- and making Y+ OR Y- as a probe (means we take voltages from Y+ or Y-), in the same fashion we take voltage from the X+ or X-. These two voltages we get are function of the resistance which will vary through out as you move in the touch screen.
Now, the two analog voltages you get are fed to the adc for its digitization. What is left now is the mapping of the touch screen as per the requirements. How to interface resistive touch screen with the microcontroller using resistive touch screen controller will be discussed later.
More to follow!
11:38 |
Posted in
4 wire resistive touch screen,
BASIC ELECTRONICS,
How Stuff Works?,
Touch Screen Types
|
Read More »
Well, it seems strange that zero crossing being done directly using microcontroller with the help of two resistors only. AVR application note 182 verifies that zero crossing of 220 AC is possible using two resistors only. Here is how it looks like:
There is no rocket science in the above arrangement. 220AC through 1M ohm resistor, being fed directly to the AVR microcontroller will not do any harm to it. This is because the microcontrollers have internal clamping diodes that limits the high input voltage to microcontrollers operating voltage. The resistors here are used to convert a high voltage AC sinusoid to low voltage square wave. Thereafter using interrupts of the microcontroller, one can easily do the zero crossing detection.
However, there are some issues regarding the above arrangement. First of all EMI (Electromagnetic Compatibility) issue can arise. This is due to the fact that there is no isolation between the Hot Line and the microcontroller and the induced noise may affect the functionality both in the inter or intra system. Secondly, the resistor connected with AC lines act as a RC filter and thereby generating a minute phase delay. But this minute phase delay can be neglected in most of the applications. This method for the zero crossing detection is still considered very efficient.
Care should also be taken that high AC voltage may not damage the other components. There have been cases, I personally know, that people have burned out their microcontroller just because of little carelessness.
Also refer to the following posts:
More to Follow!
01:42 |
Posted in
Electronics Circuits,
How Stuff Works?,
Light Dimmer,
Microcontroller,
RMS voltage control,
Zero Crossing using AVR
|
Read More »
Controlling a DC motor in both directions often need a H-Bridge, which is nothing but an arrangement of few transistors. If not by using a single input, atmost two inputs be used to control the motor in both the directions. Otherwise, there are chances for accidential burning of transistors by programming errors. For example, if you accidentally set the transistors 1 and 2 in conducting state, shot-circuit current will flow through both of these transistor making them useless for further operations.
At any instant only one of the cross pairs of transistors can be in conducting state as explained earlier. These two pairs of transistors are responsible for the movement of motor in both directions. When 1 and 2 are on, the motor moves in one direction, on the other hand when 3 and 4 are on, the motor moves into other direction. Not Gate is placed to make sure that the two pairs are never turned on together.
How to lock the motor using a single input? The single input can be provided with 1 or 0 forcing the motor to move in either direction. So locking of motor can not be achieved. However if the pulse of 50% duty cycle is given to the input, then the motor will come to halt. One disadvantage of this approach is that the motor will draw current even in the locking state.
The above circuit has been tested practically!
More to Follow
22:02 |
Posted in
BASIC ELECTRONICS,
Electronics Circuits,
H-Bridge,
H-Bridge with single input,
How Stuff Works?
|
Read More »

What is a Servo Motor? A servo motor comprises of mostly DC motors with feedback for position controlling. Stepper motor is also used for position controlling but without feedback. Mostly Servo Motors are DC because they provide high locking power. The above block diagram depicts the basic block diagram that most of the servo systems are based on. Microcontroller provides PWM signal to the H-Bridge which onwards drive the motor in either direction on the basis of received input PWM signal. Lets say if PWM signal of 50% duty cycle locks the motor, so increasing or decreasing PWM value will drive the motor in CW or CCW direction. The Shaft of the motor is connected to potentiometer thus changing the Vf ( Feedback Voltage) as the motor rotates. User can set the desired position of the motor using another potentio meter. This is the Set-point voltage. Microcontroller takes the difference of both the voltages i-e Feedback and Set-point and generates a PWM signal such that Motor reaches the desired position. When it does do, the difference gets zero and ultimately motor comes into locking position. This is how DC motor servo system operates. More to Follow!
13:08 |
Posted in
BASIC ELECTRONICS,
Block Diagrams,
How Stuff Works?
|
Read More »
A number of Temperature Sensors / Heat Detectors are available in the market. Some of them includes:
All of the aforementioned have their own advantages and disadvantages. The pros and cons of each of the following are summarized below in a nutshell:
THERMISTOR:
This device offers the benefit of a very high sensitivity for a range of temperatures but has a non-linear scale. Extensive mathematical calculations are required to cater for this nonlinearity. The benefit is that it is very cheap compared to others. Normally used to detect a threshold temperature and used where accuracy is not needed.
THERMOCOUPLE:
The major advantage that a thermocouple offers to us is the Temperature range. It can be used for a very wide range of temperatures but at the same time it is highly insensitive. Dedicated linearize-rs like AD594( for J-Type - Temp range: 1800'C) and AD595 ( for K-Type - Temp range: 1200'C) are used compensation / amplification / linearization purposes.
DIODE AS TEMPERATURE SENSOR:
The diode is an extremely low cost device but has the disadvantage of a non-linear scale and rates poorly on the reliability scale.
RTD:
Resistor Temperature Device gives linear change in voltage with temperature. Famous of them are PT100 and PT1000. It also has a range that is suitable for normal laboratory and typical applications like fire alarm system. The cost of the RTD sensor is also less compared to thermocouple.
Solid State temperature sensor that gives linear response. Often there is no need to connect ADC. Range is also suitable for most applications. For more details see LM34/LM35/LM334/LM335 Selection Guide.
11:43 |
Posted in
BASIC ELECTRONICS,
How Stuff Works?
|
Read More »
It is necessary for a wireless mouse to have a transmitter inside it and a receiver installed on the sytem to which it is (to be) connected. Line of Sight communication is not needed in this case, as required in infrared communication. The receiver and the sender works on the radio frequency usually the
microwave frequency i-e 2.4 GHz. At such a high frequency, the chances of interference is almost negligible. These frequencies also provide a range of almost 150 ft which is sufficient for a hand-held mouse. What happens is, that the RF signals sent from the transmitter are received at the receiver and the decoded and given to the processor to execute the task.The wireless technology in mouse are mostly accomplished on the
optical mouse and not on the old mechanical ball mouse of early 1970's.
Do you have any idea about 802.11b or 802.11g ? These are also related to the wireless technology and the protocols that I will discuss later.
Lets talk about the advantages of the wireless mouse, it has over the others. First of all, it provides you a user friendly environment - no wires - no headache. Secondly they are not powered by your system supply, they have their inbuilt rechargeable or disposable batteries. Thirdly the wireless mouse do not require Line of Sight communication and thus provide you a feasible environment Lastly they are inexpensive and and you can buy one for less than US$ 25.
16:38 |
Posted in
How Stuff Works?,
Wireless mouse working
|
Read More »
Today, on 7th of Aug 2010, I will tell you how actually the optical mouse works. The technology is not old enough to be discussed here. In the year 1999 optical mouse technology replaced its mechanical version, that came in early 70's. There is a kind of a camera that captures tens of hundreds of images in a second to determine the position. There is a LED (Light Emitting diode) that sends a signal to receiver after being reflected from the mouse pad or any other surface. The signals being reflected is then put into DSP (Digital Signal Processing) module, which after being analyzed send the co-ordinates to the computer to which it is connected to. This is all about the optical mouse working. Lets glance over few of the advantages of the subject gadget. It has got many advantages over the old ball mouse. First of all there are no moving parts and hence smoother the operation. Secondly there are very rare chances for the LED to get dirty as in the case of ball mouse. Thirdly it is immaterial that which surface you are using in optical mouse. Last but not the least, optical mouse are quite inexpensive and hence easy to maintain and operate.
More to follow!
21:55 |
Posted in
How Stuff Works?,
Optical Mouse Working
|
Read More »
Pulse width modulation is a technique for reducing the amount of power delivered to a DC motor. Instead of reducing the voltage operating the motor (which would reduce its power), the motor's power supply is rapidly switched on and off. The percentage of time that the power is on determines the percentage of full operating power that is accomplished. This type of motor speed control is easier to implement with digital circuitry.
To see how PWM has been implemented practically see the project named RPM meter under the electronics section or click here.
17:30 |
Posted in
BASIC ELECTRONICS,
How Stuff Works?,
PWM
|
Read More »
"We decided to try and recycle a simple ball mouse into a useful encoder for our project. Each mouse has at least 2 rotary encoders so we attempted to reuse these encoders into something that can be used with a microcontroller for an input device as a rotary pulse generator (RPG). Useful !!
After examining several types of mice, we found there was quite a range of technology used in the detector circuits. Some older mice used LEDs and phototransistors but the best units we found had an integrated detector that directly output TTL level quad rate signals. These units had 3 pin clear plastic IR LED sources and black plastic 4 pin detectors.

To interface to a microcontroller, all that was needed was one output pin to pulse the infrared emitter and two inputs to read the 2 phases of the encoder. The LED sources are pulsed on by the controller about 120 times per second (14.8µs on, 8.5ms off). When motion of the encoder wheels is detected, the pulse rate increases up to over 5000 times/second (14.8µs on, 172µs off). This operation results in three benefits. The LED life is improved, the current consumption of the mouse is minimized when it is not being used and the signal to noise ratio on the detectors is improved because the LED sources can be driven harder when using an 8.6% duty cycle.
Amazing Features of Mouse Encoder
- Low cost rotary pulse generator
- Resolution of around 256 pulses/revolution
- Pulse rates of up to several hundred pulses/second"
16:51 |
Posted in
How Stuff Works?,
Mouse Encoder
|
Read More »
Diagram below shows a simplified diagram of the main peripherals present in the 89S52 or 8052 / 8051. There are 3 Timers/Counters in the 89S52. The expression "Timer/Counter" is used because this unit can act as a Counter or as a Timer as per requirement. Timer/Counter 2 is a special counter that does not behave like the two others, because of some extra functionality.
The serial port, using a UART (Universal Asynchronous Receive Transmit) protocol can be used in a wide range of communication applications. With the UART provided in the 89S52 it is easy to communicate with a serial port equipped computer, as well as communicate with another microcontroller.
If all the peripherals described above can generate interrupt signals in the CPU according to some specific events, it can be useful to generate an interrupt signal from an external device that may be a sensor or a Digital to Analog converter. For that purpose there are 2 External Interrupt sources (INT0 and INT1).
16:33 |
Posted in
Counters,
How Stuff Works?,
Microcontroller,
Timers
|
Read More »
Hello, this very post is related to the RPM meter project. In fact this is the description of AT89S52 with reference to that context. You must first of all glance over the project here. This is to mention here that this post is the work of all the same team members mentioned in the project.
8051 is the name of a big family of microcontrollers. The device which we used in our project was the 'AT89S52' which is a typical 8051 microcontroller manufactured by Atmel™. The block diagram provided by Atmel™ in their datasheet that showed the architecture of 89S52 device seemed a bit complicated. A simpler architecture can be represented below.
The 89S52 has 4 different ports, each one having 8 Input/output lines providing a total of 32 I/O lines. Those ports can be used to output DATA and orders do other devices, or to read the state of a sensor, or a switch. Most of the ports of the 89S52 have 'dual function' meaning that they can be used for two different functions.
The first one is to perform input/output operations and the second one is used to implement special features of the microcontroller like counting external pulses, interrupting the execution of the program according to external events, performing serial data transfer or connecting the chip to a computer to update the software. Each port has 8 pins, and will be treated from the software point of view as an 8-bit variable called 'register', each bit being connected to a different Input/Output pin.
There are two different memory types: RAM and EEPROM. Shortly, RAM is used to store variable during program execution, while the EEPROM memory is used to store the program itself, that's why it is often referred to as the 'program memory'. It is clear that the CPU (Central Processing Unit) is the heart of the micro controllers. It is the CPU that will Read the program from the FLASH memory and Execute it by interacting with the different peripherals
Diagram below shows the pin configuration of the 89S52, where the function of each pin is written next to it, and, if it exists, the dual function is written between brackets. Note that the pins that have dual functions can still be used normally as an input/output pin. Unless the program uses their dual functions, all the 32 I/O pins of the microcontroller are configured as input/output pins.
16:23 |
Posted in
8051 Description,
How Stuff Works?,
Microcontroller
|
Read More »
Converting .m files into stand alone applications
I don't take responsibility of this post. However I was able to transformed my Matlab GUI files into standalone executable files. Whats the benefit of doing all this ? You can still run your M-Files and applications without having Matlab installed in your system. That's what it does.
Let's convert the
calculator , which I showed you yesterday, into standalone executable files. Open Matlab command window. Type "mcc -m calculator.m". Calculator.m is the M - File for calculator and mcc -m is the Matlab command. You can explore more by typing "help mcc"
Typing mcc -m calculaor.m will generate executable file in the same folder. The files genereated are :-
- exe file
- asv file(s)
- prg file(s)
- c files(s)
- log files
- txt files
Now close Matlab and open calaculator.exe or any other exe file that you have generated. It would take sometime to open but will run with no difference. Its better you make a zip of above files. MRC installer must be installed in your system before you run it.Thanks!
11:28 |
Posted in
.m to .exe,
How Stuff Works?
|
Read More »