pwm

PID magnetic levitator.

An AVR Atmega based PID magnetic levitator

This is a magnetic levitator implemented using Atmega8 microcontroller. Magnetic levitation is a method by which an object is suspended with no support other than magnetic fields. To make a magnet levitate, an hall sensor is attached to a coil. The coil acts as an electromagnet, and the hall sensor measure the distance of the magnet from the coil. …

An AVR Atmega based PID magnetic levitator Read More »

compare voltage

PWM Waveform Capture using AVR microcontroller Using Atmega

Described are the waveform capture method, example firmware and hardware designs. This material formed the basis of an article that was first published in the October, 2003 issue of Circuit Cellar magazine. The only components added to the operating Atmel AT90S2313 circuit (one capacitor and two resistors) to allow  waveform sampling with < 1 microsecond resolution …

PWM Waveform Capture using AVR microcontroller Using Atmega Read More »

RGB Rotary Encoder

RGB Rotary Encoder with PWM and ISRs Using an ATmega328

Description A long time ago I bought a couple RGB rotary encoders from Sparkfun because they were cheap and I was already spending a bunch on other stuff.  I thought they would be neat for some interfaces since it includes a push button.  The interrupt service routine (ISR) for pin changes on the rotary encoder (for terminals …

RGB Rotary Encoder with PWM and ISRs Using an ATmega328 Read More »

fast PWM Pulse Width Modulation

How to use fast PWM (Pulse Width Modulation) Mode of AVR microcontroller Timer Using Atmega

This article is in continuation of PWM generation using AVR timer. In the previous article, PWM generation using Phase correct PWM mode is described. However, there are some applications like DAC, power regulation and rectification etc. which require high frequency PWM wave. The PWM generation using Fast PWM mode is suitable for such applications. This article focuses on Fast …

How to use fast PWM (Pulse Width Modulation) Mode of AVR microcontroller Timer Using Atmega Read More »

PWM Based DC Motor Speed Control

PWM Based DC Motor Speed Control using Microcontroller Using Atmega

In many applications, it is important to control the speed of DC motor where precision and protection are essence. Here we will use a technique called PWM (pulse width modulation) to control the speed of DC motor. We can achieve speed control of DC motor using mechanical or electrical techniques but they require large size …

PWM Based DC Motor Speed Control using Microcontroller Using Atmega Read More »

Working with Atmel AVR Microcontroller

Working with Atmel AVR Microcontroller Basic Pulse Width Modulation (PWM) Peripheral

Pulse Width Modulation (PWM) is a technique widely used in modern switching circuit to control the amount of power given to the electrical device.  This method simply switches ON and OFF the power supplied to the electrical device rapidly. The average amount of energy received by the electrical device is corresponding to the ON and …

Working with Atmel AVR Microcontroller Basic Pulse Width Modulation (PWM) Peripheral Read More »