Difference between revisions of "PineTime"

From PINE64
Jump to navigation Jump to search
(26 intermediate revisions by 7 users not shown)
Line 1: Line 1:
= PINE64 SmartWatch "PineTime"  =
= PINE64 SmartWatch "PineTime"  =
 
The PINE64 SmartWatch, dubbed "PineTime", is a product of a community effort for an open source smartwatch in collaboration with wearable RTOS and Linux app developers & communities.  
The PINE64 SmartWatch, dubbed "PineTime", is used in the community effort for an open source smartwatch and collaboration with wearable RTOS and Linux app developers/communities.  


PineTime development has been broken down into two distinct phases:  
PineTime development has been broken down into two distinct phases:  
Line 7: Line 6:
* Phase Two - Introducing the PineTime smartwatch around Q1 2020, depending on development results in Phase 1.
* Phase Two - Introducing the PineTime smartwatch around Q1 2020, depending on development results in Phase 1.


 
== PineTime Concept Photo ==
 
== '''PineTime Concept Photo''' ==
 
[[File:PineTime_leaflet.jpg]]
[[File:PineTime_leaflet.jpg]]


 
== PineTime Case and Charging Cradle Photos ==
== '''PineTime Case and Charging Cradle Photos''' ==
 
[[File:PineTime_on_wrist_Photo.jpg]]
[[File:PineTime_on_wrist_Photo.jpg]]
[[File:PineTime_PPG_Sensor_Photo.jpg]]
[[File:PineTime_PPG_Sensor_Photo.jpg]]
[[File:PineTime_Charging_Cradle_Photo.jpg]]
[[File:PineTime_Charging_Cradle_Photo.jpg]]


== '''Watch Information''' ==
== PineTime DevKit internal Photos ==
[[File:PineTime_Devkit-1.jpg]]
[[File:PineTime_Devkit-2.jpg]]
[[File:PineTime_Devkit-3.jpg]]
 
[[File:PineTime_Devkit-4.jpg]]
[[File:PineTime_Devkit-5.jpg]]
[[File:PineTime_Devkit-6.jpg]]
 
== Watch Information ==
* LAUNCH:
* LAUNCH:
** Announced: Tweet on 13 September 2019
** Announced: Tweet on 13 September 2019
Line 31: Line 34:
** Weight: 38 grams
** Weight: 38 grams
** Build: Zinc Alloy and Plastic
** Build: Zinc Alloy and Plastic
** Environmental Rating: IP67 (waterproof to 1 meter of immersion; '''not applicable to devkits''')


* DISPLAY:
* DISPLAY:
Line 38: Line 42:


* PLATFORM:
* PLATFORM:
** OS: Various open source RTOS such as Zephyr, FreeRTOS, Mbed, Mynetw, or NuttX
** OS: Various open source RTOS such as Zephyr, FreeRTOS, Mbed, Mynewt, or NuttX. See [[PineTime RTOS Comparison]].
** SoC: NORDIC Semiconductor nRF52832 (final product may use nRF52840)
** SoC: NORDIC Semiconductor nRF52832
** CPU: 64MHz ARM Cortex-M4F  
** CPU: 64MHz ARM Cortex-M4F  


* MEMORY:
* MEMORY:
** Internal: 512KB Flash, 64KB DRAM
** Internal: 512KB Flash, 64KB RAM
** Additional: SPI NOR 8MB Flash (final product may use 16MB Flash)
** Additional: SPI NOR 8 MB Flash


* COMMUNICATION:
* COMMUNICATION:
Line 56: Line 60:
** Built-in LiPo 170-180mAh battery
** Built-in LiPo 170-180mAh battery
** Charging: Proprietary 2pin 5V 500mA, USB type A plug
** Charging: Proprietary 2pin 5V 500mA, USB type A plug


* PRICE:
* PRICE:
** USD $22.99 (PineTime pebble and charging cradle, based on phone on PineTime devkit hardware configuration)
** USD $22.99 (PineTime pebble and charging cradle, based on phone on PineTime devkit hardware configuration)
** USD $2 and up (20mm straight generic wrist band: silicone, NATO, Milanese steel, leather, and etc)
** USD $2 and up (20mm straight generic wrist band: silicone, NATO, Milanese steel, leather, and etc)


== PineTime Schematic and Certifications ==
== PineTime Schematic and Certifications ==
* PineTime Main Board Schematic:
* PineTime Main Board Schematic:
** not yet available
** [http://files.pine64.org/doc/PineTime/PineTime%20Schematic-V1.0a-20191103.pdf PineTime Schematic ver1.0a]
** [http://files.pine64.org/doc/datasheet/pinetime/nRF52832%20product%20brief.pdf PineTime GPIO Port Assignment ver0.2]
** [http://files.pine64.org/doc/PineTime/PineTime%20Port%20Assignment%20rev1.0.pdf PineTime GPIO Port Assignment ver1.0]
* PineTime Certifications:
* PineTime Certifications:
** not yet available
** not yet available


== PineTime DevKit SWD Probe ==
* PineTime SWD probe pinout definition:
[[File:PineTime_SWD_location.jpg]]
=== PineTime SWD Probe Usage Method ===
Slightly bend or zig-zag the probe pins to the left and right to strengthen contact to the SWD pins on the dev kit.
'''Note''': The color coding on the SWD probe wires is random and meaningless.
[[File:PineTime_SWD_Plugin.jpg]]
== Driving the peripherals ==
=== Display ===
The display is driven using the ST7789 display controller. Use the following pins to drive the screen:
{| class="wikitable"
|-
! PineTime pin
! ST7789 pin
|-
| LCD_SCK (P0.02)
| SPI clock
|-
| LCD_SDI (P0.03)
| SPI MOSI
|-
| LCD_RS (P0.18)
| Clock/data pin (CD)
|-
| LCD_CS (P0.25)
| Chip select
|-
| LCD_RESET (P0.26)
| Display reset
|-
| LCD_BACKLIGHT_{LOW,MID,HIGH}
| Backlight (active low)
|}
Notes:
* Chip select must be held low while driving the display. It must be high when using other SPI devices on the same bus (such as external flash storage) so that the display controller won't respond to the wrong commands.
* SPI must be used in mode 3. Mode 0 (the default) won't work.
* LCD_DISPLAY_* is used to enable the backlight. Set at least one to low to see anything on the screen.
* Use SPI at 8MHz (the fastest clock available on the nRF52832) because otherwise refreshing will be super slow.
=== Battery ===
Reading whether the PineTime has power attached is easy: simply read the charge indication pin (P0.12). When it is high it is running on battery, when it is low it is charging.
Reading the battery voltage is a bit harder. For that you can use the battery voltage pin on P0.31 (AIN7). The returned value is 12 bits, which means it is 0..4095. You can get the measured voltage with the following formula, assuming a reference voltage of 3.3V (this is configurable in the ADC):
adcVoltage = adcValue / (4095 / 3.3)
The measured voltage is actually half of the actual battery voltage, because the ADC is connected between a voltage divider where both resistors are 1MΩ. This can be corrected by multiplying the value:
batteryVoltage = adcValue * 2 / (4095 / 3.3)
It's often better to avoid floating point values on embedded systems and in this case there is no reason to use float at all, we can just represent the value in millivolts. Therefore the formula can be simplified to:
batteryVoltage = adcValue * 2000 / (4095 / 3.3)
batteryVoltage = adcValue * 2000 / 1241
Converting this voltage to an estimated capacity in percent requires a more complicated algorithm, because Lithium-ion batteries have a non-linear discharge curve.


== Datasheets for Components ==
== Datasheets for Components ==
Line 79: Line 149:
** [http://files.pine64.org/doc/datasheet/pinetime/SGMICRO-SGM2036.pdf SGMicro SGM2036 3.3V Low Power Low Dropout RF Linear Regulator Datasheet]
** [http://files.pine64.org/doc/datasheet/pinetime/SGMICRO-SGM2036.pdf SGMicro SGM2036 3.3V Low Power Low Dropout RF Linear Regulator Datasheet]
* SPI Flash information:
* SPI Flash information:
** [http://files.pine64.org/doc/datasheet/pinetime/MX25L6433F,%203V,%2064Mb,%20v1.6.pdf Macronix 64Mb(8MB) SPI NPR Flash]
** [http://files.pine64.org/doc/datasheet/pinetime/MX25L6433F,%203V,%2064Mb,%20v1.6.pdf Macronix 64Mb(8MB) SPI NOR Flash]
** [http://files.pine64.org/doc/datasheet/pinetime/MX25L12835F,%203V,%20128Mb,%20v1.6.pdf Macronix 128Mb(16MB) SPI NPR Flash]
** [http://files.pine64.org/doc/datasheet/pinetime/MX25L12835F,%203V,%20128Mb,%20v1.6.pdf Macronix 128Mb(16MB) SPI NOR Flash]
* LCD Panel:
* LCD Panel:
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20LCD%20Panel.jpg 1.3" 240x240 IPS LCD Panel Specification for PineTime]
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20LCD%20Panel.jpg 1.3" 240x240 IPS LCD Panel Specification for PineTime]
** [http://files.pine64.org/doc/datasheet/pinetime/ST7789V.pdf 11.6" Sitronix LCD Driver/Controller Datasheet]
** [https://wiki.pine64.org/images/5/54/ST7789V_v1.6.pdf 11.6" Sitronix LCD Driver/Controller Datasheet]
* Touchpad information:
* Touchpad information:
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20Touch%20Panel.jpg Touchpad Specification for PineTimel]
** [http://files.pine64.org/doc/datasheet/pinetime/PineTime%20Touch%20Panel.jpg Touchpad Specification for PineTimel]
** [http://files.pine64.org/doc/datasheet/pinetime/CST816S数据手册V1.1.pdf 11.6" Nynitron CST816S Capacitive Touch Controller Datasheet in Chinese]
** [http://files.pine64.org/doc/datasheet/pinetime/CST816S数据手册V1.1.pdf 11.6" Hynitron CST816S Capacitive Touch Controller Datasheet in Chinese]
*** [https://wiki.pine64.org/images/5/51/CST816S%E6%95%B0%E6%8D%AE%E6%89%8B%E5%86%8CV1.1.en.pdf English Translation]
* Sensor:
* Sensor:
** [http://files.pine64.org/doc/datasheet/pinetime/BST-BMA421-FL000.pdf BOSCH BMA421 Triaxial VAcceleration Sensor Product Brief]
** [http://files.pine64.org/doc/datasheet/pinetime/BST-BMA421-FL000.pdf BOSCH BMA421 Triaxial VAcceleration Sensor Product Brief]
** [http://files.pine64.org/doc/datasheet/pinetime/HRS3300%20Heart%20Rate%20Sensor.pdf TianYiHeXin HRS3300 PPG Hear Rate Sensor Data Sheet]
** [http://files.pine64.org/doc/datasheet/pinetime/HRS3300%20Heart%20Rate%20Sensor.pdf TianYiHeXin HRS3300 PPG Hear Rate Sensor Data Sheet]

Revision as of 18:24, 15 November 2019

PINE64 SmartWatch "PineTime"

The PINE64 SmartWatch, dubbed "PineTime", is a product of a community effort for an open source smartwatch in collaboration with wearable RTOS and Linux app developers & communities.

PineTime development has been broken down into two distinct phases:

  • Phase One - PineTime Dev Kit Project on October 2019
  • Phase Two - Introducing the PineTime smartwatch around Q1 2020, depending on development results in Phase 1.

PineTime Concept Photo

PineTime leaflet.jpg

PineTime Case and Charging Cradle Photos

PineTime on wrist Photo.jpg PineTime PPG Sensor Photo.jpg PineTime Charging Cradle Photo.jpg

PineTime DevKit internal Photos

PineTime Devkit-1.jpg PineTime Devkit-2.jpg PineTime Devkit-3.jpg

PineTime Devkit-4.jpg PineTime Devkit-5.jpg PineTime Devkit-6.jpg

Watch Information

  • LAUNCH:
    • Announced: Tweet on 13 September 2019
    • Devkit Release: October, 2019
    • Expected Release: Q1/Q2 2020, pending on development result
    • Availability: at least 5 years
  • BODY:
    • Dimensions: 37.5mm x 40mm x 11mm
    • Weight: 38 grams
    • Build: Zinc Alloy and Plastic
    • Environmental Rating: IP67 (waterproof to 1 meter of immersion; not applicable to devkits)
  • DISPLAY:
    • Type: IPS capacitive touchscreen, RGB 65K colors
    • Size: 1.3 inches
    • Resolution: 240x240 pixels, 1:1 ratio
  • PLATFORM:
    • OS: Various open source RTOS such as Zephyr, FreeRTOS, Mbed, Mynewt, or NuttX. See PineTime RTOS Comparison.
    • SoC: NORDIC Semiconductor nRF52832
    • CPU: 64MHz ARM Cortex-M4F
  • MEMORY:
    • Internal: 512KB Flash, 64KB RAM
    • Additional: SPI NOR 8 MB Flash
  • COMMUNICATION:
    • Bluetooth 5 (including Low Energy)
  • FEATURES:
    • Sensors: Accelerometer, PPG Heart Rate Sensor
    • Actuator: Vibrator
  • BATTERY:
    • Built-in LiPo 170-180mAh battery
    • Charging: Proprietary 2pin 5V 500mA, USB type A plug
  • PRICE:
    • USD $22.99 (PineTime pebble and charging cradle, based on phone on PineTime devkit hardware configuration)
    • USD $2 and up (20mm straight generic wrist band: silicone, NATO, Milanese steel, leather, and etc)

PineTime Schematic and Certifications


PineTime DevKit SWD Probe

  • PineTime SWD probe pinout definition:

PineTime SWD location.jpg

PineTime SWD Probe Usage Method

Slightly bend or zig-zag the probe pins to the left and right to strengthen contact to the SWD pins on the dev kit.

Note: The color coding on the SWD probe wires is random and meaningless.


PineTime SWD Plugin.jpg

Driving the peripherals

Display

The display is driven using the ST7789 display controller. Use the following pins to drive the screen:

PineTime pin ST7789 pin
LCD_SCK (P0.02) SPI clock
LCD_SDI (P0.03) SPI MOSI
LCD_RS (P0.18) Clock/data pin (CD)
LCD_CS (P0.25) Chip select
LCD_RESET (P0.26) Display reset
LCD_BACKLIGHT_{LOW,MID,HIGH} Backlight (active low)

Notes:

  • Chip select must be held low while driving the display. It must be high when using other SPI devices on the same bus (such as external flash storage) so that the display controller won't respond to the wrong commands.
  • SPI must be used in mode 3. Mode 0 (the default) won't work.
  • LCD_DISPLAY_* is used to enable the backlight. Set at least one to low to see anything on the screen.
  • Use SPI at 8MHz (the fastest clock available on the nRF52832) because otherwise refreshing will be super slow.

Battery

Reading whether the PineTime has power attached is easy: simply read the charge indication pin (P0.12). When it is high it is running on battery, when it is low it is charging.

Reading the battery voltage is a bit harder. For that you can use the battery voltage pin on P0.31 (AIN7). The returned value is 12 bits, which means it is 0..4095. You can get the measured voltage with the following formula, assuming a reference voltage of 3.3V (this is configurable in the ADC):

adcVoltage = adcValue / (4095 / 3.3)

The measured voltage is actually half of the actual battery voltage, because the ADC is connected between a voltage divider where both resistors are 1MΩ. This can be corrected by multiplying the value:

batteryVoltage = adcValue * 2 / (4095 / 3.3)

It's often better to avoid floating point values on embedded systems and in this case there is no reason to use float at all, we can just represent the value in millivolts. Therefore the formula can be simplified to:

batteryVoltage = adcValue * 2000 / (4095 / 3.3)
batteryVoltage = adcValue * 2000 / 1241

Converting this voltage to an estimated capacity in percent requires a more complicated algorithm, because Lithium-ion batteries have a non-linear discharge curve.

Datasheets for Components