Controlling servo motor with AVR

Servo motor

Servo motors are a type of electromechanical actuators that do not rotate continuously like DC/AC motors. They used to position and hold some object. They are used where continuous rotation is not required so they are not used to drive wheels. In contrast they are used where something is needed to move to particular position and then stopped and hold there. Most common use is to position the rudder of aircrafts and boats etc. Servos can be used effectively here because the rudders do not need to move full 360 degrees nor they require continuous rotation like a wheel. Servos are DC motors with built in gearing and feedback control loop circuitry. Most servo motors can rotate about 90 to 180 degrees. Some rotate through a full 360 degrees or more. Servos… Continue reading

Interfacing character LCD to AVR

HD44780 character LCD

In this tutorial, we will be interfacing a HD44780 character LCD. Although as an alternative you can use JHD162A LCD. Both follows the same instruction set along with the same pin diagram. Both these LCD’s are easily available in the market at a low cost. HD44780 LCD has a set of 16 columns and 2 rows for display. The pin diagram of the LCD is as follows Continue reading

Accelerometer Interfacing with AVR

ADXL335 size

The article covers how to interface an accelerometer with the atmega32/atmega16. Before proceeding, the user must know the basics of ADC (Analogy to digital converter) of the AVR. An accelerometer is an electromechanical device that will measure acceleration forces. These forces may be static, like the constant force of gravity pulling at your feet, or they could be dynamic – caused by moving or vibrating the accelerometer. Accelerometers are of two types Analog and Digital. In this post we will be discussing about Analog accelerometer. They give voltage as output which is proportional to acceleration. The digital one gives the PWM output or direct binary digital data Continue reading

All you need to know about AVR fuses

avr crystal oscillator

AVR lock bits and fuses is one of the topics that may cause some confusion. If you missed something or set one bit wrong, it may lead to failure – bricking whole AVR chip. So it is important to understand once and to things right. Despite the fact that datasheets give enough information about AVR fuses, many times we feel somewhat unsure before executing write command. Lets go through main features of AVR fuses and lock bits so next time we would feel safe and get expected results. Continue reading