Smart-grid Interface with Photovoltaic Installation – Phase 2 PP-01 Team members: Matt Koresh Ivan Mills Matt Martin Advisor: Dr. Aliprantis.

Slides:



Advertisements
Similar presentations
Analog to digital converter
Advertisements

EUSART Serial Communication.
Electronics Design Lab TUTORIAL PIC Microcontrollers Francesco Tenore 2/10/2006.
ECT 357 Ch 18 UART. Today’s Quote: Be careful that your marriage doesn’t become a duel instead of a duet. Be careful that your marriage doesn’t become.
DATA COLLECTION USING ZIGBEE NETWORK Timothy Melton Moscow, ID.
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2014 Lecture 32: PIC example programs: Analog to digital conversion.
Slides created by: Professor Ian G. Harris Inputs and Outputs PIC Vcc RA3 RA4 RA5  Make an LED toggle state when button is pressed  Need to read RA3,
Data acquisition and manipulation
Explain the introduction to ADC, ADC characteristics, Programming ADC using PIC18, Introduction to DAC and DAC interfacing with PIC18.
ECT 357 Ch 10 Analog to Digital COnversion. Today’s Quote: It’s better to die with a good name than to live with a bad one. It’s better to die with a.
S4525A Peripherals & Enhanced FLASH 1 © 1999 Microchip Technology Incorporated. All Rights Reserved. S4525A Peripherals & Enhanced FLASH 1 Peripherals.
Starting with serial Chapter Ten 10.1, 10.2,
Eng. Husam Alzaq The Islamic Uni. Of Gaza
1 Electrical and Computer Engineering Guitar Virtuos Justin D’Alessandro (EE) Jacob Dionne (CSE) Adam Montalbano (CSE) Jeffrey Newton (EE) Team Kelly Final.
Home Wireless Control Students Lee Blum Ehud Ravitz Instructor Konstantin Sinyuk Mid Semester Presentation Project A
16.317: Microprocessor System Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 30: PIC data memory.
Railway Foundation Electronic, Electrical and Processor Engineering.
EEE305 Microcontroller Systems Lecture 7: Embedded C using PIC microcontrollers Serial i/o with the XC8 Teaching resources are at
Microcontroller Architecture PIC18F Family
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Embedded Systems Design
Microcontroller Programming How to make something almost do something else Raffi Krikorian MAS November 2003.
Serial Communication ETEC 6416.
Department of Electronic & Electrical Engineering Embedded system Aims: Introduction to: Hardware. Software Ideas for projects ? Robotics/Control/Sensors.
Input/Output mechanisms
16F877A. Timer 0 The Timer0 module timer/counter has the following features: –8-bit timer/counter –Readable and writable –8-bit software programmable.
I/O PORTS (Simplest Peripherals) PORT A: 6 bits wide (7th and 8th bit always read as 0) PORT B: 8 bits wide PORT C: 8 bits wide PORT D: 8 bits wide.
Digital to Analogue Converter
“Describe the overview of hardware interfacing and the serial communication interface. Describe the PIC18 connections to RS232. Explain the serial port.
RS232 #use rs232(baud=9600,xmit=PIN_C6,rcv=PIN_C7
(More) Interfacing concepts. Introduction Overview of I/O operations Programmed I/O – Standard I/O – Memory Mapped I/O Device synchronization Readings:
MICROCONTROLLER SYSTEMS Part 1. Figure 1.1Elements of a digital controller CPU Central Processing Unit Input Peripherals Output Peripherals ROM Read Only.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Chapter 7 Larger Systems and the PIC 16F873A The aims of this chapter are to introduce: The architecture of the 16F873A microcontroller; The 16F873A memory.
Chapter 11 Data Acquisition and Manipulation The aims of this chapter are to introduce: the main features of a data acquisition system; the characteristics.
Department of Electronic & Electrical Engineering Serial interfaces Serial Interfaces allow communication between devices sending one bit at a time. In.
Features of the PIC18 microcontroller - 8-bit CPU - 2 MB program memory space (internal 32KB to 128KB) bytes to 1KB of data EEPROM - Up to 4096 bytes.
Department of Electronic & Electrical Engineering Lecture 2 ● Introduction to IO ● Using a subroutine ● Driving a 7seg display.
Serial Peripheral Interface SPI I2C (i-squared cee)
Microcontrollers session. What is Microcontroller? Microcontroller is composed of microprocessor,ram, flash memory,EEPROM and some modules like timers,
Department of Electronic & Electrical Engineering Lecture 4. ➢ Loops ➢ Delays ➢ Conditional instructions ➢ Simple clock example.
Department of Electronic & Electrical Engineering Lecture 3. ● Template program. ● Introduction to IO ● PORTA PORTB TRISA TRISB ● Using a subroutine ●
Microcontrollers JULES CALELLA. Microcontrollers vs Microprocessors  Microprocessors – do not contain RAM, ROM, I/O  Microcontrollers – The whole package.
Programming PIC 16F84A in Assembly. PIC16F84 pin-out and required external components.
I/O PORTS. General purpose I/O pins can be considered the simplest of peripherals. They allow the PICmicro™ to monitor and control other devices. To add.
A Quick Start Guide to PIC16F877 microcontroller And Microchip Development Environment A Quick Start Guide to PIC16F877 microcontroller And Microchip Development.
Criteria for choosing a microcontroller A microcontroller must meet the task at hand efficiency and cost effectively. Speed. What is highest speed of.
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),
CEng3361 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2011 Recitation 06.
Microcontrollers Part II BME 201. Overview ADC Serial.
 Mini-Computer ◦ Microprocessor  The Brains  Arithmetic Logic Unit (ALU)  Control Unit  Program/ Data Storage  Peripherals (Input/Output)  Low-Cost.
Serial mode of data transfer
Chapter 10 PIC18 Serial Port Programming in Assembly
Microprocessor Systems Design I
Microprocessor Systems Design I
USART Universal Synchronous Asynchronous Receiver Transmitter
ECE 354 Computer Systems Lab II
Serial Communication Interface
PIC18F458 Analog-to-Digital
ADC and DAC Data Converter
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
EUSART Serial Communication.
EECE.3170 Microprocessor Systems Design I
PIC Serial Port Interfacing
ADC and DAC Data Converter
PIC Microcontroller ADC interfacing Prof. Ashvini Kulkarni
PIC Serial Port Interfacing
PIC18 Interrupt Programming
Presentation transcript:

Smart-grid Interface with Photovoltaic Installation – Phase 2 PP-01 Team members: Matt Koresh Ivan Mills Matt Martin Advisor: Dr. Aliprantis

Problem Statement Our group is tasked with the completion of previous work on a PV panel. The panel must be installed on top of Coover Hall and must incorporate smart grid technology. Our client has expressed a need for a wireless device to send power data between a solar inverter and a computer interface. Our client has expressed using new Zigbee technology to be incorporated in our design.

Solution We built upon small amounts of previous work laid out by the previous group and began a design for the installation We designed a current measuring circuit and incorporated a wireless Zigbee device in order to transmit data to a computer.

Previous Phase Documentation on PV panel PV panel and cables Due to lack of testing and documentation reverse engineering the inverter could prove futile.

System Diagram

Measurements and Data transfer Current will be measured from Inverter output Power will be calculated from known grid Voltage and Current measurements Data measurements will be sent over Zigbee network to computer with Software interface to display results

Schematic of Final Board

Microcontroller: PIC18F Bit A/D Converter (up to 13 channels) -Internal Oscillator -USART interface -ICSP (In-Circuit Serial Program) -ICD (In-Circuit Debug)

PIC Programming MPLAB from Microchip used to program Assembly Code Utilized ◦3 basic functions:  Analog to Digital Conversion of input voltage signal  Serial Communication Interface  30 second timer to repeat main functions

PIC Programming ListP = PIC18F4620 #include ; ; ; This program is implementing USART on a PIC18F ; ; OSC = INT RC-Port on RA6, Port on RA ; ; Fosc = 8MHz (internal) ; ;------Initialization Routine ; Init: ; Set Oscillator ; banksel OSCCON movlw b' ';set frequency to 8MHz movwfOSCCON ;------Configure Input/Output------; ;Clear PORTA banksel PORTA;Select the bank that PORTA is located clrf PORTA;Clear the Port just in case erroneous ;Configures Pin AN0 as an A/D input bankselTRISA;Select the bank that TRISA is located MOVLWb' ';move binery number to w-register MOVWFTRISA;move value from w-reg to TRISA - this makes pin AN0 an input for ADC later ;------ADC Init------; ;ADCON0: Controls operation of A/D module bankselADCON0;Select the bank that ADCON0 is located movlw b' ' ;bit selects AN0 as A/D channel, A/D module enabled, A/D conversion to idle movwf ADCON0 ;ADCON1: Configures functions of port pins banksel ADCON1;Select the bank that ADCON1 is located movlw b' ';sets Vref- to Vss, Vref+ to Vdd and AN0 as analog input movwf ADCON1 ;ADCON2: Configures A/D clock source, programmed acquisition time and justification banksel ADCON2;Select the bank that ADCON2 is located movlw b' ' ;A/D Result right-justified movwf ADCON2 ;------Configure USART Communication------; banksel TRISC;select bank holding TRISC movlwb' ';Program RC7/RX pin and RC6/TX pin as directed by datasheet (pg 201) movwfTRISC; bankselSPBRG;Select bank holding SPBRG movlwb' ';decimal value of 12 (binary ) is required value for 9600 baud rate movwfSPBRG;

PIC Programming (cont) banksel RCSTA;select bank holding RCSTA movlwb' ';Enabled transmission, 8 data bits. SPEN bit (RCSTA =1) movwfRCSTA;USART ready to transmit and recieve data banksel TXSTA;select bank holding TXSTA movlw b' ';Transmit enabeled bit TXEN(TXSTA ) set low(disabled) for now, Asynchronous mode low speed(BRGH=0) movwf TXSTA; goto Main;force program to go to Main loop after initialization ; ; ; ; ; ;------Main Routine ; Main: ;------ADC------;\ ;Clear ADC Output registers first to ensure correct measurement banksel ADRESH;Select the bank that ADRESH is located clrf ADRESH ;clear output high banksel ADRESL;Select the bank that ADRESL is located clrf ADRESL;clear output low ;Actually Perform ADC banksel ADCON0;Select the bank that ADCON0 is located bsf ADCON0, GO_DONE;sets GO_DONE bit high enabling ADC btfsc ADCON0, GO_DONE;checks GO_DONE, if low the next line is skipped goto $-1;this is a loop, if GO_DONE is low (ie. ADC is complete) program returns to previous line ;------Send data in A/D registers to Serial------; ;---Note:Data to transmit must be in W register--; TXDATA: ;---Send ADRESH-----; banksel TXSTA bsfTXSTA,TXEN;Transmit enabled bit TXEN(TXSTA ) set, this enables transmission banksel ADRESH movfADRESH, W;put data located in ADRESH into working registry bankselTXREG movwfTXREG;Store ADRESH data in TXREG initializing transmission

PIC Programming (cont) movlwb' ';waste time in order to allow TRMT (status bit) to change so we can pole it movlw b' ';waste more time WaitHerebtfssTXSTA,TRMT;transmit complete if bit TRMT(TXSTA ) is high goto WaitHere;sending not done, go back through loop banksel TXSTA bcfTXSTA,TXEN;clear transmit enabled bit when finished ;---Send ADRESL-----; banksel TXSTA bsfTXSTA,TXEN;Transmit enabled bit TXEN(TXSTA ) set, this enables transmission banksel ADRESL movfADRESL, W;put data located in ADRESL into working registry bankselTXREG movwfTXREG;Store ADRESL data in TXREG initializing transmission movlwb' ';waste time in order to allow TRMT (status bit) to change so we can pole it movlw b' ';waste more time WaitHere2btfssTXSTA,TRMT;transmit complete if bit TRMT(TXSTA ) is high goto WaitHere2;sending not done, go back through loop banksel TXSTA bcfTXSTA,TXEN;clear transmit enabled bit when finished ;------Wait 30's to take another measurement and send data------; ; Delay Loop ; ; Instructions occure every 1/f ; ;This code segment defines how many times to run the delay loop movlw 0xFF;Put the value of 85h in the working register (85h is a value) movwf 09h;Move this value to the 09h register (09h is a register) COUNT2 equ 09h;09h defines how many times to run COUNT1 delay loop movlw 0xFF;Put the value of 85h in the working register (85h is a value) movwf 07h;Move this value to the 09h register (09h is a register) COUNT3 equ 07h;09h defines how many times to run COUNT1 delay loop

PIC Programming (cont) LABEL3: movlw 0xFF;Put the value of FFh (255) in the working register (FFh is a value) movwf 08h;Move this value to the 08h register (08h is a register) COUNT1 equ 08h ;Now COUNT will equal the value 85h LABELDECFSZCOUNT1,1;Decrease COUNT1 by 1 from 255, if COUNT1=0 skip next line and continue goto LABEL;COUNT1 is not 1 therefore go to LABEL DECFSZ COUNT2,1;Decrease COUNT2 by 1 from 09h, if COUNT2=0 skip next line and continue goto LABEL3;if COUNT2 is not 0 therefore re-run delay loop another time DECFSZ COUNT3,1;Decrease COUNT2 by 1 from 09h, if COUNT2=0 skip next line and continue goto LABEL3;if COUNT2 is not 0 therefore re-run delay loop another time goto Main ; ; end

Wireless Communication Wireless communication utilizes Zigbee protocol Zigbee: a) Was a design requirement b) Requires minimal power c) Easy to use d) Is becoming a standard

Zigbee Module Includes MAC address Straight-forward interface More standardized than other modules

Network Topology Due to low power of Zigbee modules a mesh network is utilized to increase reach of our network We are planning ahead for an increased number of devices in the future Zigbee modules work with other device brands

Installation Location

Installation (cont) Equipment Standards Expandability

Serial Communications Built in Java Event Driven USB to Serial

Testing Communications PC Settings Communications Check Modem Configuration

Data Storage Relay data to a MySQL database Programs Needed PHP/Script Interaction Expandability

Visualization Google API Select and Zoom Feature

Project Evolution PrototypeFinal Product

Project Evolution PrototypeFinal Product

Sources

Questions?