created for the entire build — including schematics,
source code, and development notes — is available
on my website ( www.grandideastudio.com/
portfolio/pt-virtual-sea-adventure/).
Introducing the Melexis
MLX90333
A main facet of this project was for the player to
be able to control the ROV while being underwater.
As such, we had a challenge to make the controls
waterproof. Typical mechanical joysticks or
controllers were out of the question, as they are
susceptible to damage due to water leakage or
corrosion. Off-the-shelf industrial, waterproof
controls were too bulky and expensive for our
particular design. So, I decided to experiment with a
magnetic position sensor: the Melexis MLX90333 3-D
Joystick Position Sensor ( www.melexis.com/Sensor
_ICs_Hall_effect/Triaxis_Hall_ICs/ MLX90333_648.aspx).
The sensor is designed to detect any magnet moving
in its surrounding area and is specifically intended for non-contacting joystick implementations. In its default
configuration, the MLX90333 outputs analog voltages
depending on the magnet's position. My thought was that
I could attach magnets to the player's left and right
thumbs and, by simply moving his thumbs over the
sensors, the player would be able to drive the ROV (after
some processing of the analog voltages into the proper
control signals, of course).
SeaBotix LBV150SE ROV with control unit
showing video received from its HD camera.
( www.national.com/mpf/DC/ADC0831.html) eight-bit
successive approximation A/Ds to convert the two analog
voltages output from the single MLX90333. The results are
transferred to the host via a simple synchronous serial
interface. The final design of my Virtual Sea Adventure
system used a four-channel version of the ADC0831 (the
ADC0834) and two MLX90333 sensors, as I had both left
and right thumbs to contend with. Since the full source
code for this demonstration is available on my website
and in the interest of space, only one channel (left/right) is
discussed here, but the code is essentially the same for
the second channel (up/down). First, I simply read the
output of the MLX90333 with the ADC0831:
Magnet Controlled
Etch A Sketch
During each episode of Prototype This, we
interspersed short and quirky segments called "podcasts"
(because their style was based on video podcasts I had
released on the web prior to filming Prototype This) to
help explain complicated or technical components of the
build in a fun way. One podcast segment we created was
to show off the magnetic position sensor and demonstrate
the feasibility of using it as a joystick control for the ROV.
For this simple and straightforward example, I used the
outputs of a single MLX90333 to control the direction and
speed of two continuous rotation servo motors attached
to the X and Y axes of a classic Etch A Sketch® toy. The
further away the magnet was from the center of the
sensor, the faster the associated servo would move.
The hardware used in this demonstration is a subset of
the full schematic (which represents our complete Virtual
Sea Adventure system) and can easily be built on a
prototype board (I used a Parallax Board-of-Education).
Since the BASIC Stamp 2 doesn’t have its own built-in
A/D capabilities, I used two National
Semiconductor ADC0831
LOW AdcCS_OUT1
SHIFTIN AdcDta, AdcClk, MSBPOST, [MLX_OUT1\9]
' get the voltage
HIGH AdcCS_OUT1
DEBUG " OUT1: ", DEC3 MLX_OUT1
The graphic below illustrates the range of possible values
(0-255) returned from the A/D. Values within the gray
areas will be scaled and used to move the servo. Values
outside of the gray areas will cause the servo to stop:
0 10 107 147 230 255
September 2010 51
Joe explaining the concept of a magnetic position sensor.