Gyro’clock prototypes

Last few weeks I have been busy putting together the first prototype of the Gyro’clock. In fact I have put together three prototypes because the first two had major issues. The third one is a much improvement over the original key chain propeller clock. Let me show you what I have done so far.

Prototype 1

Fully assembled Gyro'clock prototype 1.

Fully assembled Gyro’clock prototype 1.

Pictured above is the first prototype I built. I put the NeoPixel LED stick inside an empty solder tube since I wanted everything to fit inside a cylindrical shaped case resembling a Greek gyro (food!). Since there wasn’t enough room to fit everything inside the case, the 2 x ATTINY85 assembly, L3GD20H gyroscope, mode selection switch, 150 mAh Lipo battery and charger had to go outside. After soldering all the components together I used a cable tie to make things hold tight.

So how did this one work? in short not so good. It worked as it did on the breadboard setup, which means I wired up everything correctly, but the display was blurry and the pixels resolution was too big. I could barely make out the digits, and it was nowhere close to the clarity of the first key chain propeller clock. The orientation detection wasn’t working properly either. First things first, lets get the pixels to display properly. I was wondering if the tube caused the pixels to get distorted. So I decided to abandon the idea of having a tube and decided to put the NeoPixel stick outside.

Prototype 2

 

 

Fully assembled Gyro'clock prototype 2, charging

Fully assembled Gyro’clock prototype 2, charging

In the second prototype, I ditched the tube idea and placed the NeoPixel stick outside a now rectangular case hoping to get better pixel resolution. The resulting display was somewhat better than with Prototype 1, but still the pixels are two large and ugly. The reason for this, I later found out in the Adafruit’s NeoPixel Uberguide, is the low pixel update rate of the NeoPixels. At 400 Hz refresh rate it is not fast enough for persistent of vision (POV) displays.

Then I focused my attention on the orientation detection, which had problems of its own. Soon I realized that I overlooked a major issue when designing my orientation detection system using a gyroscope. The gyroscope is very accurate in measuring rate of rotation around a given axis, but since the device axis is not always aligned with the spinning axis, the output of gyroscope is not the same as the rate of spinning. The gyroscope output is equal to the actual rate of spinning when the two axes are aligned. When they are 90° apart, the gyroscope output will have no component along the spin axis. So I tried to compensate for this by keeping track of the angle between the gyroscope axis and the spin axis. But the 10 ms sample rate was not enough to accurately keep track of the angle.

This means that I had to go back to the drawing board and make changes to my design. I went back, all the way back to where I got this idea from. I got this idea when I ran into the website of Jussi Angesleva & Stephen Hughes, who had actually built such a device. They had used an accelerometer in their design to detect orientation. I still had the accelerometer I used in my first keychain propeller clock design, which was not able to detect the orientation of a spinning device accurately either. But back then I only knew how to read data from the accelerometer, and had no idea how to configure it to utilize all its embedded functions. Now I know how to communicate with the accelerometer and how to program it to use its embedded functions. So I decided to include the accelerometer in my next prototype.

Prototype 3

Fully assembled Gyro'clock prototype 3

Fully assembled Gyro’clock prototype 3

So I went back to using regular LEDs. Since now I need more pins I replaced the clock display ATTINY with a ATmega328p. The accelerometer has replaced the gyroscope and is talking with the ATTINY about accelerations. And when the ATTINY thinks what the accelerometer is saying means that we are at minimum of the sinusoidal acceleration pattern, then it sends a signal to the ATmega328p to display the clock.

See how the LEDs are oriented now? This way they are visible most of the time even if the board keeps spinning around itself. Also the flat profile of the board (aerodynamic design) should help keep it facing the same direction when moving through air (but haven’t tested this in a wind tunnel so you have to take my word for it).

So how did it work? Better! much better than the last two. The LEDs are now visible most of the time and the resolution is excellent! Although a bit dim sometimes when they are pointing at an off angle. Diffused LEDs might work better. Orientation detection was better than with the gyro, but still not the best. It keeps moving around, but not as much as when I was using the gyroscope. Before I could do enough testing on it though, The poor little ATTINY decided to quit, and won’t let me upload any more programs to it. I think it got damaged because I constantly had to remove it from the socket to reprogram it. So I need to go buy more ATTINYs before doing any more testing. But this is very good. I am positive that I can improve it further. Hopefully I will have pictures of it working to show you next time! Thanks for reading.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s