SD Card Data Logger Senior Design II Final Presentation April 21, 2011.
-
Upload
gertrude-bailey -
Category
Documents
-
view
219 -
download
0
Transcript of SD Card Data Logger Senior Design II Final Presentation April 21, 2011.
![Page 1: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/1.jpg)
SD Card Data Logger
Senior Design II
Final Presentation
April 21, 2011
![Page 2: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/2.jpg)
TEAM
Team Advisor:
Dr. Patrick Donohoe
James Felkins (EE) Team Leader, Web Design,
Test Board
Harry Corey (EE)
Test Cases, Hardware Design, Part Procurement
Brendan Babiak (EE)
Prototype Construction, Buffering Scheme, MDDFS
Jaron Martin (CPE)
Command Set, SPI/UART Input, MDDFS
![Page 3: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/3.jpg)
OUTLINEIntroduction to Project• problem/solution• tech./practical constraints
System Overview• high-level system design• software solutions
Hardware Design• power• PCB
Testing• subsystems• features
Questions
![Page 4: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/4.jpg)
WHAT IS THE S-DRIVE?
The S-Drive is an OEM module that accepts data through a serial connection and saves it to an SD card.
![Page 5: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/5.jpg)
THE PROBLEM
SD cards are a viable storage medium with unique advantages but involve complex overhead.
![Page 6: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/6.jpg)
SOLUTION
The S-Drive will handle the unwanted overhead and make SD cards a more desirable solution.
![Page 7: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/7.jpg)
TECHNICAL CONSTRAINTS
Name Description
Communication The device uses UART and SPI data connections.
VoltageThe device supports an input voltage between 3.3 or 5 V.
Current DrawThe device draws a maximum current of 250 mA in active mode and less than 10 uA in sleep mode.
Storage MediumThe device interfaces with a standard size, 32 x 24 x 2.1 mm SD card.
Memory The device supports all SD cards up to 32 GB.
![Page 8: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/8.jpg)
PRACTICAL CONSTRAINTS -
ECONOMICThe device must cost less than $60.
Competitor Price
VDRIVE2 $24.50 [4]
Logomatic v2 $59.95 [3]
Avisaro M20511 99.00 € (~$133) [2]
[2]
[4][3]
![Page 9: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/9.jpg)
PRACTICAL CONSTRAINTS - MANUFACTURABILITYThe device must easily fit and integrate into other systems.
•Provided on a PCB
•No larger than 5 in2
•Easily mountable
![Page 10: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/10.jpg)
SYSTEM OVERVIEW
![Page 11: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/11.jpg)
SYSTEM OVERVIEWSoftware Implementation
-Microchip’s MDDFS library
-Command Interface
![Page 12: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/12.jpg)
SYSTEM OVERVIEWSize constraint met
![Page 13: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/13.jpg)
SYSTEM OVERVIEWCommand Set
Open File for Append
1 Opens the file LOG1.TXT for appending. Only use if no file is currently open. Returns 1 if successful, else returns error code. Creates the file if it does not exist.
a
Open File for Read
1 2 - ? File name followed by \n character to represent the end of the name. File pointer will start at the beginning of the file. Use only if no file is currently open. Returns 1 after each byte if OK, else returns error code.
o File Name
Close File
1 Closes the file so that another file can be opened or the SD Card can be safely removed. Use only if a file is open in either write or read mode. Returns 1 if successful, else returns error code.
c
Write Data1 2 3 - [4-257] The S-Drive will append the next NumBytes received to the end of the file. Use only
if the file is opened in write mode. Returns 1 after each byte if OK, else returns error code.w # of Bytes Data
Read Data
1 Each time the r command is is received, the next byte in the file is returned and the file pointer moves one by byte. Use only if the file is opened in read mode. Returns the next byte in the file. If at EOF, starts over at beginning of file.
r
Move Read Pointer
1 2 Moves the read pointer NumBytes without replying with each byte of data. Use only if file is open in read mode. Returns 1 if sucessful, else returns error code.m # of Bytes
Flush Buffer
1 Flushes the write buffer. Use to flush the buffer if you do not want to wait for the buffer to automatically get written. Use only if file is open in write mode. Returns 1 if successful, else returns error code.
f
Sleep1
Forces the S-Drive to enter sleep mode.s
Big File1 2 - ? ? Allows for long or unknown lengths of data to be written to SD card. Use only if the
file is opened in write mode. Returns 1 after each byte if OK, else returns error code. End this command by sending a NULL byte.
b Data NULL
![Page 14: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/14.jpg)
SENDING LARGE FILES
Data size not pre-specified•Binary files may contain all possible byte values•Toggle wake pin to signal EOF
![Page 15: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/15.jpg)
INTERFACE MODESSPI & UART
•multiple baud rates•config.txt file•jumper determines mode
![Page 16: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/16.jpg)
BUFFERING SCHEMEFlow Control
•2.3 kB each buffer•READY pin
![Page 17: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/17.jpg)
WHILE INACTIVEEnters ‘Sleep Mode’
•Enters mode via SLEEP command•Dedicated WAKE signal•Uses READY pin while re-initializing SD card
![Page 18: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/18.jpg)
HARDWARE DESIGN & TESTING
![Page 19: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/19.jpg)
HARDWARE INTERFACE
8 wires•UART/SPI TX & RX use same lines
![Page 20: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/20.jpg)
SCHEMATIC
![Page 21: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/21.jpg)
SD CARD SOCKETStandard-sized SD cards
•Supports adapters for mini- and micro- SD cards
![Page 22: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/22.jpg)
POWER SUPPLYAccepts 3.3 and 5 V inputs
•Power mode determined by jumper•5 V mode uses a low-dropout LR
![Page 23: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/23.jpg)
POWER SUPPLYCurrent draw
•SD card has own power rail•SD card is uses ~250uA while inactive•Sleep mode cuts power to SD card•Implemented with a low-dropout LR
![Page 24: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/24.jpg)
POWER AND CURRENT DRAW (SPI)
Power (V) Inactive Current Draw (mA)
Active Current Draw (mA)
Sleep Current Draw (uA)
Constraint Met?
3.3 19.2 68 4.60 Yes
5 19.4 73 69.5 N/A
![Page 25: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/25.jpg)
POWER AND CURRENT DRAW (UART)
Baud Rate Power(V) Inactive Current Draw (mA)
Sleep Current Draw (uA)
28800
3.3 18.6 8.8
5 18.7 74.0
57600
3.3 18.6 8.9
5 18.7 74.1
115200
3.3 18.6 8.9
5 18.7 74.1
![Page 26: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/26.jpg)
PCBPractical Constraints
•Small•Affordable parts•Mountable
![Page 27: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/27.jpg)
PCBIssues
•Disjoint ground planes•SPI buses fused•Issues corrected for web-site
![Page 28: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/28.jpg)
SYSTEM TESTING
![Page 29: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/29.jpg)
TEST-BOARD
![Page 30: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/30.jpg)
SUBSYSTEMS– SPISPI Master SPI Slave
Logic Analyzer
![Page 31: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/31.jpg)
SUBSYSTEMS– UART
Logic Analyzer
Realterm
![Page 32: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/32.jpg)
FULL SYSTEM TESTING
Operational modes• 8 possible combo’s
![Page 33: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/33.jpg)
TESTING - GUI
![Page 34: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/34.jpg)
TESTING - GUIPython Tool
• Handles semantics• Very slow• Used to test robustness• Better demo
![Page 35: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/35.jpg)
TESTING – LARGE FILESReading large file from SD card
• Took appx. 1 hour w/ Python tool for 20kB• File perfectly copied• Testing done in all modes• ~3.5 kbps reading and writing
![Page 36: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/36.jpg)
TESTING – LARGE FILES
![Page 37: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/37.jpg)
TESTING – REAL THRU PUT
Sending/Receiving a large file:• Intermediate MCU sends 5 million chars• Data rate ~15kB/s
![Page 38: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/38.jpg)
TESTING – COMMAND SYNTAX
Command Functions• All functions do their job• Improper commands are ignored (no crash)
![Page 39: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/39.jpg)
PRODUCT COST
![Page 40: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/40.jpg)
FINAL PRODUCT PERFORMANCE
Issue Constraint Actual Spec Met?
Comm. Interface UART & SPI UART & SPI
Voltage 3.3 & 5 (V) 3.3 & 5 (V)
Current Draw <10 uA (sleep) ~4.5 uA
Storage Medium Standard SD Standard SD
SD Card Size Up to 32 GB Up to 32 GB
![Page 41: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/41.jpg)
REFERENCES[7] Microchip, “PIC24F Family Reference Manual, Sect. 21 UART,” Microchip Technology Inc., January 26, 2010. [Online] . Available: http://ww1.microchip.com/downloads/en/DeviceDoc/en026583.pdf. [Accessed September 14, 2010].
[8] Microchip, “PIC24F Family Reference Manual, Sect. 23 Serial Peripheral Interface (SPI),” Microchip Technology Inc., March 22, 2007. [Online] . Available:http://ww1.microchip.com/downloads/en/DeviceDoc/39699b.pdf. [Accessed September 14, 2010].
[9] STEC, “SLDSxxxBS(I)U Data Sheet,” STEC Inc., March 2008. [Online] . Available: http://www.stec-inc.com/downloads/flash_datasheets/SLSDxxxB_I_U61000-05203.pdf. [Accessed September 14, 2010].
[10] Sparkfun Electronics, “Logomatic v2 Serial SD Datalogger,” On-Line Store,2010.[Online].Available:http://www.sparkfun.com/commerce/product_info.php?products_id=8627. [Accessed:September 14, 2010].
[11] C-ONE Technology Corp., “Wide Temperature Industrial SD Card Product Specification,” May 2010. [Online]. Available: http://www.psism.com/c-1sd.pdf. [Accessed: September 14, 2010].
![Page 42: SD Card Data Logger Senior Design II Final Presentation April 21, 2011.](https://reader035.fdocuments.in/reader035/viewer/2022062409/5697bfc61a28abf838ca760b/html5/thumbnails/42.jpg)
QUESTIONS?