Ye Olde Status Clokke

Made by Leslie Liu

Understanding motors and servos.

Created: November 26th, 2024

0

Intention

Inspired by the Weasley family clock in the Harry Potter series; Paper Signals (Isaac Blankensmith, Glenn Cochon, Matthew Carey, Smooth Technology, and Kelly Ann Lum) — as well as certain artfully constructed metallic and magnetic status boards in the basements of Margaret Morrison Carnegie Hall — I wanted to make a simple deskside device that I could use daily, integrating a servo's movement and Particle cloud functions.

0

Process

Originally I had wanted to play with the tradition of European medieval manuscript marginalia and the figure of the manicule —but then realized setting up a rig would likely be overpowering/overengineered. While the wireup was generally free of troubles, I initially ran into some issues programming, as I had forgotten — briefly — that the servo.write() function takes in resultant angles, rather than differences in angular rotation. Code is as follows.

0
#include "Particle.h"
int servoPin = D15;
int servoPos = 0;

SYSTEM_MODE(AUTOMATIC);
Servo serv;

SerialLogHandler logHandler(LOG_LEVEL_INFO);

bool shouldWobble = false;
bool shouldCountdown = false;

void setup() {
    Serial.begin(9600);
    serv.attach(servoPin);
    Particle.function("setStatus",handleSetStatus);
    Particle.function("tweak",handleTweak);
}

// this debugging function lets me fine tune servo position.
int handleTweak(String cmd) {
    if (cmd=="a") {
        serv.write(10);
        delay(1000);
        serv.write(-10);
        delay(1000);
    }
    delay(1000);
    int deg = cmd.toInt();
    serv.write(deg);
    return 1;
}

int handleSetStatus(String cmd) {
    int tgtAngle = 0;
    int n = 120; // 120 is true north 
    if (cmd == "working") {
        tgtAngle = 150;
    } else if (cmd == "away") { // alas this does not work due to the range of motion of the micro servo
        tgtAngle = 180;
    } else if (cmd == "out") { // alas this does not work either
        tgtAngle = -180;
    } else if (cmd == "meeting") {
        tgtAngle = 0;
    } else if (cmd == "available") {
        tgtAngle = 70;
    } else {
        tgtAngle = 120;
    }
    serv.write(tgtAngle);
    int fakeDelay = 1000*60; // 60 second delay
    delay(fakeDelay);
    serv.write(n);
    return 1;
}

void loop() {
}
Click to Expand
0

Outcome

Ye Olde Status Clokke is working! But due to the microservo’s 180˚ range of motion, I can never set it to “away” or “out” — using a DC motor may have avoided this altogether... but folks don't need to know :') Another way I post-rationalized this was the fact that if I were physically absent from/at my desk, that's enough of a sign that I’m out/away... By using the fake delay to simulate a period of time passing, I was able to bring this device to semi-imaginable realms. Ideally, personally the availability updates would be triggered by a physical switch, rather than typing on my computer into the Particle cloud — since the former feels more like a definitive shift into a new state/activity.

0

Setting the Clokke to “working” during a focused work session, then to “available” after the session ends.

0

Closer video of the Clokke in action.

0

Back of the clock. It definitely could use a more polished and forgiving enclosure as demonstrated in Paper Signals, but I felt this was sufficient so that I could easily disassemble it during debugging sessions.

0

Wireup: a simple microservo connected to a Photon 2, connected to the Particle cloud via cloud functions remotely activated/triggered.

0

Servo is notched into cardboard casing.

0

Reflection

I’d probably build a more elaborate cardboard encasing for the electronics, stick the clock face to a harder card stock or thin (ply?-)wood, and explore the aforementioned physical switch input integrations — which would presumably be perceivable as events in Particle cloud.

0

Clock viewed from below.

x