Thursday, 25 October 2012

Slightly unsettling, smiley birthday cake!

14th birthday and need a cake in a hurry? well...
What's better than a mashed up fridge cake with a frankly disturbingly lax level of attention to detail!

Smiley birthday cake

This delightful baby was constructed from the following shite in 40 minutes...

Smiley birthday cake

Melt chocloate
Smiley birthday cake

to create buttons. This was on foil, but should have been on cling film on the cake tin base...
Smiley birthday cake

Then melt some white choc...

Smiley birthday cake

Dye it yellow...

Smiley birthday cake

Then slaver over the chocolate facial features...

Smiley birthday cake

Chill, then stuff the tin with caket goodies, all mashed up...

Smiley birthday cake

Then pour over the base with melted choc to stick it all together
Smiley birthday cake

And chill... then turn out...

Smiley birthday cake

Here's the detail from the side - sweet!

Smiley birthday cake

It smudged getting it off the base, so 0/10 for finish!

Smiley birthday cake

disturbing, but tasty!

Tuesday, 23 October 2012

Making servo mounts inside Twitr_janus' puppet head

Twitr_janus' eyeballs are controlled by two servos. Like all eyeballs the two eyeballs must move as a pair (well maybe not chameleon's, granted!).  This is done by fixing two eyesockets into the skull. Each one can  contain an eyeball with a positioning rod at the rear of the eyeball. The rods for the two eyeballs are then fixed together in such a way that they can only move up down togther or left right together.
Here's what this looks like from the front (this is the skull only. It doesn't have skin yet)

Twitr_janus full electronics kit laid out


The eyeballs were made from old deodorants. For details on making eyeballs and sockets from deodorants, see this post, and this Instructuble (animatronic head reading lamp).

Here's the underside showing the two servo mounts. The one on the left is the left/right rig. The one on the right is the up down cable controller

The main cranium of the skull here is laminated papier mache, which is strong, and can take a self-tapping screw to affix the plastic servo mounts.
Twitr_janus eyeball servo construction



The main construction is in making the rig. This is a collapsing parallelogram frame that fixes the rotation of the control rods into one plane, seen here from above, showing the fulcrums (pivots) maded from split pins with washers. The servo is in the middle and is fixed to one cross-beam, with the end of the servo-horn connected by a free pivot to the other. This is actually not a good design, as the arc it sweeps is not even.


@Twitr_janus eyeball mounting rig




























From the front, you can see the servo body

@Twitr_janus eyeball mounting rig

Here it is inside the head. The servo rotates in the left/right direction, causing lateral shearing, but in the up/down direction, the rod moves with the rods. The eyeball/left/right servo rig is clearly visible on the left here, and the cable attached to the rig is the up down mover, attached to the horn of the second servo

The mounts are made from square section PVC cable conduit, which can be cut to shape with tin snips and folded with long-nose pliers.

Twitr_janus eyeball servo construction

Here is the up/down servo

Twitr_janus eyeball servo construction

Thursday, 18 October 2012

Hacking out an audio amplifier for a text-to-speech puppet voicebox

@Twitr_janus needs a voicebox. This will do two things:

  • Amplify the Processing text-to-speech output from  a feeble PC audio speaker to a dedicated speaker in the puppet 
  • Provide a voltage level that is high ebough to use as an analog input to be detected by the Arduino board, to power the speech to jaw motion sync
In the top left photo, is a standard PC audio amplifier rigged up to an iphone as a test source. In the right photo is a standard phono plug, which will provide the output..
Hacking open audio amplifier













Below left is where is he output plug comes out of the amplifier. The output cable was cut to expose the wires (below right)

Hacking open audio amplifier Hacking open audio amplifier













This cable is coaxial. The outer sheath copper mesh is the earth level, with a sheathed inner copper core

Hacking open audio amplifier Hacking open audio amplifier














Below left is what the stripped cable looks like. Below right with the oscilloscope lead attached

Hacking open audio amplifier Hacking open audio amplifier













And on the left here is the signal trace. Each square is 1V.

Hacking open audio amplifier
This is what will be used to drive the Arduino. The output which is here driving the oscilloscope will be attached to the Arduino analog input. The Arduino will convert the analog audio level into digital data. In fact a number between 0 and 1024.

The Arduino script will send pulses to a relay if the signal peak is higher than a preset threshold level.

In practise the jaw will trigger to move, if there is a peak speech output (e.g. a plosive B, etc)



This is done in Arduino with a function that polls the analog input, something like this. (This example uses variables that would normally be declared elsewhere in the sketch.)

void jawTrigger () { //  jawTrigger is a function to be called in the Arduino loop()


jawPeakVol = analogRead(analogPin); // turns voltage from amplifier signal wire into a number between 0 and 1024
  if (jawPeakVol >= jawThresholdVol) {
  digitalWrite (jawRelayPin, HIGH); 
// trigger the relay to make the jaw motor move if the voltages peaks above a preset threshold (jawThresholdVol)
     }   // end if
  else if (jawPeakVol < jawThresholdVol) {
      digitalWrite (jawRelayPin, LOW); 
// trigger the relay to make the jaw motor return to default rest position if the voltage drops below the threshold
  }  // end else if
}   // end jawTrigger

This is not able to simulate how a real mouth looks when speaking, which will change shape depending on the phonemes in the speech. Here the mouth movement is synced to an audible peak, which the audience will hear as they see movement, and the brain will believe it is speaking the words.

The speaker is stereo. There are two outputs

Hacking open audio amplifierThe PC amplifer has two speaker boxes. One master speaker with an amplifier in it and one slave speaker that is driven by it.

The lead above  is the feed from the master box to the slave box.
Inside the master box is the speaker that will be the voicebox itself. This was removed from the box, and the box was then cut up to use as a mount






Old long-handled, sheet-metal-cutting shears make light work of even such a thick plastic casing (below left)
Below right is the amplifier extracted from the box

Hacking open audio amplifier Hacking open audio amplifier

Tuesday, 2 October 2012

Hacking a Microsoft LifeCam to make a video eyeball

Warning this post contains scenes of open-webcam surgery and the hacking of roll-on deodorant bottles...

To interact with people via the Internet, Twitr_janus needs to be able to see.
Here is a webcam-enabled eyeball, made from a Microsoft LifeCam, a deodorant ball and a pen refill...
@Twitr_janus' eyeball



Twitr_janus needs one eye to be able to see who is looking at it. The eye was made from a Microsoft LifeCam.


This can be driven by Skype. Skype allows you to start a video call with a remote computer, which means the eyeball can be turned on at will from anywhere (and using Skype apps on phones etc.!). And so...

The LifeCam is a reasonably good webcam. The camera is housed in a convenient cylinder that readily fits a sawn off deodorant ball!





The ball was hacked from a standard roll-on deodorant ball
DSCN1810 Making Twitr_janus eyeball and video camera
The hole can be made even and the edges smoothed off by rubbing on sandpaper on a flat surface. Making Twitr_janus eyeball and video camera Making Twitr_janus eyeball and video camera
Making Twitr_janus eyeball and video camera Making Twitr_janus eyeball and video camera
Having tested the camera eyeball in situ for physical movement, it was clear that the camera housing was far too bulky and the cam needed removing from its casing. Amazingly a quick trawl of the web found a very detailed step by step description of how to do this.

Respect to Gary Honis, whose Astrophotography and Digital Imaging website had a whole article detailing all the tricky screws things needed to get the camera and drive board out of the shell
http://ghonis2.ho8.com/lifecam/lifecam1.html

This started simple, but ended up like the jumble on the right after about half an hour
DSCN1818 Making Twitr_janus eyeball and video camera
Eventually the camera was extracted from the case and looked like this
Making Twitr_janus eyeball and video camera Making Twitr_janus eyeball and video camera

The eyeball was given a cornea, made from an old torch lens, trimmed to size with a file and glued in...

@Twitr_janus' eyeball @Twitr_janus' eyeball
@Twitr_janus' eyeball @Twitr_janus' eyeball

Here is the camera in the ball. This is fascinating to pugs...

@Twitr_janus' eyeball @Twitr_janus' eyeball
The last remaining thing was to add a means by which the eyeball could be moved. To do this a rod needed to be added.
The casing of the camera was operated on and with a bit of simple metalworking
@Twitr_janus' eyeball @Twitr_janus' eyeball
@Twitr_janus' eyeball@Twitr_janus' eyeball

@Twitr_janus' eyeball @Twitr_janus' eyeball @Twitr_janus' eyeball @Twitr_janus' eyeball>
Until a beautiful eye was made, thus!
@Twitr_janus' eyeball