Introduction: Science With Rainbows! - Spectrophotometry
Rainbows, natural phenomena that produce beautiful spectrums of coloured light in the sky, inspire myth and legend and art and give happiness to millions of people. Just as natural rainbows are created by how sunlight plays through water droplets in the atmosphere, we can artificially create our own rainbows using prisms. There are many scientific applications of rainbows, and one is 'Spectrophotometry'!
A spectrophotometer is a scientific instrument used to measure how different wavelengths of light (the different colours of light seen in the rainbow are different wavelengths) are absorbed by a sample. This analysis can tell us all sorts of things, and these instruments (first made in the 1940s) have played a huge role in modern science, especially biochemistry.
In this Instructable, we're going to make a basic Arduino-powered spectrophotometer, using a little prism to create and use our own rainbow. We'll make a lot of use of 3D printing, and also learn about lots of other things along the way.
Step 1: What You Will Need
These are the components I used to build my prototype. Please read onto the next step to read a more full explanation of how a spectrophotometer works, and how we can make our own at home!
- Triangular prism (30mm each side)
- Arduino Uno
- LDR (light dependent resistor)
- 16-Bit LED pixel ring
- 9g Servo
- DC-DC boost converter 5V-9V
- USB cable (one end cut off, and the power lines soldered to the boost converter)
- Wall plug that can supply 5V DC 0.5A
- USB cable to connect Arduino to PC
- Toggle switch
- Momentary push button
- Bulb holder
- 10K OHM电位器（或更大）
- Hookup wire
- Electrical insulative tape
- Windows PC
- Arduino IDE
从根本上，分光光度计测量相对于波长物质的传动特性。那么这是什么意思？不同颜色的光（你可以看到的彩虹的颜色）具有不同的“波长”，这就是使它们似乎与我们的眼睛不同的颜色。我们知道不同的材料和化学品彼此不同地吸收和传递不同的波长 - 我们看到一个绿叶出现为绿色，因为光谱的绿色部分是叶子不吸收的主要部分，因此它被向后传递给我们的主要部分眼睛。分光光度计产生光谱，然后通过样品选择性地通过该频谱（例如红灯）的一部分，然后测量记录的光强度。反过来这样做，对于可见光谱内的光线中的每种波长（或每种颜色）的每个频段允许您测量该物质如何吸收各个部分的频谱，从而从您绘制吸收图表。这种分析可以告诉你很多关于一种物质或化学反应，这就是它是这样一个有用的科学工具！在研究这一点时，我读到了一个诺贝尔的化学版权所有的化学版表示，分光光度计是“可能是对生物科学进步的最重要的仪器”。我必须承认，我真的不需要在家里的分光光度计，但我认为尝试使用基本组件和arduino尝试一个非常有趣的项目。 So here goes!
红外线是电磁谱的组成部分，其刚刚超出了我们可见光光谱的红色末端。对人眼看不见的，红外线在我们的生活中起着巨大的作用 - 我们太阳的一半以上的能量到达地球作为红外光线，这让我们温暖我们并帮助我们的星球我们所需要的条件。威廉·赫歇尔（William Herschel）是18世纪的德国德国/英国天文学家，是第一个注意到红外线存在的人，他只是用一个简单的棱镜来做这件事，就像你所愿意这样做的那种说明。如果您愿意，您可以尝试在使用棱镜对分光光度计进行复制。
Herschel pointed a beam of strong sunlight into a darkened room, and angled his prism it so a beautiful rainbow shined out from it. He then took a thermometer, and noticed that when holding it in the dark region beyond the red part of the spectrum, there was a noticeable increase in temperature, although there was no visible light there at all! He wasn't looking for it, but with this simple observation he'd just discovered a whole previously unknown type of light!
Step 3: Richard of York Gave Battle in Vain
这个小助记符就是我如何教导彩虹的颜色'理查德 - 红色， - 橙色，约克 - 黄色，给予 - 绿色，战斗 - 蓝色，Indigo，Vain-virte'和参考一小英语历史赛段 - 参考Richard，Duke Of Richard，Richard的失败，在1460年在Wakefield的战斗中，在玫瑰战争的早期，在Wakefield的战斗中。我发现像这样真正令人满意的历史参考，所以我以为我会和你分享这个。
Let's now have a look at our design, and discuss the main components.
- The Prism - we shall use a simple triangular prism to generate our spectrum. The prism assembly will be held in bearings and be able to rotate, this will allow only a part (or single colour) of the light spectrum to be shined through through a narrow slot and into the sample.
- 伺服马达驱动,一个微型9 g伺服马达会l rotate the prism assembly to point different parts of the spectrum through the slot towards the sample.
- 测试tube hole - a mini test tube holding the sample will be inserted into this deep hole in the housing. One one side of the test tube will be this narrow slot from which light will pass through the sample, and on the other side of the test tube will be mounted the light sensor which will record readings and pass those to the Arduino microcontroller. I initially used a BH1750, but later changed this to a Light Dependent Resistor (LDR).
- 光源 - 对于这种设计，我们将使用9V割炬电池。它安装在一个小组件中，该小组件在灯泡（涂覆在锡箔）后面的抛物线反射器以保持直射，并且前面具有小槽，使得只能出现窄光束。这允许光精确地被引入棱镜。
Step 4: She's a Rainbow
打印的所有.stl文件以及.step文件（如果要对设计进行修改，您可以导入CAD软件）将上载到这个grabcad页面I created to store the files. I strongly recommend you open this assembly to see for yourself all the detail of the assembly, so it's easier to understand how it all fits together. As well as the files for the spectrophotometer itself, this also includes the mini test tube rack that I designed to hold my samples.
对我来说，最勇气的复合部分是迄今为止打印主要案件！几乎所有项目的复杂性都包含在该单一部分内，因此正确打印这是如此根本。我的3D打印机（修改过的ANET A6）非常基本，缺乏更复杂的打印机的某些安全功能，所以我不舒服地运行它过夜。因此，我必须使用Slicer软件（Ultimaker Cura）中的设置来将打印时间保持在一天的窗口内。我最终调整它需要12.5小时，但如果我打印到更需要的质量，那将是22岁！
The fun pack of filament colours (PLA filament) I bought came with about 30g of a whole variety of colours (even glow-in-the-dark which you'll definitely see appear in a future project!). This I used to add the rainbow spectrum decoration to the side of the casing, which I think adds a lot to the project in terms of aesthetics. The first photo shows how I built this up - you'll need to fettle the fits a little with a knife/file to make sure they all fit snugly, but I didn't actually need to glue them.
A tiny piece of stripboard was cut which was used to make a mini 5V rail and GND rail from the Arduino, to which the other electrical components are interfaced. Please follow the specific instructions for the specific LED Ring you purchase, as there are some very similar models that have slightly different wiring, so I wouldn't want to advise you incorrectly. A 10k potentiometer is used to connect the LDR in a voltage divider circuit, but a larger value would probably be better, as I used this set to the maximum 10k position.
Step 6: Assembly Time!
Time to complete the mechanical assembly. It's going to get quite tight inside the housing!
- After the prism assembly in is inside, a rubber band is used to go to the servo motor head (the servo motor is super-glued in place on the rails that support it). Due to COVID-19 related lockdown, I couldn't go out to source another in time, so this is an old one from the kitchen that once was wrapped around a bunch of asparagus! This rubber band is a little loose, but it still works.
- The nuts for the M2.5 bolts are embedded into 9 locations in the housing, and super-glued in place.
- The Uno and boost converter are just pressed into place, which was nice and easy.
- The LDR fits into a little plate, that fits into the void originally designed for the form factor of the BH1750 light sensor. This pushes into the housing, but I decided to secure it with extra electrical tape.
- The light source assembly, even when printed in black PLA still leaked some light through the sides, so I wrapped black electrical tape around it too, which properly insulated it
Please download the attached Arduino code and get it uploaded to your Uno, but make sure to pay attention to the libraries that the code references that you'll need to install into your Arduino IDE if you don't already have them. It's necessary to check the pin attachments too, so make sure they match to how you've wired your system.
测试ing time, and running the code will produce the sequence seen in the video (Section 1 of this Instructable!). Copy the data that comes in from the Serial Monitor in the Arduino IDE into Excel or similar, and you can produce a plot similar to that shown above. This shows the traces from all 8 colour samples I tested (the ones shown in the test tube rack, which are paint in solution). The portion of the plot that is relevant is bounded by the vertical lines, which show the portion of the prism's rotation that the colour spectrum is shining through the sample. Outside of those bounds we're not interested in, and the light recorded is extraneous from other errant light sources. It's interesting to see how the LDR picks up different levels of the different colours of light, and how it shows variation within the spectrum for each colour too. I need to conduct more testing to further understand the response of the LDR to different wavelengths of light (there are different types of LDR which respond differently), and analyse more samples, but I think it's a promising result so far.
非常感谢你的阅读,I hope that this interested you. If you do your own experiments based on this design, I would love to hear from you how you got on, and improvements that you could make! Please also comment if there are details you need that I've missed out, and I'll do my best to help.
First Prize in the
Colors of the Rainbow Contest