Working with a defective SCA60C

I recently purchased an single angle tilt sensor. It was defective, but was still able give readings within a 0 to 90 degree range. This was fine, since that is all I needed to measure. This post explains how I got it to work.

SCA60C

This is a tilt sensor or single angle analog accelerometer that is able to measure tilt angle, and is dependent on the rotation or tilt speed of the sensor (VT1000060)

Connecting to an Arduino

The sensor has 5 pins, but only 3 are relevant to my needs

  • Vcc - This is where you supply 5V of power from the Arduino
  • GND - Ground
  • Vo - This is what you measure and should be connected to an Arduino analog pin

This analogRead() function translates or rather maps volts into an integer between 0 and 1023 (dependent of Arduino model). That integer could then be mapped into an angle

In a functioning sensor, the readings would range between 0 to 1023. My sensor however, maxed out around 363, at 90 degrees. Additionally, this reading of 363, fluctuated based on the speed on the sensor rotation

The max value had to be determined on the fly after installation using a comparator and swap in a calibration step

    // callibrate the maxReading
    if (pinReading > maxReading) {
      maxReading = pinReading;
    }

Finally, during regular operation, the angle could then be determined by mapping 0 - MAX to 0 - 90 degree

    angle =map(pinReading, 0, maxReading, 0, 90)

Diagnosing the faulty sensor

This was how I determined that the sensor was faulty

According to the spec sheet, Vo should be outputting between 0 and 4.75v between 0 to 180 degree. I was only able to go up to 1.77 volts when measured with a voltmeter and tilting the sensor between 0 and 180 degrees.

https://forum.arduino.cc/t/sca60c-angle-sensor-not-giving-me-the-right-output/905829/5

Additional links

http://www.61mcu.com/upload/SCA60C-N1000060.pdf

https://www.hobbytronics.co.uk/accelerometer-info

https://www.mouser.com/pdfdocs/tn17_voltage_to_angle.PDF