You are currently browsing the December, 2011 archives.

Anxiety

Posted 2011.12.30 10.45 in Life On Drugs, Pointless Blather by Stephanie

So I’m on my way to a date with a scalpel, and I’m nervous.

They say it’s no big thing. Simple procedure, only takes 30 minutes or so.

I’m sure they’re right. I’m sure everything will be ok.

It’s just that I get nervous when needles, scalpels, and anaesthetic are involved.

And it’s not like they do anything to ease the anxiety – to the contrary, the whole process is designed to extend the discomfort. No food or water after midnight, so you’re hungry and totally parched while you’re waiting. No painkillers or other medication for a full week ahead of time.

I get the no-food thing, and the no-water thing makes a very slight amount of sense. But it doesn’t do anything to make one feel less uneasy about the situation.

Personally, I think they should give you a small supply of demerol, to start taking as soon as the anxiety sets in. That would go a long way to making the whole process run a little smoother. At least from the patient’s point of view.

Master Control Project

Posted 2011.12.25 9.40 in Computers/Internet/Technology, Hobbies by Stephanie

Last weekend I finally mostly-finished the project I’ve been working on, on and off, for the last several months. My Master Control Project, or MCP*, was designed to be a central controller and information display that would sit on my desk in my livingroom, and give me all sorts of useful information while allowing me to control various things.

The idea grew out of my DIY thermostat project – after getting a taste of what could be done with an Arduino and an ethernet connection, I wanted more!

Plus, the thermostat is located up on a wall and I can’t see it from my desk in the livingroom . I wanted a cool project that I would be able to see all the time!

Unlike previous brief glimpses at this project, this time around I’m going over the whole thing in detail – mainly because it is, as I said, mostly-finished. (It’ll never be fully finished, because I’ll always be adding to it.) The other reason why this is a good time for a write-up, is last weekend was when I rebuilt the whole thing from the ground up, and took the project from ‘beta’ to ‘1.0’.

Thermostat 2.0

So here’s what it does so far:

  • It is a clock, with full day / date and time display.
  • It mirrors the HVAC information from my DIY thermostat.
  • It displays the current temperatures of my two aquariums.
  • It controls the lights of my two aquariums, turning them on and off automatically.
  • It controls my Game of Life wall display, turning that on and off automatically.
  • It displays the amount of background radiation detected by a geiger counter.
  • It displays the number of active connections on my linux server.
  • It displays the current weather conditions for my area.
  • It allows me to directly override the thermostat, aquarium lights, game of life display.

For communication, the MCP is connected via ethernet to my LAN, and also has an XBee wireless module allowing it to communicate with other devices in and around my house (eg. the thermostat).

Pile of Parts

For the most part, the MCP is made with off-the-shelf components. Some components were kits, some came fully assembled, and a few things were ‘homebrewed’. Here’s something of a BOM:

  • Arduino Mega 2560 – the brains of the operation.
  • Arduino Mega Proto Shield – provides connections for I2C (secondary LCD and Chronodot), Serial (XBee), the geiger counter, and the GLCD.
  • Arduino Ethernet Shield – does what it says on the box, this adds 100/10BaseT ethernet, allowing the MCP to receive data and commands from clients on my LAN or out on the internet.
  • Arduino Patch Shield – provides simple plug-in connections using normal Cat-5 cable so you can easily access inputs and outputs some distance from the main unit.
  • KS0108 Display – a monochrome graphic LCD that can dispay text and images.
  • Chronodot – a highly accurate RTC with its own battery backup and an I2C interface.
  • Protoboard GLCD backpack & Wiring Harness – some standard proto-board and ribbon cable, to connect the GLCD and Chronodot back to the Arduino, via the Mega Proto Shield.
  • 20×4 LCD Display – a monochrome LCD character display, for displaying text-only.
  • Adafruit I2C LCD Backpack – an Adafruit kit that lets you use character LCDs using I2C.
  • XBee – a transceiver that lets you communicate with other devices using standard serial protocol, wirelessly at ranges up to hundreds of feet away.
  • Adafruit XBee Adaptor – an Adafruit kit that makes it easy to use a 3.3V XBee module with a 5V Arduino.
  • MightyOhm Geiger Counter – a self-contained geiger counter kit that is easy to interface with an Arduino, and has a fairly sensitive GM tube.
  • Adafruit Perma-Proto Board – an ingenious proto-board from Adafruit, which lets you transfer projects from a breadboard to a soldered, permanent format.
  • Waterproof DS18B20 Temperature sensors – submersible digital temperature sensors, they only require one digital line and you can put more than one sensor on a single line.

The MCP is mostly assembled in layers, each layer is a ‘shield’ using the Arduino lingo. Here are the assembly steps:

The MCP is installed on the upper part of my desk, above the primary display of my computer. This puts it just slightly above eye-level, almost at the centre of my ‘hub of activity’. I spend most of my home-hobby-time at my desk, where my computer and tv are located.

This shot shows the MCP installation, with all its peripherals and cables etc. The modular construction means that if any part fails or needs attention, I can easily access and isolate that part, or replace it if necessary, while leaving the rest intact. And all without desoldering anything!

In terms of software, the whole thing is running with a sketch written in the Arduino IDE. It compiles to a binary of about 47kB in size, and generally uses about 3kB of RAM while it’s running. Prior to last week’s rebuild, I updated the sketch to version 1.0 of the Arduino platform.

The libraries used include:

I’ve added some special characters to the GLCD font definitions, such as the degrees symbol, and used a few graphic symbols as well, such as the fish and snail icons. A couple of the indicators on the GLCD are ‘text’ but I’ve used a graphic to squeeze the text into smaller area than the standard fonts would allow.

For all that I’ve got completed though, there are still some significant aspects that I have yet to include. The most-glaring omission is the lack of any kind of controls on the MCP itself – there are no buttons or switches or anything. I can’t control the Master Control Project, without firing up a terminal and accessing it over a network connection.

On the one hand, this isn’t a huge problem as it needs very little ‘help’ in doing its job – the aquarium lights turn on and off when they should, my Game of Life display is on when I’m around to enjoy it and off when I’m not. And the various data displays show me what I want to see.

However, it would be nice to have some buttons or something, so I could override things quickly and easily. I have some ideas on how to do this, and have already explored some options – touchscreen, rotary control, buttons, etc. Sooner or later, I’ll make a decision and put something into place.

Another obvious step will be a proper front-panel, so that the LCD displays aren’t just haphazardly screwed into the edge of the desk shelves. I’m planning to get a laser-cut acrylic panel made, which I think will look quite snazzy – but I need to finalize my plans on the buttons/controls first.

I’m also toying with the possibility of upgrading the displays. Obviously the GLCD wasn’t enough, hence the added 20×4 character display. Even that feels cramped, so I’m looking at the option of a second 20×4 display… Or maybe there’s some way to replace both of these displays with something all-together bigger – like a little VGA screen.

I have one of those digital photo frames, that I mean to disassemble and see if there’s any way to merge it to an Arduino… but that’s way down the road.

For now, the MCP is ‘done’ and it’s done well enough for me to leave it alone for at least a little while. Should anyone be interested in having a closer look at the ins and outs, I’ve attached a zip file containing the Arduino sketch, the related headers, and a text-file which contains my overview and some wiring and design notes.

Click here to download the MCP zip file.

(* Yes, I’m a fan of the original TRON movie. Not long after I started this project, I couldn’t help calling it the MCP and the name just stuck.)

Stealing Eggs

Posted 2011.12.23 22.40 in Aquaria by Stephanie

For two years, I’ve kept corydora catfish along with my apple snails. And for two years, my corydoras keep laying eggs all over the place. But they all keep disappearing within a day or two.

Now, I know the corydoras themselves do eat the eggs, but I’ve also suspected that the apple snails were getting in on the act too. And finally, after two years, I have proof!

This little video shows the snails doing their darndest to eat some eggs, though they don’t appear to be successful. These eggs are fresh, just laid in the morning, so maybe they need another day to ripen?

The video is also a pretty good way to see how the snails mouths / rasps work – they don’t have teeth, but they have a sort of tongue with a tough teeth-like surface. Not unlike a cats tongue, in a way. They use this rasp to break down food and draw it into their mouth.

So Damn Tired

Posted 2011.12.21 20.00 in Pointless Blather by Stephanie

I’ve been trying for three or four days now to write a big long babbling post about some electronic jiggery-pokery stuff, but when I get home from work all I wanna do is sleep.

I sit and stare at the computer and my head’s full of words but before I can squeeze them out my fingertips into the keyboard, my eyes glaze over and it’s jnue4 just bed bed bed bed bed bed I wanna go to bed.

Just getting out this brief missive is probably the high-point of my evening.

Blah.

Grasp of Time

Posted 2011.12.14 14.19 in DID, Pointless Blather by Stephanie

This week went by particularily fast. Or was it two weeks? It feels like only last night I was tinkering with the Arduino 1.0 library stuff. There were a couple weekends in there too, I think. It’s all just condensed into a blur. Stuff happened. I slept. I worked. That could have been any day. Or every day.

This has led me to think more about time in general, and how I perceive it. I think I have a pretty good grasp of seconds, and minutes. Hours are ok. Days… one or two, aren’t bad. When it starts getting up into the weeks thing though, that’s where it all starts to blur for me.

Thinking about it while coming in to work this morning, I feel like I have a fairly good grasp of time, as far back as the day before yesterday, and as far forward as the day after tomorrow. Beyond that though, it all just compresses together.

Except not these last two particular days, they’re very blurry.

I haven’t been able to sleep. My insomnia went into overdrive, I’ve been up till about 4am two nights in a row, but still waking up at the usual time in the morning to go to work. I don’t even use an alarm clock.. I just get up when I wake up, and that happens fairly consistantly at the same time most days, to get me to work on time. Even when I haven’t had enough sleep, it seems.

Needless to say, there hasn’t been anything to report, other then, “Still alive. Sleepy.”

Chronodot Library Update

Posted 2011.12.01 17.40 in Computers/Internet/Technology by Stephanie

Arduino has just released their 1.0 software update. This is a Big Deal, but it does break some prior content. Changes to the basic libraries and the Wire library have resulted in my simple Chronodot library no longer functioning.

Fortunately it was a quick and simple fix which I’ve attached below.

One of these days I’ll learn how to use Git and do a real repository thing…

Cheers!

Chronodot Library Update

Note – this library is backwards compatible to older Arduino IDEs as well.