element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs TimeFrame part 1
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: andysc
  • Date Created: 3 Jul 2015 9:03 AM Date Created
  • Views 1475 views
  • Likes 2 likes
  • Comments 2 comments
  • second_life
  • timeframe
  • @andysc
  • andy_stanford-clark
  • arduino
Related
Recommended

TimeFrame part 1

andysc
andysc
3 Jul 2015

imageimage


Way back in 2007, when a lot of us were enthralled by immersive 3D worlds like SecondLife, I had a great idea for a novel type of clock, which I called the "TimeFrame".

 

I wasn't sure if the idea would be quite as cool in reality as it was in my head, and I knew that making a physical version of this device would be mechanically difficult, time consuming, and expensive.


So I decided to build a prototype TimeFrame in the SecondLife 3D immersive world, which was a LOT easier than building it in real life (or "FirstLife" as we called it!). I could then show a working prototype to other people in SecondLife to see if they thought it was as cool as I did.


Here's a blog post plus video I wrote about the virtual TimeFrame in July 2007. I was completely convinced that the TimeFrame *was* as cool as I suspected it would be, and from then on, have harboured a desire to build a real TimeFrame.


You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

So what is the TimeFrame? It's a continuously updating binary display of a number called the Unix Datestamp that computers all over the world use to count the number of seconds since a notional "beginning of time" on 1st January 1970. We're currently up around 1.4 billion (1,436,913,091) seconds. But the TimeFrame displays it in *binary* - 1s and 0s - or, this case, black bars and white bars, which flip over in a mesmerising and rather pleasing way, continuously displaying the current value of the Unix Datestamp that, if you decode it, gives you the date and time to the nearest second.

 

As an example, a rather visually pleasing date has recently passed in the unix timestamp world: at 2.09AM on 15th May 2015, the unix timestamp was 1,431,655,765. Not very interesting, you may say, until you convert it to binary:


01010101010101010101010101010101


Cool, huh? On the TimeFrame, that would have been alternating black and white slats all the way down the line.


My experience with building the virtual TimeFrame in SecondLife convinced me that the idea *was* as cool as I thought it was, and everyone who saw it thought it was amazing. So I set myself the challenge of one day building a physical TimeFrame, in the real world.

 

One idea I had was that it would be a garden ornament - one that was big enough to be visible from the aeroplanes that take the photos for Google Earth and other mapping applications, so you would always have a sort of "barcoded" record on the photo of the exact time and date it was taken. That, however, would need the TimeFrame to be about 4 metres long, which seemed like a daunting prospect from a mechanical engineering point of view!

 

Eight years passed, during which I thought from time to time about how to implement the mechanics of a real-world TimeFrame. I had ideas about using motors, using cams and microswitches to delimit the slat rotation. I thought about stepper motors and geared motors with optical position encoders. All of these, were variously clumsy, complicated, expensive and unreliable, and with 32 slats to automate I needed something much simpler. I eventually settled on servo motors, and hit upon the idea of using slats with right-angle section, so I would only need to turn through 90 degrees rather than 180 degrees to make the transition from black to white.

 

I was still not sure how the mechanical engineering part would go, so, encouraged by Lucy Rogers' projects, I built a 4 digit prototype to validate all the design and construction considerations. Here's an 11 minute video of the prototype and first few next steps:


You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

The slats are made from right-angle section plastic, sold as edging strip. I chose 1m long by 50mm wide slats that were available from a local hardware shop. They are turned using a servo motor which has a 180 degree range. We only need 90 degrees of rotation, so that we can display one side of the slat, or turn through 90 degrees to display the adjacent side.

imageimage

 



image

 

Using masking tape and spray paint, one side was made black, the other left white.



image

A small block of wood was screwed to the inside of the slat, and the plastic actuator arm of the servo was screwed onto that. A hole through the middle of the wood block enabled the actuator arm to be screwed onto the rotor of the servo.

imageimage

The other end of the slat needed a bearing of some sort to allow the slat to rotate under control of the servo motor. A block of wood at that end of the slat had a hole in it and a cocktail stick pushed through. This rested in a hole drilled through the side of the TimeFrame, which was lined with a small length of plastic pipe, to reduce the friction of the bearing.

image

 

The holes in the side of the TimeFrame for mounting the servos were very carefully measured, marked and cut out, as I wanted the slats to be as close together as possible, without them hitting each other when they rotated. I used Pythagoras' Theorem to work out the clearance needed by each slat, and ensured that even if two adjacent slats were in the "widest" position at the same time (half way between black and white), they would clear each other with 1mm gap.

 

The frame of the TimeFrame was made from 18mm x 70mm pine, and was carefully cut to size and the holes for the servos and bearings carefully measured and drilled, as the accurate alignment of the slats required precision in the drilling and cutting.

image

The servo motors run on 5 Volts, and are controlled from an Arduino micro controller. The Arduino Uno can drive up to 4 servo devices simultaneously, so that was fine for our prototype.

image

I experimented a lot with the speed of rotation, as I wanted a pleasing "rolling" effect as the digits carried over in the binary sequence. If the servo is turned too slowly, it appears jerky. If too fast it doesn't appear to roll: it just snaps from one position to the other. I also had to make the rolling fast enough that all the slats could be turned, if required, in less than one second. Otherwise, the first digit would need to turn again before the program had finished turning all the slats, so it would fall behind in its time keeping. With just 4 slats this was not a problem, but I realised that a different approach would be needed for the full-size 32 slat time frame, as a long roll of many digits could take several seconds!


A mechanical problem that I discovered, was that servos are sometimes prone to "jitter". The flexibility of the slats meant that when the servo turned them, there was a bit of a twist, and this could over-shoot the required position. In trying to maintain the position they had been set to by the Arduino, the servo would then go back the other way a bit, which would flex the slat the other way, and I sometimes saw quite violent oscillations in the slats as the servo fought to keep them at the desired position.

 

I tried many ways to solve this problem: making the slat stiffer (with a wooden strip inside), increasing the friction on the far-end bearing (by making a bed of Sugru for the cocktail stick to turn on), replacing the servo, thicker and thinner blocks of wood at the ends of the slats, slower turning, faster turning, different start and end angles for the servo. Eventually, I concluded that the slats were too flexible, and reached a compromise with high friction end bearings and careful selection of the servo angle positions.

 

In order to set up the correct angles for the black and white position of each slat, I wrote a "tuning" application. In tuning mode, the TimeFrame would start with all slats in what I call "tent" position: half way between black and white. The first slat would then flip into white position, and the knob of a potentiometer could be used to manually turn the servo by telling the Arduino to move the servo one degree at a time in each direction according to the turning of the knob. The angle setting was printed out to the serial port for display on a connected laptop. After the correct angles for the black and white positions of the first slat were identified, a pushbutton was pressed to move on to the next slat. The angle readings are hard-coded into the Arduino application, so that after the tuning process is complete, the TimeFrame in its normal clock mode runs with correct alignment of the slats in their two colour states.

 

Valuable lessons learned from the prototype:

 

* Measure twice, cut once!

* Ensure there is enough clearance between the first and last slat and the frame (5mm)

* The length of the slats varies slightly, so ensure there is sufficient clearance at the ends of the slats (5mm at each end)

* Use a thick enough block of wood at the ends of the slats that it doesn't split when the screws are inserted (I used 2.5cm)

* Make sure the frame is high enough that the slats don't hit the ground when they turn. I had to add some wooden blocks to raise it up a bit.

 

Building the 4-bit prototype gave me the confidence to embark on the much more ambitious, full-size 32-bit TimeFrame. I knew how to overcome all the mechanical, electronic and software challenges that the bigger project would present.

 

I was able to show the prototype to other people, so they could appreciate the vision that I had for the full-size TimeFrame project.


Bill of Materials for the major electronic components:

 

Farnell Number

Description

Link

2112013

PSU 12V

http://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-AStC-Timeframe%26SKUS=2112013

1318719

Power cord

http://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-AStC-Timeframe%26SKUS=1318719

2075382

Arduino Uno

http://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-AStC-Timeframe%26SKUS=2075382

1196440

Power cord

http://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-AStC-Timeframe%26SKUS=1196440

1109888

PSU 5V

PCM50US05 - XP POWER - ADAPTOR, AC-DC, MEDICAL, 5V, 8A | Farnell element14

2075365

MODULE, MICRO SERVO, TINKERKIT

http://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-AStC-Timeframe%26SKUS=2075365

9731156

HEADER, SQUARE PIN, 2.54MM, 3WAY

http://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-AStC-Timeframe%26SKUS=9731156

  • Sign in to reply
  • andysc
    andysc over 10 years ago in reply to Former Member

    The 2038 problem is that unix time is a *signed* 32 bit number, so only has 31 bits available for time keeping... The TimeFrame has 32 operational bits, so will keep going for another 69 years after 2038 - I expect the servo motors gears will be stripped clean by then image Remember each extra bit doubles the number it can display, so 64 bits would be way longer than the universe has existed (I haven't checked the maths image)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 10 years ago

    This is an interesting idea , I worry though that 32 bits is not enough. I mean most computers have an issue in 2038. Also this might not effect computers that store time as a 64 bit sign integer. Granted  with magnetic reversal and all 2038 might not be big issue seen but I think you might need a 64 bit clock. Any idea how to get around the 2038 issue with your clock? I would possibly suggestion doing time keeping like they did in hte old days with stars. Make something like a lamp and pick your favourite constellation along with plants and all that glow in the dark.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube