AAS But Like Not It's Basically a UV-Vis Spectrometer But With a Single Wavelength Source So It's It Kinda Like AAS :)

Introduction: AAS But Like Not It's Basically a UV-Vis Spectrometer But With a Single Wavelength Source So It's It Kinda Like AAS :)

So I did this for a class, but it turned out to be reaaaally fun. I learned a lot of about what goes into making an instrument during this project that it's reaaaally hard to make an instrument with positioning everything just right for it to work. And all of the material I used I had lying around my house (because pandemic lol) except for the Arduino that is the school property. So lets make it!

Step 1: Materials

So i used the Arduino mega Rev3, KY-008 laser, GL5516150 photoresistor, 10k Ω resistor, a breadboard, 3 short male-to-male wires, 2 long male-to-male wires, 2 long male-to-female wires, a CD with nothing on it, two old magnifying glasses, and a small round bottle. A computer is needed as well with the Arduino program. It didn't cost me anything because I had all of this lying around. I seen Cds being sold for $5 though. and magnifying glasses shouldn't be much more either. The Arduino mega is a bit expensive at $40 but the Arduino uni works exactly the same for a cheaper price ($20). The KY-008 laser is around $5, and resistors and photoresistors are pretty cheap and they come in packs ($5 ish for both).

Step 2: Arduino and Breadboard Assembly

The circuitry was pretty simple, the signal didn't need to be amplified, so I didn't use an operational amplifier. Anyway, a simple voltage divider was made with the photoresistor and 10k Ω resistor. The voltage divider went into A0 on the Arduino. The photo resistor was the "top" resistor and the 10k Ω resistor was the "bottom resistor". I also have a schematic for the electronics. I used a LED instead of the laser because the laser wasn't available. The laser was simple put into the 5V and GND. It only needs a simple power supply.

Step 3: Assembling the Optics

So this is the set of my instrument: the laser, the sample holder, the magnifying glass, the CD grating, another magnifying glass, and the photoresistor (detector). I noticed that the magnifying glasses needed space to focus light better. (Probably because the light scattered more and focused better because of it). Also the CD had was showing two reflections, so I checked with a flashlight to see which reflection was separating the wavelengths of light and focused that beam to the second magnifying glass.

Step 4: Sketch I Used

This code has a little bit extra to it it will also light up an led if the Arduino was hooked up correctly, but this worked fine for this project. I tried to remove the unneeded parts unsuccessfully, so I just left it. The sketch reads the input from A0 and puts out a number from 0-1023 every second on the serial monitor.

const int sensorPin = 0;<br>const int ledPin = 9;
// We'll also set up some global variables for the light level a calibration value and
//and a raw light value
int lightCal;
int lightVal;
int readingNumber = 0; //sets the first reading value to zero
void setup()
{
  // We'll set up the LED pin to be an output.
  pinMode(ledPin, OUTPUT);
  lightCal = analogRead(sensorPin);
  //we will take a single reading from the light sensor and store it in the lightCal
  //variable. This will give us a prelinary value to compare against in the loop
  Serial.begin(9600); //initializes serial port with baud rate of 9600
  //baud rate is a way of confirming that the send rate equals the receive rate
  Serial.println("Serial is initialized"); // verify that it does something
  Serial.print("Initial light reading: "); //verify the initial reading
  Serial.println(lightCal); //adds the lightCal reading after the previous colon
  Serial.println("ReadingNumber,LightValue"); //Headers for the data that will be collected, CSV
  
}
void loop()
{
  //Take a reading using analogRead() on sensor pin and store it in lightVal
  lightVal = analogRead(sensorPin);
  Serial.print(readingNumber); //prints the reading number to the serial monitor
  Serial.print(","); //prints a comma in the serial monitor to aid in CSV data collection
  Serial.println(lightVal); //prints the current photoresistor values
  readingNumber++; //shorthand of saying new variable = previous variable +1
  delay(1000); //sets data collection sampling rate to 1 second
  //if lightVal is less than our initial reading (lightCal) minus 50 it is dark and
  //turn pin 9 HIGH. The (-50) part of the statement sets the sensitivity. The smaller
  //the number the more sensitive the circuit will be to variances in light.
  if (lightVal < lightCal - 50)
  {
    digitalWrite(9, HIGH);
  }
  //else, it is bright, turn pin 9 LOW
  else
  {
    digitalWrite(9, LOW);
  }
}

Step 5: My Results

Sample prep:

I didn't have a good way to quantitate the amount of food dye I used. So I made a saturated solution of green food coloring to and set that concentration to 1 and serial diluted from there. The dilution factor was the closest thing to a concentration. I used green food coloring because it is complementary to the red laser so it should absorb more light than any other color.

Results:

I measure 5 blank values transferred the pins to voltage because 5 V / 1023 pins is the conversion. The transmittance of the average of the blank was set to 1 so each individual blank was near one. Transmittance was converted to absorbance because A = -log(T). The same was done for all of the samples. The transmittance was calculated by dividing the sample voltage by the blank voltage and then converted to absorbance. The first few dilutions were very obviously not in the linear range. After calculating the LOQx only one data point was thrown out resulting in the graph. In the graph the organ data point was left out since it was so far from the regression line. It worked surprisingly well using only stuff I had at home other than the Arduino.

Limitations:

Of course the instrument is going to reflect that I didn't use very accurate tools; I did the best I could and the data shows that it's pretty good considering everything. Because I didn't have a way to quantitate the amount of food coloring I used, each calibration curve is specific to the actual concentration that it is but that concentration wasn't really known. (I didn't have a scale at home that could weigh really small masses). This would easily have been fixed if I had a scale that could measure the mass of the food coloring I need to calculate a concentration.

Step 6: References

1. The sketch was written by SparkFun Electronics.

2. Here is more theory about Beer's law:

https://teaching.shu.ac.uk/hwb/chemistry/tutorials/molspec/beers1.htm

Arduino Contest 2020

Participated in the
Arduino Contest 2020

Be the First to Share

    Recommendations

    • Fandom Contest

      Fandom Contest
    • Maps Challenge

      Maps Challenge
    • Metal Contest

      Metal Contest

    Comments