can include misalignment of the laser (shine the laser on the
other unit’s receiver at close range at least once so you can
see what the phototransistor looks like when it is getting
properly excited by the laser), electronic malfunction, or
distance is too great. Most likely, a back and forth between
alignment and comparator adjustment will give you a signal
if the two units are less than 100 meters apart. Once
aligned, the unit is simply ready to accept serial input data.
The default speed of the lasers is set in the code is 4800 baud.
Remember that Arduinos do not detect communications
settings and both units have to have the laser ports set at
the same speed. I have no idea how
far apart these things will work.
over which this system can be used?
• Can the electronics be refined to increase sensitivity?
• Can the mechanics be improved to ease alignment
• What is the maximum data transfer speed?
• Would an array of phototransistors work better
(increase target area)?
• Is analog signal modulation possible?
Just remember the whole “point” of this project is
to have fun!! NV
Code is very, very simple. I used
the interrupt feature of the Arduino
to detect the button press. This is
appropriate for a situation where
button presses will be infrequent. For
efficiency, I did not want the main loop
looking for a state change on the
button’s pin upon every iteration when
activation would be so infrequent.
As indicated previously, there are two
versions of code: one for the Arduino
Mega with multiple hardware ports;
and one for the Duemilanove which
uses a hardware UART and a
software serial port created by the
NewSoftSerial library (available by
download from the Arduino site).
Areas of Further
One early experiment was to use
an LED as the sensor. Excitation of a
conventional (i.e., low) brightness red
LED with a red laser beam created a
~1.3 volt potential. From the standpoint
of electronics, it worked quite well,
requiring a high impedance amplifier
to buffer the voltage generated
(current generated was tiny). The
signal — when present — was quite
robust, and once buffered was easy
to pass to the comparator (Figure 6).
However, from a use/construction
standpoint, the LED required a
“direct hit” from the laser to generate
a voltage. Revisiting this design may
be of interest to some builders.
Other ideas to expand on include:
• What is the maximum distance
November 2009 39