Professional Documents
Culture Documents
Arduino
by Reese Gallagher
Introduction:
This paper gives a quick overview of the skills, materials, and planning
needed to build a simple proof-of-concept scientific instrument. Along
the way I document my experience building a spectrophotometer and
discuss the trials and learning associated with that. Finally I hope to
convince you that anyone can build a simple instrument as long as you
are willing to tinker for about two weeks.
Here are a few additional (but not necessary) skills that can help make
a project better:
Planning:
I want to keep this section short because what you intend to build is
completely up to you. Just keep in mind the expense of the
materials that you will need. Also drawing circuit diagrams and raw
pictures can be really helpful because they act as templates to
further build your ideas off of. In addition they make for good
documentation.
Materials:
*A word of caution: if you are going to use a DC motor (or other large
motor) be sure there is a resistor, a diode, and a transistor involved.
Even if you dont know how they are precisely working you need them.
There are specific examples with the Arduino controlling motors; copy
their stuff first before attempting to build your own circuit.
A second word of caution: if you are going to use a motor (or any
device that will draw a lot of current) consider having a second voltage
source. All grounds should be the same, but a voltage source can be
different than the Arduinos 5V or 3V. This is for two reasons:
1. The Arduino can only supply so much current without things going
horribly wrong. Also consider that the Arduino is probably hooked up to
your computer!
For now these are all the warnings and suggestions I have. From here
on out your best friend is Google and YouTube.
Soldering, hot glue, and a lot of ghetto rigging later and Bobs your
uncle.
Note that in the last picture I built what is commonly known as a
protoshield. Its a step above a breadboard because its a permanent
soldering job. You cant see it but there are pins on the other side of
the board that plug into the Arduino. This is useful because Arduino
projects are not meant to be permanent (also you cant solder to the
Arduino anyway). In fact the Arduino microcontroller is specifically
under the category development board. The Fact that I built a
protoshield was so that the Arduino could easily be removed and put
back in at a later time. In your project simply leaving the wires in a
breadboard will suffice (just know that at some point you will take
apart those wires and if you want to rebuild your project you have to
rebuild everything from scratch).
Coding:
I could copy and paste the exact code I used for this project however
that wouldnt do any good. For one it is not immediately
understandable, secondly it wont teach you anything anyway. The
Coding for your project is literally all about finding a similar code on
the web (usually from the Arduino site directly) and pasting it into the
Arduino IDE (where you would paste your code). You may have to
tweak it a bit before it does what you want it to. The important part
isnt that its beautiful code but rather if it does exactly (or close
enough to) what you want. Trust me when I say Im not a coder so
dont feel discouraged if youve never coded before. If you know how
to Google search and copy/paste youll be fine.
If it works:
Its incredibly rewarding to build something that works, but the cool
thing is that you can actually use it multiple times thereafter. Here are
some spectra that Ive taken from my instrument.
Final Words:
If theres anything I can say that would sum up what building this
project has taught me its that you shouldnt underestimate your
abilities as long as you are persistent. Building an instrument can be
daunting but let me tell you the Arduino microcontroller is super user
friendly and there are tons of resources on the interwebs.