3D Print Babbage's Difference Engine No.2

A fully functional replica of Charles Babbage's Difference Engine No.2 with 3D printed parts

Similar projects worth following
Imagine a world where computation began with gears and steam-powered machinery. Enter Charles Babbage, a visionary mathematician and inventor who conceptualized the world's first mechanical computer, the Difference Engine No. 2, back in the 19th century. This groundbreaking device was designed to perform complex mathematical calculations, heralding the dawn of computing technology. Its intricate series of interlocking gears, cranks, and cylinders laid the foundation for modern computers.

In the spirit of celebrating Babbage's genius and the steampunk ethos, I've embarked on an ambitious project: the replication of Babbage's Difference Engine No. 2 using modern technology, namely 3D printing.

Through the marriage of 19th-century innovation and 21st-century manufacturing techniques, this project stands as a testament to the enduring influence of Babbage's legacy and the captivating allure of steampunk culture.


Here I am presenting you the first functional trial piece.

This trail piece has two figure wheels axis, and perform cacluation for linear functions. In the video above, I used the following function as example

What is the Difference Engine

The Difference Engine was a pioneering mechanical calculator designed by Charles Babbage in the 19th century. It aimed to automate mathematical calculations by using a series of interlocking gears and levers to compute complex polynomial functions. This innovative machine, composed of thousands of precision-made parts, represented a breakthrough in early computing, eliminating human error inherent in manual computations. Though never fully realized during Babbage's lifetime due to funding and technical limitations, the conceptualization and design of the Difference Engine laid the groundwork for modern computing principles and stand as a testament to Babbage's visionary contributions to the field of technology.

The replicas

The replication efforts of the Difference Engine have been a testament to human determination and technological innovation. Inspired by Charles Babbage's visionary designs, engineers and enthusiasts have meticulously reconstructed this mechanical marvel through a blend of historical research, advanced manufacturing techniques, and a deep understanding of Babbage's original plans. These endeavors involve deciphering cryptic blueprints, overcoming intricate design flaws, and reengineering the machine's components to suit modern materials and techniques. The aim is not just to recreate a historical artifact but to honor Babbage's legacy while showcasing the evolution of computing, providing invaluable insights into early technological advancements and pioneering the fusion of historical knowledge with cutting-edge manufacturing methods.

Figure: Full scale replica of the Difference Engine No.2 by the London Science Museum. Only two such replicas were made, one in the London Science Museum, one in private collection.

In the spirit of celebrating Babbage's genius and the steampunk ethos, I've embarked on an ambitious project: the replication of Babbage's Difference Engine No. 2 using modern technology, namely 3D printing. The design files will be open-source, enabling anyone to create replicas of such machines, fostering accessibility and making replication feasible for all.


This trial piece stands as a testament to the intricate design and functionality of Babbage's ingenious invention. It convincingly demonstrates that achieving the precision necessary for replicating the Difference Engine using 3D printed parts is indeed feasible.

The larger-scale replica of the Difference Engine No. 2 is currently taking shape in the design phase. The endeavor involves meticulous attention to detail, precision engineering, and a passion for preserving the legacy of Babbage's pioneering work in computing.

External Links

My YouTube Channel:

My Bilibili Channel (only in Chinese): 


(Video in Chinese)

  • Construct the trial piece

    MechRedPanda11/27/2023 at 05:33 0 comments

    Welcome back, everyone, to the fourth episode of the Difference Engine Replication Project with Mechanical Panda! In this segment, I'll share the journey of creating a prototype, aiming to validate the principles behind the difference engine using 3D printing technology.

    The main objective behind crafting this prototype was twofold: to test the strength and tolerances of 3D-printed parts and to validate the rationality of the design blueprint. Think of it as a preliminary research project for the grand-scale difference engine. Although small in scale, every structural aspect and layout of this machine mirrors the full-sized difference engine.

    A trial piece constructed by the London Science Museum before they constructing the full scale replica.

    One of the first hurdles in replicating the difference engine was sourcing the design files. You might ask, why not simply replicate Babbage's blueprints? Well, Babbage left behind a couple of "trapdoors" in his design. Firstly, his drawings lacked any annotations or explanatory notes. His intricate designs remained cryptic for over a century, further complicated by his unique symbol system designed for the machine's control sequence. Additionally, Babbage unwittingly designed a significant bug in the machine, mirroring the blunder of reversing the rotation direction of an entire set of figure wheels.

    Thankfully, the Science Museum in London guided me through these pitfalls. Their comprehensive 400-page analysis deciphered Babbage's original drawings and provided a fix for this bug. Unfortunately, their restored blueprints are not publicly available, and the difference engine's original design materials were based on brass and cast iron, vastly differing from my 3D-printed plastic replication. These differences in material strength and tolerances necessitated a complete redraw of all components.

    The centerpiece, the figure wheel, determined the entire machine's size. After several trials, I settled on a 60mm size for the figure wheel, allowing the maximum dimensions of the test engine to be 240mm, perfectly suiting my printer's capacity. The choice of a 20mm stainless steel tube as the driving shaft for the figure wheel prompted a recalibration of all other parts’ sizes and positions.

    Despite encountering conflicts in parts' motion paths during assembly due to oversights in the blueprint, redesigning through 3D printing offered advantages. The original design required multiple independent parts and subsequent welding, introducing assembly errors, which 3D printing's integrated manufacturing process effectively mitigated. Every part of this prototype, excluding the driving shaft and nuts, was meticulously crafted using a FDM 3D printer, with a total printing duration of around three days.

    After nearly two months of dedication, I finally completed this youthful rendition of the difference engine. However, limited by its eight figure wheels, this "Youth Edition" can only store two four-digit numbers, capable of computing only linear functions. Nevertheless, this prototype's construction validates the feasibility of replicating a difference engine through 3D-printed parts, meeting the mechanical strength and precision required for its operation, albeit with alterations to the original design.

    Yet, this prototype merely marks a small milestone in the replication of the difference engine. Due to its limited number of figure wheels and lack of a control system, I am already designing a more comprehensive model. If you’re intrigued by the journey of this replication project or keen on following the progress of my ongoing endeavors, don’t forget to subscribe!

    Until next time, this is Mechanical Panda bidding farewell for now!

  • Carry Mechanism

    MechRedPanda11/26/2023 at 22:12 0 comments

    In the previous log, we delved into how the Difference Engine uses mirrored figure wheels to perform addition. You might wonder: what happens when the sum of two numbers exceeds 9? Today, we'll explore how the Difference Engine accomplishes the "carry" operation.

    Imagine a Difference Engine's  figure wheel capable of displaying digits from 0 to 9, vertically stacked in three figure wheels representing units, tens, and hundreds. Together, they cover a range from 000 to 999. Each figure wheel's numbers cyclically repeat after 9, resetting to 0. The "carry" refers to when a digit surpasses 9, necessitating an increase of 1 in the higher digit.

    Three figure wheels stacking together, storing a three-digit number 000

    The engine's carry system operates in two stages: the carry warning and the carry. The carry warning mechanism consists of a lever, base, and spring clamp with three grooves on the lever – labeled as first, second, and third positions. As values in the figure wheel surpass 9, protrusions around the figure wheel engage with the lever, initiating the carry alert phase. During this phase, the lever moves between the first and second positions, alerting the system of a potential carry.

    Warning lever, latch and warning limb (placement of figure wheel is indicative) reproduced by the London Science Museum. Figure taken from the DE2_TD manual

    Moving into the carry phase, the carry lever rotates around its axis. When the carry lever is in the first position, it remains disengaged. However, if pushed to the second position, it interacts with the higher-order lever, triggering the next phase. This connection pushes the higher-order figure wheel, incrementing its value by 1 through a ratchet mechanism.

    The reason the engine doesn't directly drive the higher-order registers from the lower ones is to account for special scenarios like continuous carries. For instance, in the computation of 99 + 1, the units digit requires a carry, and as the tens place also crosses 9, a simultaneous carry must trigger in the hundreds place. This intricate design facilitates continuous carries by setting the carry levers at a specific angle, allowing each digit to trigger the next without overwhelming the system's load. Unlike a direct driving mechanism, this design scalability allows for an expandable carry system, adaptable to different register configurations without overburdening the material's strength.

    This extendable design philosophy permeates the Difference Engine, reflecting Charles Babbage's aspiration to create a universal calculating machine. If you want to explore more about the Difference Engine's design or follow the progress of my replicated version, don't forget to subscribe. This is Mechanical Panda, signing off until our next log!

  • Figure Wheels

    MechRedPanda11/26/2023 at 05:57 0 comments

    Figure Wheels and Sector wheels

    The figure wheels are made from 40-teeth gear. Each figure wheel can store one digit (0 to 9). 

    The nerigboring figure wheels are connected by a sector wheel, which is a section of a 40-teeth gear.

    The combination of figure wheels and sector wheel can perform additions.

    I chose the size of figure wheel to be 60mm, so that it is not too small and hard to print, and not too large to fit in my 3D printer.

    3D printed figure wheels
    Figure wheel numbers
    Figure wheel numbers

  • The Difference Engine No.2

    MechRedPanda11/26/2023 at 05:51 0 comments

    The story of the Difference Engine No. 2 finds its roots in the pioneering work of a young mathematician named Charles Babbage. In the early 19th century, Babbage presented a short paper titled "A note respecting the application of machinery to the calculation of astronomical tables" at the Royal Astronomical Society, marking the beginning of a groundbreaking endeavor.

    A replica of the Difference Engine No.2 built by the London Science Museum based on Charles Babbage's drawings. Credit: London Science Museum
    A replica of the Difference Engine No.2 built by the London Science Museum based on Charles Babbage's drawings. Credit: London Science Museum

    Living in an era when the first industrial revolution had mostly unfolded, complex mathematical calculations had become integral in fields such as finance, navigation, and military applications. The need for accurate computations was crucial - from determining the latitude and longitude of ships on long voyages to calculating firing tables for artillery and aiding astronomers in their daily astronomical computations.

    During this time, mathematical tables served as indispensable tools, offering precomputed values for various functions, simplifying arithmetic and reducing the margin of error in calculations. However, creating these tables was a laborious process that relied on human computers—individuals who manually executed computations based on algorithms designed by mathematicians. This method was not only resource-intensive but also prone to errors, potentially leading to significant consequences such as ships getting lost at sea.

    Charles Babbage was intrigued by this problem and envisioned a solution that would eliminate human errors from mathematical computations. His idea, unlike others at the time, aimed to reduce errors by reducing human involvement. In 1821, Babbage expressed his desire to his friend John Herschel, stating, "If we could only get the machine to do the calculations!"

    In his 1822 paper, Babbage proposed the construction of a mechanical device that could automatically compute complex mathematical functions using gears, levers, and rotating cylinders. This machine aimed to expedite and lower the cost of creating mathematical tables, ultimately rendering other mathematicians and human computers obsolete - a concept that aligned with the reduction of human error and increased efficiency.

    Named the "Difference Engine," referencing the method of finite differences, Babbage's machine embarked on a challenging journey. From 1822 to 1833, with funding from the British government, Babbage and his engineering partner completed a fraction of the Engine, comprising approximately 1/7th of the computational components, which alone consisted of around 2,000 parts. Yet, due to difficulties in machining parts and conflicts among partners, the project faced constant delays and budget overruns.

    Demonstration_model_of_Babbage’s_Difference_Engine_No_1,_19th_century, Credit: London Science Museum
    Demonstration model of Babbage’s Difference Engine No.1, Credit: London Science Museum

    Ultimately, in 1833, the British government terminated funding, having already invested a substantial sum, around £17,500 - a significant amount considering it could have purchased 22 brand-new steam locomotives in that era.

    However, Babbage was undeterred by the failure of the Difference Engine project. He began envisioning an even more advanced machine - the Analytical Engine - a universal mechanical computer that could compute any mathematical function. Although never fully realized, the principles of the Analytical Engine influenced Babbage's reworking of the Difference Engine.

    Between 1847 and 1849, Babbage redesigned the Difference Engine, creating the Difference Engine No. 2. This newer design significantly simplified the structure, requiring around 8,000 parts, roughly a quarter of his initial estimate for the complete Engine. Despite his efforts to seek funding from the British government again, he faced rejection from the Prime Minister.

    Charles Babbage passed away in 1871, leaving behind numerous designs for both the Difference Engine and the Analytical Engine. These designs, known as the Babbage Papers, were donated by his...

    Read more »

View all 4 project logs

Enjoy this project?



ysonic2021 wrote 12/08/2023 at 04:23 point

woo, so interesting! I like it....

  Are you sure? yes | no

Will wrote 12/02/2023 at 18:43 point

You may be interested in this site: 

They are going through Babbage's papers and summarising them, with the eventual aim of building the Analytical Engine.

  Are you sure? yes | no

MechRedPanda wrote 12/02/2023 at 20:52 point

Thanks for the pointer! I don't know they have achieved this far in looking at and understanding the engine

  Are you sure? yes | no

Maribell wrote 11/30/2023 at 08:03 point

Seeing the 3D printing of Babbage's Difference Engine No.2 is like time travel with a cool tech upgrade! It's amazing how they bring an old invention to life. And hey, just like that, picture digging into Microbiology dissertation topics  that mix old and new, like solving puzzles about tiny living things using the latest tech

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates