Tag Archives: Arduino

Lego Watch Winder Mk2

It’s tested and finished!

This is the list of stuff that have been implemented, some planned, some improvements were reactive.

  • Direct stepper drive
  • LCD display
  • Rotary switch to control rotation direction, TPD settings, and turn on the LCD backlight.
  • Maxed out the RAM/processing power of the Arduino – revamped the source code
  • Re-arranged the board layout, cable management
  • Mounted on custom cut acrylic and Lego baseboard; 3mm acrylic cover

Finished pictures below; here’s also a video of it at work.

Lego Watch Winder Mk1

For those following my winder project 3 years ago… I’m sorry.

The acrylic rig binded and squeaked, the photointerrupter died… and as soon as I got myself in gear ordering replacements, etc… Wifey got pregnant, and being a first time expectant dad, I ran around like a headless chicken doing this and that.

And so died the Gear Winder Project…

Timmy is almost 2, and about 2 months ago I thought I should revisit this project. I got some a lot of inspiration from this guy. I can’t build something like that! I don’t even have 4 automatic watches! I also decided that this new iteration would be made using Lego – my childhood love.

I dug up the old Arduino, ordered the bits and pieces, and here is Mk 1.

Here’s a video of it working.

Mk 1 runs on an Arduino Uno, with a Easy Driver board and driving a stepper motor. The watch carrier is a piece of 2 3/4″ aluminum tubing painted black and a white line down it for a line sensor to detect and count revolutions. A left over real time clock shield is also in place for future expansion.

The belt drive system is prone to tension and slippage problems. This can be seen in the choppy watch carrier movement in the video.

I have torn Mk 1 down and embarked on Mk 2, which will have direct drive. Here’s a sneak peek.

Direct Drive

Changes planned for Mk 2 include a LCD screen, and some control mechanism. And a 3mm Acrylic cover, which should keep wifey happy. ;-)

iPhone4 Charging and Control with Arduino


And here we go. A PodBreakout v1.5 with cables for music, charging and serial communication with an Arduino. Charging is accomplished with the appropriate voltage divider resistors and power from a 7805. Serial communications via a Logic Level Converter, a breakout into a regular 3.5mm audio plug. Last but not least, Pin 11 to ground for audio output to Lineout; and Pin 21 with 500kOhms to ground.

Guide for pinouts at Pinouts.ru.

Currently, the SimpleRemote program switches between play and pause every 5 seconds; but there you go – proof of concept. The “This accessory is not optimized for this iPhone” message will pop out, but will go away after the 1st cycle of play/pause.

Nice. Next steps. Integrate this into the hardware and software for the Actigraphy logger; and the dreaded enclosure design phase begins.

I’m calling this the SleepyDock. ;-)

DIY Actigraphy with Arduino

In an effort to understand how well or badly I’ve been sleeping, some ghetto actigraphy had to be done. So for the past month or so, I’ve been sleeping with an accelerometer under my pillow.

I'm such a freak

Pictured is a MMA7341L based accelerometer, an Arduino Uno, a ScrewShield, a Datalogger Shield and a Protoshield. All either from Mr Wong of Robot R Us or AdaFruit.

Progress has been slow, due to my bad programming skills and the write-upload-sleep/test-analyse nature of the project. I actually enjoy the sleep/test portion very much! And every morning, I yank the SDCard to my PC for some Excel graphing.

Light and Temp are achieved with a photo resistor and temperature sensor. Samples are taken once per second and once per minute respectively. The SDCard logs maximums once per minute, including accelerometer data.

“Jump” is a little harder to explain. I read only the Z-Axis. The accelerometer registers 1G facing upwards and -1G facing downwards, so registers 640-ish or 380-ish on “AnalogRead”. So to register every time a significant movement (or jump) is detected, the program compares the maximums for the last 2 minutes and logs the differences as well as the raw accelerometer data.

The green LED also lights up and is PWM’ed to reflect jumps on a per second basis.

Fun! But I have to say, I’m standing on the shoulders of giants here. The original idea from an article by Loic Royer. The code for the internal millisecond clock by Daniel Andrade, Adafruit’s very comprehensive code (and circuit diagrams) for data logging temperature, light and time.

Next steps, have the device charge my iPhone4, and wake me up to music at my pre-programmed time, or up to 1 hour early if I start tossing around enough in bed. This is gonna be achieved through the iPodSerial library (original by David Findlay, forked by Blalor)

Woohoo! This is gonna be fun!

p.s. If you want the code, let me know. It’s work in progress, but I *do* document.