A bedside clock with OLED graphical display.

This clock is controlled by a Teensy 3.2 processor which has a built-in RTC. It has a 32x128 graphical OLED display and is controlled by a 16-position selector and a 3-way momentary switch. It also has modes selected by tilting the box.

WARNING

To prevent shorting the USB power supply to the battery, switch off the battery before connecting the programming cable! After programming, remove its cable then switch the battery back on while pressing the bypass pushbutton.

INSTRUCTIONS

This device is battery-operated, self contained, and uses a graphic OLED display. Since the display uses 50+ MA it is normally off. A jolt turns it on via an accelerometer, which is always powered. Its interrupt output turns on the power relay. The power is maintained by a PWM signal until turned off under program control.
It is controlled by a 16-position selector and a 3-way momentary switch. Modes are selected by tilting the box and by selected positions.
The initial mode is intended to tell the time at night. It is the default on power-up which is done by tapping or a sideways movement. In this mode large numerals appear and the power goes off after a short time.
Two modes are entered from the initial display by rotating the box around its two horizontal axes. These modes provide control of remote devices via 433 MHz transmissions. They have a longer timeout which resets by any control action.
The Settings mode is entered by selection from specified mode positions. It consists of information pages and settings.
All selections display the results of switch operation.

It is made with four sub-assemblies:
The controller has a Teensy 3.2 micro controller and a LIS3DH 3-axis accelerometer.
The display is a 32x128 pixel OLED.
The power assembly contains a 1.2AH Li-ion battery, its charger circuit, and the power relay.
The transmitter assembly also contains a BME680 environment sensor.

These are the photos of the finished clock.

Here is the Arduino sketch.

Here are the circuit diagrams.