200 likes | 375 Views
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?.
E N D
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 systemwhich collects data(temperature and skin resistance) from a person and creates influence(light and sound) on it accordingly, minimizing user interface
System description PIC Microcontroller I2C Temperature sensor Skin resistance circuit A/D UART Control PWM Influence 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 • 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 5 I/O ports PWM module UART module MSSP module A/D
System components • Demo board • Buzzer-sound source • Led’s –light source • To perform connection • to PC RS-232 port with • serial communication • hardware are used Buzzer PWM PIC I/O ports pins RS-232 connector and support hardware Led’s
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 ADD1 (Input) TMP 100 SCL 1 3 To I2C controller ADD0 (Input) 6 5 SDA 2 There are pull up resistors connected to SCL and SDA lines
Connecting T sensor to PIC ADD1 PIC Tsensor I/O port ADD0 MSSP module in I2C mode A/D Temperature register SDA I/O port C with I2C pins SCL SDA: digital temperature data SCL: serial clock TMP100 resolution : 12 bits (up to 0.0625 C) with conversion rate 3 samples/s
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 Amplifier circuit with selectable gain PIC Measurement borders: 15 Ohm – 300 kOhm
Current source circuit Vman V2 1/5*Vdd S1 Vdd S2 Amp S3 200k 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 PIC S4 S5 S6 S7 S8 A/D Amp 20k 40k 80k 200k 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 I PIC A/D I/O port A with analog input pins R V Amp 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 RS-232 Serial port COM port PC UART module I/O port pins 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 Receiving answer(UART) and running buzzer and led’s (demo board) Switches control 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 PICPC 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