Final Presentation - High Speed Digital Systems Laboratory

Download Report

Transcript Final Presentation - High Speed Digital Systems Laboratory

Technion-Israel Institute of Technology
Electrical Engineering Department
High Speed Digital Systems Laboratory
Project subject: wireless biofeedback system
Performed by:
Yarovoy Boris
Krassowizki Alexander
Instructor:
Sinyuk Konstantin
What is Biofeedback?
The principle of biofeedback is to collect
data about person’s emotional state and
to perform appropriate actions
accordingly to this state.
Also it can be used to influence on the
people, to force certain mental and
physical state.
Project objective
Building of Biofeedback system which
collects data(temperature and skin
resistance) from a person and creates
influence(light and sound) on it
accordingly, minimizing user
interface
System description
Temperature
sensor
Skin resistance
circuit
Influence
I2C
PIC
Microcontroller
A/D
Control
PWM
UART
PC
System components
• Digital temperature sensor of TI TMP100
with I2C interface
• Skin resistance circuit (self built):
TI amplifiers,TI analog switches
• Microchip microcontroller PIC18f452
with I2C interface (with demo board)
• Sound and light sources :
LED’s and buzzer on PIC demo board
• PC
System components
• PIC microcontroller
PIC
PWM module
5
I/O
ports UART module
A/D
MSSP module
•MSSP used as I2C interface
•MPLAB2 module for debugging
•C-compiler with support C
functions for programming
PIC peripherals
•Evaluation board with LED’s
and buzzer
System components
• Demo board
PWM
PIC
I/O ports
pins
RS-232 connector
and support hardware
Buzzer
Led’s
•Buzzer-sound source
•Led’s –light source
•To perform connection
to PC RS-232 port with
serial communication
hardware are used
Components description
• Temperature sensor
The TMP100 require no external
components for operation except for
pull-up resistors (10 kOhm) on SCL,
SDA (I2C interface pins), although a
0.1uF bypass capacitor is
recommended.
Vdd
Temperature
sensor .
0.1uF
4
SCL
1
To I2C
controller
SDA
3
TMP 100
6
ADD1
(Input)
ADD0
(Input)
5
2
There are pull up
resistors connected
to SCL and SDA lines
Connecting T sensor to PIC
T sensor
ADD1
ADD0
A/D
Temperature
register
SDA
SCL
PIC
I/O port
I/O port C
with I2C
pins
SDA: digital temperature data
SCL: serial clock
TMP100 resolution : 12 bits (up to 0.0625 C)
with conversion rate 3 samples/s
MSSP
module
in I2C
mode
Connecting T sensor to PIC
ADD0 and ADD1 lines used to select T-sensor
address on I2C bus.They received from I/O pins
of PIC.
Data is sent in 2 bytes (12 bits value).
For programming MCC18 compiler library
functions are used (I2C interface and I/O ports
configuration)
I2C interface implemented in MSSP module of
PIC working in I2C mode
Components description
• Skin Resistance Circuit
• Current up to 16 uA flows through human’s
fingers and voltage difference between
fingers is measured
• AC current is preferred for it reduces
changes to human’s tissue
• After voltage is measured it is amplified
and transmitted to PIC
Skin resistance circuit
Voltage value
Current
source
circuit
men
Measurement borders: 15 Ohm – 300 kOhm
Amplifier circuit
with selectable
gain
PIC
Current source circuit
Vman
V2
1/5*Vdd
S1
Vdd
S2
200k
Amp
S3
Iout
3/5*Vdd
V3
Iout=(V3-V2)/200K
AMP - TI’s instrumentation amplifier
Sx – TI’s bi-directional analog switch:
control switches’ pins connected to I/O ports pins of PIC
‘0’=OFF ,’1’=ON
S1 and S2 need to change current direction
S3 need to allow or stop current through a man
Amplifier circuit
S4
20k
S5
40k
S6
80k
S7
200k
S8
PIC
Amp
A/D
400k
Vman
The gain of amp. depends on resistance value connected to it
To select appropriate resistance switches are used
Circuit allows 5 gains: 1,2,5,10,20
Connecting resistance circuit to PIC
PIC
I
R
V
Amp
I/O port A
with analog
input pins
A/D
A/D result is signed 10 bit
Programming of A/D hardware and switches of resistance circuit
is done with MCC18 compiler A/D functions and definitions
Connecting PIC to PC
Demo board
PIC
UART
module
I/O port
pins
RS-232
Serial
port
COM
port
PC
To enable connection on PC Visual Studio functions for usage
of communication devices are used
On PIC UART module used for serial communication
(MCC18 UART module C functions)
Flow of data and control
T and R
measurements
Switches
control
Receiving
answer(UART)
and running
buzzer and led’s
(demo board)
Gain
adjusting
PIC receives
data with I2C
interface and
A/D
Influence
Algorithm
(on PC)
Sending data
to PC with
UART module
RS-232 serial port
Project status
Accomplished:
•building and testing resistance circuit
•learning different modules(software)
•receiving resistance data on PIC
To be done:
•to accomplish receiving temperature on
PIC
•to accomplish serial connection PICPC
•run and test overall system
Schedule
Finish temperature measurement -26.10
Finish PIC  PC connection – 3.11
Ensemble overall system-10.11
Debug the system – 15.11