Showing posts with label Nyan Hat. Show all posts
Showing posts with label Nyan Hat. Show all posts

October 28, 2012

Finishing Nyan Hat

 Nyan Hat is done!

To make the stars in the background of the Nyan Cat video, I made two long strips of LEDs.  The strips consist of six nodes of 5 LED's each, arranged in a star pattern.  The six nodes are split in half, and connected with the two-transistor LED alternating circuit in the center.

Here's one of the strips:


Recreating the exact star pattern seen in the Nyan Cat video would have taken 13 LEDs per star, so I simplified it to use only 5.  The centers and outsides of the stars are connected to opposite outputs of the LED controlling circuit so that they alternate.



The stars are set up so that consecutive stars around the circumference of the hat have alternate lighting patters - when the inside of one star is lit, the outsides of its neighbors are lit.


Holes for the LEDs were melted through the hat with a soldering iron.


All the wires from the top of the hat (motor, half of the LEDs, battery, audio amplifier power, and audio signal)  were routed down the center support, and into the base.  They each got their own quick disconnect headers, so that the hat can be taken apart.  All the power connections were wired through a toggle switch in the side of the hat.


An old iPod nano, donated by a hallmate, was restored, loaded up with the Nyan Cat song, and set to infinitely repeat.  It was fixed to the polycarbonate panel with double sided tape, with it's pause/play button accessible through a hole in the plate.


I wasn't able to scrounge an iPod cable anywhere, so I got a super cheap car charger from the 7-eleven, removed all the casing, and wired it to the hat's battery pack.


Here's the shiny toggle switch.  You can see the volume knob for the amplifier off to the right of the hat.


To let sound from the speaker escape better, I made some vents in the top of the hat:


One step I completely forgot to document was the making of the rainbow and the actual cat image.  The pieces were scaled from a Nyan Cat GIF, and then printed on the single Athena Cluster color printer on campus.  After cutting out the pieces, I realized that I was about an inch short of rainbow.  Upon returning to the color printer, I found that in the two hours between my visits, someone had managed to break it.  To get it to print, I had another person help me to hold the printer's door closed, so that the switch that tells the printer that the door was open was kept depressed.  Anyway, once I printed and cut out all the parts, I laminated them with packing tape.  

Here's a final picture:


The final pictures and video can be found in the build report on the main page.

October 21, 2012

Nyan Hat: Nice Lasered Things and More

Since the first half of my weekend consisted of

  • Work on projects until 3 AM
  • Rest
  • Repeat
I was able to make significant progress on Nyan Hat.  

First, I modified the motor that moves the Nyan Cat around the outside of the hat.  I started out with a generic hobby servo, and removed the mechanical stop that prevents it from spinning more than 180 degrees.  I also removed all the control circuitry as well, and in its place installed a linear voltage regulator (7805) with heatsink, since the hat's operating voltage will be around 10V, but the motor only operates from 4-6V.  


When I originally conceived the design of the hat, I imagined a gear motor in the center of the hat, with an arm attached the output shaft pointing radially outward and holding the Nyan Cat.  I realized though that if the spinning arm spanned the entire radius of the hat, it would be very difficult to 
  1. Mechanically support the top half of the hat.
  2. Run wires between the two halves of the hat.
To do both of these things, the spinning mechanism needed to have a gap in the center.  To design the mechanism, I used Inventor's handy gear generator to make a large internal gear and a small pinion to mesh with it, as well as a retaining mechanism to hold the gears and servo in place.  The mechanism also slows the output speed to 10 rpm from the ~60 rpm of the servo.  



The parts were then cut out of acrylic on a laser cutter, with the help of Charles and Shane.  While collecting materials, I misidentified some 6mm polycarbonate as 6mm acrylic, resulting in lots of unpleasant (as in poisonous) fumes inside the laser cutter.  Suitable acrylic was found however, and this happened:


The ring gear, which is what drives the cat, is retained by three bearings that sit in a groove around the edge of the gear.

Due to a slight change in my mental design, I also made a matching base plate to fit into the other half of the hat.  I just traced the laser cut piece onto the sheet of polycarbonate that I accidentally lasered, roughed out the shape on the bandsaw, and used a bench grinder to finish it off.  Two holes for wires were cut with with a hole saw.  The second plate is slightly larger, so that it fits snugly into the bottom half of the hat.

To secure the mechanical parts to the hat, I drilled and tapped four holes into the edges of the plates that fit into the hat, and matching holes in the hat its self.




To connect the two halves, I made a large standoff on the lathe.  Also, here's the actual hat:



And here's a clip of the cat circling the hat:



To make the cat's tail, legs, and head move, I made a soft foam track around the polycarbonate plate.  The roller that actuates the cam on the cat rolls along this track.  Originally, I made the roller too short, so I had to extend it.



And here's a clip of the fully animated cat:



On to the electronic bits.  The hat will feature blinking LED stars around its perimeter, so I made a simple two-transistor circuit that will alternately flash two groups of LEDs:


To make the hat play the Nyan Cat song, I tore apart a set of old computer speakers and harvested one of its drivers and amplifier circuit.  Both these parts mount next to the servo, in the top half of the hat.  An old iPod nano given to me by someone on my hall with do the actual MP3 processing.


To power everything, I made a battery pack out of A123 26650 cells.  Originally, I planned to place the battery pack around the corner of the hat, which your head doesn't fill due to its curvature.  However, I decided against this, mostly because I didn't want batteries that, if short circuited, can discharge enough current to melt the wires I used to make the pack close to my head.  Fortunately, I was able to cram them in the top half of the hat, along with the audio bits and servo.

Before:


After:



Coming up next:  LED stars, iPod hacking, and a control panel.

October 14, 2012

New Project: Nyan Hat


For Halloween, I'm making a Nyan Hat, which is pretty much exactly what it sounds like.  The base of the hat will be a blue top hat, with a pixelated rainbow encircling the middle of the cylindrical part of the hat.  A mechanical Nyan Cat, complete with moving head, tail, and legs, will move around the rainbow, on the outside of the hat.  The blue part of the hat will be embedded with white LED's controlled to mimic the star patterns in Nyan Cat.  Finally, built in speakers will play the Nyan Cat song while the hat is turned on.

All the movements of the cat will be controlled by one single motor, so I built a frame for the cat made of of interlocking plates and bushings  that connects the motions of the tail, legs, and head all to one rotation point. 

Technical drawings on a picture of Nyan Cat:



The plates were manually milled out of acrylic (yes, I probably should have just lasser cut it...) and the bushings were made out of brass rods on a lathe.  The head and tail mechanisms are linked to the leg plate.  The vertical slot in the middle of the leg plate is for a scotch yoke mechanism, to convert the rotary motion of a shaft into the back-and-forth motion of the legs.


The poptart-supporting part of the acrylic, which stays fixed relative to the head, tail, and legs, was fixed to an aluminum piece that supports the rotary part of the mechanism.


The bearing that supports the shaft is held in via a clamp, so it can be taken apart:


 

The Nycan Cat will be moved around the outside of the hat by a low-rpm gear motor in the middle of the hat.  The motor will be connected to an arm that will span the radius of the inside of the hat and connect to the cat mechanism.  As the motor turns, the cat mechanism will roll along a wavy rainbow-shaped track that circles around the hat.  As it moves along the track, the protruding metal cylinder that is linked to the scotch yoke mechanism will rest against the track and act as a wheel, thereby turning and actuating the cat's appendages.




To create the side-to-side motion, a a 4-40 screw was screwed into the aluminum cylinder, slightly offset from the axis of rotation.  As the cylinder spins, the cap of the screw moves the acrylic below it back and forth.


The aluminum arm attached will eventually be coupled to the gear motor:


One last shot of the mechanism:


And a video of it working:



In other news, my scooter seems to have gotten a case of spontaneous motor failure, even though I replaced a dead motor a week ago.  I was riding on flat ground at around half speed when one of the motors became flaky, and eventually gave out.  Unlike the other failures I've had, this time I wasn't doing anything silly like towing a hexapod or full-throttling up a long hill.  It could be that the motor was already near failure, and finally gave out.