Wednesday, October 28, 2015

Painting Winter Rims

So I decided to have some fun with my winter tires this year. Whatever paint Kia uses on their factory rims is terrible. I'm pretty sure they just colour them with a sharpie because the "paint" does almost nothing to stop the rust. I decided to hit them with some rustoleum and see what happens.

I don't have pictures of the whole process but I washed the rims down with dish soap to degrease them and then hit them with a wire cup brush on a drill to get rid of most of the rust and to finish I sprayed them down with simple green and rinsed with water. The sun took care of the drying. Next I masked them off, which was actually quite tough. I was using some cheap green painters tape and it didn't like curves. The best results were obtained by using lots of short pieces.


As you can see below my masking got better as I went. I started with the right most tire so it's the worst looking. A friend told me that a deck of playing cards wedged between the wheel and tire works very well.


All painted up.


Back on the car. I think it's gives it a fun rally look. Either way it's more interesting than black.


Three sets of summer tires in the garage waiting for spring.

Friday, October 23, 2015

It worked!

Well it took two weeks but I've finally got a dinosaur time lapse for you. This was taken with the camera module on a raspberry pi 2 over 5 days. It's 1201 frames at 24fps. I couldn't encode it on windows, it kept running out of memory (shocked!) so I used libav to do it on Ubuntu.



I'm not sure what's up with the horizontal lines, it might have something to do with the CFL bulb that I used to light the scene or it could be something totally unrelated.

Was this worth two weeks? I'm not sure but it was fun none the less.

Tuesday, October 20, 2015

The Model M Lives!

I picked up a PS/2 to USB converter today for about $6 and now I can easily use the model M on a modern computer. The only downside is it doesn't have a windows key, a key I use all the time. I've found lots of people online that are re-mapping the caps lock key to be a windows key. This seems like a pretty good compromise.

I found a registry key that'll do it for me.

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,5c,e0,3a,00,00,00,00,00
http://mattshaw.org/news/window-map-caps-lock-to-windows-key/

Just save that as a .reg file, run it, and reboot. The regular windows keys still work too.

Sunday, October 18, 2015

Try, try, try again

Well the first timelapse didn't work out because of some technical difficulties. This time I'm trying with my raspberry pi 2 and we'll see how that goes. I had it capture a 12 hour timelapse last night and it didn't drop off the network. We'll see how 5 days treats it. Luckily I had a second egg. This one is cracked all the way around so who knows if this is going to work very well.

Friday, October 16, 2015

Kegerator

I've been making home brew with one of my co-workers for a while. We've made about a half a dozen batches and bottling is a bit of a pain. He got a Danby kegerator and decided to make it a two tap system. I don't have any pictures of the process but it was pretty straight forward. We mounted the tower to the top, put the taps on, plumbed the gas side, and plumbed the beer side. After we put the beer in the kegs we set the CO2 pressure and it is good to go. The beer needs to sit under pressure for a week to get properly carbonated but it's still faster and easier than bottling.

I think it turned out pretty well.


In about a week we'll see if the red ale and IPA are any good.

The Ultimate Mechanical Keyboard

We cleaned out some old locations at work and found some goodies. Some were interesting but useless like the original manual for an IBM XT PC from 1983 and a manual for MS Basic from 1982 but the money was 4 IBM model M keyboards.

Those are basically the holy grail of mechanical keyboards. Buckling spring switches make for some awesome tactile feedback and some great sound to annoy your co-workers. Luckily they were the PS/2 versions so it's pretty easy to adapt them to modern computers.


I've got a reputation at work for being a keyboard snob. I can't help it if a quality keyboard makes typing a little better. I use a Das Keyboard Professional S at work with brown Cherry switches. I've put o-rings on the switches to dampen the sound a bit. I think it's at a livable level but if they ever complain about the noise I'll just start using the model  M and they'll forget all about my browns!

Saturday, October 10, 2015

Dinosaur Timelapse!

The reason I was testing out timelapse with the raspberry pi is I had a project in mind. My wife bought these hatching dinosaur eggs for my son's birthday party and it was pretty neat. You put it in a container of water and it took about 4 or 5 days to hatch. I figured that was a perfect opportunity to try this out.

I'm betting on 5 days but to hedge my bets I've doubled the amount of images I'm going to capture. So instead of assuming 10fps I'm doing 20fps. That way if the egg hatches twice as fast as I expect then I'll still be able to make a usable video. If it takes the full 5 days then I should have a smoother video. In case you're wondering 5 days is 432,000,000 milliseconds.

Here is the setup:


It took me about 5 attempts to get started. I initially just ssh'd in from my ubuntu box but I got worried thinking about the amount of time this is going to take. There is an option in putty to send a keep alive packet so the connection doesn't time out but I'm pretty sure if putty crashed I'd still lose my running proccess. I did some googling and decided to skip screen and use tmux instead. This way I can fire up my remote process, detach from it, and close my ssh window. If I want to reconnect I just ssh back in and type 'tmux attach' and it will attach me back to the running session. Pretty sweet. So as long as the raspberry pi doesn't freak out in the next 5 days I should be good. I can periodically check in and make sure it's still writing image files to make sure it's still going.

Here is what the first image looks like. It's a little out of focus because of the space I had to work in. They're just too close together.


A little distortion from the glass but I'm hoping it'll still work. I'll try and post updates as it goes.

Bad news. I know I promised updates but my pi has decided it doesn't want to be on the network anymore. For some reason the wired ethernet has disconnected from the network and now I can't ssh in. I plugged in a monitor and it looks like it's still taking pictures so I'm going to leave it but it's going to be a surprise when I finally get to see the images.

Final update. Very bad news. It looks like when the pi dropped off the network it must have frozen because I didn't get more than about 30 pictures and they all look like the image above. I think I'm going to try again with my Pi2. I'm letting it run right now to see if it stays on the network for a while. If it's still up tomorrow I'll try to redo the egg hatching.

Friday, October 09, 2015

Raspberry Pi Timelapse

I'm fascinated by timelapse photography and I'm also fascinated with single board computers. Luckily the Raspberry Pi makes it easy to mix these two interests. I use a Raspberry Pi model B and the camera module to take a bunch of still photos and then turn that into a video with software.

The video below is over 3 hours looking out my basement window. It faces north so you get lots of great shadows running across the house across the street. Unfortunately my setup was a bit unstable and it moved down a bit to show the window frame. This is just a test so it's not super important. I just wanted to make sure I had the command right and that everything worked.


My setup is the raspberry pi running raspian with the camera module connected and enabled in the configuration.

Keep in mind it's just a test so try to ignore the kleenex box.

The command to capture the images is:

raspistill -vf -hf -w 1280 -h 720 -o time_%04d.jpg -tl 18000 -t 1080000
-vf is vertical flip since my camera is upside down
-hf - horizontal flip since the image is mirrored
-w - width. The native resolution is quite high so I just capture at 720p resolution
-h - height
-o Output file name and location. %04d tells it to use a 4 digit incremental number to name the files
-tl - duration between images. If this is low, say under 2 seconds you may want to use -bm for burst mode. This keeps the camera active and you'll have fewer dropped frames
-t - total capture time. These are both in milliseconds so in the above example I was taking an image every 18 seconds for 3 hours which gives me 600 images and at 10 frames/second that is a 1 minute video.

If you have a monitor connected you may want to use the '-n' switch that prevents a preview from being displayed.

So how did I decide on my shot interval? Well I use an online calculator. I know that 10fps is good enough and I picked 1 minute as the final length so a little math or the online calculator will tell me to take an image ever 'x' seconds. You could go up to 24fps and take more images but 10 seems to work pretty well.

So now that you've got the images how do you make it into a movie? If you have access to them you can use quicktime pro quite easily or Adobe premier but I'm poor and don't have either of those. If you want you can do the encoding right on the raspberry pi with libav. It takes a while but it does work. Here is the command:

avconv -r 10 -i myimage_%04d.jpg -r 10 -vcodec libx264 -crf 20 -g 15 timelapse.mp4
I stole these settings from Raspberry-Spy and they seem to work. This is also where I found that 10fps was good enough.  The catch with avconv is the files need to be consecutive. Sometimes raspistill will drop a frame so you'll be missing that file and that will cause avconv to die. You can fix this with a quick bash script.

a=1
for i in *.jpg; do
new=$(printf "%04d.jpg" "$a")
mv -- "$i" "$new"
let a=a+1
done

This will take all the jpegs in a folder and rename them in consecutive order.

You'll need to install libav on Raspian if you want to do it this way. Apt-get install libav-tools should do it. If you do the conversion on another machine Ubuntu has libav installed by default I believe.

An easier way to do it for free is to use Windows Movie Maker. It's a free download from Microsoft and it's a little more user friendly if you like GUIs. Install and fire up Movie Maker and then add your photos. You're basically making a slide show but luckily you can set very short durations.


 You'll have to do some math to determine the duration you need. Here are a couple to get you started.

10fps = 0.1
25fps = 0.04 - can't do exactly 24fps

After you've got that set go to the file menu and choose to save your video. If you pick Android medium that'll give you a 1280x720 mp4 video.

One last thing I'll touch on, what if you don't have the camera module? Well you can use a USB webcam. I can tell you from experience that it doesn't work as well. I'm not sure if it's lack of horsepower on the pi side or what but I had to use very low resolutions to get it to work properly. The upside, motion, the software I used can do timelapse directly to a video output. That sure streamlined the expereience.



So that's the crash course in raspberry pi timelapse. I hope you enjoyed it and hopefully found it useful.

Cheese Beer Bread

It's no secret that I'm a huge Alton Brown fan, I even got to meet him once, and I like to try his recipes from time to time. Today I'm giving his cheese beer bread recipe a shot. On Good Eats he recommended a hoppy pale ale so I grabbed my last home brew IPA and I'm crossing my fingers.


The bread is in the oven and hopefully I'll remember to take a picture of it.

Well it turned out pretty well I think.




Overall this was a pretty good recipe. It was easy to make and I had everything on hand to make it. I used bread flour instead of AP because I like to and I always have it on hand. For beer I used a homebrew IPA that is very similar to New Belgium's Ranger IPA. I think the pine flavours in the beer worked really well with the dill in the bread. I also shredded too much cheese, I put about 5.5 oz in instead of 4.5 but too much cheese is never a problem. I think the best part is how fast it is to make. I had the dough ready by about the same time that my oven finished pre-heating.

Tuesday, October 06, 2015

Harvest Time

When we moved in I wanted a garden so I had one roto-tilled and then I did nothing with it. The kids came and there was no time to get out there to do weeding, etc. This year I was determined to grow a garden. I put in random potatoes that I got from friends, carrots, corn, radishes, spinach, and sunflowers. Well the sunflowers didn't come up but the rest did. It's getting pretty late in the year so I'm under the gun to get the carrots and potatoes out. I was going to do them this past weekend but the rain prevented that. I dug them last night and washed them up in the garage.



Nothing reminds me of being a kid more than the taste of carrots right out of the garden with a bit of dirt still on them. I'm going to assume the dirt helps me get vitamin B12.

Got the potatoes out and washed. Here is the whole harvest.

Not as many potatoes as I expected but I probably threw away 5 or so pounds because they were green from the sun. I'll have to do a better job of hilling them next year.

Monday, October 05, 2015

Deer Mounts

I'm not an avid hunter but I've gone every year for about the last 7 and I'm finally getting a couple mounts done. My father-in-law does taxidermy as a hobby but I think his work is better than most professionals I've seen.

I shot this whitetail deer in 2010 and the mount is almost finished. He's got to do some touch ups and final work but it's almost there. Five years is a long turn around time but I can't complain about free work. It's well worth the wait.



Last year I got drawn for mule deer and shot an amazing animal. I was about an an inch away from making the provincial record books for that year. You need to score 175 and mine scored something like 173 5/8, so it was pretty darn close.



A photobomber jumped into the second picture there. He's going to be out hunting soon I suspect.

Saturday, October 03, 2015

Another weekend project

My wife wanted a new tall shelf for the living room so I suggested we try using two short shelving units and making one large one. I bought some dowel pins and a couple straight brackets and got to work.



I think it turned out OK. I removed the bottom shelf and kick plate off the top unit to avoid having a weird double shelf but the downside is now the backing is not long enough. I'm going to leave it for now because we can use it as a cord pass through for a couple things that'll be on that shelf. I've still got to sand it and paint it as well. That's a tomorrow project.

Sunday I got some more work done on it. I picked up some wood glue so I could glue all the dowels in and started painting.


The temperature was at the minimum for the paint I was using so I hope it turns out ok.

Monday night I washed carrots and got some more paint put on.
I'm not sure what the blue glow is. Perhaps it's Cherenkov radiation.

Some fancy hi-tech lighting system I put up
I realized I didn't paint the removable shelves so I have to go buy more paint, d'oh!

Picked up some paint at lunch today and got the shelves painted tonight.

A disaster though. Put a final coat on the main chassis and had some paint buckling. I must have got it on a bit too heavy and the solvents in the fresh paint screwed up the base.

I'll let it dry and sand it a bit. It had to be on the front left corner, the one that is going to be most prominent when they are in the house.

It's now 10 days after I started this project and it's finally in the house and looks pretty good. I fixed the wrinkled paint by sanding it down and cleaning the area with denatured alcohol. One of the upsides is I gained an extra shelf because I took the bottom out of the top unit when I stacked them.



I think it looks pretty good. After 4 cans of paint I don't know if this ended up being cheaper than buying a new taller shelving unit but at least this way we didn't have to throw these ones in the landfill. That's got to count for something.

Friday, October 02, 2015

Bird feeder post

A recent visit to my fathers place and his plethora of bird feeders has got my son and I interested in feeding our local birds. I've got one of those metal shepherds hooks in the yard with a couple feeders on it but I'm not terribly happy with that. My wife got me on pinterest a little while ago and I found this:

I liked the idea but I didn't really like the design so I decided to make one out of all wood. Here is the work in progress:

It's all cedar and held together with deck screws. I'm going to use one of those steel 4x4 post spikes to anchor it to the ground. I figure that way I don't have to dig a big hole and if I want to move the post later I can.

Last night I put the first coat of stain on it and tonight I'll do the second. I hope to get it setup on Saturday afternoon. I'll post some pictures of the result.

Friday edit. All stained up. I'll try to get it setup tomorrow.


It was a rainy Saturday afternoon but I was determined to get some work done. So after doing an oil change on the car I figured it was time to setup the bird feeder post. I think it came out pretty well.



The chickadees found it right away and surprisingly took some of the peanuts. The blue jays came soon after and my peanut feeder is 1/3 gone already. A successful project if you ask me and including bird feeders came in about $50.



Again with the domain?

One of the guys at work was renewing his domain so I checked if my old zackmac.ca was available and it was so I grabbed it up. Just a domain this time, no hosting or anything. Maybe this will encourage me to put more stuff online.