Posts tagged: modding

Current Cost Classic vs CC128

Back in November I bought (well, actually I signed up to a new deal with E.ON which included one) a Current Cost electricity monitor, and hooked it up to my server so I could gather the stats for Cacti. I do this by running a small perl script which looks as follows:

#!/usr/bin/perl
# /usr/local/bin/cc-classic.pl
 
use Device::SerialPort qw( :PARAM :STAT 0.07 );
 
$port = "/dev/currentcost";
 
$ob = Device::SerialPort->new($port)
      or die "Can not open port $port\n";
$ob->baudrate(9600);
$ob->write_settings;
$ob->close;
 
open(SERIAL, "+>$port");
while ($line = <SERIAL>)
{
  if ($line =~ m!<ch1><watts>0*(\d+)</watts></ch1>.*<tmpr>\s*(-*[\d.]+)</tmpr>!)
  {
     $watts = $1;
     $temperature = $2;
     print "watts:$watts temp:$temperature";
     last;
  }
}
close(SERIAL);

This would give me the two values I am interested in; watts and temperature (since it sits in the garage node 0 ;)) in Cacti’s format:

$ /usr/local/bin/cc-classic.pl
watts:761 temp:11.3

But today, I received my new unit, a Current Cost CC128. It’s main benefit is that it supports individual appliance monitors, which makes the output even more useful. So, armed with a draft copy of the CC128 XML output document, I prepared my script to read as follows:

#!/usr/bin/perl
# /usr/local/bin/cc-cc128.pl
 
use Device::SerialPort qw( :PARAM :STAT 0.07 );
 
$port = "/dev/currentcost";
 
$ob = Device::SerialPort->new($port)
      or die "Can not open port $port\n";
$ob->baudrate(57600);
$ob->write_settings;
$ob->close;
 
open(SERIAL, "+>$port");
while ($line = <SERIAL>)
{
  if ($line =~ m!<tmpr>\s*(-*[\d.]+)</tmpr>.*<ch1><watts>0*(\d+)</watts></ch1>!)
  {
     $watts = $2;
     $temperature = $1;
     print "watts:$watts temp:$temperature";
     last;
  }
}
close(SERIAL);

And guess what… that works just fine ;)

For those who read diff:

$ diff /usr/local/bin/cc-classic.pl /usr/local/bin/cc-cc128.pl 
2c2
< # /usr/local/bin/cc-classic.pl
---
> # /usr/local/bin/cc-cc128.pl
10c10
< $ob->baudrate(9600);
---
> $ob->baudrate(57600);
17c17
<   if ($line =~ m!<ch1><watts>0*(\d+)</watts></ch1>.*<tmpr>\s*(-*[\d.]+)</tmpr>!)
---
>   if ($line =~ m!<tmpr>\s*(-*[\d.]+)</tmpr>.*<ch1><watts>0*(\d+)</watts></ch1>!)
19,20c19,20
<      $watts = $1;
<      $temperature = $2;
---
>      $watts = $2;
>      $temperature = $1;

Please note, the above only works with 1 sensor (the main transmitter), so it is likely to change in the future. For now it suits my need.

Modding the Dell Mini 9 – Part 2

I wasn’t planning on revisiting my Mini mods yet, but when someone offered (and I happened to be looking) an upgrade to a 32GB RunCore SSD, I could not pass on the occasion. The only problem was that it rendered my SSD activity light useless as the RunCore does not carry the same signal on the pin that the STEC drive uses.

Thankfully all the hard work figuring out where the negative side of the SSD light had to connect to was done once more by UnaClocker on the MyDellMini forums, so all I had to do was find a quiet Saturday and warm up the soldering iron.

We begin by undoing the work we did on the STEC. Heat up the pin on the SSD and remove the black wire. We will need to connect that to the RunCore drive.

As said, UnaClocker found out that the signal we need is present on a small resistor, which although tiny, isn’t the worst place in the world to solder on. Just fold back the sticker to reveal it. If you enlarge the 2nd picture, you will see which one it is. Use the tiniest amount of solder and attach the black wire to the resistor.

Fold back the sticker, put the SSD back into it’s slot and boot it up. Blue LED goodness once again!





Lies, damned lies, and statistics

I’ve been using a 1 wire network for quite some time now, but when I deleted a directory to much on my server, I lost a lot of the stats that I had gathered. A couple of weeks ago I finally got my behind in gear again and rebuild my network, this time making sure it all gets backed up ;)

One day I’ll write something about how it’s all been done, but for now you’ll have to suffice with some pretty graphs.

Here’s the daily graph for the temperatures in our bedrooms for the past 24 hours:

Daily temperatures Bedrooms

And recently I added a Current Cost meter to my network, which gives me the shocking facts about my electricity usage for the past 24 hours:

Daily electricy usage

The above graphs are updated hourly, and I’ve got other graphs too, extending the period of graphing. You can find them here for the time being.

Update 25.1.2009

And now you’re able to follow the stats on twitter: http://twitter.com/awoogadotnl

Modding the Dell Mini 9

Dell Mini 9

For Christmas this year I received a Dell Mini 9, which is one of the most flexible netbooks around. Searching around on the internet quickly revealed an incredible source of information posted on the forums over at My Dell Mini. As I was looking for a new modding project, the Mini 9 seemed perfect.



First an important message

The information below has all been taken from the My Dell Mini forums, especially the SSD activity LED mod by UnaClocker. I have merely adapted it to suit my own needs. As with all things involving voiding your warranty, I will not (and can not) take any responsibility for any problems that you have trying to do the same. You break it, you pay for it (and if you read on, so do I :))

 

Right, that’s out of the way, let’s get to it! Here’s a quick overview of the things that I have done to my Mini.

Part 1: Disassembling the Mini 9
Part 2: Disassembling an USB hub
Part 3: Disassembling an USB flash drive
Part 4: Putting it all together
 

Part 1: Disassembling the Mini 9

Dell publishes a great online manual which details how to disassemble your precious Mini 9. I used their guide and documented it all on one page. All pictures can be enlarged by clicking on them for additional detail.

I used a selection of tools, but one that I would specifically like to recommend is the plastic wedge. This allows you to pry open the case without damaging it. I got mine when I bought a Brodit phone mount, but I’m sure Ebay will have a selection of these too.

Switch the Mini off if you haven’t already, and turn it over. I placed an old tea towel underneath it to prevent scratches to the mirror finish lid. First we need to remove the battery. On either side of the battery is a latch, which when pushed outwards, allows for the battery to be slide out.

The module cover is next. Two Phillips screws hold it in place and then using your nails, or the wedge tool, lift it up. It may require some force as it is held further into place by small plastic tabs.

With the module cover removed, you have access to the memory, SSD, WLAN card, and if you are lucky/ticked the WWAN option, a WWAN card. As you can see, I have already upgraded my memory to a 2GB SODIMM. To remove the memory, gently push away the latches on either side of the memory, until the module is tilted up. Then just pull it out.

The SSD is held down by two screws. Just unscrew them, and slide the SSD out of its socket.

Remove the two antenna wires from the WLAN card by gently (really gently) pulling them out from the sockets and undo the two screws. Just pull the card out and place it to one side.

My Mini doesn’t come with a WWAN card, so that leaves a nice empty space where we will stuff the USB hub and flash drive. More on that in the last part.

To make life as easy as possible, we need to have access to both sides of the mainboard, so the next item that need to be removed is the keyboard. Locate the two screws marked with a K and undo them. Turn the Mini over again (right side up), open the lid, and lift it up slightly to reveal the keyboard connector at the bottom of the keyboard. Using a small flat screwdriver, push the two locks open and remove the keyboard completely.

With the keyboard removed, the palmrest is next. Place the Mini again on it’s lid and remove the nine screws as indicated in the pictures. Two of them are below some rubber studs, which can be lifted out using a flat screwdriver. They have a sticky bit underneath, so they require a bit of an push to get over the initial resistance.

Flip the Mini over and open the lid again. Remove the seven screws. Disconnect the bluetooth, touchpad and power button connectors and then, using the plastic wedge, pry the case open using some gentle force along the sides. Be patient at this point as the plastic latches inside the case, are fragile and will snap if you exercise too much force.

Now we just need to remove the mainboard. There are two screws to undo, followed by a number of connectors. First route the WLAN antenna wires through the hole in the mainboard and disconnect the speaker connector just below it. Then disconnect the microphone, the two power connectors and the display connector.

Lift the mainboard up at the left side and then pull it out sideways.

That’s it! You’ve successfully made your first step on to the void your warranty ladder :D
 

Part 2: Disassembling an USB hub

Following a recommendation on the My Dell Mini forums for a small USB hub, I found the so called “Octopus” hub to be small enough to fit inside the WWAN space, leaving enough space for additional USB devices. I bought one on Ebay from a seller called 2008_topseller for £3.60 and had to wait about 2 weeks before it arrived. Plan your mods in advance ;)

Remove the plastic cover and it reveals the tiny PCB that will fit neatly in the WWAN slot later. Using a soldering iron remove all the existing wiring and (although not shown in these pictures), move the ceramic resonator from the bottom to the top (take note in which direction it needs to be on). Also make a note what wiring is which pin on the PCB. Fortunately the wiring follows the USB standard, which is Red/White/Green/Black.

Once done, put some electrical tape underneath the PCB to make sure that at no point that side is able to short on the mainboard. I also put a piece of double sided foam tape on it so it will remain in place once put inside the Mini.
 

Part 3: Disassembling an USB flashdrive

I bought a 16GB PNY Attache Premium USB Flash drive from Play.com, as it looked in the pictures small enough once all the plastics were removed and at £16.99 it was cheap enough.

But then things started to go wrong for me. Applying a bit too much force on the USB connector whilst trying to heat up the connector legs up, caused the copper pads to be removed completely from the PCB. Doh!

If anyone has an idea what I can do with it now (other than to bin it), use the contact form :)
 

Part 4: Putting it all together

Fire up the soldering iron, the time to kiss that warranty goodbye has come!

In order to add the SSD activity light, we need to tap into pin 52 on the standard STEC SSD. This is where having a spec sheet from the manufacturer comes in handy. Please note that this mod only works on the STEC SSD’s (as supplied standard by Dell), not any other brand. Pin 52 is marked as “-DSAP” with description “In the True IDE Mode, this input/output is the Disk Active/Slave Present signal in the Master/Slave handshake protocol”. To you and me that translates as disk activity :)

The SSD LED will then be located next to the battery surface mounted LED as shown in the picture.

The LED will also require a +3.3V source, which you can find on pad 52 of the WWAN connector.

In order to add the USB hub, we need to use the WWAN connector which carries the required Data+ (pad 38) and Data- (pad 36) signals. For completeness I also added +5V (found in the copper track that runs through the “L”) and ground (using a screw hole) from underneath the WLAN card.

Now comes the scary bit. Scrape, using a tip of a knife, a small area of the PCB coating (that Blue/Green layer you see) to reveal the copper track underneath. Then using a small dab of solder, attach the Red and Black wires. Protect the wires from stress by sticking some electrical insulated tape on top of it. Using an even smaller amount of solder, attach the White and Green wires to the WWAN pads, making sure the pads do not touch each other. If you can’t manage first time around, heat the pads up and remove the wiring again. Then retry it.

Just two more wires to go. As pin 52 on the SSD connector is miniscule, it is better to solder the Black wire onto the SSD directly. Make sure the wire is as flat and small as possible, and then use the tiniest amount of solder to attach it. Double check that you haven’t connected two pins together. The Red wire needs to be attached to the WWAN connector again on pad 52. By now, this should be easy ;)

Before we continue putting the hub and LED in place, fire up the mini (assembling just enough to get it to boot) to make sure it is still working. If it doesn’t, revisit your soldering and double check they are done properly.

Put the USB hub in it’s place and cut the USB wires to measure. Maintain a small amount of extra length, in case you need to move it around later. Solder the wires back to the USB hub in the correct order, and test the Mini again. It works!

Almost there now. Route the remaining Red and Black wires towards the battery LED and cut them to length. Solder a new LED and a resistor to the wires and test it is working. If it isn’t, then swap the legs of the LED around and try again as LEDs only work one way. You have to use a resistor suitable for the LED too. I used a 3000mcd “Tru-Colour” Blue LED with a forward voltage of 3-3.2V and a 100 ohm resistor. It doesn’t matter on which side of the LED the resistor goes, as long as it is there.

Unfortunately, when it came to assembling everything, I discovered that the way I have mounted the LED did not allow the case to be closed properly. I mounted it therefore slightly different, but I forgot to take pictures of it. I’m sure I will open up the case in the future and then I’ll update this page with the new pictures. In the pictures below it shows the LED in action when the SSD is being accessed, when the battery runs low, and when they both light up. Neat!






Finally, take a last look at the mods, before we close the module cover and call it a day ;)

Update 7.2.2009

I’ve upgraded to a 32GB RunCore SSD, so I have done the LED mod again. Have a look at this post for details

Node Zero 33 1/3 – The Final Install

Node Zero… Every respectable technology enthusiast has one, and so do I. It started all the way back in 2001 when I came across The Automated Home website and it’s associated mailing list. I knew nothing about home automation, audio distribution, video sharing, etc but was keen to learn and introduce at home (often with great resistance from SWMBO ;)).

Node Zero 2002So I build my first node zero to accommodate some of my servers in the garage and distributed the network from there into the living room. Due to the fortunate location of the garage being adjacent to the living room it is the ideal place to put stuff without worrying about the illusive WAF :)
You can’t really call the cupboard a node zero though, but if you closed the doors, at least it hid the cat5 wiring from the switch and modem it housed.

Node Zero 2004Flash forward to 2004 and with an ever increasing gadget count it was time to upgrade node zero. My dad is blessed with the carpentry gene and so with my instructions he set off to partition the garage in two parts where I reserved myself a shelf for the 2nd incarnation of my node zero. On the shelf my two TiVo’s and their satellite receivers were placed, followed soon by a Xbox Media Center, a scart switch and a Kat5 transmitter. The result: spaghetti junction all over again :(

So with an increasing demand on convenience and accessibility, I had to make amends. Bring on 2008 where my dad performs yet another masterpiece and creates a purpose build rack for me. The rack houses all my stuff, and with some space left at the bottom I even have room left for more toys! :D

Node Zero 2008

Find some more pictures in the gallery