Archive for November, 2011

F***en Magnets…


On Friday I bought an old oscilloscope from Uni on the cheap. That and a old Wishmaker, with a signal generator, variable voltage supplies, switches, buttons, multimeter and a breadboard. Getting all this home, I quickly realised that I didn’t actually have enough room on my desk for all this stuff. Sad Panda. So what do you do? Move into the spare room and use the desk sitting in there! (nearly) Instant workspace!

Need a computer for said workspace… For datasheets and coding and what not. I know! I’ll use the broken screen laptop curently on my desk and wire it up onto my workspace instead! But what about powering it on and applications? I’ll, shudder, need a windows boot, I use to use Wake on Lan to turn it on becuase it was just a hassle to open up the screen and press the power button, especially when the monitor was resting on it. Moving it to the spare room meant that I coudn’t run an ethernet cable to it, so Wireless had to be used. WoL doesn’t work on wireless. Well. Atleast not with this old Toshiba laptop. But. I got the bright idea to break out the power button to outside the laptop case. Simple enough really. Tack a new momentary button onto the power button board in the laptop. That was the easy part.

What was the hard part, was the power button wouldn’t work when the lid was closed. Some smart developer decided to disable to power button when the lid was closed. This kinda defeated the whole purpose of the new button, didn’t it? Yeah.
So several hours of hunting around the laptop trying to find the sensor got me REALLY frustrated. Other laptops I have pulled apart had simple switches in the hinge or a basic light sensor. This one, had none of these. No obvious sensors, no hidden switches, nothing.
After pulling, literally, everything apart and unplugging everything, I still couldn’t find the sensor. It had to be in the monitor somehow because nothing else placed over the laptop with the monitor removed would set the sensor off. But it couldnt be in the monitor because nothing was plugged into the monitor. Even after stripping the camera, LCD and mic out of the screen section, it still was sensing some how.
Genius here decides to look on the other side of the bezal that he just put back onto the screen. Low and behold. What was there?
A Frikken magnet. There was obviously a magnetic sensor on the board that detected when the magnet was near by and set laptop to sleep/disabled power button.

It’s kinda hard to see, but it’s the dark silvery bit clipped into the screen. Pop that out.

Bam, it works. That’s it. On the upside, I got rather intimate with a laptops guts, but I am never pulling this one apart again…

Dual boot! This was also far too painful. Because it already had Ubuntu installed on it, installing Windows will destroy the GRUB2 bootloader, rendering the Ubuntu partition useless. But that’s easliy fixed, right? Wrong.
Install Windows, that goes painlessly. Try to repair the GRUB2 bootloader using a live CD, same way I have done it many a time before.
Doesn’t like that.
Why? Because it reakoned that there was no GRUB installed to it in the first place, which is crazy talk. Crazy talk I tells ya!
After a few more hours of hunting and trial an error, I discover I need to chroot (kinda run the Ubuntu commandline within another linux install) into my Ubuntu install from the live CD and Re-install GRUB completly. Sigh.
Ultimatly it was fairly simple from there. Let me walk you through it.
First we needed to find which partition the linux build was on. Punch in:

sudo fdisk -l

Find the partition that says “Linux Partition” and that’s the one we’ll be using. From here on I’ll be using sda1, because that’s the one mine was.
Next, let’s make a folder to mount everything in.

sudo mkdir /mnt/root

Then lets mount our linux install files to allow us to chroot in:

sudo mount /dev/sda1 /mnt/root<br />
sudo mount -t proc none /mnt/root/proc<br />
sudo mount -o bind /dev /mnt/root/dev

Done. Now to chroot in!

sudo chroot /mnt/root /bin/bash

From here you should have a slightly different looking prompt on the terminal. Here, type:

sudo grub-install /dev/sda

Bam. That fixed it! After a little custom work with the grub loader from inside my Ubuntu build, like changing the time out and looking for my Window partition (sudo update-grub), we have a working GRUB2 loader!

Well, here’s the fruits of my labours. My new workspace!

Updates updates updates!
What have I been doing you ask?
Uni work. Far too much uni work for my liking. Well, it’s done now. For this year at least. So now it’s time for projects, SKYRIM! and work.

Let’s take a step back for a moment and I’ll explain one of my subjects that has kept me so busy. The subject known as ECTE350 Engineering Design and Management. Basically, at the start of the year we are put into teams of 8 and are given a theme. From this theme we must design a product, then build it. Following all regulations, much paperwork and what not. This years theme was “Aged and Disabilities care” and Team 8, also known as TSAM Tech designed and built the E-LINE. Pretty much, it’s an automated clothes line with various sensors to detected temperature, humidity, and light to detect when to draw the clothes line into the house through a window. It was also controlled by a wireless remote to move the line so it was easier for the disabled person to sit in their wheel chair and hang clothes with minimal movement.

Don’t listen to Jaqui. It’s her bra, not a swim top…

Here we can see the E-Line and TSAM Tech Team Members, minus Ru Qui, he missed the photo. We had to present our product at the annual Innovation Fair at UoW and the crowds vote on the products. This year we came third! So pretty much, this past semester at uni all my project mind set has been in this product.

Moving on.

What else. Tried to fix a mates monitor. That didn’t work. Backlights dead and I cannot find any visually dead capacitors. Bought a new Arduino Mini Pro on eBay. Just for shits and giggles. Noticed my TV has serial comms line for RS232 control. Winning! TV/XBMC remote all in one in the thought planning stages…

Yesterday, I started up on my Wireless glove gesture control mouse again. I have dubbed it the “RatGlove”. As it turns out, the learning curve between AVR micro controllers and TI micro controllers is quite steep. Not a huge fan of TIs Datasheets really. Too many references to other documents and poorly documented. I braved the datasheets and got my FR5739 board to work at the right clock speed and set up the USART interface properly so my serial LCD screen works with it all properly like. That took me 2 days alone. Oh well. Next is the accelerometer. I have a much better understanding of the ADC component of micro controllers now after my micro controller subject at uni. Hopefully I can decode the accelerometer stuff this time around.

See? Photographic evidence I am actually doing something other than Skyrim. Notice no super dodgy transistor array this time around, it’s a serial enabled 3.3V LCD available from LittleBirdElectronics. Quality aussie supplier. They get their stock from several other manufacturers, like SparkFun.

That’s pretty much it from me this time around. Just keep blowin’ shit up and taking names.