NBEL

NBEL BLOG

NBEL RC 1.0: Part I - Computer-Aided Mechanical Design

Please see our previous post: NBEL RC 1.0: Integrated computer-aided design of a voice-activated, LEGO-powered, Raspberry Pi-controlled, GoPro-integrated robotic car (3-1-19) to learn the background of this project.

Considering LEGO CAD

Consider this very simple set of LEGO technic bricks:

Screen Shot 2019-01-04 at 6.34.19.png

Try assemble it in your head, and you will most likely end up with a simple two wheeled bike. Ask yourself:

  1. What are the bike’s mechanical characteristics? Is it stable? How fast can it go? How much load can it carry?

  2. How would the mechanical characteristics of the bike vary between different assembly configurations (e.g. different clutch location)? Is it mechanically optimal?

  3. Can it be easily reproduced?

  4. How much would it cost? Is it cost-effective (how the cost varies between alternative pieces)?

  5. Can the inner-hidden structures can be non-destructively examined?

  6. How easy would it be to utilize parts of this design with other - specialized, or more complicated - designs?

The answers to these questions are critical for the design value of your work.

While all of the above may sound not so relevant for a simple design such as this bike, consider the same for the design of the NBEL RC 1.0:

NBEL RC 1.0

NBEL RC 1.0

This Lego design was created in NBEL Innovation Workshops and was described in our previous blog post. Focusing on its mechanics, the car has motorized steering / driving and a motorized stage for a GoPro session camera. It has a full system of shock absorption (rear and front), as well as differential gear trains.

One key question is what is the design value of the NBEL RC 1.0 in terms of: mechanics, optimization, cost effectiveness and reproduction. To optimize the RC design value, we need to approach it from a numerical point of view. It is as complex as it is simple: we need to describe our mechanical design in a mathematical-numerical format.

Screen Shot 2019-01-04 at 11.04.34.png

The question is: how?

Describing LEGO bricks and models in a numerically-driven virtual environment is a challenging endeavour, taken in 1995 by James Jessiman, who has tragically died in 1997, when he was only 26 years old. James developed the LDraw framework, which has grown to be the standard by which most designers create virtual LEGO models. You can read more about the LDraw format here: http://www.ldraw.org/.

The basics are fairly simple. First, we describe the dimensionality of our numerical representation. In the case of LDraw, 1 LDU = 4mm. Then we define a set of geometries (e.g. line types), with simple sets of coordinates.

Screen Shot 2019-01-04 at 20.33.59.png

In an LDraw .dat file, lines of numerical descriptions define the geometry. Defining a rectangle, for example, would look like:

<line type> <color> x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4

From these fundamental geometries we can define a set of geometrical primitives, which are occasionally used in LEGO brick design, such as: cylinders, rings, disks, boxes, torus, and studs. From this set of primitives, we can define a whole brick using transformation matrices (we will not dive into the details here). See example below:

Screen Shot 2019-01-04 at 11.31.26.png

The visualizations above were reformatted here from LDraw documentation. More detailed description of LDraw part authoring is given in: http://www.holly-wood.it/ldraw/authoring-en.html.

Today, the LDraw library has thousands of Lego parts, with many new ones added annually. Numerous CAD softwares, which are specifically designed for LEGO, are available. One particularly good LEGO CAD software is STUDIO 2 by BrickLink (https://studio.bricklink.com/v2/build/studio.page). STUDIO 2 is freely available to download for all common operating systems, it has an integrated renderer (with which you can create realistic pictures of your model), stability analysis system, instructions making framework and a direct link to BrickLink crowd-powered LEGO brick store.

STUDIO 2 brick library

STUDIO 2 brick library

A great resource for instructional use of STUDIO 2 is available here: https://www.bricklink.com/help.asp?helpID=2446. In NBEL, we used STUDIO 2 to design our RC 1.0 from the ground up.

CAD of NBEL RC 1.0

CAD of NBEL RC 1.0

Now, we can perform a stability check:

Stability analysis of the NBEL RC 1.0

Stability analysis of the NBEL RC 1.0

We can examine the submodules which were separately specified prior to the integration into the complete design:

NBEL RC 1.0 rotating stage for the GoPro session

NBEL RC 1.0 rotating stage for the GoPro session

We can utilize submodules to other designs (such as the differential, shock absorbing mechanism of the front wheel):

Differential, shock absorbing mechanism of the front wheel

Differential, shock absorbing mechanism of the front wheel

And we can create instructions for building:

Capture 5.PNG

Another powerful feature of STUDIO 2 is its integration with the BrickLink store. STUDIO 2 can automatically generate a brick list and then find stores from which the bricks can be purchased, including a price. For example, NBEL RC 1.0 is comprised of 663 parts, which can be distributively purchased from 79 different stores, located in 9 different countries, with a total cost of 505 NIS (~140 USD).

Capture 6.PNG

Now, when our model is numerically represented in the computer, we can use computer graphics to render it in 3D into a realistic image.

3D rendering of NBEL RC 1.0

3D rendering of NBEL RC 1.0

Finally, we can export our LEGO CAD model to other file formats, which can be used in other CAD softwares (such as AutoCad), for a higher level of integration, such as the incorporation of the microprocessor and our electrical board.

One important key file format for CAD is the STL (stereolithography) file. It essentially captures the surface of the design, using a triangulated mesh (a set of triangles), where each triangle is described with 3 vertices and a normal. You can read more about STL files in: https://all3dp.com/what-is-stl-file-format-extension-3d-printing/.

Once our LEGO design is exported to STL format, it can be viewed with AutoCAD:

NBEL RC 1.0 as STL

NBEL RC 1.0 as STL

This concludes our discussion of the mechanical design. In the next post we will explore the motors and electronics. We will show how LEGO motors can be hacked to be controlled with an external microprocessor, using a driver circuit. Stay tuned!

Elishai EzraComment