AllFreePapers.com - All Free Papers and Essays for All Students
Search

Digital Microcontroller System

Autor:   •  October 2, 2016  •  Essay  •  407 Words (2 Pages)  •  745 Views

Page 1 of 2

Abstract

This experiment demonstrates the use of a microcontroller for reading and outputting analog signals. The theory behind pulse width modulation (PWM) will be detailed and observed in effect in experiments. Also, the effects of filtering sensor input with the arduino microcontroller are observed.

Introduction

In this experiment, a digital microcontroller system was used to read and output analog signals. Digital and analog signals differ in that a digital signal can only take certain quantized values while an analog signal can cover a full spectrum of values. For example, the digital voltage output from the arduino was limited to only 0 or 5 volts, but the motor fan it was driving accepts an analog voltage input. To drive the fan at voltages between 0 and 5 volts, the arduino uses pulse width modulation. PWM works by turning the voltage on and off at a high frequency. To output a signal that is 50% of the maximum value, the voltage will be turned off for half of the controller’s operating period. The percentage of time that the signals is on is known as the duty cycle. The magnitude of the output signal can be determined by multiplying the duty cycle by the maximum output magnitude. Although the signal generated by PWM is a square wave, the voltage observed by the fan approximates a constant value due to the high frequency at which PWM operates combined with any hardware filtering done by the fan.

Often, signals read by microcontrollers are noisy in nature, so filtering is done by the controller to smooth the input signal. One type of filter that is often used is a moving average. The controller saves a certain number of previous readings and averages them to obtain a less noisy reading. One issue with this is that it often causes the signal to “lag.” For example, if the microcontroller receives continuously increasing readings, the moving average will return a filtered

...

Download as:   txt (2.4 Kb)   pdf (37.5 Kb)   docx (8.5 Kb)  
Continue for 1 more page »