Irrelevant Aside: Household Electrical Problem

Update: I fixed the problem, solution is below!

This topic is not really relevant to this blog, but it’s interesting to me and I had to share.

The other day I experienced a weird electrical problem in our house. The master bedroom lights started to flicker periodically, and eventually went out completely. A power bar spontaneously blew up (ok, made a popping sound and then smelled of ozone and burnt plastic).  In another bedroom, the ceiling CFL lights would pulsate dimly, not able to fully light. The rest of the house was fine, it was only the back two bedrooms and hall/bathroom lights that were affected (two different circuits, one breaker for each bedroom).

I stuck my multimeter into a master bedroom outlet and an outlet in the second bedroom and was…surprised.

So, how is this even possible? I have a hypothesis, and as soon as I get a chance to open up the electrical panel, I’ll be able to confirm. For now, the breakers to these two circuits are shut off, and we’re camping with candles in our own bedroom. OK, that’s not actually true; I ran an extension cord from the bathroom to power a lamp and my laptop charger. Priorities…

If you have any ideas about the cause of this problem, please comment!

Update: It’s fixed! My hypothesis was correct, I had a multiwire branch circuit with an open neutral. When my house was built, it was a common practice for electricians to save money on wiring by putting two circuits on a single 3-conductor wire, with a common neutral. This was allowed if the two hot legs were connected to opposite phases; in this way, the current on the neutral return would be the difference of the amperage draw of the two circuits, not the sum of the current draw of the two circuits (which could overload the 14ga neutral.) It looks something like this:

These multiwire branch circuits suffer from a serious weakness – they have a dangerous failure mode. If the neutral conductor is disconnected (fails open), the branch circuit changes from two 120V circuits in parallel, to a single 240V series circuit. This can and will damage devices connected to the circuit! There’s a full explanation of this dangerous failure mode over at EC&MWeb, but here’s a simplified diagram:

So, where was my actual failure? In the panel, at the neutral/ground buss bar, the neutral for these two shared circuits had not been tightly clamped and had arc-faulted. Here’s a pic of the damage.

 Upon investigation, a number of connections in this buss bar were loose, and there were some instances of neutral and ground wires for the same circuit being bundled under the same terminal. This latter situation is very dangerous – if a loose connection arc-faults both the neutral and ground conductors, there is no path to ground for the hot leg of that circuit. This means that if you touch it, YOU become the path to ground.

I remedied all the faults that I found in the panel, and trimmed and reconnected the neutral for my two broken circuits. All is well now, the extension cords have been removed from my bedroom, and I learned all about the dangers of multiwire branch circuits.

Making a Video Recording Booth, Part 1: Brainstorming

My friends Jacqui and John got married, and they’ve asked me to provide a video booth/kiosk for their celebration party (in less than three weeks from now, eek!). The idea is that guests will be able to record their own video messages to the bride and groom – essentially a multimedia guestbook. This is very similar to the self-service photo booth, which has become a ‘must-have’ item at weddings and parties, and there are a number of commercial and open source photo booth software solutions available (SparkBooth, PhotoBoof, etc.)

I assumed that there would be similar software available for self-service video recording booths, but my Google-fu has largely failed me here. It seems that most of the software for this use is commercially developed and packaged with turn-key hardware solutions. I don’t have big bucks to spend here, so I won’t be buying/renting a commercial video booth. After much fruitless searching for a suitable product, I’ve determined that I’ll be writing my own video booth software.

My requirements for video booth software:

  1. Should have a simple, intuitive and bulletproof user interface. Anyone should be able to record a video without ever having used a computer before (I’m looking at you, Grandma), and the workflow must survive enthusiastic button-mashing by tipsy guests.
  2. Should not need expensive hardware (again, tipsy guests). I don’t have a powerful computer available to me for this project. This may be a challenging requirement, as video encoding in software is very CPU-intensive.
  3. Should be able to handle continuous use. If there’s a line of people waiting to record a greeting, a guest should be able to begin recording as soon as the previous person has finished their recording. This implies that I’ll either be encoding captured video/audio in real time or using background encoding tasks that are invisible to users, either of which may be a challenge considering my ‘no expensive hardware’ requirement.
  4. Should be able to record high quality video. I would hate see once-in-a-lifetime video memories look pixelated and crappy. My cell phone can take good video, so my video booth had better take great video. I’d be happiest with 1920×1080 (1080p HD), and I’d settle for 1280×720 (720p HD). A frame rate of 30FPS is preferable, but I’d go to 24 or 25FPS if needed, and I’d like to keep a data rate around 5000kbps. Absolute worst case scenario: 640×480 (SD) resolution at 24FPS and 500kbps data rate; I refuse to go any lower. I know I’m really challenging myself here, considering the need for cheap hardware and continuous use.

The spare computer that I have available for this project is an Acer Aspire AX1430. It’s got a wimpy little AMD E-450 processor, which is only slightly better than the dual-core Atoms.  The computer has 4GB of RAM, a 500GB HDD, and I’ve replaced the optical drive with a 32GB SSD. It’s essentially a high-end nettop, and doesn’t have much available horsepower for tasks like video encoding.  In order to keep resource usage as light as possible, the machine is running Lubuntu 12.04.

Other hardware that I have available to play with:

  • Logitech C260 webcam.
  • An Arduino microcontroller.
  • Wireless RF keyboard and mouse.
  • I’m considering using a Big Red Button for the user interface:

The user experience I have in mind is exceedingly simple:

  1. A webcam sits on top of a large monitor, which displays a full-screen preview of the video camera feed at all times. There won’t be a keyboard or mouse available, just a big illuminated red button in front of the monitor. In the idle (waiting) state, a text overlay invites the guest to “Press the button to begin recording.”
  2. When a guest presses the button, the text overlay gives them a quick countdown (3…2…1) and then recording begins. An overlay message (maybe including the ubiquitous flashing red circle ‘recording’ symbol) instructs the guest to “Press the button to stop recording.”  The big red button will flash during recording.
  3. The guest records their video message and then presses the button to complete their recording. A quick “Thank you!” message flashes, and then we’re back to the idle state, ready for the next person.

There won’t be an Internet connection at the party, so I’m not considering features like streaming video, automated uploading, email notifications, etc. at this time.

For the video capture and encoding backend, it looks like GStreamer is the de-facto choice as far as libraries go. I’ve used Processing to interface with arduino in the past, so I’d like to reuse some of that code (there’s a time crunch here!). There’s an implementation of GStreamer for Processing called GSVideo which seems to have garnered a substantial following, so that may be the best choice for the UX.

Now I’m off to run some GStreamer tests and see if my wimpy little computer will be capable of on-the-fly previewing and encoding of HD video. My suspicion is ‘no’, but I’m ever-hopeful! I’ll follow up soon with those results.