♪ Control ♪
Hello.
We're demonstrating 
an on/off servo control system
using a Smart Magnetometer,
with a magnet on the actuator
a Smart Angle Sensor 
underneath the magnetic knob,
and an Arduino board.
We have a three-position solenoid valve,
but these valves don't release pressure 
when they're off,
so the actuator tends to drift.
Our control moves the cylinder
when the position is outside 
a deadband.
The angle sensor detects 
the rotation of a magnetic knob
and sets the desired position.
The magnetometer's sensitivity and wide range
gives us control over 
about a 50-millimeter range.
This valve provides on/off control 
like a thermostat.
We could have smoother control with a 
proportional flow valve,
but those valves are a lot more expensive.
Here's a diagram:
Both sensors have SPI interfaces,
so we just connected them in parallel
with different Slave Selects.
The Arduino drives the valve solenoids
via transistors.
Here's the Arduino program:
There's a procedure 
for reading the sensors,
which is a simple four-byte sequence.
We read the angle sensor
and the magnetometer.
For this demo we use a simple 
inverse square root approximation
for distance as function of field.
For better accuracy, we could 
calibrate a piecewise linear lookup table
as we demonstrated in another video.
The cylinder is moved in or out
if the error is beyond the deadband tolerance.
Here are the demo components 
and where to get them:
Click, e-mail, or call
for more information,
or to buy Smart Sensors,
breakout boards, or evaluation kits.
