Generator trials (by )

Yesterday, my friend Mike (who is interested in generators) was around, so we tested the generator out with the cable I made.

It could run the computers, or the fridges and freezers, without straining; I couldn't try running everything at once since I don't have the spur in my cable yet to reach both bits of the house.

We tried running the kettle on it, since it's a 2kW kettle and a 2.1kW generator, and when the kettle was switched on you could hear the generator rev up to deal with the load, then when the kettle clicked off, the generator settled down again.

I wonder how the generator actually outputs AC - the revving up and down would imply that it's not just a synchronous generator. Also, when I hooked it up to an oscilloscope, it showed some kind of spiky noise at a few hundred Hz (nicely synchronised to the 50Hz sine wave) - so perhaps it's a DC generator running an inverter with voltage and frequency regulation?

The computers ran fine with the noise - but the UPS was suspicious of it and thought the incoming frequency was fluctuating between 50Hz and 80-90Hz, so kept switching to battery and back again. In the long run this would probably run the battery out, so I may have to build some kind of low-pass filter (at scary mains voltages and high currents!), just to stop it panicking.

Talking ’bout my generation (by )

Since, as I mentioned before, the generator has 16A IEC 60309 weatherproof power outlets:

...I had to order special bits to make a nice lead for it. Well, they arrived today (along with a 20 litre petrol can), so I've made my nice lead:

Doesn't that look like it was bought in a shop rather than home-made? Nice arctic-grade PVC cable, since it'll need to run outside (we're not running the genset indoors!)

Well, that's the prototype of it. I have the same length of cable again plus a second set of sockets. I need to get a junction box to run the second set off, since we will need backup power on both floors of the house.

Since it took forever to get the nice white grommet on the cable where it goes into the twin socket, rather than redo it, I'll just cut the wire a metre back from the sockets to put the junction box on, making this just a little spur in a long cable.

And if there are any problems with power factors, I'll put appropriate reactive components in the junction box (plus test points so I can use my dual-trace scope to get voltage and current traces), too.

Costco (by )

Ah, the benefits of having a limited company!

We're now members of CostCo, a wholesaler of general retaillable things. Which means we can go to their nice warehouse, flash our membership cards, and load up on bulk packs of all sorts of stuff, generally quite cheap (although some of their stuff is more expensive than on the high street; it pays to check carefully).

This, however, is great for stocking up on food for Christmas, printer paper, and so on...

And handily, they sell generators. Since we're a bit worried about power cuts here interrupting my ability to work, we've picked up a generator capable of running the PCs and freezers for a few hours before needing refuelling.

I've had to order a special plug, though - it has a 16A weatherproof socket on it:

...so I'm making up a custom extension cable starting with one of those and ending up with two different sets of 13A outlets, so we can run the computers (upstairs) and the freezers/ADSL router (downstairs)

AJAX (by )

Eeeeeaaarrrggghhhhh....

People seem to have found a new way to make Web pages that aren't very usable for the blind.

AJAX is its name, and it's causing a lot of excitement about creating "rich user experiences".

I automatically cringe when I hear that. The Web works because HTML doesn't really define the "user experience", it defines the structure of a document with headings and text and links and stuff. You can layer on a "user experience" with some optional, ignorable, CSS. This means that screen readers can ignore the "user experience" designed by people who assume everyone can see a two-dimensional display surface, and examine the actual structure of the page.

Garbage collection (by )

One of the interesting little problems in converting a CPU, some RAM, and a bunch of I/O devices into a useful system is memory management.

Your everyday PC with 512MB of RAM contains about 512 million little memory cells, each of which contains an eight-digit binary number. This is where all running applications, and all the information they are dealing with, must be stored; programs, text, images, and whatnot are all encoded as sequences of these eight-digit numbers (known as bytes) and stuffed into memory.

The problem is - where to put everything? After all, when you double click on a program, the computer looks at the size of the program on disk, and needs that many bytes of memory to load the program into. How does it know which bits are free and which are in use? Different computers have different amounts of memory, and may be running any combination of apps already, so there's no way to reserve a given bit of memory for a particular program; the system has to keep track of what's in use and what isn't in real time. And when you load your app, it will start asking for bits of memory to keep track of the windows it has open, to store your document in, and so on.

Now, the first problem to be solved is how to keep track of which bits of memory are in use and which aren't, in such a way that the computer can efficiently find a block of free memory of a specified size - that problem is harder than it may seem, especially when you consider that multiple threads of execution will be requesting memory at once. But that's not the problem I was pondering as I sat on the train today.

My problem is how to figure out when a block of memory isn't used any more, so that it can be handed back to the system that keeps track of free blocks and reused.

WordPress Themes

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales