Title: Building a Spectrometer
1Building a Spectrometer
- Robyn Badon
- Michael Barnes
- Terrell Black
- Ryan Bloodworth
- Robyn Mackey
2Lecture Outline
- Introduction
- What is a Spectrometer?
- How it works/ Project relevance
- Spectrometer Design Overview
- LED Geometry
- Hardware
- Software
- Summary
3Introduction
- What is a spectrometer?
- Optical instrument to automatically measure light
intensity/ detect color changes - What are we using it for?
- Urinalysis
- More accurate than human eye alone
- The urinalysis test strip is compared to
predefined samples by color - Computer can eliminate human error
4Overview of Project Relevance
- Medical screening device with 5 modules
- Thermometer
- Blood Oxygen Saturation
- Blood Pressure
- ECG
- Urine Glucose ?SPECTROMETER
- For safety urine is sampled
- Reduce risk of disease transmission
- Much more sanitary
-
5How it works
- Collect sample using test strip
- Light reflects off the colored strip
- Light intensity is picked up by the photoresistor
- Different reading for each LED
- Based on concentration of glucose in urine sample
6Light back to Physics...
- Human perception of color
- Composition of light an object reflects
- A quick example
- If an object appears red, the red light is
reflected while all other colors are absorbed
7Trivia
- If an object appears to be white, what is
happening?
8Light
Figure 3. Electromagnetic radiation. The visible
wavelength range extends from approximately
350-700nm. Image source http//www.andor.com/lib
rary/light/
9Our Spectrometer
- Reflectance spectrometer
- Intensity measured by photoresistor
- Interpret results
10Photoresistor
- A photoresistor or LDR is an electronic component
whose resistance decreases with increasing
incident light - made of a high-resistance semiconductor
intensity. - If light falling on the object is high enough,
electrons get energy to jump into the conduction
band - The resulting free electron and its hole conduct
electricity, therefore lowering resistance
11Application
- Glucose concentration
- Human analysis by color matching
12Basic Reflection Spectrometer Design
- Three LEDS blue, green and red.
- LEDs are controlled by the PIC
- Each LED is turned on one at a time
- LED is reflected down on the photoresistor
causing the resistance value to change - The voltage value is read in by PIC
- Data sent back to PC and compared
13Basic Reflection Spectrometer Design
Figure 4. Block diagram of mini reflectance
spectrometer
14LED geometry
- LEDs are arranged at a 30 angle
- The light is directed in a narrow beam towards
the sample - Prevents light from entering photoresistor
directly, which would obscure the true signal - The entire circuit is put in an opaque box to
preventing interfering light from entering
15Spectrometer geometry
Variety of LEDs Boxed in green is most typically
used, estimated at 80 of world production Boxed
in red is the LED used for our spectrometer
16(No Transcript)
17(No Transcript)
18Powering the LEDs
- Red and Green powered by PIC
- Resistors used as voltage dividers
- Blue LED needs more power
19Blue LED
- Transistor used as switch to power blue LED
20Spice Analysis of
Transistor and Diode Voltage
21(No Transcript)
22The detector
- NSL-6110 photoresistor
- Change is voltage is very small
- Must be amplified
- Run through 2 stages
- Voltage divider
- Non-inverting Amplifier
23The detector
24Controlling Software
- PIC code for reading reflectance
- GUI
- KNN Algorithms
25Central Unit the 18F4520
- Input/Output port
- A/D conversion
- Adaptation for RS232 communication
26PIC Code
- PIC must activate LEDs and read in Voltage from
the photoresistor - Set port D, pins 0-2 to output
- Loop program until RX interrupt
- Run functions based on char received
27MeasureR()
- Turn on red LED, turn off green and blue
- Wait short time
- Read in voltage
- Convert analog to digital
- Divide by 256, multiply by 5
- Save value
- Turn off red LED
28GUI Software
- Using Visual Basic
- Button and text box for each LED
- Button sends char to PIC
- PIC returns data which gets displayed in text box
29Controlling Software
Figure 8. Example Visual Basic GUI
30Color Matching Software
- Training phase
- Classification phase
31Training Phase
- Create sample data by scanning known colors
- Urinalysis Strips with known concentrations
32Classification Phase
- Compare current sample to test data by computing
distance - Create a list of K closest training values
- Take the average to find concentration
33Summary
- Our spectrometer has been designed to read urine
glucose strips - However, it is versatile enough to be used in any
application where color detection is needed - It can be adapted to be used for anything from
protein concentration to pregnancy tests
34Questions?