Category Archives: Hardware

5V relay module

The module Keyes_SR1y is the KY-019 5V relay module for Arduino (or most anything else really, it’s not as if it plugs straight into the board – you’ve got to connect the pins off to disparate parts of the Arduino board). Relays mostly are used to switch larger loads than opto-isolated switches; they’re generally used in cars or for switching household devices on and off. Large currents are dangerous; you have been warned. This module can switch 250V at 10 amp – at least, that’s what the printing on the box says. The 5 volt part is about the voltage needed to switch the relay. I haven’t measured the current used to switch, but it runs happily off the current supplied by a laptop USB port.

The circuit board marks the 5 volt (+) and ground (-) lines (because of the current draw, these are fed from the power circuitry of the Arduino, rather than the GPIO pins); the remaining line is a digital input; the program code or “sketch” to control it looks something like

const int relayPin=5;
pinMode(relayPin, OUTPUT);
digitalWrite(relayPin, HIGH);

assuming you’ve hooked the relay up to pin 5. Split the code into the body, setup(), loop() and elsewhere as appropriate.

HIGH energizes the relay (switches it from its normal state), LOW does the opposite (and switches it into its normal state). When it changes state it makes an audible click. On board the module is a red LED that lights up when the relay is energized. The relay has Normally Open (NO) and Normally Closed (NC) circuits, so save some power and use the appropriate one for the normal state, or design for a useful fail-safe state.

This module is one that you’ll find in the various Arduino Module Packs around the place.  One guy has made an attempt to identify and document the lot: http://space.makehackvoid.com/wiki/DxArduinoModulePack

Sony Vegas 10: Out of memory when rendering

We were having issues rendering a reasonably complex but fairly short video using Sony Vegas 10 (32-bit) on a 64-bit machine (Win7 x64) with plenty of RAM and disk space free. After a few seconds each time, the rendering would stop dead with an Out Of Memory error.

I looked around on Google, where various discussion forums came to different conclusions about a fix (including changing the rendering thread and RAM options within Vegas) — and a 4-minute YouTube video claiming also to fix it — honestly, who has the time to watch something like that? — just give me the solution in words I can quickly scan and replicate.

I eventually found this:

I finally found the solution to Vegas giving me memory errors using CFF Explorer… This is what I did.

1) Using “CFF Explorer” I open the original “VegasMovieStudioPE100.exe” file.

2) Now go to “NT Header/File Header” and click “File Header”. There you will find a button labeled “click here”. Click it. And select the checkbox “App can handle> 2GB address space”

3) Now press the “ok”‘s and when back on the main menu, click on the disk button and save the modified “.exe” file, overwrite the orginal one. (Note in Vista and 7 you must be running CFF Explorer in Administrator Mode).

Suddenly all my low memory errors were history and have been able to render all my movies with no issues.

Happily, this worked for us too. Hopefully repeating the fix here will help others find it more quickly. Thank you, “Lowlypawn” for posting your solution rather than just posting your problems like many do.

At some stage we’ll upgrade to a newer (64-bit) video editing package. But it’s nice to know this one can be cranked up to keep going for a bit longer.

It makes me wonder why (a) Sony hasn’t issued their own information about this, and (b) something as incredibly useful as CFF Explorer isn’t built into Windows.

Click through to read the full post, which includes feedback from Sony from when he contacted them about it.

How much memory should you have in your PC? How about 8Mb? #BackToThe90s

Charles Wright, the IT whiz who writes regularly in The Age Green Guide, and has a persistent habit of referring to himself in the plural, reckons in his latest column that you should have eight megabytes in your PC, but soon it’ll be practical to have up to sixteen megabytes.

This quarter the price of RAM has jumped about 60 per cent as manufacturers shift the emphasis to production of mobile memory, squeezing supply of PC memory. The 8MB of Kingston RAM that we recommend is now $60, compared with $38 in December.

It’s possible to see the future of desktop computing contained in a diminutive box into which the customer can stuff as much as 16MB of RAM and a fast mSATA SSD drive, at prices ranging from $500 to $700.

The Age, 28/3/2013

Wow, don’t go overboard on the RAM there Charles.

Charles Wright's column in The Age, 28/3/2013

New monitor

Mostly for my own records:

Since one of my two Samsung 940N 19″ monitors (bought in 2006) developed a horizontal line through it, I’ve replaced it with a 23.6″ Philips 247E3LSU2, which was $168 from Officeworks.

Bigger monitors wouldn’t really fit into the space.

It’s plugged into “Calculus”, the Mac Pro. I should get a DVI-D cable to get the best picture quality out of it… amazed at how damn expensive they can be retail. I’ve ordered one from DealExtreme instead (no particular rush – the VGA cable I have may not be optimum, but it works).

Error code L6

If you have an ACS-15 digital scale beeping and flashing error code L6 on the LED display, I think it means “battery undercharged, and I refuse to work until it’s better charged. I don’t care if you plug me into the mains.”

And now Google knows. I wonder where I put the instructions?

Upgrading Netgear Stora without data loss

Despite my expectations, I’ve managed to upgrade our NAS’s storage quickly, easily, and without losing a byte of data.

We have a Netgear Stora as our home NAS. We’ve been butting heads against the storage limit of the box, but I’ve always been careful not to populate the second drive bay; the last upgrade replaced the single 1Tb drive with a single 2TB drive – 2TB was the cost/storage sweetspot. However, a couple of years on and it’s still the sweetspot, the largest drive capacity is only 3TB (I suspect due to the Thailand floods of 2011 - we’ve been stalled at this capacity for a while… which is a little misleading, but I’m not paying $550 for a 4TB drive when I can have 3TB for $150) and it seemed like it was time to exploit the second drive bay.

Researching online shows that the default configuration for a Stora is RAID 1, which is… not the default I’d have chosen. What we want is a JBOD array. I didn’t recall changing the configuration the last time we did an upgrade, so it’s a safe bet that we were still a RAID 1 setup. The documentation is clear that converting from RAID 1 to JBOD or vice versa requires a format of the media, so step 1 was to ensure our backup of the backup was up-to-date; that took overnight to complete, even with the 2TB USB3 drive that we picked up for only $99 from Officeworks (how are they able to sell a drive and enclosure for the same price as a cut-price parts supplier sells the naked drive?)

If anyone can explain why I was getting over 70MB/s to my external USB3 hard drive when I started, and a few hours later when I went to bed I was getting under 30MB/s, I’d love to hear it. It was a steady decline in I/O rate and I’m at a loss to explain it.

Anyway, with the backup completed, and verified, it was time to bite the bullet. For step 2 I powered down the NAS, extracted the existing drive from the NAS and put it aside, took our lying-around-spare 2TB drive and shoved that in its place and then restored power. I fired up the (Windows-based) Stora management software and connected to the Stora and it announced that there was some weird drive mounted, and what storage configuration did I want? Having picked JBOD, it then proceeded to format the drive.

Once the formatting was done, I proceeded to step 3. I powered the Stora down, inserted the original drive in to the previously unused bay (the vertical orientation flipped relative to the other bay, which was surprising) and restored power. I fired up the (Windows-based) Stora management software and connected to the Stora and it announced that there was (again) some weird drive mounted, and what storage configuration did I want? Annoyed that it didn’t remember that I’d already picked JBOD, it then proceeded to format the drive, both as expected (per advice on the Internet) and as it had last time. There was a slow moving progress bar and everything.

Once that was all done, I got ready for step 4: restore the backup. I browsed to the mount, and discovered all the data was already there. Every last byte. The lying bastard of a thing had formatted nothing. The carefully prepared backup was not needed; I spent several long moments stunned, absolutely stunned.  I even ran a few checks to make sure I wasn’t being lied to, that the OS had cunningly cached the directory structure. But it was true; I could play media, read configuration files, the works. Free space was now reported as 2.2TB. I’d suspected there was a chance that this would work (JBOD shouldn’t require any special formatting, unlike RAID 0 and perhaps RAID 1), but still couldn’t believe it.

A technology upgrade worked, and contrary to advertised capabilities. Has this ever happened before?

VirtualBox could not open the medium: you’re not the old you

I recently had reason to restart an old virtual machine on VirtualBox running on my Ubuntu machine, and was presented with the error:

Failed to start the virtual machine XP Install 2.

Medium ‘/home/net2/.VirtualBox/Machines/XP Install 2/Snapshots/{70eab271-a63d-4bff-aa7b-8ac8b713e3b6}.vdi’ is not accessible. Could not open the medium ‘/home/net2/.VirtualBox/Machines/XP Install 2/Snapshots/{70eab271-a63d-4bff-aa7b-8ac8b713e3b6}.vdi’.
VD: error VERR_FILE_NOT_FOUND opening image file ‘/home/net2/.VirtualBox/Machines/XP Install 2/Snapshots/{70eab271-a63d-4bff-aa7b-8ac8b713e3b6}.vdi’ (VERR_FILE_NOT_FOUND).

I figured that somehow the backup had been hosed, as it had been through a couple of restores and system migrations. A ls of the above failed with

ls: cannot access /home/net2/.VirtualBox/Machines/XP: No such file or directory
ls: cannot access Install: No such file or directory
ls: cannot access 2/Snapshots/{70eab271-a63d-4bff-aa7b-8ac8b713e3b6}.vdi: No such file or directory

And then it occured to me that I was running under a different username now. As such:

cd /home
sudo ln -s josh net2

solved the problem with the computer is completely fooled into believing that net2 is still a user on this machine. Well, for the purposes of VirtualBox anyway.

Android: Ice Cream Sandwich upgrades

Computerworld has a list (that they are continuing to update) of which devices are getting Google Android 4 (Ice cream sandwich).

Alas, there’s no news of some phones, including my HTC Desire S. (The Desire non-S is looking very iffy, apparently.) There is a hacky way of getting it onto a Desire S… if you’re willing to forego being able to use the camera. No thanks. No doubt some other devices have this option available too, for the hardcore.

The bigger picture on this is that with a myriad of phone manufacturers, Android updates are a lot more hit and miss than Apple’s, where Apple’s absolute control clearly benefits customers by making operating system updates available quickly on all recent models of phone.

What’s your smartphone doing in the background?

Fascinating analysis of what goes on in the background on an iPhone or iPad as you listen to the radio or open a few (mostly Australian) apps — both in terms of bandwidth wastage, privacy and security: Secret iOS business; what you don’t know about your apps

Not that I’d expect Android to be much better; it’s all in the hands of the web/app authors, after all.

(via Kornelis)

Gateway computer, circa 2000

Was clearing out some papers on the weekend and found this: an order form for a Gateway computer from June 2000. I can hardly believe I used to spend that much dosh on buying computers.

Order form for a Gateway computer, June 2000

I seemed quite impressed with the spec when I ordered it.

That computer worked until 2005, when its (custom) PSU died.

Comparison of costs: 1995 vs 2000 vs 2005.

To this day, the speakers that came with it (from “Cambridge Soundworks”) are still going strong, even though their beige colour doesn’t match all the black stuff.

Why is it so hard to figure out what’s wrong with an appliance?

Yesterday morning the house suddenly went black – except for the oven clock, which made it clear that the RCD had been tripped.  I went out and reset it, and then the fuse for one of the electrical circuits tripped.  After resetting that and having it not trip again, I checked a few suspects out and discovered that my washing machine was dead.  With a full load of water.  I powered it off at the wall and went about the rest of my morning, later siphoning it empty.  Checking again showed it still dead.

The next day I pulled the user interface off the front to diagnose which module had blown (fearing it was the notorious front panel), and in powering it up to check with a multimeter it came good.  Ish.  It mostly worked, but ended up lighting up the display in a way that was clearly an error code, and various combinations of functionality checking seemed to me that the agitator motor wasn’t working.

I suspected that the error code could tell me what exactly was the cause of the motor not working, but finding a Fisher & Paykel MW058U service manual is no easy task.  Finding the model number is surprisingly easy – wiggle the machine forward and on the back, helpfully slapped on upside-down is the full details of the machine (why it couldn’t be printed on the front panel art is beyond me).

Reading the manual made it clear that something bad had happened (one of motor wiring bad, motor bad, motor controller bad), and phoning a helpful call-out tech I discovered I could expect something around $300 to repair.  This is half the price of a new machine… so I guess we’ll go with repair.   As an aside: if I can provide a broad diagnosis, or at least model and error codes, why can’t some firms even provide a guesstimate on cost?