How Accurate Is Microstepping Really?

Stepper motors divide a full rotation into hundreds of discrete steps, which makes them ideal to precisely control movements, be it in cars, robots, 3D printers or CNC machines. Most stepper motors you’ll encounter in DIY projects, 3D printers, and small CNC machines are bi-polar, 2-phase hybrid stepper motors, either with 200 or — in the high-res variant — with 400 steps per revolution. This results in a step angle of 1.8 °, respectively 0.9 °.

Can you increase the resolution of this stepper motor?

In a way, steps are the pixels of motion, and oftentimes, the given, physical resolution isn’t enough. Hard-switching a stepper motor’s coils in full-step mode (wave-drive) causes the motor to jump from one step position to the next, resulting in overshoot, torque ripple, and vibrations. Also, we want to increase the resolution of a stepper motor for more accurate positioning. Modern stepper motor drivers feature microstepping, a driving technique that squeezes arbitrary numbers of microsteps into every single full-step of a stepper motor, which noticeably reduces vibrations and (supposedly) increases the stepper motor’s resolution and accuracy.

On the one hand, microsteps are really steps that a stepper motor can physically execute, even under load. On the other hand, they usually don’t add to the stepper motor’s positioning accuracy. Microstepping is bound to cause confusion. This article is dedicated to clearing that up a bit and — since it’s a very driver dependent matter — I’ll also compare the microstepping capabilities of the commonly used A4988, DRV8825 and TB6560AHQ motor drivers.

Continue reading “How Accurate Is Microstepping Really?”

Hands-On The Shaper Origin: A Tool That Changes How We Build

I bet the hand saw really changed some things. One day you’re hacking away at a log with an ax. It’s sweaty, awful work, and the results are never what you’d expect. The next day the clever new apprentice down at the blacksmith’s shop is demoing his beta of his new Saw invention and looking for testers, investors, and a girlfriend. From that day onward the work is never the same again. It’s not an incremental change, it’s a change. Pure and simple.

This is one of those moments. The world of tools is seeing a new change, and I think this is the first of many tools that will change the way we build.

Like most things that are a big change, the components to build them have been around for a while. In fact, most of the time, the actual object in question has existed in some form or another for years. Like a crack in a dam, eventually someone comes up with the variation on the idea that is just right. That actually does what everything else has been promising to do. It’s not new, but it’s the difference between crude and gasoline.

My poetic rasping aside, the Shaper Origin is the future of making things. It’s tempting to boil it down and say that it’s a CNC machine, or a router. It’s just, more than that. It makes us more. Suddenly complex cuts on any flat surface are easy. Really easy. There’s no endless hours with the bandsaw and sander. There’s no need for a 25,000 dollar gantry router to take up half a garage. No need for layout tools. No need to stress about alignment. There’s not even a real need to jump between the tool and a computer. It can be both the design tool and the production tool. It’s like a magic pencil that summons whatever it draws. But even I had to see it to believe it.

Continue reading “Hands-On The Shaper Origin: A Tool That Changes How We Build”

Tools Of The Trade – Test And Programming

In our final installment of Tools of the Trade (with respect to circuit board assembly), we’ll look at how the circuit board is tested and programmed. At this point in the process, the board has been fully assembled with both through hole and surface mount components, and it needs to be verified before shipping or putting it inside an enclosure. We may have already handled some of the verification step in an earlier episode on inspection of the board, but this step is testing the final PCB. Depending on scale, budget, and complexity, there are all kinds of ways to skin this cat.

Continue reading “Tools Of The Trade – Test And Programming”

RGB LEDs: How To Master Gamma And Hue For Perfect Brightness

You would think that there’s nothing to know about RGB LEDs: just buy a (strip of) WS2812s with integrated 24-bit RGB drivers and start shuffling in your data. If you just want to make some shinies, and you don’t care about any sort of accurate color reproduction or consistent brightness, you’re all set.

But if you want to display video, encode data in colors, or just make some pretty art, you might want to think a little bit harder about those RGB values that you’re pushing down the wires. Any LED responds (almost) linearly to pulse-width modulation (PWM), putting out twice as much light when it’s on for twice as long, but the human eye is dramatically nonlinear. You might already know this from the one-LED case, but are you doing it right when you combine red, green, and blue?

It turns out that even getting a color-fade “right” is very tricky. Surprisingly, there’s been new science done on color perception in the last twenty years, even though both eyes and colors have been around approximately forever. In this shorty, I’ll work through just enough to get things 95% right: making yellows, magentas, and cyans about as bright as reds, greens, and blues. In the end, I’ll provide pointers to getting the last 5% right if you really want to geek out. If you’re ready to take your RGB blinkies to the next level, read on!

Continue reading “RGB LEDs: How To Master Gamma And Hue For Perfect Brightness”

Fractals Among Us

Think not of what you see, but what it took to produce what you see

Benoit Mandelbrot

Randomness is all around you…or so you think. Consider the various shapes of the morning clouds, the jagged points of Colorado’s Rocky Mountains, the twists and turns of England’s coastline and the forks of a lightning bolt streaking through a dark, stormy sky. Such irregularity is commonplace throughout our natural world. One can also find similar irregular structures in biology. The branch-like structures in your lungs called Bronchi, for instance, fork out in irregular patterns that eerily mirror the way rivers bifurcate into smaller streams. It turns out that these irregular structures are not as irregular and random as one might think. They’re self-similar, meaning the overall structure remains the same as you zoom in or out.

The mathematics that describes these irregular shapes and patterns would not be fully understood until the 1970s with the advent of the computer. In 1982, a renegade mathematician by the name of Benoit Mandelbrot published a book entitled “The Fractal Geometry of Nature”.  It was a revision of his previous work, “Fractals: Form, Chance and Dimension” which was published a few years before. Today, they are regarded as one of the ten most influential scientific essays of the 20th century.

Mandelbrot coined the term “Fractal,” which is derived from the Latin word fractus, which means irregular or broken. He called himself a “fractalist,” and often referred to his work as “the study of roughness.” In this article, we’re going to describe what fractals are and explore areas where fractals are used in modern technology, while saving the more technical aspects for a later article.

Continue reading “Fractals Among Us”

Tearing Into Delta Sigma ADCs Part 2

In part one, I compared the different Analog to Digital Converters (ADC) and the roles and properties of Delta Sigma ADC’s. I covered a lot of the theory behind these devices, so in this installment, I set out to find a design or two that would help me demonstrate the important points like oversampling, noise shaping and the relationship between the signal-to-noise ratio and resolution.

Modulator Implementation

modulatorCheck out part one to see the block diagrams of what what got us to here. The schematics shown below are of a couple of implementations that I played with depicting a single-order and a dual-order Delta Sigma modulators.

schematicBasically I used a clock enabled, high speed comparator, with two polarities in case I got it the logic backwards in my current state of burn out to grey matter ratio. The video includes the actual schematic used.

Since I wasn’t designing for production I accepted the need for three voltages since my bench supply was capable of providing them and this widget is destined for the drawer with the other widgets made for just a few minutes of video time anyway. Continue reading “Tearing Into Delta Sigma ADCs Part 2”

Lessons In Small Scale Manufacturing From The Othermill Shop Floor

Othermachine Co. is not a big company. Their flagship product, the Othermill, is made in small, careful batches. As we’ve seen with other small hardware companies, the manufacturing process can make or break the company. While we toured their factory in Berkeley California, a few interesting things stood out to us about their process which showed their manufacturing competence.

It’s not often that small companies share the secrets of their shop floor. Many of us have dreams of selling kits, so any lessons that can be learned from those who have come before is valuable. The goal of any manufacturing process optimization is to reduce cost while simultaneously maintaining or increasing quality. Despite what cynics would like to believe, this is often entirely possible and often embarrassingly easy to accomplish.

Lean manufacturing defines seven wastes that can be optimized out of a process.

  1. Overproduction: Simply, making more than you currently have demand for. This is a really common mistake for first time producers.
  2. Inventory: Storing more than you need to meet production or demand. Nearly every company I’ve worked for has this problem. There is an art to having just enough. Don’t buy one bulk order of 3,000 screws for six months, order 500 screws every month as needed.
  3. Waiting: Having significant delays between processes. These are things ranging from running out of USB cables to simply having to wait too long for something to arrive on a conveyor belt. Do everything you can to make sure the process is always flowing from one step to another.
  4. Motion: If you have a person walking back and forth between the ends of the factory to complete one step of the manufacturing process, this is wasted motion.
  5. Transport: Different from motion, this is waste in moving the products of each individual process between sections of the assembly.
  6. Rework: Get it right the first time. If your process can’t produce a product that meets specifications, fix the process.
  7. Over-processing: Don’t do more work than is necessary. If your part specifies 1000 hours of runtime don’t buy a million dollar machine to get 2000 hours out of it. If you can find a way to do it with one step, don’t do it with three.

IMG_0371

The first thing that stuck out to me upon entering Othermachine Co’s shop floor is their meticulous system for getting small batches through the factory in a timely manner. This allows them to scale their production as their demand fluctuates. CNCs and 3D printers are definitely seasonal purchases; with sales often increasing in the winter months when hackers are no longer lured away from their workstations by nice weather.

As the seven sins proclaim. It would be a bad move for Othermachine Co. to make too many mills. Let’s say they had made an extra 100 mills while demand was at a seasonal low. If they found a design or quality problem from customer feedback they’d have to commit to rework, potentially throwing away piles of defective parts. If they want to push a change to the machine or release a new model they’d either have to rework the machines, trash them, or wait till they all sold before improving their product. Even worse, they may find themselves twiddling their thumbs waiting for their supply to decrease enough to start manufacturing again. This deprives them of opportunities to improve their process and leads to a lax work environment.

One way to ensure that parts are properly handled and inventory is kept to a minimum is with proper visual controls. To this end, Othermachine Co has custom cardboard bins made that perfectly cradle all the precision parts for each process in their own color coded container. Since the shop floor is quite small, it lets them focus on making spindle assemblies one day and motion assemblies another without having to waste time between each step. Also, someone can rekit the parts for a recently completed step easily without interrupting work on the current process going on.

IMG_0373

It’s hard to define what’s over processing and what isn’t. My favorite example of what isnt, and something I’ve fought for on nearly every factory floor I’ve worked on is proper torque limiting screwdrivers. They’re a little expensive, but they are a wonderful tool that helps to avoid costly rework and over processing. For example, let’s say you didn’t have a torque limiting screwdriver. Maybe your customers would complain that occasionally a screw came loose. Now, one way to solve this would be the liberal application of Loctite. Another way would be an additional inspection step. Both of these are additional and completely uneccessary steps as most screws will hold as long as they are torqued properly.

In one factory I worked in, it was often a problem that a recently hired worker would overtorque a screw, either stripping it or damaging the parts it was mating together. A torque limiting screwdriver takes the worker’s physical strength out of the equation, while reducing their fatigue throughout the day. It’s a win/win. Any time a crucial step can go from unknown to trusted with the application of a proper tool or test step it is worth it.

Another section where Othermachine Co. applied this principle is with the final machining step for the CNC bed. The step produces a large amount of waste chips. Rather than having an employee waste time vacuuming out every Othermill after it has gone through this process, they spent some time designing a custom vacuum attachment. This essentially removed an entire production step. Not bad!

IMG_0396 (2)

With the proper management of waste it is entirely possible to save money and improve a process at the same time. It takes a bit of training to learn how to see it. It helps to have an experienced person around in order to learn how to properly respond to them, but with a bit of practice it becomes a skill that spreads to all areas of life. Have any of you had experience with this kind of problem solving? I’ve really enjoyed learning from the work stories posted in the comments.