psoc
-
Upload
leti-gimenez-gasca -
Category
Documents
-
view
212 -
download
0
description
Transcript of psoc
EX3: An outdoor digital thermometer based on PSoC
INSTRUMENTATION AND ELECTRONIC SYSTEMS IN SMART CITIES
Chapter 2: Embedding analogue circuits into PSoC devices EX3
An outdoor digital thermometer based on PSoC
1.1 Cooperative group
TEAM NUMBER: ___________
DUE DATE: ________________ 1st review due date: ________________
STUDY TIME:
Study time
(in hours)
Group work Classroom and laboratory sessions
Sessions out of classroom
Individual Student 1
Student 2
Student 3
STATEMENT:
My signature below indicates that I have (1) made equitable contribution to EX1 as a member of the group, (2) read and fully agree with the contents (i.e., results, conclusions, analyses, simulations) of this document, and (3) acknowledged by name anyone outside this group who assisted this learning team or any individual member in the completion of this document.
Today’s date: __________________
Active members Roles: (reporter, simulator, etc.)
(1) ________________________________________ _______________
(2) _________________________________________ _______________
(3) _________________________________________ _______________
1
EETAC – ISECI: Instrumentation and Electronic Systems in Smarts Cities
Acknowledgement of individual(s) who assisted this group in completing this document:
(1) _______________________
(2) _______________________
1.2 Abstract
Explain here the most significant developments, results or conclusions about the exercise. Use the remaining space in this sheet (200 words maximum).
(This section is mandatory. You must complete it in order to get a mark.)
2
EX3: An outdoor digital thermometer based on PSoC
CONTENT
An outdoor digital thermometer based on PSoC........................................................................................1
1.1 Cooperative group.....................................................................................................................................1
1.2 Abstract.....................................................................................................................................................1
1.3 Description................................................................................................................................................3
1.4 Topics........................................................................................................................................................3
1.5 Introduction to PSoC Designer.................................................................................................................4
1.6 Analogue signal conditioning in PSoC.....................................................................................................4
1.7 Analogue to digital conversion in PSoC...................................................................................................4
1.7.1 PSoC A/D peripheral........................................................................................................................4
1.8 Design a data acquisition system to measure temperature........................................................................5
1.9 Problem solution.......................................................................................................................................6
1.9.1 Project 1: Sensor conditioner (heading 3).......................................................................................6
1.9.2 Project 2: Analogue to digital conversion........................................................................................6
1.9.3 Project 3: Digital outdoor thermometer...........................................................................................6
1.10 References.................................................................................................................................................6
1.11 Study plan to solve the exercise................................................................................................................7
1.12 Grading grid..............................................................................................................................................7
1.13 Questions...................................................................................................................................................7
1.14 Improvements to the exercise based on the review and correction...........................................................8
3
EETAC – ISECI: Instrumentation and Electronic Systems in Smarts Cities
1.3 Description
This exercise will present the basics of embedding analogue circuits into Programmable Systems on Chip (PSoC) devices from Cypress Semiconductor. The aim is to study the PSoC-1 device while adapting the outdoor thermometer conceived in Chapter 2 for the Microchip PIC18F4520 chip. Let’s study the particularities and differences with respect the other microcontrollers that we can find in Cypress PSoC. The applications will contain features like: sensor conditioners and amplifiers, analogue to digital converters, FSM-programming style, interrupts, pushbuttons and LCD displays to represent temperature measurements within the range from -15ºC to +45ºC.
We will proceed in three steps:
(1) Study the design Cypress design environment: PSoC Designer. Run an example project.
(2) Implement analogue circuits like the sensor signal conditioner into PSoC device.
(3) Implement the A/D converter using a FSM approach. Reproduce the application from EX2 in a single PSoC chip.
1.4 Topics
The following topics have been listed from the course’s specific and cross-curricular learning objectives1:
Dissenyar sistemes incrustats senzills usant eines EDA professionals com ara PSoC Designer de Cypress, programant les aplicacions en llenguatge C.
Usar plataformes de simulació i targetes d’entrenament per programar els microcontroladors i verificar el funcionament definitiu de l’aplicació.
After studying Chapter 2 and successfully completing all the assignments in this task, you will be able to:
1. Design a suitable conditioner for a temperature sensor like the LM35 and embed it into a PSoC microcontroller.
2. Plan and develop a PSoC-based application to acquire analogue signals using A/D converter, timer, interrupts, and the FSM programming style to control the program.
3. Process digital data in C language to obtain meaningful measurements representing them in a LCD display.
1 https://eetac.upc.edu/ca/fitxers/Juny.2012_Opta_EEL_V2.pdf
4
EX3: An outdoor digital thermometer based on PSoC
Fig. 1 Example of a signal acquisition system using PSoC. The key feature of this device is the possibility to program not only the classical digital peripherals, but analogue blocks as well.
1.5 Introduction to PSoC Designer
a) Install the software PSoC Designer and PSOC and run a demonstration project to verify that everything is correct in your computer. Explain the main features of the last release of the software. Do the software import projects from previous editions?
b) Infer the block diagram of your outdoor digital thermometer after reading and studying some application notes and videos from Cypress to grasp the PSoC way. For instance:
1. PSoC Today! Temperature Measurement Part I
2. PSoC Today! Temperature Measurement Part II
3. AN2017 - PSoC® 1 Temperature Measurement with Thermistor.
5
EETAC – ISECI: Instrumentation and Electronic Systems in Smarts Cities
Fig. 2 Picture of an example project report of a “Weather monitoring and instrument control using PSoC” found in internet.
1.6 Analogue signal conditioning in PSoC
c) Reproduce your signal conditioner circuit from EX2, the one which adapts the -15 to + 45 º C temperature range to a voltage span from 0V to +5V. The circuit which was simulated in Proteus. The system has to have a single 5V power supply. Compile, download and execute the project in the PSoC EVAL 1 board. Simulate the 600 mV voltage span from the sensor using a power supply or a variable resistor circuit which simulates the real LM35 sensor.
Fig. 3 The PSoC analogue block
1.7 Analogue to digital conversion in PSoC
1.7.1 PSoC A/D peripheral
d) Explain how the integrating A/D architecture in Fig. 4 works. How many clock pulses are required to perform a data conversion? Which is the maximum signal bandwidth if a 10 bits conversion is required and the CLK signal comes from a 12 MHz oscillator? Read the application notes [4] and [5] to better understand the way the analogue to digital converters work.
6
EX3: An outdoor digital thermometer based on PSoC
Fig. 4 the CY8C29466-24PXI chip’s A/D integrating converter
e) Implement the project to acquire the analogue signal and represent it in the LCD display as a binary or hexadecimal value.
1.8 Design a data acquisition system to measure temperature
f) Design a -15 ºC to + 45ºC thermometer with an LCD display using the PSoC CY8C29466-24PXI microcontroller. The device has to represent the actual temperature and the mean temperature value over a period of 10 s. Sampling rate is 2 Hz.
Do not modify the text from page 3 to page 5
7
EETAC – ISECI: Instrumentation and Electronic Systems in Smarts Cities
1.9 Problem solution
1.9.1 Project 1: Sensor conditioner (heading 3)
Installing the software (heading 4)
Your first picture is Fig. 5. (normal text)
Fig. 5 Example of caption (caption style)
This cross-reference [3] is a reference to a web page and this one [2] is the reference to a book on PSoC’s.
1.9.2 Project 2: Analogue to digital conversion
Your text.
1.9.3 Project 3: Digital outdoor thermometer
Your text.
1.10 References
Modify or add new references to this section. Follow the same format.
[1] http://digsys.upc.es . Here, in Chapter 5 units you will find information on PSoC and programming examples from previous semesters. [retrieved 11/2012]
[2] Ashby, R., “Designer's Guide to the Cypress PSoC”, Newnes, 2005.
[3] http://www.cypress.com/ . All the information you need to study and program applications using PSoC’s. [retrieved 11/2012]
[4] AN2239 . PSoC® 1 Selecting The Right ADC
[5] AN2096 . PSoC® 1 - Using the ADCINC Analog to Digital Converter
[6]
[7]
8
EX3: An outdoor digital thermometer based on PSoC
- Before delivering the exercise Remember to add your own sources and references
9
EETAC – ISECI: Instrumentation and Electronic Systems in Smarts Cities
1.11 Study plan to solve the exercise
Establish a study plan, a task distribution scheme and other requirements to succeed in producing a good solution when working cooperatively: flux diagrams, concept maps, schematics, tables, pictures, etc.
(This section is mandatory. It must be filled in order to get a mark.)
Gxx Project
Analogue sensor & signal conditioner
Analogue to digital signal acquisition
Thermometer
Sections a), c), c) d), e) f)
Folders <dropbox>/EX3/Sensor_and_conditioner/
<dropbox>/EX3/A_D_conversion/
<dropbox>/EX3/Digital_thermometer/
Number and name of the source files
A_D_conversion.c Digital_thermometer.c
Engineer in charge Alberto Helena Pere
1. Specifications2. Plan3. Development 4. Simulation
5. Board prototyping
v
v
x
x
x
v v
Marks
1.12 Grading grid
Here you are the way the exercise could be grades.
Sensors and signal conditioning
A/D converter Design of a complex application
Total
a), c), c) d), e) f)
10
EX3: An outdoor digital thermometer based on PSoC
Scores 1 p 4 p 5 p
Self-assessment
Instructor’s grades
Do not forget to annotate your own self-assessment before uploading the exercise at your site.
1.13 Questions
Write here your questions, comments, doubts, opinions, etc. Add more sheets if necessary to report your progress or comments though the exercise.
[Add something here. It’s impossible to deeply understand everything in this complex subject!] Use this space to reflect and conclude about the course/exercise or whatever related to the content…
1.14 Improvements to the exercise based on the review and correction
This is an optional section in which you can add anything you like based on the corrections. This section must also be discussed orally with instructors.
11
EETAC – ISECI: Instrumentation and Electronic Systems in Smarts Cities
12