Sunteți pe pagina 1din 12

1EX3: 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: ___________


1st review due date: ________________

DUE DATE: ________________


STUDY TIME:

Group work Classroom and


laboratory sessions
Study time
(in hours)

Individual

Sessions out of
classroom

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.

Todays date: __________________

Active members

Roles: (reporter, simulator, etc.)

(1) ________________________________________

_______________

(2) _________________________________________

_______________

(3) _________________________________________

_______________

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.)

3EX3: 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

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. Lets 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
-15C to +45C.
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 courses specific and cross-curricular learning objectives 1:

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 dentrenament per programar els microcontroladors i verificar
el funcionament definitiu de laplicaci.

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

5EX3: 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.

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

c)

Analogue signal conditioning in PSoC

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.

Fig. 4 the CY8C29466-24PXI chips A/D integrating converter

7EX3: An outdoor digital thermometer based on PSoC

e)

1.8

Implement the project to acquire the analogue signal and represent it in the LCD display as a binary or
hexadecimal value.

Design a data acquisition system to measure temperature

f) Design a -15 C to + 45C 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

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 PSoCs.

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 PSoCs.
[retrieved 11/2012]

[4]

AN2239. PSoC 1 Selecting The Right ADC

[5]

AN2096. PSoC 1 - Using the ADCINC Analog to Digital Converter

[6]
[7]

9EX3: An outdoor digital thermometer based on PSoC

- Before delivering the exercise Remember to add your own sources and references

EETAC ISECI: Instrumentation and Electronic Systems in Smarts Cities

10

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

Folders

<dropbox>/EX3/Sensor_
and_conditioner/

<dropbox>/EX3/A
_D_conversion/

<dropbox>/EX3/Digit
al_thermometer/

A_D_conversion.c

Digital_thermometer.
c

Alberto

Helena

Pere

Number
name
of
source files
Engineer
charge

and
the
in

1. Specifications
2.
Plan
3. Development
4. Simulation
5.
Board
prototyping

v
x
x
x

Marks

1.12 Grading grid


Here you are the way the exercise could be grades.
Sensors and
conditioning

a, c, c

signal

A/D converter

d, e

Design
of
application

complex

Tota
l

EX3: An outdoor digital thermometer based on PSoC


11

Scores

1p

4p

5p

Self-assessment
Instructors
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. Its 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.

12

EETAC ISECI: Instrumentation and Electronic Systems in Smarts Cities

S-ar putea să vă placă și