Tuesday, 3 March 2015

Router Table - Part 1

I did some wood shop in high school and have flirted with the idea of getting back into it, on and off, for many years. Specifically, I've always wanted to make my own furniture. The first time I did some woodworking after school, I collected a couple of hand tools and a secondhand Makita 3601b router. I didn't stick with it that time around, but about 6 months ago I started tinkering with woodworking again.

Playing by the rules

Lack of tools has always been a problem for me - especially since my ambitions often outweigh my budget and my skills. I don't like wasting money on poor quality tools, but I also can't justify going out and stocking up on Festool gadgets either - no matter how sexy they are. So I made the decision that I need to prove to myself that I can be trusted to keep this up and therefore justify any costs. I decided on a few loose rules:
  1. Use what I have: this includes the lumber I've been hoarding for some time.
  2. Find free stuff (such as a pallet at work that was going to be thrown away).
  3. Don't be afraid to spend money on tools, but only buy the things I need as I need them.
  4. Make as many of my tools as I can.
  5. Buy good quality tools, but not the best.
  6. Adapt my processes to what tools I have.
  7. Don't be scared of having a compact workshop and working out on the drive way.
These may seem like pretty common sense ideas, but each one addresses the mental barriers that make it difficult for me to stick with (and actually engage in) the things I really enjoy.

In order to satisfy this criteria, I decided to make my own router table. The goal was to make as much of it as possible with my router, since that was the only power tool I owned. After all, the reason I bought a router in the first place was because they are so versatile.

Living life on the edge

The difficulty when starting out is trying to understand how to make accurate cuts without a table saw. I don't want a table saw yet. They are expensive, take up a lot of space and can be very dangerous. While scouring YouTube, I came across this video series by Ron Fox:

Accurate woodworking starts with a straight edge. Ron demonstrates this by using just a straight edge to make some simple jigs. He then uses those jigs and the straight edges to make more complex jigs and so on. The problem was, I didn't own a straight edge. I had some timber, but it was sourced long ago and warped by the Australian heat. I had no way to really test if it was straight. I also didn't really trust any of the "dressed" timber from Bunnings - at least not for long cuts.

I did some research and decided that the 50" ProGrip fence from Carbatec was going to be my best option. It had adequate length to allow me to work with fairly large sized pieces (i.e. cross cut on a full 2400 x 1200 sheet) but I could still make smaller straight edges if I needed. It also clamped securely to the timber being cut which makes it easy to pass the router all the way along the edge without any clamps getting in the way. I also grabbed some 16mm MDF and used the ProGrip fence to make a few additional straight edges.

Lining up the MDF straight edge to trim some ply to size

Using a template bit with one of the MDF straight edges

The other tip I got from the Ron Fox videos was double sided tape. You can use it to hold the straight edge guides in place to trim your work piece straight. Sometimes clamps will get in the way - especially on smaller cuts. I bought my double sided tape from the painting section of Bunnings. I also bought a basic router bit set because all I owned was a cheap straight bit. I also owned a Carbatec ogee bit and a Carbatec planing bit that I had managed to buy on sale.

The Plan

Sketchup router table design

A few years ago when binge-watching The Wood Whisperer (I still do!) I was introduced to the idea of using Sketchup to design wooden furniture. Sketchup used to be a Google product but it's now owned by Trimble Navigation. The basic version is still free and it is really easy to use. There are heaps of tutorials out there on how to use Sketchup to design woodworking projects so I won't go into much detail here. The workflow I have chosen, involves starting with the basic shapes and then constructing all of the joints, exactly as you plan to make them. You can then lay out all of the components and add dimensions so you can create a cut list.

Cut away showing the rebate joints in the main box

As this project has been a bit of a learning exercise, some aspects are over-engineered. I haven't stuck 100% to the plan as I've progressed in the project, but the general idea has remained the same. The sizing for the main box was selected based on some (warped) pine boards I already owned. The main table top was a big question mark, as it is really critical that it is quite flat.

Bill of materials

The design of the project was heavily influenced by the following materials that I already owned:
  • 2 longish DAR pine boards 70 x 19 mm
  • 2 longish DAR pine boards 190 x 19 mm
  • Some 18mm ply from a pallet that my mate Kev and I took apart after salvaging it from the work rubbish pile
  • 5 Ikea style table legs (another freebie from the rubbish pile at work)
Deciding on what to use for the table top was probably one of the single biggest hold ups when designing this project as I was really trying to not spent a huge amount of money on materials. I got some quotes for a thick piece of melamine coated MDF and they were way more than I was willing to spend. I decided to put the decision off until later.

Routing the main joints

The DAR pine I had was pretty warped and twisted, but I didn't want to plane it by hand and I don't have any power tools to flatten and joint timber (yet), so I decided to see how I'd go clamping everything as flat as possible when making the joints and then clamping heavily during the glue up.

I started by choosing the straightest edge and flattest faces for each piece and marked them like we used to do in school. I then used my try square, referencing off the face side and edge, to mark the lengths of each piece. I used my router, with the flush trim bit and a straight edge to cut each piece to length. Stacking 2 at a time allowed me to ensure that opposite members were the same length.

Next I cut the half lap joints for the top support frame and the rebate joints for the side walls using my router. For the half lap joints I used my Carbatec planing bit and offset the straight edge to ensure I could run the router along it and stay withing the cutting line. I used a support block on the opposite side to make sure the base of the router was supported during each pass.

Straight edge and support block for making the
half lap joint

Carbatec planing bit

Finished half lap joint
Finished pieces for the top support frame

The rebates on the side walls were cut using a straight edge and a flush trim bit.

Cutting the base

Next I needed to cut the bottom of the box to size. I decided to use the pallet plywood as it was free and the base would not be seen once the whole thing is assembled. I also decided to leave it as a solid piece for now, which was different to my Sketchup design. I would eventually need a small hole to allow the router to fit through, but I had not finished deciding how I was going to handle dust collection yet.

I used the straight edge and flush trim bit to roughly cut down the large piece of ply and then squared everything up and did the final cuts with less material to remove. I was getting a fair bit of tear out so I used a piece of scrap to secure the fibers at the end of the cuts. Squaring the sides was done as carefully as possible with my try square and a large ruler.

Using one of the top rails to ensure the correct width

Using a piece of scrap to prevent tear out at the end of the cut

Cutting to size with a flush trim bit

Top and bottom pieces cut to size and ready for assembly

The Glue Up

Test fitting the pieces was pretty problematic due to the warped and twisted pine. I used a bit of blue masking tape to hold things together and added a few clamps here and there. I became increasingly unsure if I owned enough clamps. My frugal side didn't want to admit that I didn't.

Dry run assembly with tape and clamps

Test fitting the top

I started by gluing the top framing pieces as a sub-assembly as this was an easy problem to tackle.

Assembling the top support pieces
I put off gluing the main box for a while. In the end I decided I really didn't have enough clamps and bought 3 long sash clamps, and 4 deep throat F-Clamps from Bunnings. I already owned some long quick release clamps and various small F-Clamps. It was the sash clamps that were the real saviour. They sit stable on the ground and have a large amount of clamping force. They easily pushed the warped sides of the box into shape.

For the glue, I used cheap PVA I bought at Bunnings.

Glued and clamped

Finally, I made sure nothing would move with a large number of 40 mm 6-gauge wood screws.

In part 2, I'll give an overview of finishing the table top, fitting my router and making a sliding fence.

Friday, 2 January 2015

Logically seeing in the new year

My awesome other half got me an 8 channel 24 MHz "Saleae Logic" USB analyser for xmas. This (cheap clone) device seems to work well with the Saleae software Version 1.1.34 (beta) and detected immediately under Linux Mint 16 Petra.

Having never used a logic analyser (or oscilloscope) before, the first thing I did was hook it up to the 25L1605D on the animal card reader board. This unofficial Saleae device doesn't come with the nice E-Z Hook connectors that the official Saleae Logic comes with, so I bought these. They're possibly not as grippy as the E-Z Hooks, but they seemed to do the job. It is however a bit of a squeeze fitting them on the PCB mounted chip in the Animal Card reader.

So. Much. Cable.
The datasheet for the 25L1605D shows that it is Serial Peripheral Interface compatible. I'm pretty new reading datasheets, and I was really hoping that the listed clock speeds of 66/86 MHz were going to be maximum values. I was hoping that the toy was cheap enough that the micro-controller would be clocking the bus significantly lower.

Saleae recommend sampling SPI at least 4 times faster than the clock rate. This means the maximum clock I could hope to sample would be 6MHz - which is quite a lot less than the values in the data sheet.

I wired everything up, configured the Saleae software to record 10 seconds worth of samples at 24 MHz, hooked up the channels to the appropriate SPI signals, pressed "Start" and precariously swiped the card through the reader to trigger the sound. The recorded data successfully decoded as SPI, but subsequent recordings of the same card were producing different results. Also, the clock signal was very irregular.

Huge gaps between clock cycles...doesn't look good
Since I was using the same animal card each time, would have expected to see the same data retrieval from the flash each time in order to produce the same sound. Since this wasn't the case I assume I have one of two problems:

  1. The SPI bus on the animal card reader is clocked higher than 6MHz (which means I can't use my new logic analyser to spy on it), or
  2. My IC hooks are interfering with each other/shorting
To confirm number 1 I would have to track down a tool that can sample at a higher rate. Unfortunately I don't own an oscilloscope or a faster logic analyser, and since I'm on holidays at the moment, I can't access these at work. I could eliminate number 2 by soldering on some pigtails and attaching to the pins that way, but to be honest, I'm pretty sure the issue is number 1 (also I'm terrible at soldering).

UPDATE: I bought a soldering station and soldered on some pigtails to the SPI pins on the flash chip but still had similar results using the Saleae software. I then decided to take it into work and get one of the guys to log the SPI bus using the sexy new 4 channel Agilent scope. Clock speed is 16 MHz so, as expected, there was no chance of getting this to work with the 24 MHz logic analyser. 

So what's a girl to do? I'd need another project in order to play with my new Logic analyser.

Enter my mate Kev to the rescue on New Year's eve - equipped with his NeoPixel ring project (and beer).

Kev is in the process of making an abstract wall clock using the NeoPixel LEDs and an Arduino. He's using this library to configure the pixel ring to show the time using various colours and patterns. The datasheet for the chainable/programmable LEDs can be found here.

Kev's setup uses a single data pin to program the chained LEDs so we simply hooked up the Saleae analyser to his breadboard and recorded 10 seconds of traffic on the single wire bus. We had no idea what the protocol was - and both being noobs, we spent a while messing with various protocols in the Saleae software before retiring to board games and festivities (oh and not ignoring our significant others due to technology distractions).

The next day I decided to approach this properly (soberly).

According to the data sheet, each LED's controller will remove 24 bits from the data stream, interpret that as the green, red and blue (in that order) intensities for itself and pass the rest of the packet onto the next chip in the chain. The signal is self-clocking, with a rising edge indicating the start of a bit and the timing of the falling edge indicating whether the value is a logical 0 or 1. Each new transmission is preceded by a reset period.

In the Saleae software, it looks a little something like this:

Despite the fact that the protocol is pretty basic, I could not work out a way to interpret it with the inbuilt analysers in the Saleae software.

In order to cater for these situations, Saleae offer a C++ SDK for writing your own analysers. Just make sure if you are using the Beta Logic software, you remember to grab the Beta analyser SDK. You get some crazy core dumps if you forget to do this :)

A custom analsyer consists of 4 main parts:
  1. A class that knows what settings are required to be configured by the user (e.g. which channels map to which parts of the protocol, baudrates, etc)
  2. A class that knows how to generate simulated signals
  3. A class that knows how to display and write to file the decoded signals
  4. A class that knows how to decode the signals into frames and packets
The 4 classes get compiled into a dynamically linked library using the provided python script. You then just tell the Logic software where to look for additional libraries in Options -> Preferences -> Developer.

There are some great PDF instructions included in the API download that walk you through the whole process of compiling and modifying the core classes to implement your analyser. I found it useful to implement the classes in the order suggested and use gdb to diagnose any issues along the way.

It took me a little while to work out how to "call" the generator code, but it is actually quite simple. If you run the Logic software without a device connected, the big green start button in the top left of the "Capture" tab is actually a "Start Simulation" button. If you have your new analyser loaded on the right hand side, it will call your generator code with the current capture settings (i.e. sample rate and time, etc).

Once I had everything working with the simulator, I was able to load the data we captured on New Year's eve, decode it and write it to file. As usual, you can find all the source code on github