RPi – Motor, Servo vs Stepper Motor

Selecting between a servo motor and a stepper motor can be quite a challenge involving the balancing of several design factors. Cost considerations, torque, speed, acceleration, and drive circuitry all play a role in selecting the best motor for your application.

Basic Differences Between Stepper and Servo Motors

Stepper and servo motors differ in two key ways, in their basic construction and how they are controlled. Stepper motors have a large number of poles, magnetic pairs of north and south poles generated either by a permanent magnet or an electric current, typically 50 to 100 poles. In comparison, servo motors have very few poles, often 4 to 12 in total. Each pole offers a natural stopping point for the motor shaft. The greater number of poles allows a stepper motor to move accurately and precisely between each pole and allows a stepper to be operated without any position feedback for many applications. Servo motors often require a position encoder to keep track of the position of the motor shaft, especially if precise movements are required.

Driving a stepper motor to a precise position is much simpler than driving a servo motor. With a stepper motor, a single drive pulse will move the motor shaft one step, from one pole to the next. Since the step size of a given motor is fixed at a certain amount of rotation, moving to a precise position is simply a matter of sending the right number of pulses. In contrast servo motors read the difference between the current encoder position and the position they were commanded to and just the current required to move to the correct position. With today’s digital electronics, stepper motors are much easier to control than servo motors.

Stepper Advantages

Stepper motors offer several advantages over servo motors beyond the larger number of poles and easier drive control. The design of the stepper motor provides a constant holding torque without the need for the motor to be powered. The torque of a stepper motor at low speeds is greater than a servo motor of the same size. One of the biggest advantages of stepper motors is their relatively low cost and availability.

Servo Advantages

For applications where high speed and high torque is needed, servo motors shine. Stepper motors peak around speeds of 2,000 RPM, while servo motors are available many times faster. Servo motors also maintain their torque rating at high speed, up to 90% of the rated torque is available from a servo at high speed. Servo motors are also more efficient than stepper motors with efficiencies between 80-90%. A servo motor can supply roughly twice their rated torque for short periods, providing a well of capacity to draw from when needed. In addition, servo motors are quite, available in AC and DC drive, and do not vibrate or suffer from resonance issues.

Stepper Limitations

For all of their advantages, stepper motors have a few limitations which can cause significant implementation and operation issues depending on your application. Stepper motors do not have any reserve power. In fact, stepper motors lose a significant amount of their torque as they approach their maximum driver speed. A loss of 80% of the rated torque at 90% of the maximum speed is typical. Stepper motors are also not as good as servo motors in accelerating a load. Attempting to accelerate a load too fast where the stepper cannot generate enough torque to move to the next step before the next drive pulse will result in a skipped step and a loss in position. If positional accuracy is essential, either the load on the motor must never exceed its torque or the stepper must be combined with a position encoder to ensure positional accuracy. Stepper motors also suffer from vibration and resonance problems. At certain speeds, partially depending on the load dynamics, a stepper motor may enter resonance and be unable to drive the load.

This results in skipped steps, stalled motors, excessive vibration and noise.

Servo Limitations

Servo motors are capable of delivering more power than stepper motors, but do require much more complex drive circuitry and positional feedback for accurate positioning. Servo motors are also much more expensive than stepper motors and are often harder to find. Servo motors often require gear boxes, especially for lower speed operation. The requirement for a gearbox and position encoder make servo motor designs more mechanically complex and increase the maintenance requirements for the system. To top it all off, servo motors are more expensive than stepper motors before adding on the cost of a position encoder.


Selecting the best motor for your application depends on a few key design criteria for your system including cost, positional accuracy requirements, torque requirements, drive power availability, and acceleration requirements. Overall, servo motors are best for high speed, high torque applications while stepper motors are better suited for lower acceleration, high holding torque applications


16 Channels Servo Control Board


RPi – A4988 stepper motor driver

The A4988 is a stepper motor driver board that has on a A4988_chip that enables control of stepper motors through arduino type programming firmware and software.
The A4988 is an utterly tested and proven solution to drive stepper motors in RepRap 3D printers, and this fact should not be overlooked. As long as the following three conditions are met, these Made in China Allegro A4988 stepper driver boards seem to be bullet-proof workhorses:

  1. The stepper driver boards should not be inserted backwards in their respective slots on the controller board.
  2. The stepper cables should not be disconnected from the boards while powered on.
  3. Proper airflow (i.e. active cooling or in other words, a fan) should be provided.

The alternative DRV8825 board, with increased 1/32 step mode is slightly more expensive.

Both the the A4988 and DRV8825 boards are interchangeable (note how you put them in), and should work the same on any 3D printer or similar system.

The following table compares Made in China A4988 Stepper driver boards vs DRV8825 ones, for RepRap use:

A4988 DRV8825
Availability very widely available widely available
Approx. price $6.80 / 5 pieces $10 / 5 pieces
Max. theoretical current 2A 2.5A
Max. microsteps 16 32
PCB color Green / Red Purple
Stepper current adjust. trimpot Yes, near Dir pin Yes, near En pin
Typical Rs value 0.05 Ohm or
0.1 Ohm or
0.2 Ohm
0.1 Ohm
Vref formula (*) I_TripMax= Vref/(8*Rs) I_TripMax= Vref/(5*Rs)
Thermal Overload Protection (**) Yes Yes
PCB layers 2 4
Small heatsink included (***) Almost always Sometimes not
Active cooling required? Recommended Recommended
IC packaging 5x5mm 28-lead QFN 9.7×6.4mm 28HTSSOP



DSD’s Sludge Vessel – Clean Harbour I

Maiden voyage of DSD’s sludge vessel Clean Harbour 1  (Date: 5 Mar 2015)
Clean Harbour 1, the Drainage Services Department (DSD) sludge vessel built under the Harbour Area Treatment Scheme (HATS) Stage 2A, set sail today (March 5). Clean Harbour 1, together with the new Clean Harbour 2, will be responsible for delivering all sludge from the Stonecutters Island Sewage Treatment Works (SCISTW) to the sludge treatment facility in Tuen Mun, significantly minimising the traffic and environmental impacts arising from land transport.

Officiating at the maiden voyage ceremony, the Secretary for the Environment, Mr Wong Kam-sing, said the HATS has significantly improved the water quality of Victoria Harbour after years of efforts. All closed beaches in Tsuen Wan have been re-opened, the suspended Cross-Harbour Swimming Race was revived in 2011 and the Hong Kong International Dragon Boat Races have been held in the Harbour again in recent years.

He pointed out that upon commissioning in the third quarter this year, the HATS will be able to treat all the sewage generated on both sides of the harbour, thereby further improving the water quality of the harbour in the long run. He added that further to this year’s Policy Address regarding the initiatives on promoting water-friendly culture and activities, the Government plans to develop more water activities at the harbour with a view to enhancing citizens』 living standards and lifting the international image of Hong Kong.

The Director of Drainage Services, Mr Daniel Chung, also officiated at the ceremony. He said, 「After the commissioning of the HATS Stage 2A, the sludge generated daily at SCISTW is anticipated to increase from 600 tonnes to 800 tonnes, and ultimately to 1 200 tonnes. We have built the first two environmentally friendly cargo vessels in Hong Kong for sludge delivery to minimise the traffic and environmental impacts arising from sludge delivery. This is the first time that a works department of the Government has built vessels. Integrated with the latest environmental protection technology, the vessels will assist in the daily operation of the department and provide cleaner services.」

The HATS Stage 2A will collect sewage from the northern and southwestern parts of Hong Kong Island and convey it to SCISTW for treatment. The main works were completed in January this year and the project team is now conducting a six-month testing and commissioning stage. The facilities are anticipated to be commissioned in the third quarter of 2015.

Other officiating guests at today’s ceremony included the Chairman of the Sham Shui Po District Council, Mr Kwok Chun-wah, and the District Officer (Sham Shui Po), Mr Benjamin Mok.

Ends/Thursday, March 5, 2015



IMO number 9708277
Ship type Waste Disposal Vessel
Flag Hong Kong
Gross Tonnage 2190
Summer Deadweight (t) 2176
Length Overall (m) 70
Beam (m) 18
Draught (m)
Year of Built 2015
Place of Built
Registered Owner


Vessel Name Registered Owner Year

Anycubic I3 Mega – dual watch winder

This is a 3D printed double watch winder which powered by a 3K1655 gear motor which powered by a 5V usb power supply from any mobile phone and controlled by an external 7 days x 24 hours programmable timer.

In order to protect and hold the watches in place, flexible pad was made from the insulation tube for the hose of air conditioner. There is a wide range of size for your choice.

Hints and tips for using a watch winding:

  1. Timer turns on at intervals (i.e. At least 3 times a day) which noise of motor/gear was not interfering your daily living and stored in a place with stable temperature and humidity (i.e. Stored in a enclosed cupboard and placed over a absorber);
  2. The USB power supply (i.e. Use good quality 5V power supply) shall be safe to operate without hazard of fire;
  3. All the watches can be winded properly and ensure that it can be used by you at any time without adjustment of time (i.e. Set the time correctly at first and then hand winding/swing until it is moved prior to insert onto the cups of winder. ;
  4.  It must be secured hold in the cups of winder without falling off from the winder (i.e. Use correct size of pad to suit your watch. If it is possible, please set the winder in inclined position to prevent rolling out of watches) during prolong winding for months.

Anycubic I3 Mega – print size hacks

With below modifications, size of printing was changed to  210 x 210 x 233 mm. First of all, the gantry was risen and the connector of hot end and cooling fans were relocated to back of lead screw.

  1. Gantry was risen by (i.e. 28 mm) fastening two screws instead 4 screws and lowered down the end stops of Y-axis carriages.

2. Connector for cables of two cooling fans and hot end was relocated to back of slides with the below connector enclosure and a stool. 3. Machine setting in Cura shall be changed and Marlin firmware shall be used. Search in Configuration.h for Z_MAX_POS 206  and change it to 234 (i.e. 233+1) https://www.youtube.com/watch?v=6Urru7IsFrI


Magic Lantern – Canon EOS Cameras

Magic Lantern is a free software add-on that runs from the SD/CF card and adds a host of new features to Canon EOS cameras that weren’t included from the factory by Canon.




  • Analog / digital gain adjustments.
  • Selectable input source.
  • Toggle wind filter.
  • Live audio monitoring through with headphones.
  • Beep / test tones.
  • Not available on all models – please check the feature matrix.


  • Analog / digital gain adjustments.
  • Selectable input source.
  • Toggle wind filter.
  • Live audio monitoring through with headphones.
  • Beep / test tones.
  • Not available on all models – please check the feature matrix.


  • Zebras for under/over exposed areas.
  • Focus peaking for quickly checking focus.
  • Magic Zoom window to fine-tune focus.
  • Cropmark overlays for 16×9 bars or any custom shape.
  • Overlay a ghost image in live view.
  • Spotmeter in live view.
  • False color for precise exposure control.
  • RGB histogram with RAW support.
  • Waveform for perfect green screen lighting.
  • Vectorscope for color tones.


  • Full control over H264 bitrate.
  • Full control of recording framerate.
  • Record HDR video.
  • Custom vignetting for lens correction.
  • Record 14-bit uncompressed RAW video to your CF/SD card.
  • Experimental 2.5K/3K/4K with 10/12/14-bit RAW video (uncompressed or LJ92).


  • Bracketing for exposure, flash, or depth-of-field.
  • In-camera intervalometer.
  • Custom bulb timer for extra-long exposures.
  • Motion detection.
  • Silent pictures without shutter actuation.
  • Record voice tags for photos / videos.


  • Trap focus.
  • Follow focus.
  • Rack focus.
  • Focus stacking.
  • Custom AF patterns.
  • DOF calculator (diffraction-aware).
  • Automatic AFMA calibration (DotTune).


  • Program your own camera!
  • Write Lua scripts in any text editor – no special setup needed!
  • Change any ML settings from scripts (menu API).
  • Change most Canon settings from scripts (WIP).
  • In-camera text editor and calculator.
  • Games (implemented as Lua scripts).

CHDK – Canon Hack Development Kit 

CHDK – Canon Hack Development Kit

During the power on process of Canon 「Powershot A610」, CHDK is loading into memory of camera via SD card.  It is upgraded to have RAW and extra features with this firmware.

  • RAW – CHDK can record raw files, giving you access to every bit of data the sensor saw, without compression or processing. Raw files can be manipulated on the camera, or processed on your PC. CHDK supports the open DNG raw standard.
  • Override Camera parameters – Exposures from 2048s to 1/60,000s with flash sync. Full manual or priority control over exposure, aperture, ISO and focus.
  • Bracketing – Bracketing is supported for exposure, aperture, ISO, and even focus.
  • Video Overrides – Control the quality or bitrate of video, or change it on the fly. Extended video clip length – 1 hour or 2GB.
  • Scripting – Control CHDK and camera features using uBASIC and Lua scripts. Enables time lapse, motion detection, advanced bracketing, and much more. Many user-written scripts are available on the forum and wiki.
  • Motion detection – Trigger exposure in response to motion, fast enough to catch lightning.
  • Edge overlay – Detect the edges in a scene, and display them later. Ideal for timelapses, stop-motion, stereography and much more.
  • Live Histogram – CHDK includes a customizable, live histogram display, like those typically found on more expensive cameras. (RGB, blended, luminance and for each RGB channel)
  • Zebra-Mode – Displays under and overexposure areas live on the screen.
  • GRIDS – Create custom grids and display whichever one suits your shooting conditions.
  • Multi-Lingual Interface – CHDK supports about 22 languages, and adding more languages is simple.
  • DOF Calculator – Display detailed DOF information on the screen.
  • Customizable OSD – Improved display of battery status, free space, camera parameters, and much more. Fully customizable with an on-screen editor.
  • Filebrowser – Manage files without a PC.
  • Textreader – Display text files on your camera.
  • Games – Play Reversi, Sokoban, Mastermind, 4-in-a-Row, Tetris, Snake or Sudoku on your camera.
  • Calendar
  • USB Remote – Simple DIY remote allows you to trigger exposures or scripts.
  • PTP Extension – Remote control and display from a PC
  • Benchmark – Compare the performance of your SD cards.
  • User Menu – Edit your own customizable User-Menu for fast access to often used features.
  • Battery Indicator – Always on
  • Ability to control dark frame subtraction.