Friday, November 18, 2011

How to Resize a VirtualBox VM in Windows

Have you ever had a VirtualBox .vdi in Windows and wondered how you could make it larger? We all have to do this at some point, so here's what you need to know:

1) Shut down the virtual machine that uses the specific .vdi
2) Fire open a command prompt and add the virtual box bin path to your path. In my case this was done by executing:

set PATH=%PATH%;C:\Program Files\Oracle\VirtualBox

3) Change directory into the folder that contains the vdi file of interest, say 'disk.vdi'.
4) Run vboxmanage modifyhd with the resize parameter to resize the disk. If you're interested in increasing the disk to 150Gb, this is what you would do:

vboxmanage modifyhd disk.vdi --resize 150000

5) Fire open the Windows virtual machine.
6) Within the virtual machine, fire open a command prompt.
7) Execute diskpart

This will leave you at a DISKPART> prompt

8) Execute 'list volume' to obtain a list of volumes.

Note which volume number you are interested in modifying. Suppose this number is 2.

9) Execute 'select volume 2'
10) Execute 'list disk'

Note which disk number you are interested in modifying. Suppose this number is 0.

11) Execute 'extend size=150000 disk=0'
12) Execute 'extend filesystem'


Now if you open up a Windows Explorer window and right click on your disk, you should have 150Gb available.

Wednesday, October 12, 2011

Turning Old Shower Curtain Hangers Into Magnets!

I recently inherited several old shower curtain hangers that looked fishy! Fortunately, they did not smell fishy. They were in reasonably good condition and I did not want to see them thrown away. At first, I thought I could make a fake-aquarium for my daughter, where she could hang them and play "pretend fish" (two year olds like to do that ya-know). Unfortunately, the other thing two year olds like to do is throw things and these hangers were not designed for high-velocity impacts. My next idea was to make some refrigerator magnets out of them!

I decided to rip off the back hangers and put some magnets on them. The back part of the hook is embedded into the fish-material, so I had to be careful to pull the hook off flush with the back of the fish. If I moved the hook slightly back and forth a few times it would break off evenly. Here is a shot of one fish with the hook and one without the hook.

Next, it was glue time! I did not use any ultra-expensive-special-purpose adhesive for this, just regular old Elmer's Glue-All (the multi-purpose glue). It claims to be a "New Stronger Formula!", I suppose we will see just how strong it is. The magnets are regular disk magnets about 3/4" in diameter. Take a look at this close-up.

Below you can see most of the fish just sitting around, waiting for their glue to dry. They are such patient creatures!

Tuesday, October 11, 2011

Testing the Sangamd 10kHz Low Pass Filter

Tonight I took a quick look at an old Sangamd 10kHz low pass filter. Here is a snapshot of the filter and all of it's majesty! It's a beautiful old piece in excellent physical condition.

Physically, the unit is 1.7" x 1.6" x .8". The leads have an outer diameter of .025". The inner diameter of the round-casing that surrounds the leads is approximately .130". The height of the lead that extends above the casing is roughly .090", this does not leave much room for pressing the unit into a breadboard. I ended up using some old wire wrap, stripping it and tying it around the leads. Here is a closeup of the wire wrap around the leads.

Three wires stripped, wrapped and pressed by hand. Piece of cake!! At least it looks that way from the image. It takes a minute or so to get the wrap just tight enough to slip over the lead. Here is a snapshot of what all of the completed wire extensions looked like.

Now, we will plug it all into a breadboard and feed 1, 2, 3, 4.... 10kc, etc, while observing the output in-and-around 10kc. In the shot below, I am feeding 10kc @ 1Vpp into it. Here you are seeing what the oscope reads at the output of the filter. Not bad!

Now 12kc.

Now 13kc.

Now 14kc.

Now 15kc. Notice the dip.

Now 16kc, notice the dip again.

And now, 17kc.

The true drop-off point for the filter is somewhere between 13 and 15kc. I will dig a bit more to determine a closer estimate for the drop off. Unfortunately, I am unable to find a specification for this unit online, so it is impossible to say whether or not it is performing within its designed tolerances. For its age, I would say the unit appears to be working well!

Wednesday, March 23, 2011

AT Keyboard Signal Analysis

I'm a programmer and am surrounded by people that love to bang on their keyboards all day. In fact, I bet you're one of them! Even if you're not, you probably just finished typing 'AT Keyboard', 'AT Keyboard Signal', 'AT Keyboard Circuit' or something of the sort into your favorite search engine. Gotcha didn't I? Or, maybe not, w ho knows! Millions of people are banging on these things each day. Keyboards never complain and all they do it take a pounding from you, day after day after day., These poor things, they're pushed around, shoved around, slid across the table. Sometimes they are banged with one hand, sometimes with two! They wait around patiently, hoping for a taste of your table scraps, or a sip of that coffee you just spilled. It's a sad and tragic life, I know. Despite the daily abuse, these keyboards look beyond our cruelties and deliver byte after byte, asking nothing in return.

Have you ever asked yourself, what makes this keyboard tick? How does all my finger twiddling make it down the line and into that box over there? Take a few minutes to think about it. Once you're done thinking about it, take a look at these two signals:

This is a snapshot of the raw signal that is transmitted down the data line, when the spacebar key is pressed.

This is the signal transmitted down the data line when the enter key is pressed.

I will leave you with two questions to think about until I finish up this post:

1) Is keyboard / PC communications one way or two way?
2) How are the key presses encoded?