added spectrometer driver's

master
mDescape 2 years ago
parent c96801418b
commit 3e9840f894
  1. BIN
      C7000 _SDK/C7000_SDK_V2_0.zip
  2. 2
      Code/Matlab/Visual_ClosedLoop_CalibrateStim.m
  3. BIN
      Code/Visual_Basic/C7000_Main/.vs/C7000_Test/v16/.suo
  4. BIN
      Code/Visual_Basic/C7000_Main/.vs/C7000_Test/v16/Server/sqlite3/storage.ide-shm
  5. 0
      Code/Visual_Basic/C7000_Main/.vs/C7000_Test/v16/Server/sqlite3/storage.ide-wal
  6. BIN
      Documents/Presentació_TFG_29-Juny.pptx
  7. 70
      Documents/Presentació_TFG_29-Juny_guió.txt

Binary file not shown.

@ -1,4 +1,4 @@
num_measures = 5; %Number of measures will be made in each cycle of the calibration
num_measures = 10; %Number of measures will be made in each cycle of the calibration
error_max = 1; %max error (in %) permited during calibration
iterations = 0;

@ -1,11 +1,8 @@
Hi,
I'm Miguel Descalzo Pérez and I am going to present the project done as my final's degree work.
A machine used to emit visual stimuli to patients with migraine. It is used in the context of a
A system used to emit visual stimuli to patients with migraine. It is used in the context of a
psychophysics research.
My tutor for this project has been José Maria Gómez Cama and my advisor in the Vall d’Hebron Institut de Recerca
has been Nara Ikumi.
(PASAR DIAPOSITIVA)
This project is born from the need of the group of Headache and Neurological Pain from the Vall d’Hebron
@ -26,32 +23,29 @@ Well, about the objectives of the project few things can be said.
The restrictions on the system have been basically two:
- It should be at least as good as the systems used in the previous studies.
- and It must not be able to induce any type of injury to the participants.
This means, the system needs a light source able to emit enough intensity, it should create accurate stimuli, and it
might need to incorporate precautions to prevent the creation of hazardous stimuli.
(PASAR DIAPOSITIVA)
In regards of the chosen solution for the system, I'd like to highlight the following aspects.
The stimuli presented are not randomly choosen, they are presented one ofter one according to a known phsychophysics
method. This system is using the SIAM method to choose which stimulus will be presented next. The SIAM method is what
is called an "adaptative method", which means the next presented stimulus will depend on the previous answers given
by the participant. There are other methods of presenting stimuli which could be implemented, but for now this is
the only method programmed whithing the system.
method. This is the SIAM method. It is what is called an "adaptative method", which means the next presented
stimulus will depend on the last answers given by the participant. There are other methods of presenting stimuli
which could be implemented, but for now this is the only method programmed whithin the system.
As a light soruce the system uses a video projector. The used device is clasified in the Risk Group 2,
according to the european standard of photobiological safety of lamps and lamp systems, which means it does not pose
any hazard to human vision when exposed to its light beam for 0.25s or less.
As a light soruce the system uses a video projector. The used device is clasified in the Risk Group 2, which
according to the european standard of photobiological safety of lamps and lamp systems, this means it does not pose
any hazard to human vision when exposed to its light beam for 0.25s or less. This is an important number for the
project.
To accurately measure the time the stimuli are on screen, the system uses a light sensor and a microcontroller
which comunicates to the main program if the last stimulus was presented for longer than 0.25s or not. If a
hazardous stimulus is detected, the test finishes itself up in order to prevent any retinal injuries.
In order to calibrate the stimuli generated, the system uses a spectrometer to read the light intensity which will
be received by the participants. Using the spectrometer, a transfer function from the stimuli generator function the
the illuminance received is found using a calibration script. With such transfer function the system
then generates the needed stimuli for the test.
be received by the participants. With the spectrometer, a transfer is found using a calibration script. With such
transfer function from the stimuli generator rutine to the the illuminance received, the system then generates the
needed stimuli for the test.
(PASAR DIAPOSITIVA)
@ -61,19 +55,18 @@ the system parts. The spectrometer, the light sensor and the projector.
(PASAR DIAPOSITIVA)
In this slide I'll give a brief explanation of the characteristics of each system's component. This is the
implementation made for the solution presented on the last slides.
In this slide I'll give a brief explanation of the characteristics of each system's component.
About the stimuli generated by the system, they are a white image, of diferent intensities projected for less
than 0.25s.
The spectrometer takes measures in an automatized maner. It is controlled by a Visual Basic program which also
comunicates to the main script in order to take orders from it and send back the measures made.
Since the comunication between the programs is build under the TCP/IP protocol, the spectrometer and the computer
runing the main program could easily be separated by some distance, giving the system a bit more of flexibility.
The spectrometer is controlled by a Visual Basic program which also comunicates to the main script in order to take
orders from it and send back the measures made. Since the comunication between the programs is build under the
TCP/IP protocol, the spectrometer and the computer runing the main program could easily be separated by some
distance and comunicate via a LAN or a WAN, giving the system a bit more of flexibility.
The light sensor has actally two parts, the light sensor itself and a microcontroller, which digitalizes the
sensor's output, measures the time past between the start of each stimulus and the end of it, and send an order
sensor's output, measures the time past between the start of each stimulus and the end of it, and sends an order
to finish the experiment in case a stimulus is detected to be on screen more than two hundred and twenty ms, in
order to prevent retinal injuries.
@ -85,17 +78,17 @@ information. Such information is necesary to keep track on the participants ID,
migraine patient or a control; in order to extract the results once the whole experiment is over.
It also is in charge of generating the diferent stimuli, presenting them according to the SIAM method and storing
the test results, to allow a later study of them.
Finally, it is also is aware of the information comming from the light sensor, in order to finish the test when
Finally, it is also is aware of the information comming from the light sensor, in order to finish the test if
a hazardous stimulus is detected, in order to prevent retinal damage.
(PASAR DIAPOSITIVA)
The stimuli generated by the projector are not static, they are associated whith an aleatory error which make its
illuminance change over time. In the worst case scenario caputred, the standard derivation of a stimulus was of only
illuminance change over time. In the worst case scenario found, the standard derivation of a stimulus was of only
6.3%, which is provably small enough to not be detected by the human eye.
When the system is calibrated, after 12h it keeps producing the desired stimuli precisely, within the same error
margin it produces them the first minutes after the calibration.
margin it had 12h prior.
Because the projector the system uses is a LED based one, the light beam is Pulse With Modulated. Because of this,
to detectd when a stimulus is on screen or not, the light sensor needs to average the readings taken. When such
@ -103,20 +96,21 @@ average is above 0.25V it interprets the stimulus is on screen and when it falls
it has finished.
In order to give the participants the instructions on how to perform the test, a screen is shown before it starts
starts where the instructions can be read.
where the instructions can be read.
(PASAR DIAPOSITIVA)
On this image we see the diferent readings made over 70 seconds (the blue circles) of the same stimulus.
On this image we see the diferent readings made of the same stimulus over 70 seconds (each blue circle).
The red line is the average of all the measures.
We can apreciate the furthes point is only 33 lux away from an average of 2513 lux.
We can also apreciate that the quantization error of the spectrometer in this range is of 10 lux
We can also apreciate that the quantization error of the spectrometer, which in this range is of 10 lux.
(PASAR DIAPOSITIVA)
In this next image we see the transfer function from the image generator to the stimuli illuminance.
The method of creating this image is the following: For each posible stimulus, present it on screen and perform
10 measures. Averge all the results. Save such average and also the maximum and minimum illuminance values measured.
10 measures. Averge all the results and then save such average and also the maximum and minimum illuminance values measured.
In this image, each circle is the average of one stimulus, and its error bars represents the maximum and minimum
illuminances found for it.
As can be seen, after the first 75 images the system has a liniar behaviour. It is also worth mentioning that the
@ -126,15 +120,16 @@ first section of the calibration curve has a negligible aleatory error.
The technical feasibility of the system is proven, since it's development is finished and it is functional.
Aditional improvements could be done if new needs arise, but for now the software it's finished.
If the Vall d'Hebton Research Institute would replicate the system, all they would need is to acquaire the hardware
If the Vall d'Hebton Research Institute would want to replicate the system, all they would need is to acquaire the hardware
specified in the technical report.
The total price of the hardware is 2 Thousand 7 hundred and 46 €. But some cheaper alternatives for the spectrometer
and the projector could be found, which are the pricier devices of the system. Lowering the total cost of the system.
and the projector could be found, which are the pricier devices of the system. Lowering the total cost of the it.
(PASAR DIAPOSITIVA)
Now, going back to the system's objectives. They are mainly archeived. The experiment will start in the following
weeks and then it will be seen if the system needs any improvement.
Now, going back to the system's objectives.
They are mainly archeived.
The experiment will start in the following weeks and then it will be seen if the system needs any improvement.
We wanted a system able to produce at least 23 thousand lux and it can generate a illuminance of over 35 thousand
lux at 50cm of distance.
The system has a minimum sensibility of 0.6 lx/step but in most of its range it has a sensibility of around 140
@ -145,9 +140,8 @@ less often.
As previously said, since the projector is classified as an RG-2 device, while the stimuli generated are on screen
for less than 0.25s, the injuries should be prevented. The system ensures hazardous stimuli are not being generated
by measuring the time the stimuli are on screen and finishing the test if a stimuli is presented for too long.
by measuring the time the stimuli are on screen and finishing the test if a stimulus is presented for too long.
(PASAR DIAPOSITIVA)
This is everything I have to present now. Thank you for listening.
Do you have any questions?
This is everything I have to present now. Thank you for listening.
Loading…
Cancel
Save