Professional Documents
Culture Documents
Science With Rainbows Spectrophotometry
Science With Rainbows Spectrophotometry
by Daniel Hingston
Rainbows, natural phenomena that produce beautiful In this Instructable, we're going to make a basic
spectrums of coloured light in the sky, inspire myth Arduino-powered spectrophotometer, using a little
and legend and art and give happiness to millions of prism to create and use our own rainbow. We'll make a
people. Just as natural rainbows are created by how lot of use of 3D printing, and also learn about lots of
sunlight plays through water droplets in the other things along the way.
atmosphere, we can arti cially create our own
rainbows using prisms. There are many scienti c The project video gives a short overview of the
applications of rainbows, and one is project, but please read on through the Instructable
'Spectrophotometry'! for full instructions too!
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!
M a in Co m po ne nt s
Science With Rainbows! - Spectrophotometry: Page 1
Triangular prism (30mm each side)
Arduino Uno
LDR (light dependent resistor)
16-Bit LED pixel ring
9g Servo
Mini Test Tubes
DC-DC boost converter 5V-9V
USB cable (one end cut o , 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
M ino r Co m po ne nt s
Ball bearings
Toggle switch
Momentary push button
E10 lament light bulb
Bulb holder
10k ohm potentiometer (or larger)
Co ns um a ble s
Heatshrink
Header pins
Hookup wire
Solder
Electrical insulative tape
3D printing lament
Suppo rt ing
Windows PC
3D printer (my print bed is 210x210mm)
S o f t w a re
Arduino IDE
CAD Software if you want to modify the les and view the assembly
This little mnemonic is how I was taught to remember the colours of the rainbow in order 'Richard - Red, Of -
Orange, York - Yellow, Gave - Green, Battle - Blue, In - Indigo, Vain - Violet' and references a tiny snippet of English
history - referring to the defeat of the Richard, Duke of York, claimaint to the throne, at the Battle of Wake eld in
1460, in the early years of the Wars of the Roses. I nd little historical references like this really satisfying to know, so
I thought I'd share this one with you.
O ur Spe ct ro pho t o m e t e r De s ig n
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.
Servo motor drive - a miniature 9g servo motor will rotate the prism assembly to point di erent
parts of the spectrum through the slot towards the sample.
Test 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).
Light source - for this design we shall use a 9V torch battery. It is mounted in a small assembly that
adds a parabolic re ector behind the bulb (coated in tin foil) to held direct light, and has a small slot
at the front so that only a narrow beam of light can emerge. This allows the light to be precisely
directed into the prism.
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.
After passing the USB power cable through the housing, I wrapped a little electrical tape around it
on the inside, to prevent it from being pulled through the hole and damage the connections.
The LDR ts into a little plate, that ts 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.
Underneath, four little self-adhesive rubber feet make for a nice grippy base to the unit. I think this
adds a nice touch of quality to the feel of the device.
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 are paint in solution). The portion of the plot that is
it uploaded to your Uno, but make sure to pay relevant is bounded by the vertical lines, which show
attention to the libraries that the code references that the portion of the prism's rotation that the colour
you'll need to install into your Arduino IDE if you don't spectrum is shining through the sample. Outside of
already have them. It's necessary to check the pin those bounds we're not interested in, and the light
attachments too, so make sure they match to how recorded is extraneous from other errant light
you've wired your system. sources. It's interesting to see how the LDR picks up
di erent levels of the di erent colours of light, and
Testing time, and running the code will produce the how it shows variation within the spectrum for each
sequence seen in the video (Section 1 of this colour too. I need to conduct more testing to further
Instructable!). Copy the data that comes in from the understand the response of the LDR to di erent
Serial Monitor in the Arduino IDE into Excel or similar, wavelengths of light (there are di erent types of LDR
and you can produce a plot similar to that shown which respond di erently), and analyse more samples,
above. This shows the traces from all 8 colour samples but I think it's a promising result so far.
I tested (the ones shown in the test tube rack, which
I very much enjoyed working on this project over the loose), and also print the housing with thicker walls or
1.5 months it took from start to nish, it's taught me a paint the insides with matt black paint to minimise
lot about design, and also about the use of light in the capture of light from sources other than the
experiments. prism.
If I had the opportunity to make improvements, a Thank you very much for reading, I hope that this
version 2 of this project would use a brighter light interested you. If you do your own experiments based
source so that more light could reach the sensor. It on this design, I would love to hear from you how you
would also employ a larger value (larger than 10k got on, and improvements that you could make!
ohm) resistor alongside the LDR sensor so that the Please also comment if there are details you need that
device would be more sensitive to variations in low I've missed out, and I'll do my best to help.
light levels. I would nd a better sized rubber band to
drive the prism assembly rotation (mine was too