[Back to Home Page]

www.RomanBlack.com

Using the Osram SFH7710 Optical Tilt Sensor
These are a very nice little SMD tilt sensor using digital optics - 26th Oct 2009.





What is it?

The Osram SFH7710 is a TINY little SMD tilt sensor. It is normally used in cameras and digital picture frames to rotate the image if the appliance is rotated, ie portrait/landscape.

I decided to test this neat little sensor for robotics and security applications, anywhere a tiny tilt sensor might be used to detect if something has been tilted, rotated, knocked over etc. It can also be used an an inertia sensor, to see if something has been bumped or if a little robot has hit a wall etc.


How it works

The SFH7710 is an opto-mechanical angle sensor operated by gravity. It contains a little ball (which must be as smaller than a pinhead!) that slides inside a track and cuts off an internal infrared light beam.





This is basically the same thing as the old mercury tilt switch (or the more modern ball tilt switches that don't use nasty mercury) but it solves most of the problems with mechanical tilt switches!

  • It's MUCH smaller
  • The optical beam won't wear out like contacts do
  • The output is cleaned up by its digital filter and output circuit
  • Very high life (number of cycles before it wears out)


    Testing it!

    These things are tiny and difficult to solder, but fortunately you only have to solder 3 of the 4 pins. Well, they are not actually pins which is part of the problem... They are corner pads on a tiny double-sided PCB. (See the top picture on this page). Ideally these would be soldered like a QFN (no leads) package in an oven.

    I couldn't be bothered etching a PCB and using my SMD oven so instead I just "tacked" it on top of a SO14 adapter board with a fine point soldering iron;





    I used 2 glass diodes (1N4148) to drop the 5v supply to 4v and used a 2.2uF cap across the power pins (GND and Vcc) of the device. Then since the output pin is a pull-down only (open drain) I used a LED and 330 ohm resistor from its 4v power pin to the Vo output pin.





    Using it as a tilt sensor

    It worked like a charm! I mounted the SFH7710 vertical on a protractor with blu-tak, and then rotating the whole setup caused the LED to light or not-light.

    I tested the hysteresis zone to be about 15 to 20 degrees if the device is rotated very smooth and slowly. If vibrated the hysteresis zone was smaller as you would expect, because the vibration encourages earlier ball movement.


    Using it as an inertial sensor

    As an inertial sensor it had both good and bad points. Very short bumps and shocks (raps and taps) were not detected very well due to the internal filtering and the devices 90mS update time. This is a deliberate design feature to make the sensor operated by "orientation" rather than "movement".

    But, with a longer more sustained acceleration or deceleration the device worked fine. I rotated it's orientation until the light would just go out, then sliding it across the desk and hitting a stationary object would cause a reliable light-on event every time. That same internal filtering seems to make a reliable inertial threshold.

    It would be quite usable as a robot inertial forward collision sensor provided the robot was on a smooth and level floor. I will attach it to a robot later and test that application more completely.


    Using it as a motorcycle alarm tilt sensor

    I'm not sure it would be good for this application. The old mercury tilt switches in glass capsules had a very small hysteresis of only a couple of degrees. You can easily set one up to be reliable as a motorcycle alarm sensor to detect when the motorcycle is lifted off the sidestand. Even allowing for variations in angle caused by terrain.

    But the high (15 to 20 degree) hysteresis would make this device extremely fussy to set up especially if the motorcycle is not on level ground. Although it is much better than a mercury switch in quite a few ways, the hysteresis issue will mean this sensor is not suitable for some more sensitive tilt applications.


    Application ideas?

    (From the datasheet) Using 3 tilt sensors to make a dice or detect any standard product orientation;





    Just some ideas off the top of my head;

  • Tiny robot tilt detect where 3-axis accelerometer is not warranted
  • Tiny alarm sensors
  • Smart float switches
  • Inertial force detectors, collision detectors etc
  • High cyclic use (machinery?)
  • Human wearable computing, (finger movement sensors etc)


    The datasheets

    Datasheet (English+German) SFH7710_angle_sensor.pdf 148 kb

    Using it (English) SFH7710_angle_sensor_using.pdf 284 kb


    - end -

    [Back to Home Page]