summaryrefslogtreecommitdiff
path: root/portfolio/watch-winder/index.html
blob: e2c670408755701dfe2e0a45c88b38586a1d31d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html lang="en">
<head>
	<title>Watch Winder | ekd&#39;s Homepage</title>
	<meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" type="image/png" href="/logo.png">
    <link rel="stylesheet" href="/style.css">
</head>
<body>
	<header>
		<a href="/"><img src="/logo.png" style="width:40px;height:40px;"></a>
		<nav class="menu">
			<ul>
				
					<li><a href="/blog/">Blog</a></li>
				
					<li><a href="/portfolio/">Portfolio</a></li>
				
					<li><a href="/cv.pdf">CV</a></li>
				
			</ul>
		</nav>
	</header>
<main>
<div class="container">
<article>
<section class="header">
    <h1>Watch Winder</h1>
</section>
<p>A close friend of mine recently gave me a few watches, one of which being an automatic one. I&rsquo;ve never owned one before, and upon learning how it works, it occurred to
me that I don&rsquo;t really want to set the watch to the correct time everytime I wear it. Sure it might increase the lifespan since the mechnical parts are moving less often,
but I&rsquo;m placing convience above it.</p>
<p>There&rsquo;s this clip from the 2016 movie &ldquo;Dr. Strange&rdquo;, where the main protagonist before going out for a drive, opens a drawer to which a dozen spinning watches are placed.
I wanted to replicate this, so I did. Or at least, sharing my progress halfway into the project.</p>
<h2 id="design-considerations">Design Considerations</h2>
<p>I&rsquo;ve never programmed in assembly before, so I wanted to make this project start with that. Now the architecture. AVR is probably the best bet here, there&rsquo;s tons of 
resources available for it, and it&rsquo;s widely popular for people taking the leap and ripping the MCU from an arduino. ATmega328p it is. Now for spinning the watch. This
device has to be silent, ie stepper motors with a Trinamic driver. I found this one with a silent step feature, TMC2100, seems pretty promising.</p>
<h2 id="layup">Layup</h2>
<p>Standard stuff with the schematic, just followed the data sheet for both the MCU and the driver. I decided to opt for barrel jack as the power input. 12V input, which
is compatible with this low power stepper I&rsquo;m using.</p>
<p><img src="/portfolio/watch-winder/images/Schematic_1.png" alt=""></p>
<p>The layout was pretty tricky. I let my ego get in the way to see if I can do this board in only a 30mm by 20mm footprint. Once I got started, I immediately knew this
has to be a 4 layer board. No way in hell I can do this in 2. Here it is.</p>
<p><img src="/portfolio/watch-winder/images/Layout_1.png" alt=""></p>
<p>And of course a 3D Model:</p>
<p><img src="/portfolio/watch-winder/images/3D_1.png" alt=""></p>
<p>PCBs came in, I&rsquo;d say they look pretty well done, reflowed all of the components on, the QFN trinamic driver was rather hard to touch up, since the parts were crammed so
tightly in. Here is the full PCBA:</p>
<p><img src="/portfolio/watch-winder/images/PCBA_1.jpg" alt=""></p>
<h2 id="analysis-of-r1">Analysis of r1</h2>
<p>Obvious packaging mistake on my part&hellip; Nothing like a slight-of-solder won&rsquo;t solve. And it doesn&rsquo;t hit a current cap when I power it on, so at least they&rsquo;re no short circuit.
I got onto programming it, using avr-dude as the programming application, and AVRA as the assembler. Untested code that should theoretically work is on my 
<a href="https://git.erickhangdao.com/watch_winder">git server</a></p>
<p>Here&rsquo;s a tip in 2022: buy your chips right after you finish designing. Of course I forgot about the chip shortage, so I thought I could big-brain this situation by ripping
the ATmega328p off of an Arduino Nano I had laying around, which is luckily the same chip I designed for. Caveat is that there&rsquo;s a bootloader preinstalled at the end of the
flash memory. I should have done more research into AVR programming, because turns out, you can&rsquo;t mess with the boot loader if you program using UART, which is the only interface
that I designed headers for. Tried a whole bunch of different avr-dude configurations, no luck. Looks like I&rsquo;m going to have to redo the board, and include header pins for SPI, which
I know now is the main way you should be programming this MCU.</p>
<p>Also for some odd reason I suppose I was on autopilot when speccing out the filter caps for the TMC2100, and used the recommended 50V caps, when I know I&rsquo;m only going to be 
using a 12V stepper&hellip; So instead of paying 3 cents for a cap, paid 3 dollars.</p>
<h2 id="layup-of-r2">Layup of r2</h2>
<p>Finished layup of r2. More detailed change log is in the schematic. The main addition was the ICSP header to program the MCU through SPI. Honestly, I preferred the layout of
r1, but r2 is much cleaner.</p>
<p><img src="/portfolio/watch-winder/images/Layout_2.png" alt="">
<img src="/portfolio/watch-winder/images/3D_2.png" alt=""></p>
<p>//Be back in a few weeks&hellip;</p>
</article>
</div>
</main>
<footer>
        <div class="container">
                <span><a href="mailto:eric@erickhangdao.com">eric <b>at</b> erickhangdao <b>dot</b> com</a>; <a href="/publickey.eric@erickhangdao.com-6b70cb1253da6f17ad37f4bc50820f12f8834a25.asc">PGP if you care</a></span></br>
                <span>© 2023 Eric-Khang Dao</span></br>
        </div>
</footer>
</body>
</html>