Zum Inhalt springen

SmartJointer: SmartMini/Arduino controlled box jointer by trusley_mike in woodworking



Picture of SmartJointer: SmartMini/Arduino controlled box jointer

This is part one of two parts about SmartJointer – an easy-to-assemble CNC box (“finger”) jointer controlled by SmartMini.

Please click here for part two.

No PC or mains power supply is required to operate SmartJointer in the workshop.

The jointer is built from 9mm plywood and softwood plus mechanical and electronics parts.

The software to control SmartJointer is produced using the Arduino IDE and is available free of charge for anyone to replace, change or tweak.

This Instructable is about the manually operated version of SmartJointer – it moves the work piece between cuts and you push/pull to make the cut.

The video shows the automatic version which cuts box joints while you have a cup of tea and a biscuit.

Step 1: Background

Picture of Background

The first photo shows the “Screw advance box jig” I built from plans provided by Matthias Wandel in Canada. All woodworkers should visit his woodgears site – it is a real treat – hours of happy fun.

The second photo shows SmartJointer which was inspired by Matthias’ ideas.

Workshops can be dangerous places so I wanted to build something without the usual mixture of USB cables and mains leads. I also wanted to avoid having a laptop or other computer lurking about on top of my bench saw. SmartJointer is totally stand-alone – no PC required and no trailing wires. It is powered by a 12V lead battery which is mounted on the back of the unit.

It will cut any number of box (“finger”) joints of any width using timber up to 200mm (8″) wide and up to 18mm thick. It would be a simply job to scale it up if you wanted to cut wider or thicker timber. SmartJointer is driven by software so, in theory, it could do a lot more than I make it do in my software. It would be great if others would have a go – maybe box joints spaced at irregular intervals, maybe box joints with different width finger in the same joint, maybe box joints with random width fingers, maybe ….

I also developed a version which does dovetails on the bench saw – but that’s a separate story!


Step 2: Tools required

Picture of Tools required

To assemble SmartJointer you will need:

  • Pozi No 2 screwdriver
  • Pozi No 1 screwdriver
  • Revolving hole punch or means of making small holes
  • Precision screwdriver set (Try ebay)
  • A digital volt meter. (Try ebay)
  • The Micro switch requires a short length of two wire cable so you will probably need a soldering iron

Personally, I reckon the best present a man can get is a powered screwdriver – I use a Bosch IXO cordless.

To program the control system you will need:

Step 3: Wooden parts

Picture of Wooden parts

SmartJointer is built from good quality 9mm birch plywood and softwood.

  • 1 off base: 400mm x 137mm x 9mm plywood
  • 1 off back: 400mm x 137mm x 9mm plywood
  • 1 off work holder back: 205mm x 137mm x 9mm plywood
  • 1 off work holder side: 52mm x 137mm x 9mm plywood
  • 4 off rail supports: 33mm x 100mm x 9mm plywood. These will be glued together to form two pairs.
  • 1 off drive belt fixing block: 34mm x 34mm x 9mm plywood
  • 2 off base supports: 400mm x 34mm x 18mm softwood
  • 1 off back support: 400mm x 34mm x 34mm softwood
  • 1 off slot runner: cut from plywood or hardwood to fit your saw bench

I am based in England and I get my plywood from Farmwood Timber Suppliesnear West Hallam, Derbyshire. Softwood comes from B&Q or Wickes.

You can download a .DXF file for all the plywood parts.

Step 4: Hardware parts

Picture of Hardware parts

SmartJointer requires the following kit of hardware parts. I have provided links to suppliers in England but the same things can be found world-wide.

Step 5: Control system

Picture of Control system

You could lash up a control system with an Arduino, an A4988 stepper motor breakout board, a power supply, a breadboard and a bunch of wires. However, that’s a bit messy so I used:

You can use a 12V power supply (a “wall wart”) if you wish – but you will be back to trailing wires again.

Bias alert

I admit I am biased – along with two friends I developed the SmartMini family of boards to make it easy to build things like SmartJointer – I hate a rat’s nest of wires!

Step 6: Cutting wood and making holes

Picture of Cutting wood and making holes

The wood dimensions are shown in the parts list. However, the holes have to be in the right places!

It’s not as bad as it seems since most of the holes are for wood screws and they don’t have to be totally accurate. The key locations are:

  • The holes in the guide rail supports for the 10mm guide rails
  • The holes in work holder back for the linear bearings
  • The holes in the stepper motor mounting plate
  • The holes in the back to receive the stepper motor mounting plate
  • The holes in the back to receive the SmartMini Universal Mounting Plate

CNC systems tend to “bind up” (i.e. go solid and refuse to move!) if things are not aligned correctly.

I have created a set of .DXF files showing the locations of all holes.

Step 7: Assembly: the base

Picture of Assembly: the base

Screw the two base supports to the front and back of the base.

Holes are provided in the base and it should not be necessary to drill pilot holes for the screws – they should go directly into the softwood.

Step 8: Assembly: the work holder

Picture of Assembly: the work holder

Glue the side to the back of the work holder/

I routed a rebate (rabbet in the USA) to provide more gluing area.

Step 9: Assembly: guide rails and bearings

Picture of Assembly: guide rails and bearings

Each guide rail support is a pair of 9mm plywood parts – one of each pair has holes for the rails. Glue the pairs together making sure you have a left-hand pair and a right-hand pair.

Slide two bearings on to each guide rail.

Insert the ends of the guide rails into the holes in the guide rail supports.

Look carefully at the photo, align the ends of the guide rail supports to the top of the back and centre them on the vertical fixing holes. The opening should align with the motor cutout.

Check, check and check again before carrying on.

Clamp in position when you are happy with alignment.

Drill 3mm pilot holes into the guide rails supports using the pre-drilled mounting holes as a guide.

Screw the guide rail supports to the back using 3.5mm wood screws.

Step 10: Assembly: fitting the back support and micro switch

Picture of Assembly: fitting the back support and micro switch

Line up the back support at the bottom of the back.

Mark the location of the micro switch as close as possible to the right-hand (motor end) guide rail support.

The active part of the micro switch (short metal lever or button) should face towards the front and towards the left so that the lower right-hand bearing can activate it.

Fix the micro switch into position and pass the cable through the hole provided in the back.

Clamp the back support in position on the back and screw into position using 3.,5mm wood screws.

Step 11: Assembly: fitting the stepper motor

Picture of Assembly: fitting the stepper motor

Fit a pulley to the spindle of the stepper motor.

Screw the motor to the acrylic mounting plate.

Screw the mounting plate to the back.

The slots in the mounting plate allow the plate, with motor, to slide left and right to tension the drive belt when fitted.

Step 12: Assembly: fitting the drive belt

Picture of Assembly: fitting the drive belt

The parts list shows a drive belt with a clip to hold the two ends together. This is not really necessary.

Overlap the two ends by about 30 mm, punch holes about 20m apart through both ends. (A leather punch is excellent for this.)

Drill two pilot holes 20mm apart through the drive belt fixing block.

Drill another pilot hole through from the front of the drive belt fixing block – this will take a screw that will pass through the work holder.

Screw the drive belt to the drive belt fixing block.using short 3.5mm wood screws.

Pass one end of the belt through the right hand rail support and loop it round the motor pulley.

Put the free pulley into the other end of the belt, locate it in the gap in the left hand rail support and secure in place with the 5mm dowel or 5mm bolt cut-off.

The dowel or bolt must not protrude above the surface of the rail support or it will foul the work holder during use.

Loosen the screw on the acrylic motor mounting plate and slide the plate to adjust the tension – not too tight and not too slack! Re-tighten the screws.

Step 13: Assembly: fitting the work holder

Picture of Assembly: fitting the work holder

Use the 5mm screws to fit the work holder to the linear bearings. You will see the bearing holes through the fitting holes – slide the bearings left or right to locate them before fitting the screws.

The photo shows the first four screws in place – one for each bearing.

Now slide the work holder along until you can see the pilot hole in the drive belt fixing block. Insert a 3.5mm wood screw through the work holder to hold it in place. Look carefully at the back of the work holder and ensure that the drive belt fixing block is aligned horizontally – adjust if necessary.

Step 14: Assembly: adjusting the stepper driver

Picture of Assembly: adjusting the stepper driver

Before going any further you need to set up the A4988 stepper motor driver module .

Setting the step resolution

  • Make sure no power supply is connected to the board.
  • Carefully remove the A4988 driver module from the board.
  • Between the female headers you will see three jumpers – blue in the first photo.
  • Using a jumper to connect the two pins makes a line high, leaving it off makes the line low.
  • The A4988 has three lines to control step resolution: MS1, MS2 and MS3. (S1, S2 and S3 on SmartMini.)
  • On the SmartMini-SA board S1 is closest to the motor terminal and S3 is closest to the Pro Mini.
  • By default the SmartJointer software is set to use half stepping – 400 steps per revolution
  • The microstepping table shows that MS1 should be high while MS2 and MS3 are low
  • Ensure that the jumpers are set correctly.
  • Replace the A4988 module – make sure it is the correct way round and all pins are inserted correctly.

Setting the drive current

  • Make sure no power supply is connected the the board.
  • You are going to adjust the small pot on the A4988 board so you need a slim screwdriver.
  • Connect the meter ground lead (black) to 0V on the SmartMini board.
  • Connect the meter plus lead (red) to the shaft of the screwdriver. You can purchase hook connectors suitable for most meters – try ebay.
  • Switch on the meter and select a suitable voltage range (you will be measuring up to 2V).
  • Apply power and switch on.
  • Carefully insert the tip of the screwdriver into the pot.
  • Turn clockwise until you get the maximum reading.
  • If you go too far the reading will drop back to zero – so back off and creep up to the maximum again.
  • Different modules will show different maximums – the one in the photo shows 1.6V.
  • Switch off, remove power and disconnect your meter.

Step 15: Assembly: fitting the controller

Picture of Assembly: fitting the controller

Pass four countersunk pozi 3.5mm x 20mm screws through the holes in the back.

Place short spacers over the screws, put the SmartMini Universal Mounting Plate on to the screws and add the nuts.

The wires from the motor and the micro switch may seem a little long. Don’t cut them short at this stage, use cable ties or twist ties to shorten them if you wish.

Leave them long for use with a future Instructable which will add a second axis to make SmartJointer fully automatic!

The battery is held in place with the Velcro strip.

Step 16: Wiring up

Picture of Wiring up

Very important warning

Never connect anything to anything with power connected. Always physically disconnect the power source before connecting any electronics components. The 12V line on SmartMini is always live when a power source is connected. Accidentally connecting 12V to a 5V line, even for a fraction of a second, will destroy the Arduino Pro Mini.

You, like me, will ignore this advice. You, like me, will destroy things (many things in my case). You,like me, will learn a salutary lesson!

Connecting the motor to SmartMini-SA

The A4988 stepper driver module is suitable for four wire motors so, please don’t try it with motors with 5, 6, 8 or any other number of wires.

The technical spec for you motor will show a diagram like the one above.

The motor has two coils with the ends labelled either with colours or as 1A. 1B, 2A, 2B – or both!

The key thing is that the wires are pairs.

The motor terminals on SmartMini-SA are labelled 1B, 1A, 2A, 2B so, if your motor spec shows the same labelling system, you know what goes where!

If your motor spec uses colours just connect one pair to 1A and 1B and the other to 2A and 2B. In the example above, black would go to 1A, green to 1B, red to 2A and Blue to 3B.

Having said all this, it is quite possible the motor will rotate the wrong way – but don’t worry, we will fix that later.

The two wires from the micro switch go to the two terminals labelled “Home” – it does’t matter which wire goes to which terminal – it’s a switch – it is normally “open” but get’s closed when the work holder crashes into it. (Sorry, not “crashes” – “touches”!)

We will leave power until the next step. Don’t connect power yet and don’t switch on!

Step 17: Programming

Picture of Programming

The Arduino Pro Mini in SmartMini-SA is programmed using the Arduino IDE.

If you have never used an Arduino, and don’t know how to send a program to one, now is the time to either learn or stop reading. I would be very happy to write an Instructable for this but I am sure it has been done before and there is a mountain of stuff about it on the Internet.

So, I am assuming you know what to do and you have a suitable USB to serial module (with DTR!) that will allow you to program the Pro Mini.


The software is provided “as is”, free of charge and with no warranty as to suitability for any particular purpose.. You are free to replace it, change it or tweak it.


  • Do NOT connect battery power. Do NOT switch on.
  • Connect the Remote Controller to the MultiPort socket.
  • Connect your USB to serial module to the Pro Mini – including the 5V power line.
  • Connect the other end to a serial port on your PC. (I use a USB extender cable to make life easy.)
  • Download my Arduino code and store it in a suitable place on your PC.
  • Load the Arduino IDE and load my source code.
  • Compile and download it to the Pro Mini.

If everything is OK you should see the startup message on your Remote Controller.

Common reasons why programming fails

  • Almost always a loose wire or wires in the wrong order.
  • No power to the Pro Mini. Check the Pro Mini LED is on before you attempt to program. Check the VCC and GND wires are connected at both ends.
  • Programming wires in the wrong order. Check that DTR is connected to DTR, TXD to RXD, RXD to TXD.
  • No driver. Make sure you have installed the driver for your programming module/cable.
  • Wrong port. Check that the Arduino IDE is connected to the correct COM port.

Don’t go any further yet.

// **********************************************************************************************************
void cutSlots(float startAt) {                  // Cuts pins (StartAt = 0) or tails (StartAt = pinWidth)
  jobTimer = millis();                          // Store time at start of job
  int p = pinsReqd;                             // Number of pins required
  if (startAt == 0) {                           // Pins require an extra cut at the end
    p = p + 1; 
  float finalCut = pinWidth - k;                // The final cut has its right hand edge on the right hand side of the slot
  int c = ceil(pinWidth / k);                   // Number of cuts required per slot

  float inc = finalCut / (c - 1);               // Increment to be added for each cut - except the last

  motorsOn();                                   // Enable motors
  stepperX.home(homeOffsetX * mmToStepsX, speedX);            // Home X: SmartJointer - homeOffset is in mm so convert to steps
  //stepperY.home(homeOffsetY * mmToStepsY, speedY);            // Home Y: SmartPusher - homeOffset is in mm so convert to steps
  for (int i = 1; i <= p; i++) {                              // For each cut position
    float s = startAt + (float)(i - 1) * pinWidth * 2.0 + k;  // Start location for the cut - assumes right edge of blade is aligned with workholder inside edge
    float l = s;                                              // Location of first cut

    for (int j = 0; j < c; j++) {               // For each cut  
      if (j < (c -1)) {
        l = (s + j * inc);                      // Not the final cut
      else { 
        l = (s + finalCut);                     // Final cut
      lcd.print("Moving to: ");
      stepperX.moveIt(l * mmToStepsX);          // Move to cut location - convert to steps

      //stepperY.moveIt(maxTravelY * mmToStepsY); // SmartPusher - pushes forward - convert mm to steps
      //stepperY.moveIt(0);                       // and back to zero

      lcd.print("Press # when cut");            // Manual push/pull version

      char key = kpd.getKey();                  // Get key - or no key
      while (key != '#') {                      // Wait for #
        key = kpd.getKey();                     // Loop until valid entry
  stepperX.moveIt(0);                           // Return SmartJointer work holder to zero
  motorsOff();                                  // Disable motors
  timeout = millis();                           // Reset the motor/LCD timeout

  jobTimer = millis() - jobTimer;               // Time taken for the job in ms

Step 18: Testing

Picture of Testing

If you’ve got this far at least you know the control system is working. Now to make things move!

  • Disconnect the USB to serial module.
  • Do NOT connect battery power yet! Do NOT switch on!
  • Check the belt drive tension – you should be able to move the work holder slowly and carefully – you will feel resistance from the stepper motor but the spindle should rotate.
  • Position the work holder in the middle of its travel – if it goes the wrong way you want to be able to switch off before it crashes into the end! Crashes are bad things but remember – removing power stops everything!
  • Connect the battery.
  • Switch on.
  • The startup message should appear on your Remote Controller asking you to press “#” to start.
  • With one finger hovering over the off switch, press “#” on the keypad.
  • The work holder SHOULD move about 10mm away from the motor and then start moving back towards it. Switch off immediately if it goes the wrong way and continues heading for the other end!
  • If it went the wrong way, physically disconnect the battery and swap the motor wires for any pair. So, swap 1A and 1B or 2A and 2B. Now, reconnect power, switch on and try again.
  • After moving towards the motor the bottom linear bearing should contact the micro switch and the work holder should stop and back off a little

If all has gone well we are ready to turn some timber to offcuts – that’s why I have a wood burning stove in my workshop!

But first we have to fit SmartJointer to your saw bench or router table.

Step 19: Fitting to the saw bench (1)

Picture of Fitting to the saw bench (1)

You will have to decide the best way to fit SmartJointer to your saw bench. The critical dimension is the location of the right hand side of the cut the saw will take through the base of SmartJointer – this should be 180mm from the left hand side.

Mark this location on the front of SmartJointer then place it on your saw bench ensuring that the unit is at right angles to the edge of the bench – the fence and a T square will help here.

The first photo shows SmartJointer against a right angled fence before the first cut is made. Also visible is the T slot runner I made on the router table. This should be a good fit to the slot, not too tight, not too slack. The runner should not stick out from the back of SmartJointer but it may stick out from the front – the longer it is, the less SmartJointer can wobble in the slot.

The second photo shows the result of the first cut after setting the blade to a height of 18mm

Do not cut all the way through – the highest point on the saw blade should reach the back edge of the work holder (though it will not cut the work holder itself.)

Step 20: Fitting to the saw bench (2)

Picture of Fitting to the saw bench (2)

Leave SmartJointer with the saw blade in the slot you have just cut.

Slide the runner in place and mark the centre of its location on the front and back softwood base supports.

At this stage I find it easiest to remove the main part of SmartJointer to work with the base alone.

Turn the base over, draw a line between the two marks indicating the centre line of the runner.

Drill two fixing holes for short wood screws and countersink them in the top of the base.

Place SmartJointer back on the bench using the saw blade and right angle to hold it in place.

Slide the runner into place and mark through the two holes so you can drill pilot holes into the runner.

Remove from the bench to glue and screw the runner into place.

Replace it on the bench and locate with the saw blade and right angle – give the glue time to set.

Step 21: Fitting to the saw bench (3)

Picture of Fitting to the saw bench (3)

I like to add stops in front of SmartJointer and behind it.

The front one marks when the top of the blade has reached the back of the work holder., The back one marks where the blade just clears the slot.

For our first cut we will be using an offcut of 9mm plywood so use the depth gauge to set the blade to 18mm – 9mm for the base and 9mm for the wood being cut

Step 22: The first cut!

Picture of The first cut!

The moment of truth!

  • Clamp the timber to the work holder.
  • Plug the Remote Controller into SmartrMini-SA – do a test push and pull of SmartJointer to ensure the cable does not foul anything.
  • Plug the battery into SmartMini-PS.
  • Switch on and press hash (“#”) to start – from now on the hash key acts like Enter or Return on a full size keyboard.
  • Don’t panic if the display goes blank after 30 seconds without you pressing anything – it is still waiting for you but it has turned off the display to save battery power – the display will come back on when you press the required key.
  • Select “B” for setup.
  • Set the blade kerf (thickness) in mm x 10 = so enter 32 for 3.2mm. Press “#” when done.
  • Set the work holder offset using the “4” key to move left and “6” to move right. Press “A” to switch between a step increment of 5mm or 1mm. Adjust until the left hand edge of the wood is aligned with the right hand edge of the slot – or just touches the saw blade. Press “#” when done.
  • Leave the other settings as they are – press “#” to move from one to the next. These settings are important if you use a different drive system – motor, pulleys etc.
  • Select “A” when you are given the option: “A save, B no save”
  • Enter you timber width in mm.
  • Enter the number of pins required.

You are ready for the first cuts!

  • Put on your ear defenders then switch on your extraction and saw.
  • Select “A” to cut pins.
  • SmartJointer will move ready for the first cut.
  • Push SmartJointer until it reaches the stop then pull back.
  • Press “#” on the keypad – the display will be showing you the cut location.
  • Continue until SmartJointer moves the work holder back to the zero position and shows you how long the job has taken.

You have cut you first set of pins!

Step 23: Setup and fine tuning

Picture of Setup and fine tuning

You will probably need the setup function only once – to set the kerf (thickness) of your blade and the location of the work holder.

However, setup can handle different configurations for a SmartJointer – perhaps using different motors or drive mechanics.

Motor speed can be anything from <100 Steps Per Second (SPS) to 2,000 SPS or a bit more. Everything will come to a halt if you try to go too fast – the motor can’t keep up!

Motor acceleration is important. A car can’t go from zero to 70mph instantly – it has to accelerate to get there. A stepper motor is the same – without acceleration it would never get started. Acceleration is in steps per second per second and a value of about 10 times speed seems to work fine. Going slower will take longer to get to the required speed but may make the motor happier.

Maximum travel is the maximum distance the work holder can travel. The software will try to prevent it going beyond this but it doesn’t have eyes so it tries its best.

Steps Per Revolution (SPR) depends on the jumper settings for the A4988 stepper driver module. Full = 200 SPR, half = 400 SPR, quarter = 800 SPR, eighth = 1600 SPR and sixteenth = 3200 SPR. The higher the value the smoother things move – but the longer it takes to get from one place to another.

Pitch is the pitch of the drive mechanics. SmartJointer uses a belt with 2.5mm between teeth. The pulley has 16 teeth. So, one revolution of the pulley will move things 16 x 2.5 = 40mm – that’s the pitch. A 10mm bolt has a thread pitch of 1.5mm (standard thread – 1.,25mm fine thread) – one rotation of the bolt moves it 1.5mm (or 1,.25mm for fine thread). There is also extra fine thread which has a pitch of 1.00mm for a 10mm bolt. Sorry, I’m rambling!

Step 24: Tweaking, strange things and a warning

Picture of Tweaking, strange things and a warning

There are many ways to tweak SmartJointer.

  • Try adjusting the kerf value in steps of 0.1mm. For example: enter 31, 32, 33 for a blade with a nominal thickness of 3.2mm.
  • Try adjusting the start location of the work holder.
  • Try setting the width of the timber you are cutting +/- 1mm.

Of course, the ultimate tweak is to change the code in SmartMini. You are welcome to do that and I am happy to reply to questions.

Strange things will happen when battery power drops – so always charge the battery before use – or use a separate 12V power supply.

Boring but important stuff

Workshops are dangerous places A saw blade can slice through fingers in milliseconds. In Europe we have riving knives and blade guards but these have to be removed when using SmartJointer. The USA doesn’t have them at all.

Your safety is in your hands and I can’t be responsible for what you do with SmartJointer or SmartMini – you are on your own. So, think ahead and take care.

If you don’t feel competent to build and use SmartJointer – don’t do it!

( … but, if you do, please let me know how you get on – you can reach me through the QUS web site.)