This video is about home-built linear drives. The first example is from an old printer. It's the drive of the printhead. A brushed DC motor pulls the carriage along the round guide bar using a toothed belt. But the head moves, a transmissive optical sensor scans the fine lines printed on a stripe of plastics. The two sensor outputs are connected to an Arduino Uno and through an H bridge, the microcontroller can command the motor in either direction using two output pins. The Arduino counts the number of scan lines and compares the actual value with the set point that is transmitted from a host computer through the USB interface. This type of linear drive is fast. Less than two seconds are needed to move the printhead from left to right, which equals a distance of approximately 30 cm. The motor consumes around one watt of electric power when operated at five volts. High speed means low torque. The carriage can be stopped by hand easily. Even with the fine pattern on the plastic stripe, you still can notice the carriage moving for a single step when having a closed look. Seven thousand steps are needed to move the printhead for 30 cm, thus one step equals 0.04 mm. With a linear sensor, the microcontroller can detect movement relative to the plastic stripe. If the carriage is stopped by hand, the motor is kept energized. Until the mechanism is released and the set point is reached. When deflecting the carriage manually, the microcontroller compensates the movement of a printhead caused by the side load. In doing so, backlash or slip are partially balanced by the control loop. The microcontroller detects movement in relation to the line pattern on the sensor stripe. When removing the tap from the mechanics, the carriage is controlled in such a way that the printhead follows the movement of the plastic stripe. Ensure that the sensor stripe is mounted tightly, which is done by a spring steel plate at this mechanics. Here the tooth belt is replaced by a simple cord. Even while the cord slips along the motor shaft, the microcontroller still can direct the printhead to the given set point reliably. Spindles are often used to transform rotational movement into linear movement. The motor is 6mm threaded rod is used. Whenever the thread is turned by the motor, the carriage moves along the aluminum square tubes guided by pole bearings. The brushed DC motor is from an old printer and the gear ratio of the plastics wheels is 12 to 1. The pitch of the thread is 1mm per turn. The motor must make 12 turns in order to move the carriage for 1mm, which is a large over all transmission. The speed of the linear drive is approximately 1mm per second, thus it is rather slow. But powerful movement. The sensor disc from the printer mounted at the plastic gear on the threaded rod is scanned by two transmissive optical sensors. Both sensor outputs are connected to the Arduino Uno, which can command the DC motor to spin in either direction through an H bridge. The working principle of this type of rotary encoders has been treated in a previous video. The fine line pattern on the sensor disc results in 3000 pulses per revolution. With the given pitch of 1mm per turn, the thread transforms one step into a linear movement of 0.3 micrometers, at least in theory. In practice, backlash is usually higher than the academic step width. The microcontroller can't detect the backlash, thus it can't compensate that kind of movement. Another drawback of that fine line pattern is the large number of pulses generated by the optical sensors with each revolution, which limits the rotational speed. Remember the low clock speed of the microcontroller. With two transmissive sensors and a two-th sensor disc having 4 teeth, we get 16 steps per revolution. With each step, the carriage moves 0.06mm, a resolution that is sufficient for many applications. We can also use the rotational sensor composed of resistors in the control circuit. Instead of using a second wiper, the washer side of the sensor is pulled to ground through the ball bearings, whose resistances are obviously low enough. The electric bounce is a huge drawback of this type of electro-mechanical encoder, limiting the maximum revolution speed. What about using an optical computer mouse as shown in a previous video to create another linear sensor? As you can see, it is indeed a practical motion sensor for our control circuit. We leave the change in movement along the Y-axis process by the microcontroller. The motion sensing is done relative to the underlying surface. When moving the sheet of paper by hand, the carriage follows that movement. Even when interrupting the movement by hand, the motor stays energized until the set point is switched. Deviation caused by side load is counterbalanced by the control circuit. I will do more investigations about using an optical mouse as linear sensor in a future video. When connecting a bipolar stepper motor to the threaded rod, the linear drive works even without sensor feedback. The motor is commanded by a Raspberry Pi. Without feedback, the Raspberry Pi can't detect if the set point is switched. When locking the mechanism by hand, the linear drive doesn't reach the best-knated point. When using a linear drive without feedback loop, the torque generated by the stepper motor must be sufficiently high so that the movement of the mechanism isn't interrupted unforeseen. Finally I'm using two linear drives to build a computer-controlled machine. The printed drive is mounted perpendicular to the linear drive composed of a DC motor and a threaded rod. A relay with a tiny lever moves wire up and down, transferring ink from the reservoir to an underlying sheet of paper. The working principle is similar to that of dot matrix printers. Of no more than one needle, it is inevitably a monochrome printer producing large dots with low speed. Nonetheless, that's why this machine is an illustrative way of explaining how printers work or how bitmap graphics are drawn on a computer screen. Start-pass a diameter of approximately 1 mm. That's the resulting resolution is 25.per inch. One hour passed by until the 300 x 318 pixel graphic resulting in 11,000 black dots was transferred to the paper sheet. Read more about this machine and linear drives on the project page. Thanks for watching and I'll be back.