January 15, 2025
Description
THIS MAY BE OUTDATED! Latest version always at https://github.com/LockManipulator/Locksport/tree/main/Safe%20manipulation/Digital%20Dial%20Magnifier
This is an encoder that sits on the dial of a safe lock to aid in manipulation. It can read down to 0.088 degrees (1/40th of an increment). Printables won't let me upload the files for the web server so you'll have to get them from the github page above.
Features:
1. Precise dial readings.
2. Customizable colors and styles.
3. Saveable graph of contact points.
4. Can run off either the 1,000mah (at least several hours) battery or USB c.
5. Has pass through charging.
6. Compact.
7. Cheap ($10-$20 depending where you buy).
To do
1. Better graph interface.
Use:
1. Put a small piece of double sided tape where the magnifier touches the dial.
2. Slide the magnetic base on to the front of the safe.
3. Slide the main body onto the rod and make sure it's both centered over the dial and level before sticking it on.
4. The encoder will automatically think it's on 0 so turn the dial to 0 before turning it on.
5. You can tighten the screws onto the rod but I do find it's better to leave it loose to allow a bit of wiggle since you won't get the magnifier on perfect. This bit of wiggle won't affect your readings.
The magnifier can be used as is or you can connect to its wifi for greater capabilities. Just connect to the wifi "DDM" with the password "magnifier" and go to 192.168.0.1 in a web browser.
BOM:
The below links are simply the exact items I bought. It will most likely be cheaper if you find a listing for smaller quantities.
1 of each print file
1x Esp32s3 mini: https://a.co/d/dx1Epni
1x 1.28in Round TFT Screen: https://a.co/d/e5kYErv
1x Battery (1,000mah, max 36mmx31mmx11mm) : https://a.co/d/a7W6ZNP
1x USB-C charge/discharge board: https://a.co/d/149T6ac
1x On/off switch (18mmx12mmx6.25mm): https://a.co/d/1Zt4meo
1x AS5600 magnetic encoder (with diametrically polarized magnet): https://a.co/d/66bdv7Q
1x Bar magnet (60mmx13.5mmx5mm but the standard 60x10x5 should be fine to glue in too): https://a.co/d/07pE4ml
1x 6.35mmx100mm rod (or print one): https://a.co/d/d7H9jlQ
2x m3 heat insert (sized to fit in 5.2mm diameter hole): https://a.co/d/cIcD6mn
6x m3 bolt (2x >=15mm, 4x 6mm-10mm): https://a.co/d/1uQwlYJ
Wires: You probably want red, black, and at least 4 other colors as well. I don't recommend anything thicker than 22 gauge due to the space.
Wiring:
Please test your on/off switch to make sure it's off before wiring it up. Mine is off when the button is clicked in and on when the button is out.
Charging board:
Battery '+/-' pads to battery '+/-' wires.
Out '+' pad to one of the on/off switch prongs.
Out '-' to esp32 ground pin.
On/off switch:
One prong to battery '+' pad and the other prong to esp32 5v pin.
Encoder:
VCC to esp 3v pin
OUT to esp pin 5
GND to esp ground
DIR to esp ground
SDA to esp pin 8
SCL to esp pin 9
Screen:
VCC: Esp32 5v pin
GND: Esp32 ground pin
SCL: to esp pin 2
SDA: to esp pin 3
DC: to esp pin 10
CS: to esp pin 11
RST: to esp pin 12
Assembly guide:
1. Insert the two m3 heat inserts into the gripper lid.
2. Insert the magnet holder into the body and then insert the magnet (the magnet makes it hard to put in and out).
3. Solder wires to the AS5600 board (wires coming out the back!) and screw it into the body (chip side down, wire side up) with the 4 6mm bolts. Different brands even of the same aesthetic seem to have slightly different dimensions so you make need to lightly file a side of the pcb to fit.
4. Solder the headers onto the esp32 facing up. Clip the bottom flush and clip the headers near the encoder so they don't stick up past the bolts holing the encoder down.
5. Solder wires to the screen then put it in the body. The back should rest on the 4 bolts holding the encoder down. You'll have to cut down the corner of the button since it's in the way. I just used an xacto knife. There's only plastic there so no harm to the functionality of the button.
6. Put each part in it's respective cutout and then solder the connections. I would start with the shorter connections first so those wires can lay flatter.
7. Put the lid on. The tab on the flat end goes first then lower the rounded end down.
8. Screw the bar magnet into the bottom of the base and then insert the rod into the top.
Depending on what battery you got, there should be just enough space for a piece of thick double sided tape under the battery if you wish. Everything else should be a press fit but you can always use a bit of glue if it's too loose.
Arduino IDE settings:
Board: ESP32S3 Dev Module
USB CDC on boot: Enabled
CPU Frequency: 240MHz (WiFi)
Core Debug Level: None
USB DFU On Boot: Disabled
Erase All Flash Before Sketch Upload: Disabled
Events Run On: Core 1
Flash Mode: QIO 80MHz
Flash Size: 4MB (32MB)
JTAG Adapter: Disabled
Arduino Runs On: Core 1
USB Firmware MSC On Boot: Disabled
Partition Scheme: Default 4MB with SPIFFS (1.2MB APP/1.5MB SPIFFS)
PSRAM: QSPI PSRAM
Upload Mode: UART0/Hardware CDC
Upload Speed: 921600
USB Mode: Hardware CDC and JTAG
If you're using Arduino IDE above version 1.8 (99.9% you are if you use Arduino IDE) then do this to upload the web page into the esp on board filesystem:
1. Make sure your arduino sketch project folder has a folder called 'data' with the index.html file in it. The 'data' folder should be in the same directory as encoder.ino.
2. Download the latest .vsix file from https://github.com/earlephilhower/arduino-littlefs-upload/releases (where these instructions come from).
3. Put it in ~/.arduinoIDE/plugins/ on Mac and Linux or C:\Users\<username>\.arduinoIDE\plugins\ on Windows (you may need to make this directory yourself beforehand)
4. Restart the IDE.
5. [Ctrl] + [Shift] + [P], then "Upload LittleFS to Pico/ESP8266/ESP32". If there's an error of not being able to use the serial port, close all serial monitors and plotters and try again.
The code for the encoder uses Rob Tillaart's AS5600 library https://github.com/RobTillaart/AS5600/tree/master
The code for the screen uses Adafruit's GC9A01A library https://github.com/adafruit/Adafruit_GC9A01A/tree/main
Wifi libraries
https://github.com/mathieucarbou/AsyncTCP
https://github.com/mathieucarbou/ESPAsyncWebServer
License:
Creative Commons — Attribution — Share Alike
9