Error Correction of 3D Printers

From the very first RepRaps to the newest and latest printers off the Makerbot assembly line, nearly every consumer 3D printer has one significant shortcoming: it cannot recover from missed steps, slipped belts, or overheating stepper drivers. Although these are fairly rare problems, it does happen and is purely a product of the closed open-loop control system used in 3D printer firmware.

[Chris Barr] has come up with a rather clever solution to this problem. He’s designed a system that will detect and correct problems with the mechanics of 3D printers. It’s technically not a closed-loop control system, but it does allow him to get the absolute position of a nozzle on the build plate, detects error states, and can automatically calculate the number of motor steps per millimeter. It’s also much simpler than other closed loop control systems we’ve seen in the past, requiring only a few bits and bobs attached to the axes and to the printer controller board.

[Chris]’ system uses a magnetic encoding strip, a single chip, and a little bit of support circuitry. It’s actually not that much different from the moving axis on a desktop inkjet printer. It’s not closed loop, though; the firmware hack is only a ‘basic error correction’ that moves the nozzle back to where it should be. Although this is somewhat of a kludge, it is much simpler than refactoring the entire printer firmware.

In the video below, [Chris] demonstrates his solution for error correcting the printer by jerking his axis around during a print. The nozzle miraculously returns to where it should be, producing a usable part.

Continue reading “Error Correction of 3D Printers”

Error Detection and Correction: Reed-Solomon, Convolution and Trellis Diagrams

Transferring data without error when there is a lot of background noise is a challenge. Dr. Claude E. Shannon in 1948 provided guidance with his theory addressing the capacity of a communications channel in the presence of noise. His work quickly spread beyond communications into other fields. Even other aspects of computer use were impacted. An example is the transfer of data from a storage medium, like a hard drive or CD-ROM. These media and their sensors are not 100% reliable so errors occur. Just as Shannon’s work defines communication channel capacity it defines the transfer rate from a media surface to the read head.

Shannon told us how much could be passed through a channel but didn’t say how. Since 1948 a lot of research effort went into accurately detecting errors and correcting them. Error correction codes (ECC) add extra bits to messages, but their cost pays off in their ability to work around errors. For instance, without ECC the two Voyager spacecraft, now leaving our solar system, would be unable to phone home with the information they’ve gathered because noise would overwhelm their signals. Typically in hardware, like memory, error correction is referred to as ECC. In communications, the term forward error correction (FEC) is used.

Robust communication, or data transfer, is a combination of fancy software and tricky signal processing. I’m going to focus on the software side in this article. You may find some of these techniques useful in communicating data among your devices. While I’ll be using the term communications keep in mind this is applicable to transferring data in general.

Continue reading “Error Detection and Correction: Reed-Solomon, Convolution and Trellis Diagrams”