Megger PAT120 animation

Made by Howard Matthews at Push Pictures
Music by
Created in Blender, composited in After Effects
Additional modelling by Richie Phillips
Additional model credits from BlendSwap:
Mixing desk: simonrepp; kitchen mixer: swmo; Anglepoise lamp: up3danimation; Clip light: bmanjones; PC: modelyna; drill: bdfspace69; table fan: shivraj; milling machine: WiKKiD Widgets; laptop: MarkLaBarr

Getting camera tracking data from Blender to After Effects

There’s a plugin for Blender that lets you export 3D camera data in a format AE can use – you end up with a camera in AE that moves exactly the same way as your camera in Blender.

After Effects strangely doesn’t support orthogonal cameras though – you can have either flat compositions with no 3D transformations, or full-on 3D with perspective. No isometric-style perspectiveless 3D. So, no good for my current project, which looks 3D but is completely perspectiveless:

Screen Shot 2014-02-07 at 11.11.52

This means that if you need to track a logo in over an orthogonally-rendered animation you have to use the 2D Corner Pin effect to distort the logo to fit the scene. In a fast-moving scene you can just render tracking markers at the corners of where the logo should go, then use them in AE to place the corner pins, either by eye or using Motion Tracker.

For slow moving scenes it’s hard to get the track perfectly. Orthogonal views along with a camera that rotates as well as translating exacerbates the error; the lack of perspective already looks weird, so a logo that isn’t tracked solidly seems to swim. After much frustration and a bit of googling I decided to hack up a script for Blender to export the data I needed:

# use this script to export the resulting screen coordinates
# of the currently active object in 3D space. Coords get 
# output to the console -h

import bpy
from bpy_extras.object_utils import world_to_camera_view

scene = bpy.context.scene

# needed to rescale 2d coordinates
render = scene.render
res_x = render.resolution_x
res_y = render.resolution_y

rnd = lambda i: round(i,1)


for j in range(1845,1902):   # frame range you're interested in    
    obj = bpy.context.active_object
    coords_2d = world_to_camera_view(scene, cam, (obj.matrix_world *  obj.location))
    print("\t{}\t{}\t{}\t".format(j, rnd(res_x*coords_2d.x), rnd(res_y*(1-coords_2d.y))))

Worth the hassle, though: the flown-in logo is locked to the wall now:
Screen Shot 2014-02-07 at 11.15.36

Chinese 12V 6800mAh Li-Po battery mini review

Lots of these Li-Po battery packs on eBay, going for around £12 from various vendors:

BatPic 122

Nice hand-sized battery pack, with a coax plug and socket on flying leads, and a handy little power switch and LED. Comes with a somewhat underspecced charger (350mA – so, around 20 hours to charge).

The battery specs seem too good to be true, though. 6800mAh at 12V? Nearly 7Ah at a fraction of the size of an old fashioned gel battery. Hmm.


To test the battery capacity, I hooked it up to a little LCD telly via a Turnigy power analyser.

BatPic 126

The TV takes about 0.3A, so it ought to run for about 20 hours. Ha! To start the test, I charged the battery fully with the supplied charger:

BatPic 124

12.77V is a little high, but it’s straight off the charger; it’ll relax back to around 12.6V.

About 6 hours later, it was time to switch it off before the battery flattened itself permanently (10.8V is as low as you should go):

BatPic 127

So. Not really 6.8Ah at all, more like a third of that. I think I know what they’ve done, though (assuming they aren’t just out and out dishonest): to create a nominally 12 volt battery, they’ve strung 3 cells together in series – but then they’ve mistakenly added the Ah capacities of the cells together. Connect 3 cells in series, you add the voltages, but Ah stays the same as a single cell; connect them in parallel instead, and you add the Ah up but the voltage stay the same as a single cell. They’ve mixed it up.

The headline, therefore: these battery packs only have a third of their marked capacity. Caveat emptor etc.

The upside (!) is that the little charger that comes with it takes half the time to charge it.

UPDATE: A kind commenter, Unferium, notes below that Li-Po cells can be safely discharged to about 3V per cell rather than the 3.6V I used, which does change the results slightly. The voltage drops off very fast from 10.8V down, so you only get an extra 0.25Ah out of the pack. I think the headline stands 🙂


Anyway, let’s see what’s inside. Note: Lithium batteries can explode or burst into flames if mishandled, or if they’re faulty. Do not take one apart unless you know what you’re doing, or you’re an idiot. Thankfully, I’m fully qualified in at least one of those categories.

First, off comes the outer blue shrink-wrap:

BatPic 128

… revealing a stiff cardboard “case”. It comes apart easily to reveal:

BatPic 129

The actual battery of cells is just the silver chunk; the dark strip on the left is just dense packing foam. Shame they couldn’t just make the whole pack a bit smaller instead – I can’t see what benefit that padding does given that it’s only on one side of the cells. Even if something bad happens to the battery and the cells start expanding, they’ll blow up like a pillow, not out sideways. Ho hum.

Let’s pull the cells out:

BatPic 131

Yup, three Li-Po cells in series. Thankfully they’ve each got their own protection circuit (which disconnects the cells before they get overcharged, or so discharged they’re unsafe to charge again):

BatPic 143

The 3 cells are extremely securely glued together, so don’t try pulling them apart. If the foil envelope around a cell is punctured, they give off a strangely fruity smell and need to be disposed of safely in a neighbour’s bin. (Not the nice neighbours, the ones on the other side)

In use:

Despite their misleading label, they’re still useful battery packs, particularly for Arduino / microcontroller use. 2.2Ah at 12V is still plenty of juice for some projects. Here’s a little wireless monitor I rustled up to monitor our solar panels:

BatPic 140

It’s just an LCD, an Arduino and an nRF24L01+ radio module, all cable-tied to the battery:

BatPic 145

Lasts for a couple of days between charges, and it’s surprisingly robust. Easy to recharge with the charger that came with the battery (albeit a bit slow).

BatPic 144


They’re not as good as they say they are, but they’re still handy.


Stranded wires often need to go into screw terminals:

BatPic 099

But they’re not very secure connections, and you have to be careful that you don’t get stray strands of wire sticking out.

The answer to this extremely common problem that blights our civilisation?

Ferrules. Mmmm.

BatPic 136

So the next time you have to stick a stranded wire in a screw terminal:

BatPic 134

… slip a ferrule on the end of the wire:

BatPic 137

… squish it up with the nearest tool to hand:

BatPic 138

Here, I’m using some crimpers, but you can use pliers, teeth, an anvil – whatever’s to hand. Go wild.

BatPic 121

Now that’s a nicely terminated wire, if you know what I mean. You can snip the end off the ferrule with snips if it’s too long for your terminal.

BatPic 139

Look at that. Isn’t that better? Strain relief, no danger of stray strands of wire causing short circuits that you spend an hour looking for; it looks neater… too many advantages to list.

To sum up: Ferrules. Oh yeah. Available wherever ferrules are sold.


Dangerous Goods Discrepancy

I’m having trouble with our solar set up – lead acid batteries, it turns out, really aren’t ideal for our usage patterns. So I’m buying a big-ass 60Ah lithium battery (LiFeMnPo4 to be precise) from the Czech Republic. Never had such an exciting looking parcel tracker screen before:

Naughty goods

Digital TV’s dirty secret

20131009-160729.jpgTo test the capacity of some rechargeable batteries, I plugged them into a little portable LCD TV via a Turnigy power analyser.

The TV has three modes: analogue TV, digital TV, or Aux input – for using it as a monitor for a VCR or camera. I was a bit surprised at the power readings for each mode:

Aux input: 2.1W
Analogue TV: 3.7W
Digital TV: 5.3W

Subtracting the Aux input power from the other readings shows digital telly takes double as much power to decode compared to good ole’ analogue. On this telly, anyway. Those extra gazillion channels don’t come for free apparently…

Laptops vs desktops

mac_pro_2013So. A new Mac Pro is being birthed as we speak.

Got me thinking about the nature of laptop vs desktop computers. My Mac Pro only differs significantly from my laptop in the number of drives it’s got stuffed in it, and the fact that it’s immobile. The new Mac Pro removes one of those distinctions – you’d be connecting drives with thunderbolt – so really it’s a question of: do I need a computer that is specifically immobile?

I think I do.

Continue reading “Laptops vs desktops”