Most of the real world sensor output is analog type. We can read the analog output with the ADC pin provided in Atmel family. In ATnega32 there are 8 ADC channel with 10bit resolution. That means each of the ADC channel can divide 0-5V to 0-1023 counting value that can be easily read by the […]

Atmel family has another type of Timer to watch the program flow. We can enable the timer and if error occurs it will restart the CPU. So much we are excited, for it is hard to succeed developing absolutely perfect and error free program. The watchdog cannot help us to better programs however it can

Watchdog TimerRead More »

A servomotor is a rotary actuator that allows for precise control of angular position, velocity and acceleration. Most modern servomotor are designed and supplied around a dedicated control module. So that servomotor doesn’t require a driver. A microcontroller PWM pin can be used directly to control the servomotor. From picture it is seen that the

Servo Motor ControlRead More »

PWM stands for pulse wide modulation. In AVR family there are three types of waveform generating modes The relationship between output voltage and duty cycle is      A PWM signal is nothing but a square wave in which the tine period (Ton+Toff) remain the same but the duty cycle changes. Basically all PWM mode operate with

PWM (Pulse width Modulation)Read More »

Ultrasonic sensors use sound to determine the distance between the sensor and the closest object in its path. The sensor sends out a sound wave at a specific frequency. It then listens for that specific sound wave to bounce off of an object and come back. The sensor keeps track of the time between sending

Ultrasonic SensorRead More »

DHT11 digital temperature and humidity sensor is a composite Sensor contains a calibrated digital signal output of the temperature and humidity. The sensor includes a resistive sense of wet components and an NTC temperature measurement device and connected with a high-performance 8-bit microcontroller. RT: Typical application circuit recommended in the short cable length of 20m

Temperature & Humidity SensorRead More »

RPM Meter

In this project we use IR Tx diode and IR Rx diode. The sensor circuit diagram is as follow- The RPM meter based on two procedures It is easy to calculate pulse using external interrupt pin. Let use ATmega8 for this purpose. The logic should be as soon as any falling edge is found, it

RPM MeterRead More »

Previously we learn about timer CTC. Now what happen if we do not compare the value? In that case the timer starts from BOTTOM to the MAXimum value i.e. 0xFF (for Timer0/2) or 0xFFFF (Timer1) and that is timer overflow. In this case when the timer overflows an interrupt available i.e. Timer Overflow Interrupt vector.

Timer/Counter – OverflowRead More »