All posts by Kris

About Kris

Hardware hacker, technology integrator, and maker. He enjoys staring blankly at code and voiding the warranty.

Budget Mobile Ham Radio Install in Chevy Colorado.

My first thought was: Antenna clipped to the edge of the truck bed – easy right! How am I going to get the antenna wire poked into the bed of the truck? There is nothing back there, no holes, no grommets. For a commercial vehicle this makes sense for the eventual tool-cab or dump body – pop off the bed – no wires to deal with. I followed the existing wire loom and it travels along the frame, under the cab, and up through the firewall. So, if I wanted an antenna mounted to the lip of the bed, I was going to need a 30′ coax detour. Not to mention exposing that wire to the elements and spending 3 hours on my back with zip ties.

Plus, I have a tonneau cover. The edge of the bed isn’t exposed, and I’m not drilling a brand new hole in it. Time to re-think this whole operation.

Fender mount! Why stretch wires all over the cab when I can grab power and antenna from the same area? I did a search for these online and the premise is a metal bracket that attaches to one of the fender (or hood latch) bolts on the front of the truck. There are many available, but not for every truck, and they are not usually inexpensive. I was considering ordering one that looked like I could modify it to fit, but for $66 + shipping, that’s an expensive experiment. Instead I made my own! If you own a vise, a hammer, and a drill – you can build this.

For $8, I grabbed a flat bar of 1/16″ (or 3/32″) 2″ wide steel from the local hardware depot. Hood up, cardboard template gave me an upside-down “2” shape. I marked up the steel and into the vice it went. Hammer, hammer, hammer, fold, check fit, hammer, check fit, repeat! Making sure that the hood had clearance and that the mount would press snugly against the fender. I was able to cut a slot for the hood bolt using a grinder. A dremel could do it, or a hand drill would work here. I sanded the edges and coated with Rustoleum Flat Black Trim Paint. For the Antenna itself I now had a platform for an off the shelf trunk lip mount. I chose a Tram 3246-B SO-239 mount as I re-used the antenna from my old truck (a Diamond NR770HB). It’s close to a factory look, as this is where the FM antenna would go on older trucks. Also I chose the drivers side specifically because the ECU (PCM / Computer) is bolted to the firewall on the passenger side. I want to minimize electromagnetic interference from this, and 65 watts of EMR (electromagnetic radiation) getting into this.

The grommet through the firewall is over-sized enough that I was able to squeeze the UHF connector through intact. The Power distribution bus on these new Chevy trucks are fantastic and I had fused ground and positive wires going right to the battery using ring terminals and existing bolts. Now power and antenna were in the cab. Where do I put the radio?

In the 2014+ Colorado, there is a nice storage shelf under the rear seats in the crew cab. If I was running multiple radios, or additional equipment, I think I would take the time to route everything back here. This would of course necessitate removal of the center console to route the wiring under the carpet. In our old Blazer I didn’t take the time to do this and occasionally dragged things over the “neatly zip-tied, but totally in the way” wires running along the floor. The center console is like a sealed piece of Tupperware that’s not quite square inside, and gouging giant holes in the bottom for wires and radios would render the storage area useless. I instead turned my attention to the front seat.

My Kenwood TM-V71A roughly fit in the area, but I was worried about the seat mechanism hitting it. I picked an area of the floor that I felt would be clear, and then moved the seat into “wife is driving” mode. The radio would be crushed by one of the seat motors. “Well, maybe the radio moves with the seat?” I situated the rig against the round bar in the middle of the seat and tried various positions – it seemed to work! I then went back to the vice and fabricated an aluminum bar with tabs to bolt onto one side of the rig. Using pipe clamps I got it into position and tried moving the seat. It actually pivots a LOT more than I expected, but I was able to find the angle where: At full depth it’s tucked up into the seat, at full height it’s lightly touching the floor. I then moved the seat all the way forward and all the way back to make sure I had clearance. It worked out great! Here’s VIDEO of the seat and radio going from all the way up – to all the way down.

A nice doughnut of spare coax was made à la choke coil and everything was zip-tied up and checked again for clearance. The remote head and speaker wires were run up the side of the center console. The mic connection on this mobile rig is now in a great spot, and because the radio travels with the seat there is always enough cord!


  • Generic parts:
    • $8 Flat bar of steel
    • $4 Aluminum bar (scrap)
    • $30 Trunk Mount (Tram 3246)
    • $42 Subtotal
  • Radio Specific Items:
    • $50 Diamond NR770HB (I owned from previous install)
    • $40 Kenwood DFK-3D Remote Mount Kit (previous install)
    • $90 Subtotal
  • $130 Total

Easier, Better, Arduino IMU Head Tracker

mainI’ve recently been immersed in a space sim called Elite:Dangerous. (It’s in Gamma and will be out shortly 12/16/2014.) I play with a small casual group that’s not about to build a ship cockpit in our living rooms or all splurge for a dev kit VR Oculus Rift. Some of us have played Elite on the Oculus and the first thing you miss is “head look”. The game is designed for it, and once you use it dog-fighting in an asteroid field, watching your enemy turn sharp high above you while you cut power and rotate at the same time whilst avoiding giant floating rocks, you don’t want to give it up. This is one of those games (much like a flight simulator) that takes 30 minutes just to map your controller(s).

My brother linked me to a UK group that was doing head tracking with an Arduino (SparkFun Pro Micro) and a Gyroscope / Accelerometer (MPU-6050) over at, “Can you build this?” he asked.

“I can build a better one.” and you can too.

  • No drift – Use hardware that incorporates a magnetometer (compass)
    (The new edtracker 9150 version uses a magnetometer to remove drift)
  • No calibration GUI – Place flat on table when powering on
  • No PCB – Four connections. SCL, SDA, +5, GND

Here’s what makes up the easier better IMU head tracker:

The first thing I noticed was the drift problem. The EDTracker guys have since put out a second version with magnetometer compensation, but they didn’t have it from the start and the hardware difference is around $6. I picked an IMU hardware package that has a great tested library for it. The calibration and angle calculation built into the Pololu libraries – specifically the code from Michael Baker Pololu_Open_IMU (Inertial Measurement Unit) as it uses the Madgwick algorithm is particularly brilliant. It outputs pitch, yaw, and roll angles. Watch a video of the Madgwick algorithm in action.

joy_cplI knew from past experience that the Teensy 2.0 can emulate many types of USB devices right out of the bag. “Joystick.X(value);” was simple to integrate and the device needs no emulation software or additional CPU to work. It just shows up in joy.cpl as a Joystick. You wouldn’t think that an Arduino could handle complex Euler angles and lots of float math on its own, but it has no problem. With the Teensy Joystick, the X,Y, and Z can be directly mapped 0 – 1023.

Lastly there are PCB boards being built for this, and  I’m really not sure why. These are not PCB’s with components on them like an ATMEGA32U4’s and the 9 Degree of Freedom hardware already built in. These are PCB’s just to connect a 9-DOF board with an Arduino. This is all of 4 connections, and the two pins on the Teensy 2.0 are D0 (SCL) & D1 (SDA) and they line up fine on both the Adafruit and Pololu breakouts for an above mount setup.

Yes, I cover the Teensy reset button. The PJRS software has a great auto-loader and you just don’t need it. You also don’t need a fancy PCB – two pins will do.

With the hardware finalized, I mounted it in a small box with a dab of hot glue and a cut-out for  the mini-usb. Here’s the test:


For the head tracking code I used Fscale to scale map the angles to the joystick. This is the part where you amplify a tiny amount of head movement into a larger amount of in-game head-look movement.  I settled on a 50° angle for pitch and roll, and an 80° angle for left and right (yaw). You’re more than welcome to try a different scale by changing the low and high Fscale numbers (-25 & 25 = 50° of movement translates into -90° & 90° of game movement) Everything else is directly from Michael Baker mikeshub/Pololu_Open_IMU. Such a tiny amount of code here is from me that I don’t even want credit for it. 😛 I’m just a lowly hardware guy that can smash out some C#. Example:

if (pitch < 0){pitch = fscale(-25, 0, 0, 512, pitch,0);} else {pitch = fscale(0, 25, 512, 1023, pitch,0);}

Here’s a list of what you will need for software:

The device calibrates when it it powered on, make sure it’s flat and motionless. After that it takes an initial heading reading and starts to blink. 20 more seconds of being on, and that heading is locked in. I commented out all of the serial outputs and zip tied it to my headset:


Results: After playing for 3 hours I had zero drift. It stays pointed at the direction of your monitor forever. I considered adding a curve to the scaling to provide a “dead zone”, but the game has a dead zone setting built-in and I’d rather just output 100% and let the game / user control the settings. I also mapped the roll axis and one could use it to fire the roll thrusters in the game. For ~$45 you now have a cool little IMU that you can experiment with!


Update: If you would like to configure it to work with Opentrack (supports TrackIR games), you will need to map the axis 1:1 with the joystick output and then set all your curves and config up in Opentrack.

fscale(-90, 0, 0, 512, your_axis,0)
fscale(0, 90, 512, 1023, your_axis,0)

Update 1/16/2016: Uploaded code and working with Grégory Paul over on

My ix2 is EOL and doesn’t finish strong – or secure…

Disappointing finish for my Iomega StorCenter ix2. The second drive failed and it has been replaced with a Synology DiskStation DS212j with WD Red drives. (more on that later) I was doing some consolidation and cleaning of the computer room yesterday and I decided it was time to wipe some hard drives including the ix2 NAS.

The replacement WD Green and the old original 500GB Seagate spin up and after a few minutes I can login via the web interface. I go into the manage disk section and I’m excited to see there is an Erase Disks section under Manage Disks. The first message tells you that you’ll need to delete all the shares (including the built in ones?!) before using the wipe functionality. The second message talks about how securely erased your drives will be. For those of you who don’t know me – here is the setup..

iomega unsecure disk wipeSecure Erase:
All data is permanently erased and overwritten to prevent recovery, user information is removed, and the device is reset to factory defaults. Disk erase is a secure operation to ensure all data on your Iomega StorCenter device is irrecoverably deleted. The disk erase process overwrites all disks with random data to prevent recovery of existing or deleted data, users, and passwords.

…and the outcome? Well I clicked it, confirmed it, and watched as the red light came on and the drives started to chug. Just like when it gets stuck doing a rebuild, I wanted to see what it was up to. I was also curious if this would affect my ability to SSH into the machine. Not only could I still log in to the ix2, I found the program that it was running to wipe the drive:

/usr/bin/shred -v -n 1 /dev/sda2
/usr/bin/shred -v -n 1 /dev/sdb2

I looked quickly at the man page for shred. The default setting is 25 times. Older versions list the default at 3. Iomega changed it to make a single 1 time pass! 🙁

Think you might donate or craigslist your old NAS drive? Well if it’s an Iomega – don’t rely on the built in “Secure Erase” to protect your data! A single pass (while at least random data) is going to be slightly better then a “quick format”. When it finished and re-initialized I restarted it, and I STILL had root access. (read: factory defaults) To which I ran my own shred on both /dev/sda2 and /dev/sdb2.
Ciao ix2!


Content (not surprisingly) is (still) King

Long time no post? Yeah… I was off building content on other sites instead of pushing content to my own. I spent some time with twitter and facebook. I did some advertising. I did some experiments, and I’m back to where I am the decider!

Monetization; Nothing is ever really free, and recently the squeeze of the all mighty dollar has been put on social media. Twitter was used to directly push eyeballs to NBC for the Olympics this year and Facebook has been slowly filtering out your feed. Now with fresh API’s and IPO’s respectively, social media is using every trick in the bag to get advertisers and it’s audience together.

Both sites control media, content, and make filtered decisions on your behalf. Remember when you saw EVERY post from your friends on facebook? They started to slowly show more of the people you interacted with. A year ago they implemented a subscribe feature that no one can figure out and opts everyone out of your feed. Soon you were asking your friends: “When did you post that?!” because FB decided that it wasn’t important. Facebook Pages are in even worse shape. Only 30% of the people that like your page will be shown any particular update from that page. “Will be shown” as in – 70% just won’t ever see it on their feed unless they directly go to your page, or you pay for that update to be promoted. Twitter has a similar model that suggests people follow you and pushes your tweets to their page.

One of my close friends liked Verizon on facebook. Or at least facebook told me that they did. Are you kidding me? Verizon has a pretty good network, but no one actually likes them. This made me suspicious and it turns out this is just another advertisement option trick.

Third party apps suffer: What I want is an app that will broadcast my words across multiple channels and outlets. I want an app that reads and parses everything from all outlets under my control. Post to facebook, twitter, wordpress, google+, etc. Show your entire timeline, all tweets, all posts. The reality is that those apps are being crushed or filtered so badly that no one will see the content when it gets there. Nothing is ranked higher then you typing an update directly into Hootsuite, Seesmic, Twitter, SMS, etc. will all be ranked lower (show up on less feeds) then your eyeballs on their site and their apps – looking at their ads. Google+ doesn’t even play the game. You just can’t post on G+ if you’re not on the page or using their app.

Why are we playing this game? It’s only going to get worse. We are social creatures, but at what (Buy Coke) point is the (Doritos) interaction going to be (Target) spoiled? Twitter just feels like a bunch of people yelling on mountaintops with no engagement happening. I have evidence to suggest that facebook just makes up demographic data. For example I ran an ad targeting anyone in the US that likes “rallying” OR “WRC”. It was over 250,000 people?! I can tell you that this demographic is more like 10k to 15k people on it’s best day – and that’s if I count the 25% of the population that is NOT on facebook!

Push them to the website: I’m retreating to safe waters. I pay for the server, I have a pro flickr account, my rally blog runs some ads to cover the $90 a year, and I get to post and promote whatever I want. I’ll still be on the social networks, but my goals have changed. I just want people to visit my sites and enjoy my work. If they’re interested they can sign up for updates via email or RSS. Google search loves unique content and is more likely to find viewers then a lousy facebook ad. I’m experimenting with and a microblog with microposts on Instead of content ending up there, content STARTS there, where it remains king.