Build an Simple Arduino Watchwinder

by slviajero in Circuits > Arduino

16 Views, 0 Favorites, 0 Comments

Build an Simple Arduino Watchwinder

IMG_0631.png

This is a poor man's watch winder. I love my automatic Junghans watch very much but being retired now, I don't wear it every day. Watch lovers usually buy expensive watch winders to keep the timepiece winded and ready all the time. This is overdone for someone who has just one, so I build one quickly using a standard servo and an Arduino as main components.

Supplies

IMG_0625.png

This device uses really simple components. You will need

  1. An Arduino UNO or any other Arduino IDE compatible MCU
  2. A standard servo.
  3. A few pieces of plywood
  4. A watch holder maybe from a watch box. Alternatively and piece of wood of the right shape.
  5. A frame, I use a small easel that one can buy in gift shops.

Build the Mechanics

IMG_0626.png
IMG_0627.png
IMG_0632.png

Servos usually come with a few different arms. I use the longest one in the servo kit and screw it to the watch holder. The servo is mounted in a hole of the plywood board just big enough to hold it and fixed with two screws. Then the plywood board is screwed to the easel.

Connect the brown line of the servo to ground, the red line to 5V and the orange line to GPIO pin 4 of the Arduino.

I choose to mount the Arduino at the front of the board but that is a matter of taste.

Upload the Software

I use Arduino BASIC on my Arduinos because it allows me to test and change programs rapidly.

Follow the steps in https://www.hackster.io/sl001/basic-on-arduinos-5b4e24 to get the BASIC interpreter on your Arduino UNO. Connect to the Arduino with the serial monitor at 9600 baud.

Then type in the program

10 PINM 4,1
20 DWRITE 4,0
30 S=80: E=140
40 B=2
50 A=S
100 IF A>E OR A<S THEN B=-B
110 A=A+B
200 P=40+A*20/18
210 FOR I=1 TO 40: DELAY 20: PULSE 4,P: NEXT I
300 DELAY 500
310 GOTO 100

and after this type RUN on the command line.

The watch winder will start to move in small steps. From one side to the other and then reverse.

Lines 10 and 20 setup the GPIO line to output.

Line 30 and 40 define the maximum (E) and minimum angle (S) of the motion and the step size (B).

Line 100 and 110 create the correct angle.

The servo is triggered with lines 200 and 210. The right pulse length (P) for a given angle (A) is computed and then a series of pulses is sent to the servo to adjust the angle.

Then the program waits and loops.

You might need to play with the parameters to get smooth movement and the right angles.

Once you are happy, type SET 1,1. With this setting the program auto starts at every reset.

How Does the Code Work?

The two important lines are

200 P=40+A*20/18
210 FOR I=1 TO 40: DELAY 20: PULSE 4,P: NEXT I

Servos change their state when they receive a signal with 20ms delay, i.e. 50 Hz frequency. The pulse length encode the angle. Zero degrees means P=40 while 180 degrees is P=240. This is the time in 10 microsecond for the pulse to be high. Approximately 40 pulses are needed to set the servo to any angle in this range.

This is the simplest way to control a servo and can be easily ported to C++ using the Arduino I/O commands

int p=40 + a * 20/18
for (i=1; i<40, i++) {
delay(20)
digitalWrite(4, HIGH);
delayMicroseconds(p * 10);
digitalWrite(4, LOW);
}

It requires no timers but blocks the CPU for the generation of the pulses.