Split-Flap Clock
Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.
Zapisane na tym urządzeniu.
Version mejorada y con agregados del modelo de The Wrench Link al video original https://www.youtube.com/watch?v=BZnZ_EV
- Ocena
- 0 / 5
- Polubienia
- 8
- Pobrania
- 9
- Wydruki
- 0
- Wyświetlenia
- 218
- Oceny
- 0
Aktualizacja u źródła:
Informacje o modelu
- Źródło
- Printables
- Kategoria
- Other Gadgets
- Licencja
- Creative Commons — Attribution — Noncommercial — Share Alike
Improved version with additions based on the model by The Wrench
Link to the original video: https://www.youtube.com/watch?v=BZnZ_EVVWgw
Materials
Arduino Nano
3 × 28BYJ-48 stepper motors
3 × ULN2003 driver modules
3 × 44E Hall-effect sensors
3 × 607-2RS bearings
9 × 3 × 1 mm magnets
USB-C connector module
Assorted screws
Clock operation and calibration guide
When the clock is powered on, all three motors automatically search for their reference positions using the Hall-effect sensors.
Wait until the search is complete before using the buttons. The clock then enters setting mode.
2. Setting the time with the buttons
The buttons are connected to pins A3 and A4 on the Arduino Nano.
A3 — Change value: each press increases the value of the selected field and moves the corresponding motor.
A4 — Next field: confirms the value and advances to the next field.
The settings are made in this order:
Hours: the dial has 12 physical positions, numbered from 1 to 12.
Minute tens: allows values from 0 to 5 to be selected.
Minute units: allows values from 0 to 9 to be selected.
When you finish setting the minute units, press A4 again. The time is confirmed and the clock starts running.
3. Pausing and resuming the motors
During normal operation:
Press and hold A3 and A4 together for 2 seconds: pauses the motors and de-energizes their coils to reduce noise.
While paused, the Arduino continues keeping track of time internally.
Release both buttons, then press and hold them together again for 2 seconds: reactivates the motors and synchronizes them with the accumulated time.
To pause or resume, release the buttons when the 2 seconds have elapsed.
4. Resetting the clock
Press and hold A3 and A4 simultaneously for 5 seconds.
The Arduino resets, and the motors search for their reference positions again using the Hall-effect sensors. You will then need to set the time again.
5. Setting the time again
While the clock is running, press and hold A4 for approximately 1.5 seconds without pressing A3. The clock enters physical adjustment mode.
You can also set the time through the Serial Monitor over USB by entering the format HH:MM; for example, 14:27, and pressing Enter.
6. Motor calibration
This section explains how to correct the position of the indicator vanes if they end up too far forward, too far back, or misaligned.
Where to find the parameters
Open the Arduino .ino file and look near the beginning for the section:
GENERAL CONFIGURATION AND CALIBRATION VARIABLES
The parameters for each motor are grouped there. You do not need to modify the program's internal functions.
There are three groups:
HOURS: the hours-dial motor.TENS: the minute-tens motor.UNITS: the minute-units motor.
6.1. Direction of rotation
Variables:
SENTIDO_HORASSENTIDO_DECENASSENTIDO_UNIDADES
Each can be set to 1 or -1.
For example:
const int SENTIDO_HORAS = -1;
const int SENTIDO_DECENAS = -1;
const int SENTIDO_UNIDADES = -1;If a motor rotates in the opposite direction to the one expected, change only its value from -1 to 1, or vice versa.
Then upload the program again and check the direction during the initial zero-search procedure.
Important: changing the direction may affect how the motor approaches the Hall sensor. Make sure it still finds the zero position correctly before leaving the clock running.
6.2. Motor speed
Variables:
VELOCIDAD_HORAS_RPMVELOCIDAD_DECENAS_RPMVELOCIDAD_UNIDADES_RPM
These are expressed in revolutions per minute (RPM).
For example:
const int VELOCIDAD_HORAS_RPM = 8;
const int VELOCIDAD_DECENAS_RPM = 8;
const int VELOCIDAD_UNIDADES_RPM = 8;To reduce the speed, try 6. To increase it, try 10, provided the motors can move the vanes without missing steps.
If a motor vibrates, jams, or fails to complete its movements, reduce its speed and check the power supply.
Speed controls the motors' movement; it is not the setting that determines how much time passes between one minute and the next.
6.3. Extra movement after detecting zero
Variables:
CAIDA_HOMING_HORASCAIDA_HOMING_DECENASCAIDA_HOMING_UNIDADES
These variables specify how many steps each motor advances after detecting the Hall sensor during zero-position correction.
Example initial values:
const int CAIDA_HOMING_HORAS = 55;
const int CAIDA_HOMING_DECENAS = 200;
const int CAIDA_HOMING_UNIDADES = 100;If a vane is not positioned correctly after zero is detected, change the value for the corresponding motor.
If it needs to advance farther after detecting the sensor, increase the value.
If it needs to advance less, decrease the value.
Start with small changes and check the resulting position.
6.4. Reverse movement after the extra advance
Variables:
RETROCESO_HOMING_HORASRETROCESO_HOMING_DECENASRETROCESO_HOMING_UNIDADES
These determine how many steps the motor moves backward after the extra advance.
Initial values:
const int RETROCESO_HOMING_HORAS = 0;
const int RETROCESO_HOMING_DECENAS = 100;
const int RETROCESO_HOMING_UNIDADES = 80;If the extra advance is correct but the vane ends up too far forward, try increasing the reverse movement. If it ends up too far back, try reducing it.
Adjust the extra advance first, and then the reverse movement, so you can identify which parameter improves the position.
6.5. Extra steps during normal movements
Variables:
PASOS_EXTRA_HORASPASOS_EXTRA_DECENASPASOS_EXTRA_UNIDADES
These are additional steps applied during normal movements, separate from the homing correction.
Initial values:
const int PASOS_EXTRA_HORAS = 0;
const int PASOS_EXTRA_DECENAS = 100;
const int PASOS_EXTRA_UNIDADES = 95;If a motor needs to advance slightly farther when changing a number, increase this value. If it advances too far, decrease it.
These parameters do not replace the zero-search procedure or its correction.
6.6. Reverse movement during normal movements
Variables:
RETROCESO_NORMAL_HORASRETROCESO_NORMAL_DECENASRETROCESO_NORMAL_UNIDADES
These control the reverse movement applied at the end of a normal movement.
Initial values:
const int RETROCESO_NORMAL_HORAS = 0;
const int RETROCESO_NORMAL_DECENAS = 100;
const int RETROCESO_NORMAL_UNIDADES = 95;Adjust them if the dials end up too far forward or too far back after ordinary number changes.
Do not confuse these with RETROCESO_HOMING, which is used for zero-position correction.
6.7. Wait times
Variables:
ESPERA_CAIDA_HORAS_MSESPERA_CAIDA_DECENAS_MSESPERA_CAIDA_UNIDADES_MSESPERA_FINAL_HORAS_MSESPERA_FINAL_DECENAS_MSESPERA_FINAL_UNIDADES_MS
These are expressed in milliseconds.
For example:
const unsigned long ESPERA_CAIDA_HORAS_MS = 200;
const unsigned long ESPERA_FINAL_HORAS_MS = 150;The first pause occurs after the extra advance; the second occurs when the movement is complete.
If the mechanism needs time to settle, you can increase the wait times. If it operates well and you want to shorten the movements, you can try reducing them.
These wait times cannot, by themselves, correct an incorrect position: adjust the step counts first.
7. How to calibrate correctly
To avoid changing many values without knowing which one works, follow this procedure:
Check the direction of rotation. Make sure all three motors rotate correctly and find their Hall sensors.
Adjust the homing advance. Change the value for the motor that does not end up correctly positioned when zero is detected.
Adjust the homing reverse movement. Once the extra advance is correct, fine-tune the final reverse movement.
Test several normal number changes. If positioning is incorrect during these movements, adjust
PASOS_EXTRAandRETROCESO_NORMAL.Adjust the speed. Do this only after achieving mechanically reliable movements.
Record the results. Change one variable at a time and keep the values that work best.
After each change, save the file, upload the program to the Arduino, and check the movements while the dials are visible.
8. Other parameters
Clock speed
The MULTIPLICADOR_TIEMPO variable changes the time scale for testing.
60: each clock minute corresponds to a nominal interval of approximately 1 second.1: the nominal interval is approximately 60 seconds.
Actual timing also depends on how long the movements take.
Sensor-search limit
The variables LIMITE_BUSQUEDA_HOMING_HORAS, LIMITE_BUSQUEDA_HOMING_DECENAS, and LIMITE_BUSQUEDA_HOMING_UNIDADES set the step limit for searching for zero.
Do not change them to correct a misaligned vane. They should only be reviewed if the sensor search cannot be completed, after checking the wiring and sensor operation.
Steps per revolution
The PASOS_VUELTA variable is set to 2048 for the motor being used. Do not change it to correct small positioning errors without first verifying the motor model and its transmission.
9. If the clock stops or resets by itself
Check the power supply, GND connections, and Hall sensors. If the Arduino repeatedly resets, resolve the electrical problem before continuing with calibration.
If a sensor is not detected within the configured limit, the program may stop the motors to prevent further position errors from accumulating.
Normal operation: power on → wait for the zero search → set the time → confirm → let the clock run.
Calibration rule: first direction, then homing advance and reverse movement, then extra steps and normal reverse movement, and finally speed and wait times. Change only one variable at a time.