Sensors#

To deliver accurate sleep phase graphs, smart alarms, and respiration monitoring, Sleep as Android relies on input from motion, body, and environmental sensors. You can use built-in smartphone sensors, pair external hardware like wearables or SleepPhaser, or combine multiple inputs for maximum tracking accuracy.


Motion Sensors#

Motion tracking is the core foundation of sleep phase estimation.

Accelerometer#

  • What it is: Uses the phone’s internal motion sensor.
  • Placement: Placed directly on the mattress. As you move during sleep, vibrations travel through the mattress to the phone.
  • Pros & Cons: Simple setup and very battery-efficient, but accuracy depends heavily on your mattress type (e.g., spring mattresses transmit motion better than thick memory foam).

Sonar (Contactless) #

  • What it is: A revolutionary feature developed by the Urbandroid team that turns your phone into a contactless motion detector.
  • How it works: The phone emits ultrasonic sound waves (silent to human ears) from its speaker and records reflected sound waves using its microphone. Even subtle chest or body movements distort the signal, allowing the app to track sleep phases and breathing rate without anything touching you or your bed.
  • Requirements & Notes:
    • Must be placed on a nightstand oriented toward your chest.
    • Does not work while wired or Bluetooth headphones are connected.
    • You can adjust Signal Sensitivity and Frequency under Sensor Testing.

Passive Infrared (PIR / SleepPhaser)#

  • What it is: Hardware sensor embedded inside the SleepPhaser smart lamp.
  • How it works: Reads heat and body movement from a distance. It offers contactless tracking while keeping phone radiation away from your head.

Body & Vital Sensors#

Heart Rate (HR) & Heart Rate Variability (HRV)#

Measured via paired smartwatches, fitness bands, or chest straps. Heart rate dips and spikes help the app distinguish true sleep phases from calm awake states. Read more about HR tracking.

Breath Rate & Blood Oxygen (SpO2)#

  • Breath Rate: Calculated via Sonar, SleepPhaser, or supported wearables. Tracks breaths per minute (RPM) to flag restlessness, snoring, or potential sleep apnea symptoms.
  • SpO2: Measured via compatible smartwatch optical sensors to detect nocturnal oxygen dips. Read more about Breath rate and SpO2.

Environmental Sensors#

Light Level Sensor#

Uses the phone’s ambient light sensor (lux sensor) to log room illumination overnight and detect light-driven awake periods. Read more about Light level tracking.


Sensor Testing & Diagnostics#

Before tracking, you can test if a sensor is functioning properly on your phone:

How to open: Go to Settings → Sleep tracking → Test sensor.

Test Modes#

  • Accelerometer Test: Displays a real-time graph responding to phone movement.
  • Sonar Test: Displays a live green wave graph showing signal strength. Use this screen to test whether your smartphone hardware supports ultrasonic generation.
    • Sensitivity Slider: Increases or decreases the sonar emission strength. Keep it as high as possible.
    • Frequency Selector: Switch frequencies if your microphone/speaker performs better at specific ultrasonic ranges.
  • Wearable Sensor Test: Verifies live data transfer from connected smartwatches or bands.

❓ FAQs & Troubleshooting #

Is Sonar tracking safe for my health?

Yes, absolutely. Ultrasound is completely safe when emitted at normal volumes. Sleep as Android uses low-volume ultrasound near 20 kHz at around 40 dB, which is softer than a normal conversational voice. It does not produce ultrasound powerful enough to cause hearing damage or health issues.

Is Sonar safe for pets (cats, dogs, or other animals)?

Yes. The signal sounds like a soft, constant background hum to pets that can hear it, similar to a refrigerator buzz. It is not harmful. If your pet seems sensitive, try switching the Sonar frequency under Settings ➔ Sleep tracking ➔ Test sensor.

Can Sonar damage my phone's speaker or microphone?

No. Sonar uses standard audio stream frequencies (18 kHz-22 kHz) that fall at the upper limit of human hearing. This places virtually no extra stress on your hardware compared to playing normal music.

Why do I hear strange clicking, chirping, or buzzing noises when using Sonar?
  • Reason: Hardware limitations or audio processing/equalization by phone firmware.
  • 👉 Fix:
    1. Disable sound-enhancing features (Equalizers, Dolby, etc.) in your phone’s Sound or Accessibility settings.
    2. In the Sleep app, go to Settings ➔ Sleep tracking ➔ Test sensor and select a different Frequency until you find one that is silent.
    3. If still audible, lower the Sensitivity slider slightly.
Why is my Sonar graph flat or unresponsive during the test?
  • Reason: Connected headphones or unsupported frequencies.
  • 👉 Fix: Ensure no headphones (wired or Bluetooth) are connected. If the graph remains flat, switch the Sonar frequency in the test settings or boost the sensitivity slider.

Need further help? Contact us via Left ☰ Menu → Support → Report a bug.