https://esphome.io/ powered physical time-tracking dodecahedron.
- AGPL-3.0 or later applies to the code and configuration
configuration.yaml
- CC-BY-NC-4.0 applies to the 3D-model, description and other support material
Documentation is lacking at some points, but this is personally not a high priority. The design is mostly settled, but might get some minor touchups. Software might need some improvements, especially for keeping a usage history on the ESP. Right now, this needs to be done manually.
This device is a physical time-tracking device to easily track how long you work on what.
It consists of a 3d-printed dodecahedron (12 sided platonic solid) and uses an accelerometer to detect which side faces up.
By using esphome as a platform, it is then able to expose the detected side as a sensor over MQTT or other protocols.
Check out the model on a360.co. The STL
and f3z
are available in this repo.
- Tracking time for projects (E.g. freelancers that switch between projects)
- Use as scene-selector in home automation setups
Feel free to open PRs to extend this list :)
- Soldering Iron
- Desoldering tools
- Pump, wick or whatever you are able to use
- 3D Printer
Name | Pcs | Note |
---|---|---|
Prints | ||
Printed hull.stl |
1 | Use your preferred color+material |
Printed base.stl |
1 | |
Mechanical | ||
M3 threaded inserts | 2 | Optional, depending on tolerances |
M3x8 screws | 2 | Can be shorter |
M2 threaded inserts | 2 | Recommended |
M2x8 screws | 2 | |
Double-sided tape | ||
Electrical | ||
Lolin32 Lite | 1 | |
GY-521 (MPU-6050 Accelerometer) | 1 | |
Resistor 200kΩ THT | 2 | Other large sizes fine, too(50kΩ-500kΩ) |
Li-Ion battery (with protection) | 1 | |
Jumper wire | GND /INT conection |
|
6x2.54mm pin header | 1 | Direct connection of the GY-521 |
Solder |
- Source the parts on your own
- Print the parts with whatever material you prefer
- Melt the two M3 inserts into the holes of the printed
hull.stl
- Melt the two M2 inserts into the two blind holes of the printed
base.stl
- (Optional: Desolder the JST-PH header for the battery)
- Desolder the LED on the GY-521 (white component next to the x-axis silkscreen)
Before | After |
---|---|
- Stick both resistors with one lead through
GPIO33
and make a solder connection - Solder the other lead of one of the 100kΩ resistors to the
+
-pad of the battery connector - Stick the other lead of the second resistor through
GND
, but don't connect it yet
- Put a piece of jumper wire (~6cm) through
GND
, now solder both the resistor and wire to GND - Solder another short piece of jumper wire (~2cm) on
INT
of the GY-521 - Break away one of the pins of the pin header (you will have one single pin and a row of 5)
- Solder the single pin on VCC of the GY-521, the remaining row on the pins
SCL
toADO
- Solder the other end of the long jumper wire to
GND
of the GY-521 (shown here without Board on the other side)
- Solder the GY-521 into
3V
toGPIO17
of the Lolin32 Lite (This will leaveGPIO22
andGPIO16
unconnected)- Make sure that it's relatively parallel to the Lolin32 Lite
- Solder the other end of the short jumper wire to
GPIO13
of the Lolin32 Lite - Cut the pins on the back of the lolin32 flush
- (If you removed the JST-PH jack: Solder the battery to the pads))
- Modify the
yml
-files in theesphome
directory to your needs (especiallysecrets.yml
) - Connect the Lolin32
- Run
esphome run chrono.yml
in that directory - Check that it works as expected (Side detection, battery level, battery charging)
- The battery level might require fine-tuning. Measure the actual battery voltage level and compare it to the raw reported one.
- Use the M2 screws to attach the Lolin32 to the
base.stl
- Use the double-sided tape to attach the Li-Ion battery to the inside of the
hull.stl
- Close the
base.stl
and thehull.stl
and connect them with the M3 screws.
./src
contains a small python script that connects to MQTT and dumps the state
of the cube in a csv-like fashion (separator is
- space), for easier
processing in spreadsheets.
It can also be configured as a service on NixOS devices by:
- Adding this repository as a flake input, e.g.:
chronodecahedron = {
url = "github:CRTified/Chronodecahedron";
# We only use basic library functions and packages, following your nixpkgs should be safe:
inputs.nixpkgs.follows = "nixpkgs";
};
- Importing
chronodecahedron.nixosModule
as a module - Configuring the service under
services.chronodecahedron-watcher
, e.g.:
services.chronodecahedron-watcher = {
# Make it depend on mosquitto
enable = config.services.mosquitto.enable;
user = "chronos";
group = "chronos";
mqttServer = "localhost";
mqttPort = 1883;
mqttCredentialsFile = "/var/keys/mqttAuth";
device = "timecube";
logFile = "/root/chronodecahedron.csv";
};
Note that credentials bypass the nix store and are stored in /var/keys/mqttAuth
.
This file needs the following entries adapted to your need:
CHRONO_MQTT_USER=$mqttuser
CHRONO_MQTT_PASS=$mqttpass