This reverse engineering is based on efforts from Gordon Williams (Espruino), Fanoush, and atc1441

If you like this please consider supporting Espruino, or buying an Open Source Bangle.js watch (which will "just work")... Or contributions to improve the accuracy of info here or features of the Espruino build would be hugely appreciated.

The SMA Q3 can be a bit hard to get hold of - if there's enough interest I could sort out some kind of bulk purchase, so please let me know if so.

Specs

  • nRF52840 (BLE 5, 64MHz, 256kB RAM, 1MB Flash)
  • LPM013M126 sunlight-readable 176x176 8 color LCD, with full touch
  • One button, IP68 waterproof
  • 8MB SPI Flash
  • GPS
  • Accelerometer, Compass, Pressure/Temperature sensor
  • Heart rate sensor

Current State

There is a build of Espruino for the watch that exposes Bangle.js functionality to the point where some apps from the App Loader can but run. What does work:

  • LCD & terminal on LCD
  • Bluetooth
  • Compass, Accelerometer, Gestures
  • GPS
  • Touchscreen (X/Y not reported as an event yet)

What doesn't work:

  • External flash memory doesn't wake up from sleep reliably enough to use it to store program code
  • Heart Rate monitor not implemented at all - while we can communicate and read data from JS, some work is needed to: adjust HRM interval, light output/sensitivity, and using the analog readings to work out HRM. If someone has any code/datasheets for the VC31 it'd be a massive help!
  • Pressure sensor not implemented internally but this is pretty trivial as Espruino has a BMP280 driver anyway.
  • No bootloader implemented
  • Display could have a fake 240x240 16bpp mode to provide support for standard Bangle.js apps
  • Touchscreen can be put to sleep when display 'locked', and probably some other sources of excess power drain can be squashed.

Building

The Espruino firmware can be built pretty easily with:

https://github.com/espruino/Espruino
source scripts/provision.sh SMAQ3
BOARD=SMAQ3 RELEASE=1 make flash

Pinouts

SWD - the 4 pads on the rear of the watch are GND, SWDIO/SWDCLK, VCC. The charge cable has wires for all 4 leads brought out to the USB connector, so the easiest method is just to attach wires from a USB socket to an nRF52DK

LCD - LPM013M126C

PRESSURE - BMP280, I2C 0x3C(0x1E)

TOUCH - Hynitron CST816S, I2C 0x2A(0x15)

    Hynitron CST816S https://wiki.pine64.org/index.php/PineTime#Touch_panel

    Can write  0x03,0xe5 to turn off

HRM - VCare VC31, I2C 0x66(0x33)

   http://www.vcaresensor.com/vc31.html

   No source or datasheets. Seems to produce raw ADC values

ACCEL - Kionix KX022, I2C 0x3C(0x1E)

COMPASS - GMC303, I2C 0x18(0x0C)


Pin

Connected

State

0

32876 oscillator

1

32876 oscillator

2

PRESSURE_SCL

3

Battery voltage analog

GND-[1M]-D3-[3M]-VBATT

4

5

Memlcd_CS (active high)

out

6

Memlcd_EXTCOMIN

Needs to be toggled at 5ms or 250ms in sleep all the time

7

memlcd_DISP

1=disp on, 0=disp off

out, pulsed high

8

Backlight

out

13 (0x0d)

Flash_MISO

input

14 (0x0e)

Flash_CS

out

15 (0x0f)

Flash_MOSI

out

16 (0x10)

Flash_SCK

in_pullup

17 (0x11)

Button

In_pullup, edge detect

19 (0x13)

Vibrate, active=1

out

21 (0x15)

HRM_POWER, active=1

out

22 (0x16)

HRM_INT

23 (0x17)

Charge port

in_pullup

24 (0x18)

HRM_SCL

26 (0x1a)

memlcd_SCK

27 (0x1b)

memlcd_MOSI

29 (0x1d)

GPS power, active=1

out

30 (0x1e)

GPS TXD

31 (0x1f)

GPS RXD

32 (0x20)

HRM_SDA

33 (0x21)

TOUCH_SDA

34 (0x22)

TOUCH_SCL

35 (0x23)

TOUCH_RESET (active low)

out

36 (0x24)

TOUCH_INT (active low)

37 (0x25)

ACCEL_SCL

38 (0x26)

ACCEL_SDA

39 (0x27)

ACCEL_INT

input

44 (0x2c)

COMPASS_SDA

45 (0x2d)

COMPASS_SCL

47 (0x2f)

PRESSURE_SDA