sensor-watch/README.md
2021-08-02 17:04:33 -04:00

2.9 KiB
Raw Blame History

The Sensor Watch

The Sensor Watch is a board replacement for the classic Casio F-91W wristwatch. It is powered by a Microchip SAM L22 microcontroller with built-in segment LCD controller. You can write your own programs for the watch using the provided watch library, program the watch over USB using the built-in UF2 bootloader, and then install the board in your existing watch case to run your own software on your wrist.

image

Features:

  • ARM Cortex M0+ microcontroller
  • 32KHz crystal for real-time clock with alarm function
  • Ten digit segment LCD, plus five indicator segments
  • Three interrupt capable buttons (one can wake from backup mode)
  • Red / green PWMable LED backlight
  • Optional piezo buzzer (requires some light soldering)
  • On-board USB Micro B connector
  • Reset button with double-tap UF2 bootloader
  • Nine-pin flex PCB connector

image

You may have noticed that there are no sensors on this board. That is by design: rather than pick sensors for you, the goal is to add a tiny flexible PCB with the sensors YOU want, and interface them over the nine-pin connector. In addition to providing ~3V power and ground, the connector provides the following options for connectivity:

  • An I2C interface with built-in pull-ups
  • Five general purpose IO pins, which can be configured as:
    • Three analog inputs and two digital IO
    • An SPI device + one analog / GPIO pin
    • One UART + 3 GPIO
    • Five digital IO pins
    • Four PWM pins on two independent TC channels
    • Five interrupt pins (two can wake from backup mode)

These tiny “sensor boards” have a set outline, and the available area for your electronics is quite small (5.7 × 5.7 × 1 mm). Still, this is plenty of room for an environmental sensor, MEMS accelerometer or magnetometer and a couple of decoupling capacitors. Note that you will likely be limited to QFN and LGA type parts; SOICs are too large, and even SSOP packages are generally too thick. You can find reference designs for several sensor boards in the PCB/Sensor Boards directory within this repository.

Getting code on the watch

The watch library in this repository is very work-in-progress, but it should allow you to get started. To create a new project, copy the “Sensor Watch Starter Project” and write your code in the app.c file.

To build your project, open your terminal and navigate to the build folder, then type make.

To install the project onto your Sensor Watch board, plug the watch into your USB port and double tap the tiny Reset button on the back of the board. You should see the LED light up red and begin pulsing. (If it does not, make sure you didnt plug the board in upside down). Once uou see the “WATCHBOOT” drive appear on your desktop, type make install. This will convert your compiled program to a UF2 file, and copy it over to the watch.