Robotics Research Laboratory Louisiana State University.

Slides:



Advertisements
Similar presentations
Jordan Barry Victor Brzeski
Advertisements

Mark Neil - Microprocessor Course 1 Device Drivers – Digital Voltmeter.
EET 2261 Unit 14 INCOMPLETE Analog-to-Digital Conversion (ADC) & Digital-to-Analog Conversion (DAC)  Read.  Homework #13 and Lab #13 due next week. 
Lecture 17: Analog to Digital Converters Lecturers: Professor John Devlin Mr Robert Ross.
Basic DC Motor Circuits
Data Acquisition ET 228 Chapter
Robotics Club, Snt Council2 The 3 Schools of Robotics: Mechanical Design – Types of motors – Material selection –
Robotics Research Laboratory Louisiana State University.
Digital-to-Analog & Analog-to-Digital Conversion BJ Furman 17APR2014.
ECE 265 – LECTURE 14 Analog Signal Acquisition The A/D converters 5/14/ ECE265.
Analog/Digital Subsystem
Analog Comparator Positive input chooses bet. PB2 and Bandgap Reference. Negative input chooses bet. PB3 and the 8 inputs of the A/D. ACME= Analog Comparator.
Khaled A. Al-Utaibi  Digital Vs Analog Signals  Converting an Analog Signal to a Digital One  Reading Analog Sensors with the.
-Done By Haresh Miriyala
Unit 4 Sensors and Actuators
Explain the introduction to ADC, ADC characteristics, Programming ADC using PIC18, Introduction to DAC and DAC interfacing with PIC18.
IO in Embedded Systems Martin Schöberl. Embedded IO2 Overview Input/Output Digital, Analog Translation Heater control example.
CR1000s are only one part of a data acquisition system. To get good data, suitable sensors and a reliable data retrieval method are required. A failure.
Railway Foundation Electronic, Electrical and Processor Engineering.
Sensors And Micro-Controllers
CR1000s are only one part of a data acquisition system. To get good data, suitable sensors and a reliable data retrieval method are required. A failure.
Railway Foundation Electronic, Electrical and Processor Engineering.
Robotics Research Laboratory Louisiana State University.
Digital I/O Connecting to the Outside World
Robotics Research Laboratory Louisiana State University.
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Robotics Research Laboratory Louisiana State University.
Dean Brock, Rebecca Bruce and Susan Reiser, CCSC SE 2009 Using Arduino Material taken from Todbot blog Bionic Arduino Todbot blog Bionic ArduinoTodbot.
September, 2007ENGR Low-Level Robot Control Mechatronics: Motors, sensors & embedded controls.
Embedded System Design Laboratory October 11, 2002Stanford University - EE281 Lecture #4#1 Lecture #4 Outline Announcements Project Proposal AVR Processor.
Robotics Research Laboratory Louisiana State University.
Robotics Research Laboratory Louisiana State University.
Advanced uC Session Speaker : Chiraag Juvekar Jan 13, 2011 Speaker : Chiraag Juvekar Jan 13, 2011.
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
Robotics Research Laboratory Louisiana State University.
Suleyman Demirel University CSS340 Microprocessor Systems – Lecture 2 ATMEGA328P ARCHITECTURE ANALOG INPUTS.
Automatic accident avoiding system PROJECT MEMBERS MUTHUKUMAR.K (05ME33) SAKTHIDHASAN.S (05ME39) SAKTHIVEL.N (05ME40) VINOTH.S (05ME56) PROJECT GUIDE:
CS224 I/O. Timers Timer1 is 16-bit timer 2^16-1 or 65,535 SYSCLK = 40MHz, Prescalers – 1:1, 1:8, 1:64, and 1:256 – Use T1CONbits.TCKPS=3 for 1:256 scaling.
Robotics Research Laboratory Louisiana State University.
ARDUINO 1. Basics  Comments  /* * Blink * * The basic Arduino example. Turns on an LED on for one second, * then off for one second, and so on... We.
Analog to Digital Converter (ADC). Analog to Digital Converters  Microcontroller understands only digital language.  To convert the analog output from.
Computer Science Summer term 2012 Final Project Team 2.
Analog to Digital Converter (ADC)
Rebecca Bruce and Susan Reiser, May 2015 Analog Input and Output.
Analog to Digital Conversion - ADC Mark Neil - Microprocessor Course 1 Device Drivers – Measuring Voltages.
INTERNET OF EVERYTHING SDU 2016 Week 4. Simple Digital and Analog Inputs  The Arduino’s ability to sense digital and analog inputs allows it to respond.
Ultrasonic Sensor TYWu.
Sensing Algorithm using IR Sensor and ADC Soong-sil University. Robotics 기 정 두 원.
1 Lab 4: D/A Converter Lab 4: D/A Converter This is a simple resistive network for a D/A converter Port 1, Port 0 are digital inputs ==> 00 (minimum),
1. PIC ADC  PIC18F877 has 8 analog input channels i.e. port A pins(RA0 to RA5) and port E pins(RE1 and RE2). These pins are used as Analog input pins.
INTERFACING HARDWARE WITH MICROCONTROLLER GUIDED BY: Prof. ASIF SIR 1. AKSHAY KIRAN 2. DEEP PARIKH 3. JIGAR PATEL 4. TILAK PATEL ,05,D2D06,09.
Application Case Study Christmas Lights Controller
Arduino.
Servos Elementary Robotics with Servos
Analog Comparator An analog comparator is available on pins PE2(AIN0), PE3(AIN1) The comparator operates like any other comparator. -when (+) exceeds (-)
Arduino - Introduction
How to avoid catching things on fire.
The Arduino Microcontroller: Atmel AVR Atmega 328
Digital-to-Analog & Analog-to-Digital Conversion
MicroLogix Packaged Controllers
EET 2261 Unit 14 INCOMPLETE Analog-to-Digital Conversion (ADC) & Digital-to-Analog Conversion (DAC) Read. Homework #13 and Lab #13 due next week. Quiz.
ADC and DAC Programming in AVR
ADC and DAC Data Converter
AVR – ATmega103(ATMEL) Architecture & Summary
Device Drivers – Digital Voltmeter
Robotics System Lecture 11_12: DC Motor
UNIT 5 Analog signals.
Introduction to Arduino
ADC and DAC Data Converter
Maker Education Manipulator
Presentation transcript:

Robotics Research Laboratory Louisiana State University

MOSFET-based H-bridges Metal–Oxide–Semiconductor Field-Effect Transistor DC Motor Controller (TB6612FNG)

int main(void){ InitHardware(); // PWM setting // ICR3 = 40000u;// input capture registor --> pulse cycle every 40 milli seconds TCNT3 = 0;// interupt flag registor // Set the WGM mode & prescalar for oscillating timer ( TCCR3A & TCCR3B : Timer control registors) TCCR3A = ( 1 << WGM31 ) | ( 0 << WGM30 ) | ( 1 << COM3A1 ) | ( 1 << COM3B1 ) | ( 1 << COM3C1 ); TCCR3B = ( 1 << WGM33 ) | ( 1 << WGM32 ) | TIMER3_CLOCK_SEL_DIV_8; DDRE |= (( 1 << 3 ) | ( 1 << 4 ) | ( 1 << 5 ));// I/O control registor (PWM pins as outputs) MC_HI(STANBY); MC_LO(LEFT0); MC_LO(LEFT1); MC_LO(RIGHT0); MC_LO(RIGHT1); int speed = 1000; int delay = 100; while (1){ MC_LO(LEFT0);MC_HI(LEFT1); OCR3A = speed; ms_spin(delay); MC_HI(LEFT0);MC_LOW(LEFT1); speed += 1000; if (speed > 40000){ speed = 1000; }

 Converting a continuous quantity to a discrete time digital representation  Converting an analog voltage to a digital value that can be used by a microcontroller.  There are many sources of analog signals to be measured such as light intensity, temperature, distance, position, etc.  The reverse operation is performed by a digital-to-analog converter (DAC).

 The number of discrete values it can produce over the range of analog values. ◦ Usually stored electronically in binary form ◦ The number of discrete values available, or "levels", is a power of two. (ex) 8bits  Range from 0 to 255 ◦ where n is the ADC's resolution in bits V ref-High - V ref-Low 2n2n Resolution =

 ATMega128 ADC has 10 bits resolution ◦ What is the range?  Has 8 channels through a multiplexer ◦ 8 pins on PORTF ◦ Need to set PORTF as input without pull-up ◦ How to set this up?  Has own power supply (labeled AVCC)  Allows measuring voltages from 0 to 5 volts with a resolution of 5/1024 volts, or 4.88 mV

 Can be configured in several different ways  Single-ended � mode : the analog voltages presented on the ADC channels are compared to ground.  There are several selectable voltage references, which determine the range of the ADC conversion. (ex) AVCC  Free-running mode (update continuously) or only one conversion.

QuantitySymbolUnit of measurement Unit of Abbreviation CurrentIAmpere (“Amp”)A VoltageV or EVoltV ResistanceR OhmΩ E = IR, I = E / R, or R = E / I

R1 = 100 Ω R2 = 400 Ω V 10 mA = 5 V / 500 ΩI = E / R 1V drop = 10 mA x 100 Ω 4V drop = 10 mA x 400 Ω 0V drop = 10 mA x 0 Ω 5 V 4 V 0 V First calculate current ( I ) by using E / R (5 / 500 = 0.01) Then calculate voltage drop at each point based on Ohm’s Law E = I x R (R1 = 0.01 * 100, R2 = 0.01 * 400)

S1 = 0 ~ Ω R2 = 1000 Ω V X V drop = Xi mA x S1 Ω X v+ restV drop = Xi mA x 1000Ω 0V drop = Xi mA x 0 Ω 5 V Connect to ADC 0 V Resistance value of S1(IR sensor) can be changed by sensing

uint16_t a2d_10( uint8_t Channel ){ // Select the channel in a manner which leaves REFS0 and REFS1 un touched. ADMUX = ( ADMUX & (( 1 << REFS1 ) | ( 1 << REFS0 ))) | Channel; // Start the conversion ADCSR = ADCSR | ( 1 << ADSC ); // Wait for it to complete while ( ADCSR & ( 1 << ADSC )); return ADC; // ADC defined at avr/iom128.h ( special function register: SFR_IO16) } // a2d_10 /home/csc2700/csc2700/40-ADC-01

 Config.h ◦ Set : #define CFG_USE_UART0 1  Hardware.h ◦ Set : #define UART0_BAUD_RATE57600  ADC_test.c ◦ Add : #include "UART.h” ◦ Create file pointer : FILE *u0;// for UART0 ◦ Open u0  if defined( __AVR_LIBC_VERSION__ )  u0 = fdevopen( UART0_PutCharStdio, UART0_GetCharStdio );  #else  u0 = fdevopen( UART0_PutCharStdio, UART0_GetCharStdio, 0 );  #endif ◦ Send values using fprintf(u0,”your message %d”, variable) ; /home/csc2700/csc2700/40-ADC-02

 Our programmer has 2 serial port ◦ ttyACM0 : ISP programming port ◦ ttyACM1 : UART serial port  Wire connection ◦ PE0  Yellow wire ◦ PE1  Green wire ◦ GND  Black wire  Open Gtk-term ◦ Set port : /dev/ttyACM1 ◦ Speed: 57600