PWM Section and D/A Converter Generator.

Similar documents
CENTRONICS interface and Parallel Printer Port LPT

Accurate Measurement of the Mains Electricity Frequency

Technical Specifications: The specifications represent a particular hardware platform. Application-specific software is provided.

Application/Connection Examples

Microcontrollers in Practice

ETEC Digital Controls PIC Lab 10 Pulse Width Modulation

Lab Experiment 1: The LPC 2148 Education Board

Radio sensor powered by a mini solar cell the EnOcean STM 110 now functions with even less light

Ordering Part Numbers:

APPLICATION NOTES: Dimming InGaN LED

EVAL-UFDC-1/UFDC-1M-16

CHAPTER 11: Flip Flops

Advanced Data Capture and Control Systems

1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver

Servo Info and Centering

Bluetooth HC-06 with serial port module Easy guide

Display Message on Notice Board using GSM

Model 5511 Filler Controller User s Manual Version 1.1 October 2011

[F/T] [5] [KHz] [AMP] [3] [V] 4 ) To set DC offset to -2.5V press the following keys [OFS] [+/-] [2] [.] [5] [V]

Theory and Practice of Tangible User Interfaces. Thursday Week 2: Digital Input and Output. week. Digital Input and Output. RGB LEDs fade with PWM

Using Xbee in Serial Communication

DS1104 R&D Controller Board

Pulse Width Modulation

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

Measuring, Controlling and Regulating with labworldsoft

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

Tamura Closed Loop Hall Effect Current Sensors

Ocean Controls RC Servo Motor Controller

BIODEX ADDENDUM BIODEX EMG/ANALOG SIGNAL ACCESS CONFIGURATION UTILITY SOFTWARE FOR SYSTEM 3 REVISION 2 AND SYSTEM 4 DYNAMOMETERS

Special Lecture. Basic Stamp 2 Programming. (Presented on popular demand)

RC2200DK Demonstration Kit User Manual

with Electronic Assistant

Technical Manual. For use with Caller ID signaling types: Belcore 202, British Telecom, & ETSI

Display Board Pulse Width Modulation (PWM) Power/Speed Controller Module

The modular concept of the MPA-3 system is designed to enable easy accommodation to a huge variety of experimental requirements.

RS-232 COMMUNICATIONS

Conversion Between Analog and Digital Signals

Automation System TROVIS 6400 TROVIS 6493 Compact Controller

Current Loop Application Note 1495

Brushless DC Motor Controller Product Specification Assembly 025F0129

Hello and welcome to this training module for the STM32L4 Liquid Crystal Display (LCD) controller. This controller can be used in a wide range of

Information Board User s Guide

Digital Single Axis Controller

RISH EM 3490 DS Dual Source Energy Meter RISH EM 3490 DS. Application : Product Features:

Computer Controlled Generating Stations Control and Regulation Simulator, with SCADA SCE

User Manual V SDM220MODBUS. Single-Phase Two Module DIN rail Meters

Work with Arduino Hardware

DAM Series DAM124 4DIN+8AI+4DO Module Model No.:DAM124 WebSite:

LDG Electronics External Meter Serial Communications Protocol Specification

DK40 Datasheet & Hardware manual Version 2

14.5GHZ 2.2KW CW GENERATOR. GKP 22KP 14.5GHz WR62 3x400V

Basic Pulse Width Modulation

REGTRONIC OPERATING INSTRUCTIONS

Timer A (0 and 1) and PWM EE3376

PCAN-MicroMod Universal I/O Module with CAN Interface. User Manual. Document version ( )

Optimize your simple machines... Modicon M218 Selection Guide

MAXREFDES46# Quick Start Guide UG6207; Rev 1; 9/15. Abstract

TCP/IP MODULE CA-ETHR-A INSTALLATION MANUAL

TAC I/NETTM MR-VAV-AX. Application Specific MicroRegulator TM

ABB Drives. User s Manual HTL Encoder Interface FEN-31

An internal gyroscope minimizes the influence of dynamic linear acceleration on slope sensor readings.

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Fingerprint Based Biometric Attendance System

Date Rev. Details Author

Technical Manual. FAN COIL CONTROLLER COOLING or HEATING ANALOG or PWM Art A

UDG1000 Hach PCX2200 Serial Port Input Driver configuration

ELECTRONIC CONTROL UNITS. Machine Management Systems. Description. EC-MMS-1012-H 10 inputs, 12 outputs meter-in systems controller 20

Measuring Resistance Using Digital I/O

Research RF Sputtering Packages

RS-485 Protocol Manual

Application Note. Terminal Server G6

AVR131: Using the AVR s High-speed PWM. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

New XUY roller sensors

GMB HR84 GMM F346 TECHNICL MANUAL. grifo ITALIAN TECHNOLOGY. grifo Mini BLOCK Housing, 8 Opto Input, 4 Relay Outputs

Features. Applications

8051 MICROCONTROLLER COURSE

TOTALLY SOLID STATE NON-DIRECTIONAL RADIO BEACONS khz

Option field bus: without bus with profibus DP. Design-Index (Subject to change)

B Robo Claw 2 Channel 5A Motor Controller Data Sheet

Advanced LED Controller (LED Chaser)

Introduction to Electronic Signals

Software Manual RS232 Laser Merge Module. Document # SU Rev A

RS-232 Communications Using BobCAD-CAM. RS-232 Introduction

SIMATIC S It s the Interplay that makes the difference. Siemens AG All Rights Reserved.

PWM IN AVR. Developed by: Krishna Nand Gupta Prashant Agrawal Mayur Agarwal

Wireless Home Security System

Talon and Talon SR User Manual

Factory Automation SIMATIC LOGO!..0BA6. Colin Limbert. Factory Automation Department. Product Manager LOGO! and S7-200

MH - Gesellschaft für Hardware/Software mbh

Welcome to the tutorial for the MPLAB Starter Kit for dspic DSCs

Digital and Analog I/O

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Nemo 96HD/HD+ MODBUS

Creating a Project with PSoC Designer

PROJECT PRESENTATION ON CELLPHONE OPERATED ROBOTIC ASSISTANT

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

BIT COMMANDER. Serial RS232 / RS485 to Ethernet Converter

GSM Interfacing Board

RPLIDAR. Low Cost 360 degree 2D Laser Scanner (LIDAR) System Development Kit User Manual Rev.1

Transcription:

Practical Course on BASCOM AVR - (34) Theoretic/Practical course on BASCOM AVR Programming. Author: DAMINO Salvatore. PWM Section and D/A Converter Generator. The internal structure of Mini Modules is composed by many different sections capable to offer so many Hardware interfaces that support the majority of possible applications. Among the available units inside Mini Modules, a really interesting section is those named PWM. Block Diagram of PWM Section. The Pulse-Width Modulation or PWM, is a type of Analog Modulation where the information is coded with a time duration of each pulses of the signal. 220

The duration of each pulse can be defined as the ratio between the 2 periods of the consecutive levels of the pulse, that is the Duty Cycle notion. A Duty Cicle equal to 0% denotes pulse with null duration, that in practice is a null signal, while a 100% value denotes a pulse that stops exactly when the following one starts. PWM Signal Waweforms. Many times the designers must generate analog voltage levels in electronic circuits that are completely digitals. Even if the market offers a really wide range of suited Digital to Analog converters, it is possible to adopt also a low cost solution, by using the PWM section of Mini Module. 221

Conversion of PWM Signal Into Analog Signal. The previous figure shows how a PWM signal is converted into Analog signal. By using this technique, and only few passive components, you can generate a good Digital/Analog converter. In the following examples you can examine some programs that use a Mini Module and they exploit the PWM output line in order to generate one analog voltage capable to cover the full range from 0 Vdc to power supply voltage, that is the maximum generable value. By using the supplied examples, and a standard Volt meter or Tester, it is possible to immediately visualize the generated voltage value. This technique can be adopted in many applications. The most diffused is, for example, the connection to an input of a power actuator that drives a DC motor, or a proportional valve, etc. This solution, really inexpensive, allow to drive small actuators that move mechanisms, where the resolution, reached by PWM signal, is sufficient. 222

Example.063. PWM Management. It Generates a D/A Conversion Output, Based on a PWM. Added Definitions: Added Declarations: Added Instructions: CONFIG TIMER1; PWM1A. Added Operators: Example program 063 of BASCOM AVR course. PWM management: it generates a D/A Conversion output, based on a PWM signal. Generate a D/A Converter Through a PWM Line. 223

The program generates a PWM signal with a fixed frequency of about 14.500 Hz and a Duty Cycle settable by user, through console. The generated Pulse Width Modulation signal, when connected to proper RC circuit, it produces an analog signal variable in 0 5 V range. The PWM signal is generated by hw from the Timer 1 section of microcontroller, where the compare signal connected to pin OC1A of Mini Module, reported on connector CN4.3 of GMM TST3, as described in the electric diagram. The resolution used on Timer 1 is 8 bits and the generated PWM signal will have 256 different values of duty cycle. The program describes its functionalities and uses a serial console provided of monitor and keyboard with a fixed physical protocol at 19.200 Baud, 8 Bit x chr, 1 Stop bit, No parity. This console can be another system capable to support a serial RS 2 3 2 communication. In order to simplify the use it can be used a PC provided of one COMx line, that execute a terminal emulation program as HYPERTERMINAL or the homonym modality provided by BASCOM AVR (see IDE Configuration). The program works only when the GMM AM08 is mounted on Z2 socket of GMM TST3!! 224

Example.064. PWM Management: It Generates a D/A Conversion Output, Continuosly Increased and Decreased, Based on a PWM Signal. Added Definitions: Added Declarations: Added Instructions: STEP. Added Operators: Example program 064 of BASCOM AVR course. Gestione PWM: Genera un'uscita di conversione D/A, continuamente crescente e decrescente, tramite un segnale PWM. PWM Management: it generates a D/A conversion output, continuosly increased and decreased, based on a PWM signal. The program generates a PWM signal with a fixed frequency of about 14.500 Hz and a Duty Cycle continuosly changed from the minimum to maximum and after from maximum to minimum. The generated Pulse Width Modulation signal, when connected to proper RC circuit, it produces a triangle waveform analog signal variable in 0 5 V range. The selection of the RC circuit components defines both the stability of generated D/A signal and the response time in Duty Cycle variation following. So, these values change according with user requirements and load connected to D/A signal. The PWM signal is generated by hw from the Timer 1 section of microcontroller, where the compare signal connected to pin OC1A of Mini Module, reported on connector CN4.3 of GMM TST3, as described in the electric diagram. 225

The resolution used on Timer 1 is 8 bits and the generated PWM signal will have 256 different values of Duty Cycle. The program describes its functionalities and uses a serial console provided of monitor and keyboard with a fixed physical protocol at 19.200 Baud, 8 Bit x chr, 1 Stop bit, No parity. This console can be another system capable to support a serial RS 2 3 2 communication. In order to simplify the use it can be used a PC provided of one COMx line, that execute a terminal emulation program as HYPERTERMINAL or the homonym modality provided by BASCOM AVR (see IDE Configuration). The program works only when the GMM AM08 is mounted on Z2 socket of GMM TST3!! 226

Example.065. PWM Management: It Drives a LED Brightness Through a D/A Conversion Line. The D/A Line is Driven by the Position of a Potentiometer, Acquired Through A/D Converter. Added Definitions: Added Declarations: Added Instructions:. Added Operators: Example program 065 of BASCOM AVR course. PWM management: it generates a D/A conversion output, based on a PWM signal, defined by the position of a potentiometer, acquired through A/D converter. D/A Converter Driver by a Potentiometer. 227

The program generates a PWM signal with a fixed frequency of about 14.500 Hz and a Duty Cycle changed from the potentiometer position. The generated Pulse Width Modulation signal, when connected to proper RC circuit, it produces an analog signal proportional to potentiometer position, variable in 0 5 V range. The selection of the RC circuit components defines both the stability of generated D/A signal and the response time in Duty Cycle variation following. So, these values change according with user requirements and load connected to D/A signal. By connecting a LED to D/A signal, its brightness will change according to potentiometer variations and, as every thing is driven by software, the program can decide the modality. For example the LED brightness could be defined even from digital inputs, delays, other analog inputs, temperatures, parameters in memory, etc. The PWM signal is generated by hw from the Timer 1 section of microcontroller, where the compare signal connected to pin OC1A of Mini Module, reported on connector CN4.3 of GMM TST3, as described in the electric diagram. The resolution used on Timer 1 is 8 bits while the A/D section resolution is 10 bits: the program will adapt the different values. The program describes its functionalities and uses a serial console provided of monitor with a fixed physical protocol at 19.200 Baud, 8 Bit x chr, 1 Stop bit, No parity. This console can be another system capable to support a serial RS 2 3 2 communication. In order to simplify the use it can be used a PC provided of one COMx line, that execute a terminal emulation program as HYPERTERMINAL or the homonym modality provided by BASCOM AVR (see IDE Configuration). The program works only when the GMM AM08 is mounted on Z2 socket of GMM TST3!! 228