Presentation is loading. Please wait.

Presentation is loading. Please wait.

Wireless Communications

Similar presentations


Presentation on theme: "Wireless Communications"— Presentation transcript:

1 Wireless Communications
SmartCar Project – Engineering Problem #7 Team: Alt_Facts Team Leader:  Jared Long Hardware Specialist:  Adam Musingo Software Specialist: Brandon Lin Team Assistant: Tyler Harclerode

2 Overview Problem Statement ……………………………………………………...(3)
Hardware ………………………………………………………………….(4) Software …………………………………………………………………(10) Summary…………………………………………………………………..(23) Audience Questions ……………………………………………………….(25)

3 Problem Statement How to implement wireless data link from car to monitoring PC (one way communication).

4 Hardware – Block Diagram
Digi Int. XBee S1 RF Module Texas Instruments TXS0104E Voltage Level Translator

5 XBee RF Module By default, module operates in transparent mode.
This mode will be utilized for the Smart Car application. Two modules act as a wired serial line replacement. Hardware specifications Supply Voltage : 2.8V- 3.4V  USE 3.3V line!!!   DO NOT APPLY 5V!!!  TX current : 45 mA RX current : 50 mA Idle current : 50 mA Has an indoor range of 100' Additional breakout board required for mounting (provided). XBee RF module on  Breakout board

6 XBee RF Module

7 TXS0104E Voltage Level Translator
Acts as the 'middle man' between MCU and XBee. With 2 voltage levels applied, this unit will translate from one voltage level to the other and vice versa. VCCA < VCCB VCCA : wired to 3.3V VCCB : wired to 5V Constraints of the device VCCA : 1.65V-3.6V VCCB : 2.3V-5.5V Max Date Rate : 24 Mbps (Push Pull) 2 Mbps (Open Drain) OE (Output Enable) pin : wired to 3.3V.  This enables output.  

8 MCU Port Assignment Must use the MCU's Serial Communications Interface (SCI) found at Port E. E0 (TX) – Used to transmit serial data. E1 (RX) - Used to receive serial data. Wire the Port E pins to the 5V side of the Voltage Level Translator. DO NOT wire Port E pins directly to XBee Module.  The 5 V output signals from TX will damage the XBee Module due to Electrical Over Stress (EOS).

9 Schematic: How to Wire Blue : 3.3V Red : 5V Black : Ground Green : TX
Purple : RX

10 A Successful Message Capture
Software Overview The SCI Module Software Implementation Constants and Variables Library Functions Register Initializations for SCI Module RTC Module Reprogramming Helper Functions Assimilation The Transmission Function Transmission Verification A Successful Message Capture

11 The SCI Module Provides Serial Communication Consists of 8 Registers
Wired/Wireless Interface Consists of 8 Registers 2 Baud Rate Registers (SCIxBDH, SCIxBDL) 3 Control Registers (SCIxC1, SCIxC2, SCIxC3) 2 Status Registers (SCIxS1, SCIxS2) 1 Data Register (SCIxD) Features Adjustable Baud Rate Error Detection Using Parity Bits 8-Bit and 9-Bit Modes

12 Implementation - Constants and Variables
SCI Macro Definitions Move “irdata” Declaration from “read_irarray()” to Global Scope

13 Implementation - Library Functions
string.h void *memset(void *str, int c, size_t n) Additional String Functions char *strcat(char *dest, const char *src) size_t strlen(const char *str)

14 Implementation – SCI Register Initializations
SCI Baud Register 𝐵𝑈𝑆𝐶𝐿𝐾 9600 𝐵𝑎𝑢𝑑 = Write SCI1BDH, then SCI1BDL SCI Control Register 1 Bit 4 = 9-bit mode Parity Bit 1 = Parity Enable Bit 0 = Parity Type

15 Implementation – SCI Register Initializations (cont.)
SCI Control Register 2 Bit 3 = Transmit Enable Bit 2 = Receive Enable SCI Control Register 3 Bit 3 = Overrun Interrupt Enable Bit 2 = Noise Error Interrupt Enable Bit 1 = Framing Error Interrupt Enable Bit 0 = Parity Error Interrupt Enable

16 Implementation - RTC Module Reprogramming
Message Generation Frequency Approximately 4Hz Different from Baud Rate Timing Regulation TPM Modules (Prescaler & Modulus) Bus Clock - 16 MHz TPM1 - 1 MHz Interrupts TPM kHz Interrupts RTC - 2 Hz Polling

17 Implementation - RTC Module Reprogramming (cont.)
RTC Can Be Modified! To double the frequency, halve the period Original 500 modulus becomes 250 modulus Don’t forget to subtract 1! Adjust All RTC-Dependent Functions battery_compare() function Other Functions? Alternative Timing Methods

18 Implementation - Helper Functions Assimilation
Code is provided in note set #2

19 Implementation - The Transmission Function
Message Formatting Ordered sequence of character bytes Begins with “$SC” Comma delimited Message Terminator (\n)

20 Transmission Verification (PuTTY)
Plug base station into USB port of computer Determine what COM port the computer assigned to the base station (MaxStream PKG-U) Open Putty program (in ET apps folder) Click serial radio button and enter COM? in Serial line text box Click Open

21 Transmission Verification (PuTTY cont.)
This terminal will display what your base station is receiving The terminal will be used to correct errors and verify correct transmission. Shown is an example transmission from Smart Car 1

22 Transmission Verification (LabView)
LabVIEW provides a graphical user interface (GUI) Open Console.vi provided by Prof. Sumey Follow instructions shown in yellow box Click the arrow in the upper left corner to run

23 Summary Start by wiring the X-Bee into the Smart Car
Plug the base station into the computer and determine COM port Begin programming to send data via the X-Bee module in transparent mode Verify correct formatting with PuTTY terminal Run Console.vi to prove communications

24 References MCF51JM128RM. Denver, Colorado: Freescale Semiconductor Literature Distribution Center, 1 June PDF. Sumey, Jeff. “CET Microprocessor Engineering.” California University of Pennsylvania. Web. 18 Feb TXS0104E. Dallas, Texas: Texas Instruments Incorporated, 1 May PDF. XBee®/XBee-PRO® RF Modules. Minnetonka, MN: Digi International Inc, 23 Sept PDF.

25 Questions?


Download ppt "Wireless Communications"

Similar presentations


Ads by Google