Category Archives: uncategorized

Not yet categorized.

A Better (inexpensive but completely overkill) Watch Winder

If you’ve ever heard a CNC machine or a 3D printer, you know the ‘zip, zip, ziiiiiiip’ sounds it makes are coming from the 3 stepper motors trying to keep up with the chips or hot plastic nozzle. Old hard drives were driven with full size stepper motors, and the sound is a Hollywood staple. New action movies with modern computers will still use the stepper motor sounds for the ‘computer is chugging on something’ sound effect, even though these drives are now 20 years old and computers are silent. Are modern stepper motors noisy? They certainly can be, but it turns out the driver that energizes the two coils in the motor dictates how much noise it makes.

I have been on the hunt for a ‘good value’ watch winder to keep my small collection of modified Seiko watches ready to wear (and for testing). With the requirement that I was going to keep this on a bedside table, it needed to be SILENT. Watch winders are priced at what you would expect for a luxury item that no one really needs, for mechanical watches that can cost a fortune. Good ones are really (REALLY) expensive, and cheap ones are noisy and disposable. The motor and gearing being the point of failure made me wonder about steppers as a replacement. Ziiiiiip?

The next google search brought me to Kevin Darrah’s YouTube channel. Where he was testing out a Trinamic SilentStepStick on his 3D printed watch winder. ‘Bingo!‘ I thought, as his Hamilton spun silently around running a small program from an Arduino.  The Trinamic Stepper driver made the motor absolutely silent! But how to build the housing? Even Kevin admits that his CAD was quick and hasty for the mount, and I knew that modeling, printing, and building something like the typical spring loaded holder for the watch was going to be super time consuming and never cost less than a $350 luxury silent watch winder.

What I really needed was a good looking housing, with the cup and watch holder molded plastic, that I could replace the motor, and stuff the electronics inside. A quick Amazon search gave me lots of $40 options, and I’m sure if you were more patient, you could get something in the $25 range shipped from Asia.

I was interested in learning more about stepper motors and controllers. I had a small stack of Arduino Pro Mini clones sitting around, and the stepper motor and driver were going to cost around $30 shipped. Even with $50 of additional parts, this still put me under $100 for a precision software controlled watch winder. Plus a fun two hour hardware project to experiment with Arduino controlled steppers. 😀

Receive intact winder – proceed to tear it apart. As expected, this uses a 5V DC motor powered with a non-UL listed USB power supply. It did have a decent capacitor across the power input on the board, but I was not surprised when I plugged it in and the gear whirring from a hollow box could be heard a few feet away. I removed this and de-soldered the power junctions from the circuit board. I was able to re-use the motor connector, selector switch, and capacitor.

Two things of note: Make sure you have a capacitor across the 12v motor supply side of the SilentStepStick, and connect ALL of the grounds together – including the data side of the stepper driver. At one point, 12v was back-feeding into my 5v Arduino, and let’s not even talk about what happens when you plug that into a USB powered FTDI friend.

I completely removed the battery holder with a Dremel tool, thus giving me a little access panel to mount the Arduino Pro Mini to. A little trimming of the watch cup, some screws, and an aluminum bracket made with the help of a drill and a vise. Some hot glue to keep the bracket from shifting, and the hardware was complete.

After some setup in the Arduino IDE, I was up and stepping! You can really make this as complicated or as easy as possible. I didn’t even connect the data lines to the SilentStepStick. I’m simply using the default setup with only the ‘enable’, ‘step’, and ‘direction’ pins. This means a simple loop drives the motor, and a pin change flips the direction:

for(x= 1; x<1600; x++) //360 degrees
    digitalWrite(step-pin,HIGH); //Trigger one step forward

digitalWrite(dir-pin, !digitalRead(dir-pin)); //flip direction

digitalWrite(enable-pin,LOW); //disable motor when resting

Important: Make sure to disable the motor when ‘resting’. No need to keep the stepper energized with 12v turning into heat. My stepper reached about 100F degrees sitting on my desk, and I added a digitalWrite(enable-pin,LOW); during the rest period. Now the highest temps I see are around 80F.

I timed that it makes 6 full rotations in one minute. 25 turns takes a little over 4 minutes (4.16). I then rest for 25.83 minutes (1550 seconds) and do another 25 rotations in the opposite direction. 50 turns an hour = 600 TPD (Turns Per Day). Automatic watches need between 600 – 800 TPD in order to stay wound and ready to go. I utilized the stock selector switch for ‘STOP’, ‘800 TPD’, and ‘600 TPD’ – there are some watches that only wind in one direction, so you could make any program for any number of turns and rotations. One thing I love is that is does ‘exactly’ the number of steps + turns that you specify. So if you place the watch in the 12-up position, days later it will still be in the 12-up position.

Adding a completely silent stepper motor to upgrade an inexpensive watch winder was a lot of fun, completely overkill, and still cost a fraction of a high end watch winder.

Action Video:

Restore an old Mac

In 1995-1996 I ran a Macintosh GUI BBS on a computer I rescued from the trash. The Macintosh SE/30 was prized for its ability as a server, and at one point mine had four external SCSI drives attached to it, two Hayes Accura V.92 14.4K Modems, and the 40MB built-in drive running System 7. With the RAM maxed out to 8MB and an external monitor card, this build was a top notch machine of its day. If you’re going to restore an old 16bit PC, why not make it the last of the V8 interceptors.

Before I get too far, let me declare that this is not a “how to”. There are far more traveled forums than the comment section of planetkris, and there are many hundreds of articles, and thousands of different things to try to get your retro hardware working. Only one of which will be covered here.

In a box, in a bin, in the last three houses my parents have owned, and saved from a flood, was a couple of my old Macintosh Computers. I think I have mentioned that I would pay to ship these out to me over a dozen times in last 10 years. I have a significant pile of keyboards, mice, cables, and adapters that go along with them. In October of 2018 they arrived in the back of the car that my parents took on their post-retirement cross country trip.

Yes, of course “leaking capacitors.” 15 years of electrolytic goop has been corroding the motherboard. I powered it on anyway just to see what I had gotten myself into, and it actually booted off a floppy that I made on my Windows 10 desktop. The fact that I was able to do THAT MUCH was particularly amazing considering the hardware/software emulation chain that was taking place: Windows 10 driver to access emulated floppy over USB writing bits from a 1990’s .img file using a 32bit Macintosh floppy conversion software on a 64bit multi-core machine. I wasn’t remotely running this on a VM desktop at the time – FYI.

Restoration VS. Nostalgia: I did NOT want this build to turn into a Raspberry Pi attached to a 7″ LCD monitor grafted into the case. I get why people do that, but it’s not at all true to the design of the machine, and it really cheapens the feeling one gets when they see an old computer they used in High School or College with the side hacked open and USB hubs sticking out. I looked into driving the original monitor with a Pi, and it has been done, but emulating hardware in Linux is not something I have any experience with. I decided that I would at least replace the spinny disk with an SD card (SCSI2SD). This alone would make the computer 10 times faster, and I could run real software on a real Macintosh from 1989.

I also experimented with powering the motherboard separate from the monitor. This would allow me to turn the original high voltage power supply off and “save it” should I want to fool around with keeping this machine on the internet or running a terminal, etc. That brushless fan – while still working great – is louder than my dishwasher.

I’m going to keep a Raspberry Pi OUT of the case. My plan is to connect to the Mac over 56K BPS serial with a modem cable connected to an external Pi. Use actual Macintosh terminal / BBS software to do fun and interesting internet stuff. The Pi will negotiate all the Ethernet and TCP/IP Internet heavy lifting. They DO make an Ethernet board for this machine, but I really (really, really) want to keep my external monitor board in there.

: Removing the nasty orange color is pretty easy with SoCal sun and some Hydrogen Peroxide. I tested my method on my older SE first, and then did a carefully controlled amount of whitening to the SE/30. I think I found the balance between “this is still a 20 year old computer” and “bleach all the old things”. There are 1000 formulas for this on the net. I used Oxyclean and “off-the-shelf brown bottle from CVS” hydrogen peroxide.

Once the replacement capacitors arrived, I had to clean the motherboard in the garage sink with soap and water. It’s a little surreal dunking a motherboard into soapy water, but yes, this is the method. A mac bomb error code had cropped up after this and I went back and cleaned again. Now the caps were never going to be a problem, but the damage they caused to the SCSI chip was worse than I thought.

Not Booting: So, what’s wrong with your computer that won’t see a SCSI emulator SD card loaded with an image from some website? How about that 50 pin cable that’s older than your first car. Is the bus terminated correctly? Did that .img file copy okay with the USB loader? Did you assign the right address? I want to give a shout out to “David and Steve’s Blog” who really detailed the process of setting up SCSI2SD.

eBay spares: There are people in other countries that make their living removing old chips off old boards to keep in old boxes. I was able to procure an old NCR SCSI controller chip. I also decided that it would be best for my soldering skills that I socket this chip. The pads on at least 3 of the leads were damaged or missing once I de-soldered, and testing goes a hell of a lot easier if you can remove the chip to fix the traces under it. *thumbnail for scale

Trace twice, solder three times, trace again. This controller has 44 pins. I found that 3 of them were causing problems. Luckily only this chip was damaged. One trace I found before I de-soldered, the second and third one were right next to each other, but used connections that travel under the chip. I broke a fourth trace trying to fix the third, but I knew I was making progress when my SCSI HDD light came on and stayed on. My blind configuration of SCSI2SD worked and I was overjoyed when it FINALLY JUST BOOTED!

The one thing that I love about this machine, is that it does something that we only started taking for granted maybe 5-6 years ago. It drives two monitors, and extends the desktop, IN COLOR. Moving your mouse off of the built in screen with a window of icons over to a second monitor is still delightful. The fact that it was able to do this in 1989 is spectacular. This is not emulation, this is a 1989 video card directly driving an LCD monitor from the 21st century.

I enjoyed the process and encourage my fellow hardware hackers to enjoy restoring some old computer that you thought would never work again. Test your maker, hardware, software, and troubleshooting skills!

Easier, Better, Arduino IMU Head Tracker

mainI’ve recently been immersed in a space sim called Elite:Dangerous. (It’s in Gamma and will be out shortly 12/16/2014.) I play with a small casual group that’s not about to build a ship cockpit in our living rooms or all splurge for a dev kit VR Oculus Rift. Some of us have played Elite on the Oculus and the first thing you miss is “head look”. The game is designed for it, and once you use it dog-fighting in an asteroid field, watching your enemy turn sharp high above you while you cut power and rotate at the same time whilst avoiding giant floating rocks, you don’t want to give it up. This is one of those games (much like a flight simulator) that takes 30 minutes just to map your controller(s).

My brother linked me to a UK group that was doing head tracking with an Arduino (SparkFun Pro Micro) and a Gyroscope / Accelerometer (MPU-6050) over at, “Can you build this?” he asked.

“I can build a better one.” and you can too.

  • No drift – Use hardware that incorporates a magnetometer (compass)
    (The new edtracker 9150 version uses a magnetometer to remove drift)
  • No calibration GUI – Place flat on table when powering on
  • No PCB – Four connections. SCL, SDA, +5, GND

Here’s what makes up the easier better IMU head tracker:

The first thing I noticed was the drift problem. The EDTracker guys have since put out a second version with magnetometer compensation, but they didn’t have it from the start and the hardware difference is around $6. I picked an IMU hardware package that has a great tested library for it. The calibration and angle calculation built into the Pololu libraries – specifically the code from Michael Baker Pololu_Open_IMU (Inertial Measurement Unit) as it uses the Madgwick algorithm is particularly brilliant. It outputs pitch, yaw, and roll angles. Watch a video of the Madgwick algorithm in action.

joy_cplI knew from past experience that the Teensy 2.0 can emulate many types of USB devices right out of the bag. “Joystick.X(value);” was simple to integrate and the device needs no emulation software or additional CPU to work. It just shows up in joy.cpl as a Joystick. You wouldn’t think that an Arduino could handle complex Euler angles and lots of float math on its own, but it has no problem. With the Teensy Joystick, the X,Y, and Z can be directly mapped 0 – 1023.

Lastly there are PCB boards being built for this, and  I’m really not sure why. These are not PCB’s with components on them like an ATMEGA32U4’s and the 9 Degree of Freedom hardware already built in. These are PCB’s just to connect a 9-DOF board with an Arduino. This is all of 4 connections, and the two pins on the Teensy 2.0 are D0 (SCL) & D1 (SDA) and they line up fine on both the Adafruit and Pololu breakouts for an above mount setup.

Yes, I cover the Teensy reset button. The PJRS software has a great auto-loader and you just don’t need it. You also don’t need a fancy PCB – two pins will do.

With the hardware finalized, I mounted it in a small box with a dab of hot glue and a cut-out for  the mini-usb. Here’s the test:

For the head tracking code I used Fscale to scale map the angles to the joystick. This is the part where you amplify a tiny amount of head movement into a larger amount of in-game head-look movement.  I settled on a 50° angle for pitch and roll, and an 80° angle for left and right (yaw). You’re more than welcome to try a different scale by changing the low and high Fscale numbers (-25 & 25 = 50° of movement translates into -90° & 90° of game movement) Everything else is directly from Michael Baker mikeshub/Pololu_Open_IMU. Such a tiny amount of code here is from me that I don’t even want credit for it. 😛 I’m just a lowly hardware guy that can smash out some C#. Example:

if (pitch < 0){pitch = fscale(-25, 0, 0, 512, pitch,0);} else {pitch = fscale(0, 25, 512, 1023, pitch,0);}

Here’s a list of what you will need for software:

The device calibrates when it it powered on, make sure it’s flat and motionless. After that it takes an initial heading reading and starts to blink. 20 more seconds of being on, and that heading is locked in. I commented out all of the serial outputs and zip tied it to my headset:

Results: After playing for 3 hours I had zero drift. It stays pointed at the direction of your monitor forever. I considered adding a curve to the scaling to provide a “dead zone”, but the game has a dead zone setting built-in and I’d rather just output 100% and let the game / user control the settings. I also mapped the roll axis and one could use it to fire the roll thrusters in the game. For ~$45 you now have a cool little IMU that you can experiment with!


Update: If you would like to configure it to work with Opentrack (supports TrackIR games), you will need to map the axis 1:1 with the joystick output and then set all your curves and config up in Opentrack.

fscale(-90, 0, 0, 512, your_axis,0)
fscale(0, 90, 512, 1023, your_axis,0)

Update 1/16/2016: Uploaded code and working with Grégory Paul over on