This document provides an overview of a mini project on developing a USB temperature logging system. The objectives are to use a USB development kit to program a system that can collect temperature samples, manipulate the data, and display it in text or graphic formats. The system needs to measure temperatures from -50°C to 150°C with at least 0.5°C resolution. The document outlines the module format, tasks for different project days, lectures on relevant topics like temperature sensors and USB protocols, and resources to support the project development.
Z Score,T Score, Percential Rank and Box Plot Graph
Mini Project- USB Temperature Logging
1.
2.
3. During this mini project the design of a temperature acquisition system is to be considered. In order to design this system the following subjects need to be considered: • What type of sensor can be implemented for a specific application • What is a data acquisition system and how can it be constructed? • How to acquire, analyse and present measurements o the user. The temperature system you are going to design should be able to measure temperatures from ?°C and up to ?°C and have a resolution of at least ?°C.
4. 3 weeks 3 weeks 3 weeks General Module Introduction Project 1 Project 2 (USB temperature logging) Project 3
5.
6.
7.
8.
9.
10.
11. • Features for the LM35 • Calibrated directly in Celsius(centigrade) • Linear +10.0 mV/°C • 0.5°C accuracy • Rated for full -55°C to +150°C range. • Suitable for remote applications • Operates from 4 V to 30 V • Less than 60 μA current drain • Low self-heating 0.08°C in still air • Nonlinearity only 1/4°C typical • Low impedance output, 0.1 Ω for 1 mA Load
12. Most computers have at most two RS232 serial ports, and they are relatively slow. Devices that needed faster connections came with their own interface cards, which had to fit in a card slot inside the PC’s case. Unfortunately, the number of card slots is limited and installing the software for some of these cards is far from trivial. The main goal for the USB is to resolve all of these headaches. The Universal Serial Bus offers a single, standardized, easy-to-use way to connect up to 127 devices to a computer!!
13. Many USB devices come with their own build-in cable, and the cable has either an A-type connection on it or there is a socket on the device that accepts a B-type connector (both types are shown below). A-type connector “ Upstream” PC side B-type connector “ Downstream” Devise side
14. PC is acting as the host • Up to 127 devices can connect to the PC. • Individual USB cables can run as long as 5 meters. • USB 2 supports a maximum data speed rate of 480Mb/sec. (Supported speeds are: 1.5, 12 and 480 Mb/sec). A USB cable has two wires for power and a twisted pair of wires to carry the data (shown below). Red: +5 Volts White: Data Black: Ground Green: Data 01992 451101
15. • USB devices are “hot”-swappable, which means that they can plug and unplug to the bus at any time. • On the power wires, the computer can supply up to 500 mA of power at 5V. • High-power devices have their own power supplies and draw minimal power from the bus. • Hubs can have their own power supplies to provide power to devices connected to the hub. • Many USB devices can be put to sleep by the host computer when the computer enters a power-saving mode.
16.
17. As devices are enumerated, the PC is keeping track of the total bandwidth that all of the isochronous and interrupt devices are requesting. They can consume up to 90 percent of the 480 Mbps of bandwidth that is available. After 90%is used up, the host denies access to any other isochronous or interrupt devices. Control packets and packets for bulk transfers use any bandwidth left over (at least 10%). The Universal Serial Bus divides the available bandwidth into frames, and the host controls the frames. Frames contain 1,500 bytes, and a new frame starts every millisecond. During a frame, isochronous and interrupt devices get a slot so they are guaranteed the bandwidth they need. Bulk and control transfers use whatever space is left.
18.
19. “ C# is a type-safe object-oriented language that enables developers to build a wide range of secure and robust applications that run on the .NET Framework. You can use C# to create traditional Windows applications, XML Web services, distributed components, client-server applications, database applications, and much, much more. Microsoft ® Visual C# 2005 provides an advanced code editor, convenient user interface designers, integrated debugger, and many other tools to facilitate rapid application development based on version 2.0 of the C# language and the .NET Framework.” 1 1 MSDN Microsoft Developer Network (MSDN) Visual Studio 2005 Library Microsoft® Visual C# Intro
20.
21. Integrated Developer Environment Microsoft® Visual C# Intro Toolbox Windows Form Designer / Code Editor Task List Solution Explorer Properties
22. In the designer, you use the mouse to drag , such as buttons and text boxes, onto a design surface that represents your form. The following illustration shows a combo box that has been dragged from the Toolbox window onto a form in the Windows Forms Designer. As you work visually, the designer translates your actions into C# source code and writes them into a project file called <name>.designer.cs where <name> is the name you gave to the form (Form1.cs in this example). When the application runs, that source code will position and size your UI elements so that they appear just as they do on the design surface. For more information, see Windows Forms Designer. Microsoft® Visual C# Adding Control Toolbox Windows Form Designer / Code Editor Task List Solution Explorer Properties
23.
24. Where to get more information on visual studio C# MSDN Visual Studio 2005 Library You can find further information on MSDN help files by looking it up on Microsoft® website. Microsoft® Visual C#
25. You will need to be familiar with the topics above and also be able to access the first 4 files (1, 2, 3 & 4) for future session of the mini project. Make sure you are familiar with topics 5, 6 and 7 as you will not have time to do them during the mini project future sessions Topics to Read Practice Progress 1 Review the Data sheet for the LM35 2 Review the Data sheet for the LM324 3 Review the “Manual_K8055_UK.pdf” manual and make sure you run the example programme for the USB kit. 4 Review the “Manual_UK_K8055_DLL” and familiarise yourself with the possible operation of the USB kit 5 Go through the “Creating and Application in c#.pdf” file. 6 Go through the “C# writing application.pdf” file 7 Create an application in c# to calculate sinusoidal values and display them via a textbox control. A timer control should be used during this step.