<font color="#d35400">digitalWrite</font><font color="#000000">(</font><font color="#000000">dirPin</font><font color="#434f54">,</font><font color="#00979c">HIGH</font><font color="#000000">)</font><font color="#000000">;</font> <font color="#434f54">// Enables the motor to move in a particular direction</font>
digitalWrite(dirPin,HIGH); // Enables the motor to move in a particular direction
<font color="#434f54">// Makes 200 pulses for making one full cycle rotation</font>
// Makes 200 pulses for making one full cycle rotation
A monochromator is a device that takes a light source of a specific wavelength and spatially separates the colors by either using a prism or a diffraction grating. The prism results the light to be separated by optical dispersion, while the diffraction grating uses methods of diffraction. An automatic scanning spectrometer is used in conjunction with the monochromator to record the changes in data as a function of wavelength. There are many other options pertaining to the relationship between the spectrometer and monochromator, such as using an absorption spectrometer. [1]
Avoid looking directly at the light source as it can damage eyesight.
Equipment or Bill of Materials
The list below contains all of the ordered parts for the Monochromator. Further parts, such as the 3D-printed parts and electronics, are listed below the image.
This is the code used to control the stepper motor
[code]
const int stepPin = 12;
const int dirPin = 11;
void setup() {
// Sets the two pins as Outputs
pinMode(stepPin,OUTPUT);
pinMode(dirPin,OUTPUT);
}
void loop() {
digitalWrite(dirPin,HIGH); // Enables the motor to move in a particular direction
// Makes 200 pulses for making one full cycle rotation
for(int x = 0; x < 200; x++) {
digitalWrite(stepPin,HIGH);
delayMicroseconds(500);
digitalWrite(stepPin,LOW);
delayMicroseconds(500);
}
delay(1000); // One second delay
digitalWrite(dirPin,LOW); //Changes the rotations direction
// Makes 400 pulses for making two full cycle rotation
for(int x = 0; x < 400; x++) {
digitalWrite(stepPin,HIGH);
delayMicroseconds(500);
digitalWrite(stepPin,LOW);
delayMicroseconds(500);
}
delay(1000);
}
[/code]
Operation & Procedure
3D print all the necessary parts, this should take about 24
Program the stepper motor using the Arduino nano for the diffraction grating
Place the lid on the box
Turn on the lightsource and spectrometer
Adjust the manual slider to allow the desired amount of light into the spectrometer
Use as desired
Shutdown
To shut off the system, turn off the lightsource and spectrometer, and unplug them from the wall.