Skip to main content
Posts by:

Tim Booher

Shapeoko Troubles

I recently encountered an issue when generating a grid of holes for workbench. I had recently planed down an old workbench from our house in New Jersey. I was planning on 20 mm holes spaced in a grid with 96mm spacing to match the festool MFT table. I’m hoping to use the available array of cool attachments and eventually add the aluminum profile to the side. For example, an MFT table can be used as a bench with a variety of different attachments, such as clamping elements and stops.

Unfortunately, the holes didn’t create a proper grid and the spacing was off. I used a CNC machine to cut the holes, but I noticed that they were off. Just looking at it showed that each row had fairly consistent spacing, but the start of the rows varied in the X direction.

To accomplish a 96 mm grid, the g-code was programmed to start at the bottom of the workpiece and move across in a row. This process was then supposed to be repeated until the entire grid was cut. However, as I mentioned earlier, I encountered some issues with the spacing of the holes and had to troubleshoot the problem.

One theory I became aware of online (thanks gdon_2003, Julien, LiamN, SLCJedi and WillAdams) is that set screws are a part of Shapeoko drive system and a loose set screw can cause this type of behavior. That’s because the set screws transfer motion from the motor shafts to the pulleys, which rotate against the belts. They are intended to be pushed tightly against the flat spot on the motor shaft, causing the pulley to turn with the motor. If the set screw becomes loose, the pulley may turn independently of the motor before snapping into place, which can cause issues with the motion of the machine. This may show up as flat spots on circles or other imperfections in projects. You can see why a loose set screw is bad as captured in the screenshot below from this youtube video by See-N-C.

Screenshot that describes how set screws work

Doing some Math

In order to do some analysis on what happened, I needed to register the image and get the location of the points.

The drawpoint command in MATLAB is a function that allows you to draw a single point on an image or plot. You can specify the coordinates of the point on an image using the mouse to record position. Using drawpoint, I recorded the coordinates of the center point of each circle and put this information in a struct. I then wrote code to turn the struct into two arrays: one for the x coordinates and one for the y coordinates. This allowed me to easily analyze the variance in the x coordinates for each column and the variance in the y coordinates for each row.

I was also able to use the drawpoint command in MATLAB to mark points on the ruler captured in the image. This allowed me to easily record the coordinates of the points and then do the math and convert the distances between the points from pixels to millimeters.

I used the pdist2 function in Matlab to calculate the Euclidean distances between my two sampled points and then converted the distances to the desired units through a conversion factor of 610 mm/523.4087 px.

Since the job started at the upper right and progressed down and across, we could look at the variance throughout the job. The variance in the x direction seemed to increase in the last four columns:

x1.2610.36030.58540.76563.24253.963
Variance of X in each Column (in mm)

The variance in the y direction was much bigger across the rows and also increased as the job progressed. I used this MATLAB to generate this: makemm(var(y(:,:),0,2))

y24.753724.573630.623235.246736.3425
Variance of Y in each row (in mm)

To generate the ideal points based on a 96 mm grid, I wrote a function that takes in two inputs, iX and iY, which represent the starting x and y coordinates, respectively. The function first initializes two matrices, X and Y, to store the calculated x and y coordinates for each point. Then, it defines a conversion factor, cf, which is used to convert the units from millimeters to pixels.

Next, the function uses a nested for loop to iterate through each column and row of the matrices. For each iteration, the function calculates the x and y coordinates of the current point by adding the starting coordinates (iX and iY) to the appropriate offsets, which are determined by the loop variables and the conversion factor. The calculated x and y coordinates are then stored in the corresponding elements of the X and Y matrices.

To calculate the root mean squared (RMS) error, I subtracted the actual coordinates from the ideal coordinates to find the error in both the x and y directions and then took the square root of the mean of the squared errors in both directions.

123456
103.64134.867812.579612.847612.0532
21.29864.71474.923613.636513.884112.3934
31.6041.47845.26213.272213.526513.8716
42.61142.536214.100214.219514.898816.2787
56.15646.040717.367317.355818.812919.6045
RMS errors for each hole

You can see the error increasing as the job progresses, but the major error starts in column 4-6, supported by a big jump in column 3, row 4, which supports the idea that the screw isn’t seating well resulting in slippage.

Overall, doing this math allowed me to see what was really going on. By adjusting for the variance at 4,3:

Pattern in Holes
By 0 Comments

Otis on Leadership

In Shawshank redemption Otis “Red” goes before the parole board with promises to be better. He tries to play by the rules and repeatedly gets denied. Finally, he has had enough and lets them have it. He is done with their game, they can keep him there forever.  He speaks with the tired wisdom of an old man desperate to speak sense to his younger self, bereft of the hope that a future is possible. He doesn’t care, and now they approve his release.

As amusing as this story is, I’m convinced it speaks to a deeper truth. The road to excellence in leadership doesn’t end with learning what to care about, but it definitely starts with a decision to follow your convictions over learning to do what others in power want.

When I was at DARPA, a PM’s goal was to get to the tech council and get the funding to make our idea happen. In several startups, I’ve marched a similar path to get funding. Each time, I had to navigate a maze of intermediaries, each wanting to hear specific things before I could get to the decision maker. The temptation was always present to win their approval by making my main focus to learn and deliver what they wanted to hear at the expense of my core vision. Keeping this temptation in check always helped in the end and I started to really know that conviction matters more than compliance.

Ok, that’s DARPA and startups. But most of my time has been in government and big companies. Big companies don’t just have intermediaries, they have systems, processes and whole organizations that test our compliance versus conviction trade. Conversations in every company start to change as everyone pays attention to where the winds are going. Conviction is still there, but it becomes bounded by what the boss or bosses emphasize. This is a natural consequence of what leadership means. We set the emphasis of our team and that includes culture and values. Shouldn’t we want our workforce to adopt what we are projecting?

Not at the expense of core individual convictions. To get a flavor of how this can lead us off the high road, a senior leader at a former company made (the fine topic of) female empowerment a core platform of his leadership and bombarded LinkedIn with his progress in this area at the expense of any other vision or message. I took pitches every day from vendors and vendor pitches started to include slides at the beginning that highlighted their commitment to female empowerment. This is how you end up with technology pitches that didn’t emphasize technology. While it was great that the boss was speaking his conviction, it was sad to watch the ecosystem around the company pander and step outside their prime value.

Tech vendor’s sometimes do this even when they focus on technology. When a topic becomes hot, say blockchain or machine learning, you start to hear lots of references to high concept phrases. Do you do X? Oh, yes we know X very well. Do you integrate with Y? oh yes. In my research work I get to bump into real thought leaders and it’s a completely different story. They question my question: “why would you do X?”. They often disagree with what I’m saying and point out my misunderstanding. I like these conversations. I like these people. They have different incentives, but they get my call back.

The best conversations are not banal agreements. Listen to a couple on their first date as they try to please each other. It’s funny watching them try and agree. It’s also a boring conversation.

Then watch the verbal tennis match of two long time friends disagreeing. “No, that’s not the best, this is . . . You’re crazy, this is . . .” In such disagreements there is life and learning and love. They deeply care about each other, but they aren’t focused on pleasing the other person. They have transitioned to something greater.

There just isn’t room for multiple things at the top of your priorities. If you focus on playing the game and optimizing the system to your advantage, you not only hurt your chances of success, but you risk any gains you make leaving you empty and not really adding up to any real change. On the other hand, if you really bottom out your convictions and decide what you really want to do, you have to take on the system. The system will fight you and may beat you down. The collective goals of that system will differ from yours and people will defend their equities in ways that give you headaches, sleepless nights and may even break you.

However, some people, and in the right culture, the right people, will watch. They will know that you care more about the impact of your principles than personal gain. They may not agree with you, but they will respect you. And when you succeed your success will have meaning and will take root. It may grow as others are inspired by your conviction and the truth of your principles.

One of my heroes, John Boyd, said you have to make a fundamental decision to the question: do you want to do something or do you want to be somebody? The magic of this is you really can have both, but you have to pick the right door. Both doors will lead to frustration. The choice to be somebody will make you an expert in what people want to hear and where the system is going. It will feed your ego with each win and teach you how to navigate a system with the right partnerships, the right things to do and the right things to believe. Each year you will risk becoming less and less of the person you once were, even if the organization rewards you.

The choice to do something driven by your convictions alone may pit you against the world. John Boyd never became a general. He never developed executive presence and took on the assignments that would get his name at the top of the promotion lists. He lived in a small apartment and his Facebook and LinkedIn page would have been boring and unnoticed. (Hint: I’m pretty sure he wouldn’t have one.) He did change the art of war and gave us our F-16, A-10, and built the science of aerial combat. He made a real impact on national security, but his lasting impact was on his acolytes who went on to change the Air Force and the DoD. His impact lives on.

The choice can’t be more clear. Integrity, conviction and meaning over advancement and ego. It’s Cincinnatus returning to his farm. It’s  General Marshall telling president Roosevelt that general Eisenhower was the better man to lead D-day. It’s George Washington refusing to be crowned King. It’s Socrates taking the cup of hemlock. It’s Martin Luther walking down the streets of Wittenberg with a piece of paper in his hand that will change the world.

The greatest parable is Solomon’s test for the two mothers who both claimed parentage of the same child: who cares more about the baby? When you truly care, you can’t lose. Without Solomon’s wisdom, the true mother would have suffered greatly. She wouldn’t have her baby to touch, to teach and to watch grow. But she could take great joy in the child’s life. There would be a chance for the truth to break free and make all things right.

Even if the other mother “won”, she would live a lie. It would be a parenthood devoid of meaning, filled with guilt and deception. Not living the lie is what bringing your full self means. It means being fully aware of the trades you will make, who you are and what you stand for.

This is all simple when described here, who wouldn’t choose the greater good when it’s described this way? But this gets complicated in Monday’s staff meeting or in your strategy review. Who will you be when you aren’t focused on the questions above? Every day you make decisions that together comprise a life. If you come to forks in the road and you haven’t been intentional about your principles and practiced applying them, then your path will be filled with extra obstacles to find meaning and you risk ending in a tale of sound and fury, in the end signifying nothing. That’s a heavy price to pay for the trophies you get from a happy system.

By One Comment

Work vs Relaxation or Why Captain Call is the Villain

Embracing hard things is important. We lift up those among us who work harder, endure more and suffer to get stronger or make the world better. But how much suck should we embrace? When is ok to relax or is choosing to relax opening the door to cowardice and weakness?

Pretty much not Relaxing

Yesterday when I was playing with my 11 year old daughter having a carefree time horsing around and I had a pang of guilt: should I be doing something harder? Of course not. It’s common wisdom that it’s good to horse around with kids and to have fun, with no specific agenda or goal. It’s necessary to be present in the moment and to enjoy oneself apart from achieving any goal. But! While it’s ok, would it be better to be push for something better? That time with my daughter, wouldn’t it be better to aim for some lesson? What if I were trying to make it more fun for her instead of just enjoying myself? The fact is that we can always do something better and can always elevate our impact — delivering more purpose, meaning and, ultimately, the potential for more joy.

The call to a life of unlimited effort is alive and well today. At MIT, all-nighters, an insane course load and failing health due to work were a badge of honor. I remember my first week, when an upper classman on crew bragged to me that she just finished a two-hour team workout that started at 5am after pulling her second consecutive all-nighter. My first thought was not sympathy, but if I had what it takes in this new environment.

It doesn’t get any easier. The professional life is a road race that puts you in constant competition. Also, you start to get a feel for the cost of your time as the demands for your money go up. A single hour of fun could alternatively provide enough money to do something significant for people you love. When I started consulting, this became much more stressful. I could turn an hour of rest into money. When you know the value of your time and can directly convert hours to dollars, it presents a real challenge. Naval Ravikant (investor, entrepreneur) writes:

“Say you value your time at $100 an hour. If you decide to spend an hour driving across town to get something, you’re effectively throwing away $100. Are you going to do that? . . . I would make a theatrical show out of throwing something in the trash or giving it to Salvation Army, rather than returning it or trying to fix it.”

Naval Ravikant

Now he famously valued his time at the start of his career at $5,000 an hour. That is a good trick to focus your priorities, but watching a sunset fall at the cost of 5K is a non-trivial decision if you think about all the good you can do with that kind of money.

The good news is that at some level, we have to sleep, relax and kick back or we die. Since we must relax, there has to be a point when is it ok, watch a movie in flight, or just sit and watch the trees blow — without it being a chance to “reflect on strategy”? Under what conditions is it ok to take a nap or waste time? Do we relax, just so we can run faster later, or do we run fast so we can relax? Put more broadly, what principles govern the balance of work and play? To what degree can we actually enjoy things without feeling guilty that we aren’t doing something harder. It’s clear to me that all meaningful things are hard, but are all hard things more meaningful than their alternative?

I’ve thought about this a lot and one of my first conclusions is to focus on what the right thing is, evaluate your current actions, and do the right thing. Always be honest, kind, just and humble. If it’s hard, do it. If it’s easy, enjoy it. This provides a lot of clarity. When riding a bike, you work hard on the up-hills and enjoy the glide on the downhills. In both cases you are completely focused and acting to reach your destination. There should be zero guilt on a pain free and enjoyable glide down hill. In that case, your optimal strategy is to enjoy the moment.

So that may be pretty easy, but what about when you pause the race, when you step away from fastest way to get somewhere? Stopping the race to enjoy the scenery will definitely cost you, but also give you something. It’s selfish to stop, breathe fresh air and be solely present in the moment, but it’s also necessary.

Yet another Optimizer hard at work

I’ve always loved how CS Lewis gets at this in the Screwtape letters. Joy is a fundamental human need and it maps closely to meaning and joy requires being present in the physical moment. He writes that the demon must prevent the “patient” from enjoying the present:

“It is far better to make them live in the Future…it is unknown to them, so that making them think about it we make them think of unrealities… it is the most completely temporal part of time- for the Past is frozen and no longer flows, and the Present is all lit up with eternal rays” 

CS Lewis, The Screwtape Letters

Operations Research provides an opportunity to understand how to separate the goal from the enablers. Every set of equations has an objective function: the ultimate goal, and a set of constraints that bound the ability to get the optimal answer. To understand how to balance work and relaxation, you have to answer the question of what gives life meaning. There can be many constraints on that objective function: the need to sleep, make money, stay in shape, eat food. But it’s key to keep the constraints separate from the objective. There is no benefit in dying with a six-pack or even of dying with a lot of trophies. Effort, the suck, doing hard things are all about the doing the constraints well– in order to optimize something else. What is that?

The staid reformers of the Heidelberg Catechism asked: What is the chief end of man? Answer: To glorify God, and fully to enjoy Him forever. The cause and effect are so clearly bound together: act and receive. Glorifying God is work, but it’s also a joy to the believer. Enjoying God is pure rest, and is also joy. Work and rest. Suffer and enjoy. It would be so easy to stop at the first clause, but that would deny the purpose of our creation–we were created, not just to worship, but to enjoy that act. With an objective like this, the “hard things” are embraced as a means to an end. The “soft things” are there to be fully accepted, enjoyed and shared.

Worship as a chief end is not just for the Christians. “Some people worship beauty, some worship political identities, and others worship their children,” wrote Derek Thompson in the Atlantic. “But everybody worships something. And workism is among the most potent of the new religions competing for congregants.” Could work itself be a valid great objective and life-purpose?

But we can dig into this more under the lens of Christianity. While the goal of life is open-ended for the non-believer, the believer is instructed to worship and obey as revealed through an honest and consistent reading of scripture. The apostle Paul emphasized his work and suffering in his descriptions of beatings, imprisonments, riots, sleepless nights, and hunger (2 Corinthians 6:5). He makes it clear that life in a fallen world is not easy, and the Christian life is described as more difficult, even challenged by demonic forces. In Genesis, physical labor is cursed with friction and obstacles at every turn. And yet Christians are called to rise and face these challenges. Paul’s hardships are shown as a means for the faithful to encounter resistance and endure, not give up.

Paul, Living His Best Life Now

Christians should be the freest people on the planet to work hard because their doctrine liberates them to pour their energy, time and skill and creativity into blessing others. This is principle leading to behavior. It is a good rule to work hard, but to avoid self worth, or even identity based on that work. Conversely, rest is just another activity, and does not confer identity. Work and rest have purpose, when they seek to optimize worship and make room for joy. (I originally had about 8 more paragraphs on the Christian view of work, but pulled that out into a separate post.)

A counterpoint to Christian view is much older, the first philosophers widely considered that enjoyment itself was a valuable pursuit. Ancient Greek philosophers such as Democritus, Aristippus, and Epicurus embraced the hedonistic theory that a good life involved pleasure and you had a moral duty to make good use of your pleasures. You have a short life so you had better do what you can to enjoy living it. Aristotle thought that work made you worse because people who are too busy working don’t have the time to perform their civic duty or develop sophisticated morals. Other philosophers such as Søren Kierkegaard and Michel Foucault believe that pleasure is essential in developing selfhood. Foucault thought that embracing pleasure was a form of expressing and developing personal freedom. Kierkegaard adopted Hegel’s view that in enjoyment the individual develops an awareness of themself as the particular individual they are.

Making pleasure a goal doesn’t sit well with me. I’ve always been skeptical of the pursuit of happiness. The pursuit of something with broader meaning seems so much more important. Jordan Peterson resonates with me when he writes:

It’s all very well to think the meaning of life is happiness, but what happens when you’re unhappy? Happiness is a great side effect. When it comes, accept it gratefully. But it’s fleeting and unpredictable. It’s not something to aim at – because it’s not an aim. And if happiness is the purpose of life, what happens when you’re unhappy? Then you’re a failure. And perhaps a suicidal failure. Happiness is like cotton candy. It’s just not going to do the job.

Jordan Peterson

However, this post is the result from a recent perspective from a much less holy book I read recently: Lonesome Dove a 1985 Western novel by Larry McMurtry. It’s a story of two different protagonists: one who lives life to enjoy it, Gus McCrae, in another one who lives life to work, Captain Call. Both of them are superheroes of the James Bourne type: put them in front of a pack of bandits or wild Indians and each of them are going to emerge victorious. Gus, however, is loud, talkative and willing to take in the pleasures of life. Capt Call works from sun up until dark and steadily leads a motley bunch of cowboys and former bandits. In the end, however, he is ultimately a coward, using work to hide his pain. His son doesn’t know who his father is, and Capt Call is too afraid or ashamed to tell him. Even worse, his absence of vulnerability prevents him from experiencing joy and developing friendships.

Two Heros?

Several scenes show his power. When his son is threatened by a solider who wants to take a horse, Capt Call easily beats the solider senseless. He endures all manner of hardship to honor a promise and take his friend’s body back to Texas. The natural opinion is to see Gus and Capt Call as a powerful pair who match each other’s weaknesses. The two of them together form the power of their team and their friendship appears to be the bond that keeps the group together.

After more thought, I’m convicted that Capt Call is the villain of the whole story. He has all the appearances of strength, but when it matters he is a coward, unwilling to be happy and willing to embrace the full potential of life. Gus, by contrast, exhibits a deplorable set of values. He treats woman as objects, is an open racist, lacks empathy and is prone towards physical violence. He leaves broken lives in his wake and, worst of all, is oblivious to the pain he causes from his selfish pursuit of pleasure. Some of this is excused by his era and the hard nature of his life. And there is no doubting that he is a clear hero–willing to risk his life to help and save others. He also has an endearing sense of humor. What truly makes him great is his embrace of life. He is willing to work, but he doesn’t serve work. Work is a constraint, not an objective in itself and none of this diminishes his strength.

So what life do you want to live: One more like Gus or one like Capt Call? I want to have hard, fulfilling work, that is seasoned with much joy. I want to have the courage to do the hard things that need doing, but to also have the wisdom to put effort in it’s proper place. I’m very deliberate and intentional about the roles I have: worshiper, husband, father, worker, citizen. I want to do all those things with honor. Really doing those right, especially the first three, requires a copious amount of joy and grace. My children are best served by remembering a dad who was quick to laugh, serve and wait for them, than a dad who was always after optimizing his personal output, growth and accomplishment. Relationships are formed in trust and shared joys and the roles I list are successful only in the context of deeply effective relationships.

All this said, what do I do? First, keep the goal separate from the constraints. The most critical thing for me is to be clear on the goal. I divide the goals into roles. As a living being (health goals), worshiper (spiritual goals), husband, father, worker, and citizen. I picture the life I want to have and the contributions I want to make. I write these down and review them during my daily journaling. Well set goals, shared with your community, provide peace. You can either rest or adjust your goals. They force you to prioritize and decide. The goals you agree not to do are just as important as the goals you decide to pursue. And this is a very iterative process for me. I’m constantly adjusting and learning what I can and can’t do as well as what I should and shouldn’t be doing. Time audits/journaling and sharing your goals with others provide the ideal feedback mechanism.

The constraints are just as meaningful as the goals as they become your personal set of rules. I love this WSJ article from 2015. In that article, Jennifer Wallace writes that “personal policies”

Personal policies are an established set of simple rules that guide your decisions and actions. On the surface, they offer a gentler way of saying no, as in: “I don’t take work calls on Saturdays because that’s my time with family.” On a deeper level, they encourage reflection, help to define priorities and aid decision-making, especially with in-the-moment requests. They can stop you from defaulting to that regretful “yes.”

A Policy of Saying ‘No’ Can Save You Time and Guilt by Jennifer Breheny Wallace

These are also connected to what James Clear writes about identity based habits and Ray Dalio in principles. Rules like: “I don’t swear”, “I go to bed at 10pm” or “I exercise every day” become the type of constraints that form what you get done in life. They should all be tied to specific goals. They make the decisions that lead toward successful completion of goals easy. Just like goals, they require a system that evaluates them. I also have found that community is key. Your spouse or close friends will be a great sounding board for rules that just don’t make sense for you. I’ve found that even the process of sharing them culls a lot of stupid rules. In any case, being intentional here is key. You have to write down your rules. I also tie them to the role they support and the associated goal for that role. I end up with rules like this:

  • In order to be a good husband, I will be sure to call my wife every day, no matter where I’m traveling.
  • Since my chief end is worship, I start every day with a prayer, followed by reflection and journaling.
  • As a Christian, I go to church every Sunday and participate actively in the congregation.
  • As an athlete, I exercise every day.
  • etc.

So, please, enjoy the downhill rides, and the hard slogs uphill. Also, enjoy the stops on the side of the road, especially if you are sharing the ride, because you know where you are going and when you need to get there. Hug your companion. Joke, laugh and watch the sunset. In the morning, run hard, work hard and don’t be afraid to sweat. All these are the constraints. Define your objective, and keep that in mind. Never waver from doing the hard things that need doing. But! Most important, never place effort, work and grit as the objective itself. That’s a bad drug that gives the appearance of meaning, but the meaning get’s trapped and self-consumed without joy to make it fully flower.

If you make work itself the goal, you need look no farther to the austere and empty end that met Capt Call.

Hard Work that is Going Somewhere
By 4 Comments

Lauren’s Desk

Lauren was using her desk for art and computing. She sketched out a design and I quickly drew it in sketchup.

Desk Concept

We decided to use an existing top from Home Depot. I probably won’t do this again. The quality is really poor. I had a to gouge out lots of loose wood and we used lots of Cyanoacrylate (“CA”) glue and epoxy to fill in the voids and then used my Lie-Nielsen No. 60-1/2 Adjustable Mouth Block Plane to shave off the excess adhesive. The end result was a nice smooth table, but the wood quality was really poor.

Pocket Hole Calculations

I measured my Kreg pocket hole drill bit as 133 mm long and 9.5mm wide with a pilot hole that is 4 mm in diameter and 12mm long (please comment below if you know the factory dimensions). Getting the Kreg dimensions right is an interesting problem. You can some discussion and calculations at this link and folks have talked about this.

Kreg pocket hole calculations

Since I’ll be screwing pocket holes into the legs, I selected 1″ Long Square-Drive Flat Head Screws for Wood, Black-Oxide Steel, Number 8 Screw Size. I will be using glue as well. The key dimension is the 15 degree angle and the key parameter is the distance between the 75 degree offset plane (green above) and the start of the pilot hole. In this case, I needed zero.

To get this working in fusion 360, I wrote this script.

I then drew the desk in Fusion 360.

desk rendered
Desk Rendered

And used cutlistoptimizer.com to generate the layout.

Cutlist Optimizer

I generated engineering drawings for the desk drawer.

drawer

And also generated drawings for all the components.

Major Desk Components

I’ve been generally unhappy with most table leg brackets, so I designed my own. This was pretty complicated, since they were an odd size that I had to cut out of a solid block of ash.

Brackets

I made them to fit the dimensions of the table exactly and use a lag screw to anchor the legs.

bracket dimensions

To build these brackets, I laser cut a jig to ensure I cut the holes at the right places. This worked out really well using my crosscut sled and drill press.

Jig Design

The final desk came together pretty much exactly according to plan.

Final Product
By One Comment

DIY Calibration tools

I had purchased Fowler 52-520-109-0 Dial Indicator with 1″ Travel with +/-0.5% measurement accuracy.

Fowler Dial Indicator

I wanted to measure the alignment of my table saw blade and fence. You can buy tools that do this using the miter slot track with a dial gauge included for about $70. For example, this one:

Example tooling

This had fairly limited travel and I already had a dial gauge. So I designed one. I did the design while I had my morning coffee before work. I cut it while finishing my email so I built this with about 30 minutes of total time. Lockheed provided access to the laser-cutter and also provides the material for hobby use:

Component

I made the part from 1/4 inch think acrylic and manufactured it on a laser cutter (Glowforge). I tapped two M6 holes (5mm hole diameter) in the back so I could get a secure bolt.

Tool in Action

In order to cut this, I used the arrange and post processing with a 0.1778mm kerf:

Part planform

Fusion 360 renders this in a full joint analysis.

By One Comment

Math of the Kreg 720

The Pocket-Hole Jig 720 uses Kreg Automaxx™ to enable one-motion clamping by simultaneously clamping your workpiece and automatically adjusting to the exact thickness of your material (from 1/2″ to 1 1/2″). GripMaxx™ anti-slip holds the project piece secure. The manual doesn’t address how to pick the right screw length or how to set the stop outside of several settings. This isn’t good enough for me and I need to do some measurements and geometry to figure out the exact length.

Basic Block Geometry

I like to be exact. The standard angle of Kreg pocket holes is 15 degrees, the whole assembly approaches the workpiece at a fixed angle to place the start of the hole in the right distance from the bottom of the board.

If I measure this in Photoshop (after skewing to correct for image distortion), I get an angle of 58.1 degrees.

Measure Tool in Photoshop

If I measure it direct (after accounting for the angle of the desktop by zeroing out the surface), then I get 57 degrees.

Direct Measurement

The most accurate method is to measure.

Measuring \(\theta\) via x,y distances

So I took these measurements and came out with.

sd
high point (mm)43.954
low10.10
accuracy0.10.1
Δ33.854
θ57.95648317

So I have two measurements, 57.95648317 degrees or 58 degrees or 57 degrees. I’m going to go with what I measured and refine as I measure real cuts.

The geometry of this is cool: as the timber gets wider, the drill bit translates up at double the degree of the pilot hole to ensure the tip of the drill hits the center of the board. The angle of the jig and wedge is twice the angle of the screw since the drill bit angle has to be half the wedge angle if it is to intersect the base at half the width of the board. It’s designed to bring the tip of the bit out in the center of the edge of the piece being drilled and automatically compensates for the timber thickness. Because of this, if the black slope is 58° from horizontal then it is 32° off vertical and the actual angle of the pocket hole is 16°.

Armed with this angle, I have to do some geometry. Given \(t_{\text{min}}\), \(t_b\) the thickness of the board for pocket holes, \(t_T\) the thickness of the board you are screwing into, \(\theta\), the angle of the jig, and \(s\), the length of the shaft of the screw. We want to find \(D\) the length of the shaft of the pilot screw.

Geometry

From this I can calculate:

$$D = \frac{H}{\cos(15 \deg)} – \frac{s}{2} \text{ or } D = \frac{H}{\cos(\theta/2)} – \frac{s}{2} $$

$$d = \tan(\theta) \, \left( t_b -t_{ \text{min} } \right) \text{ where } \theta = 58 \deg $$

Putting these together from \(H=d_{\text{min}} + d\) we have:

$$ D = \frac{ d_{ \text{min}} + \tan(\theta) \, \left( t_b -t_{ \text{min} } \right) }{\cos(\theta/2)} – \frac{s}{2} $$

I hope to use this some day to make an online calculator.

By One Comment

Making PDFs editable

I automate everything and PDFs are so easy to fill in automatically. It’s a digital world and we just live in it.

It’s so frustrating to get a “protected form” that doesn’t allow for appending documents, automated form completion or even filling out fields. It’s silly because all of these forms are printable. Many years ago, I just created an official form from scratch myself because I couldn’t find it online. Without checking a signature, forms can’t be secure. For example, one could easily write a program that takes a picture and recreates the form. Remember, in the digital world something is either secure from math (crypto) or it isn’t. The security in the transaction is provided by authenticating the user’s email. Even better, let’s move past forms and use the authentication in a website or mobile app.

Let’s do the right thing and move past forms caught in the middle ground of insecure and not usable. I think folks lock forms to prevent changes to the document, don’t do that.

Below is the code to fix this. You will need to use linux or windows subsystem for linux. While I can’t think of an evil use case, use this responsibly. (My goal in doing this is always to fill in data into a form.)

Use a little bash to print with ghostscript. Protip: this isn’t “hacking”, this is just printing.

filename=$1
outfile="${filename%.*}_clean.pdf"
echo $outfile
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$outfile -c .setpdfwrite -f $1

By 0 Comments

Autoscoring with Matlab

While I qualified a long time ago on the M9, I never really learned to be a good shot. Now, I’m trying to learn to shoot well and wanted to automatically score my targets, keep the data, and get better.

There are apps to do this, but none of them did what I wanted. One app by Thomas Gabrowski and Justa Mili works off a photo of the target to automatically calculate the score. They also have the capability to analyze shooting groups with Windage, Elevation, Mean Radius and Extreme Spread. They have capabilities to keep track of your previous shooting sessions and monitor progress. The App costs $17.

Developing my own costs my time, but gives me flexibility to work with my targets and my system. It’s also a thing I do: grab challenges that will teach me something. It’s served me well and Matlab makes this all accessible and fun. The other thing is that apps never work exactly right. What if I want the raw data so I can calculate if I’m aiming high or low over time? All this code is on github at https://github.com/tbbooher/automatic_target_scoring.

I told my children that two key skills every digital citizen needs are the ability to process text and images. By processing text, I’m able to tell any story from any reports in digital form. This is often bank statements, hotel stays, fitness stuff or uber rides. By processing images, I’m able to understand and report on things that are happening around me.

In looking around, I found this thesis filled with some good ideas. I reached out to the author and discussed the merits of edge detection vs template matching. He didn’t have his code available. There were several papers but none were really that helpful. It was easier to start building than to spend a lot of time reading other’s approaches.

I knew there would be three steps to this: (1) registering all images to the standard, fixed, image for consistent distance, (2) finding the bullet holes/center and (3) measuring the distances from the center each hole.

Image Registration

This was harder than I thought since most registration is for two similar images. I was used to the ease of Photoshop for rapid registration. It turns out it is a hard problem to register images of different pictures of what are really different scenes, even though the structure is common. Most image registration problems are pictures of the same scene that have been taken at different angles or distances. The picture below makes this clear:

Reference and Real Image

I found two approaches that worked for image registration. The first approach was to extract the red circle and then make the circles match. Here I had to calculate and align the centers, and rescale one image to the size of the other. Color thresholding and imfindcircle were quite useful.

For the more general case, I had to use fitgeotrans which takes the pairs of control points, movingPoints and fixedPoints, and uses them to infer the geometric transformation. It does this by taking the pairs of control points, movingPoints and fixedPoints, and uses them to infer the geometric transformation. After doing this I had a set of images that were all the same size, and all in the same orientation — with bullet holes.

Registered Images

Finding the bullet holes

I was able to use this matlab post to learn that I could sample some colors in photoshop, convert the image to HSV and find shades of gray using some code from Theodoros Giannakopoulos.

The next thing I had to do was create the ability to find the center. I did this by recognizing that the center X is red and pretty distinctive — ideal for template matching using normalized cross-correlation matlab has a great description of how this works here. With this accomplished, I can find the center in a few lines, by going off this template:

Template

All together, I’m able to compute the measurements to make a picture like this (note the green circle in the middle on the X):

Result

With the image registered, the center defined and all holes discovered, I could easily calculate a score of a mean distance to the bullseye.

Problems

The problem was that I couldn’t get good consistency. The shadows were a problem on some images, on others, shots very close to one another caused confusion. It turned out that I was really good at quickly seeing the holes, better than a template matching problem. Note that when I saved the image, I updated a xls file and saved the scores as EXIF data so the image had the exact locations of the holes that I could pull out later if needed. The code below works awesome and is ideal for my solution. Best of all, I learned a lot about how to manipulate and extract data from images.

Results

So, is my shooting getting better? Not yet. In the plot below you can see my score is increasing, and the stDev of my shots is increasing as well. Now, the data aren’t uniform since I had the target at 5m and now have it at 6.5m on Oct 8. Sept 12 was with a suppressed 22 at 5m. Oct 8 was 9mm. Anyway, it’s better to know from data than to be guessing. I’m chalking this up to an improved technique that is taking some time to adjust to.

By 0 Comments

Torsion Table for Shapeoko

I needed a torsion table to make sure my Shapeoko XXL had a solid foundation. Dimensions for the Shapeoko are available here. The basic idea of a torsion table is to use two thin layers of material on either side of a lightweight core, usually a grid of beams. Torsion boxes are used in wings and vertical stabilizers. The final product can resist torsion under an applied load. The torsion box uses the properties of its thin surfaces to carry the imposed loads primarily through tension while the close proximity of the enclosed core material compensates for the tendency of the opposite side to buckle under compression.

I found some great data in the links below:

  • great collection of ideas here
  • and more ideas here
  • This post was great at getting ideas.

Marc Spagnuolo, a.k.a. “The Wood Whisperer,” put together a pretty comprehensive 20-minute-plus video on how he built his. Spagnuolo shows you how to get past the dilemma of building your first torsion box, which is: how do you construct a perfectly flat surface, before you’ve got a perfectly flat surface to assemble it on?

My design was intended to look similar to this, but I didn’t like the idea of making sure all the individual pieces were straight, so I build a design based on half-lap joints.

Example Build

Lining everything up perfectly was super easy after cutting the slots. MDF is an amazing material.

Half Lap Assembly

The end result was intended to look like this by using the Hopkins Mfg Corp Workbench Kit 90158MI.

Shapeoko Table

My end design looked like this (I always use mm for dimensions).

I used my table saw to cut down the core pieces all to the same height. A torsion box is a completely flat, very sturdy and relatively lightweight surface, and anyone designing anything structural and rectilinear should understand its principles. The concept is simple, even if construction can be tedious: Two flat, horizontal surfaces are sandwiched over a grid of crossmembers, and once the sandwich is glued shut, a rigidity much greater than that possessed by the individual parts is achieved.

Pieces Cut

I added shims to the bottom of the saw horses to make sure the base was level. I used lots of glue.

Assembly drying

By using half-lap cuts I was able to get all the spacing right. It was critical to square the boards.

Half-laps cut

Here you can see my use of pocket screws and my testing of the table to ensure it is level.

Inital design

I love using cutlist optimizer to speed up my cuts and optimize the use of the wood. I’ve designed cutting algorithms myself in the past and this online tool is fast, accurate and excellent. (https://www.cutlistoptimizer.com/). I did make a design change by ripping long strips so I could avoid the inaccuracy of all the small cuts.

Cutlist

I made a video of my design process. I made a component with half-laps cut out, replicated it with design tools, flipped a copy that I rotated 90 degrees.

Video of the Design Process

By 0 Comments

Kerf Mounted Corner Brackets

Kerf Mount Corner Brackets are great. But it takes some thinking if you are working with larger lumber. I recently purchased these and these from amazon.

The corner bracket looks like this:

The trick is figuring out where to cut the leg at 45 degrees and the kerfs, especially if the leg isn’t square. I was going to work out the geometry of this, but instead I measured the bracket, drew a horizontal profile in visio and then measured the geometry. Since the leg isn’t square, I had to decide where the bracket mounts flush. I included my drawing here in the hopes that it may be helpful to you.

There are instructions here.

By 0 Comments