[ Log In ]

Introduction to the Atmel Atmega32 AVR microcontroller and the pin assignments (what each pin of the chip does). The pins include PORTs (PORTA, PORTB, PORTC and PORTD) and 8 pins for each port, ADC (Analog to Digital Converter), PWM (Pulse Width Modulation), and serial forms of communicatgion like I2C, SPI, UART, USART, and much more.

Introduction to the concept of transfering a program from the computer to the microcontroller using a programmer like the USBTiny.

Introduction to programmers line the USBTiny and the Pocket AVR and that this device is plugged into the computer and to the microcontroller (chip) to transfer the program from the computer to the microcontroller.

Introduction to SPI (Serial Peripheral Interface) and which pins are connected together (pinout) from the microcontroller to the specific SPI pin functions (MISO,MOSI,SCK,Reset, VCC and GND).

Introduction to breadboards and how the pin connections are connected together (tie strips).

Introduction to Headers. What headers are and how they are used and how to solder them onto a perfboard.

General Description of Programmers Notepad under WINAVR for Progrmming Atmel AVR microcontrollers.

Description of Mfile to modify the makefile under WINAVR for Progrmming Atmel AVR microcontrollers.

Adding the delay functions to the LED blink program using the #include util/delay.h statement and the _delay_ms(delayAmount) function.

Introduction and setup of Atmel Studio 6 IDE (Integrated Development Environment) for programming Atmel AVR and ARM microcontrollers.

Introduction to intellisense in Atmel Studio 6 IDE (Integrated Development Environment).

the data bus is a way for multiple lines (wires) communicate in a simultaneous fashion. For example, a data bus for 4 bit or 8 bit communication would have 4 or 8 wires respectively. The wires would be carrying 4-bit or 8-bit information. Each 4 or 8 bit communication is happening on all of the wires at the same time.

Potentiometers are variable resistors. The resistance changes when the wiper is adjusted. The variable resistance is measured from one of the outside leads to the center (wiper) lead. The small variable resistors are generally called trimmers.

To get DC (Direct Current) from AC (Alternating Current), the AC which is a sine wave must be rectified, then smoothed. Rectification is required because half of the sine wave happens in the negative voltage region. Rectification is taking the negative part of the voltage and flipping it up to the positive region. Smoothing is where capacitors are used to store the rectified voltage (which looks like a bunch of humps) and makes it more like a line that has very small bumps. The higher capacitance, the smaller the bumps will be.

Servos are motors that use feedback to control the motor's position. This type of control is called closed loop control. Servos use a special electromechanical device to provide this feedback. This electromechanical device can be a potentiometer or encoder. Encoders come in various shapes, sizes and resolutions.

Encoders provide a pulse (usually caused by an LED and sensor) that determines the position of the shaft of the motor. When the controller counts to the commanded number of pulses, the motor is stopped, or put into reverse if the motor over ran the position. The motor and controller will constantly provide torque in the direction that is needed to keep the position and is always correcting.

If a potentiometer is used, the motor shaft is connected to the potentiometer in some way (hobby servos connect the potentiometer with gears).

Torque has two units: length and a force. The typical unit of measurement is Nm or Newton-Meters. Newton is the force and meters is the length. Since we are dealing with small motors, we will use oz-in (ounce-inch) as the units, ounce being the force and inch being the length.

The length is the measurement from the center of the shaft and the force is the amount of force it takes to turn the motor shaft at the length from the center of the shaft.

torque = length * force

So, there is always a relationship of the amount of force that the motor will be able to turn the shaft with where the force is located from the center of the shaft.

Encoders are devices that are used in the closed loop control of motors. Encoders provide the control system the feedback on where the motor is positioned. Encoders can be linear, or radial. If the encoder is physically connected to the motor shaft in some way, then the encoder is generally circular containing some type of transparency that would provide a pulse if turned. The pulse is generated by a light on one side of the encoder and a sensor on the other side of the encoder.

If the encoder is not physically connected to the motor shaft, then the encoder may be a linear strip (commonly called a code strip). The light and sensor would be connected near the motor and the code strip would be tied the extremes of where the motor will travel.

PWM or Pulse Width Modulation is the microcontroller's way of creating variable voltages. Since the microcontroller can only create voltages of 0v and the voltage of VCC which could be 5v, 3.3v, 1.8v, etc. there is a need to be able to create voltages between this 0v and VCC to control devices that required these variable voltages.

Some of the uses are:
- Sound output
- Motor control
- LED Dimming

The components to PWM is the Pulse, the Period and the Duty Cycle.

The pulse is where the voltage reaches 5v and maintains this 5v within the set period.

The period is the time frame that there is an idle voltage 0v, and a pulse. The period is set to the specifications of the desired resolution.

The duty cycle is the percentage of the width of the pulse in relation to the period.

There is standard PWM where the pulse falls at one side of the period, and there is phase correct PWM where the pulse falls at the midpoint of the period.

A state machine is simply a sharing of the microcontrollers processing time. A state machine is like a loop that considers certain processes within a program and does this in a way that the processes get certain priorities if desired.