Generated Jar [Generative Design] [TfCD]



Introduction: Generated Jar [Generative Design] [TfCD]

About: Industrial design engineer specialized in the design and development of products & services for the medical industry.

This instructable will show you how to use Generative Design to create a unique 3D Jar incorporating user input and sensor input. Generative design makes use of algorithms to generate and explore variants of a design.

In this example we will define the basic shape of a jar, then the final shape will be generated randomly within our constrains, the color will be given by the temperature sensor and the height and width will be set by user input. The user will be able to save the generated design as a .STL file, which can be used to 3D print or modify it.

Step 1: Necessary Hardware & Software

The following is the list of required elements that we will use in this example. Software is free and hardware is less than 50€, generally included in any arduino kit:

  1. Node.js: Node.js is an open source server framework. Free and runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.). It uses javascript on the server. Download and install it.
  2. Git: Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Download and install it.
  3. Arduino IDE. Download and install it.
  4. Arduino board. Most of arduino boards will work, even an Elegoo board (used in this example).
  5. Bread board. To use the Thermistor sensor.
  6. 10K Ohm NTC Thermistor. To gather temperature. It is a sensor that is generally included in arduino kits.
  7. 10K Ohm Resistor.
  8. Hookup Wires. To connect the arduino to the breadboard.

Other software/elements used to make this example (note that you do not need to download these because are included in the the code):

  1. Johnny-five: To connect the board with our server. Johnny-Five is the JavaScript Robotics & IoT Platform.
  2. Bootstrap: To style the website.
  3. OpenJSCAD: To view, download and generate the geometry.
  4. Express: Node.js framework for our "application".
  5. JavaScript library for realtime web applications - So we can send real-time data of our sensor to ur application.

Important: The amount of software/apps used in this example might be overwhelming for a person with little experience in coding. Nevertheless the step-by-step will clarify why every thing is used for.

Step 2: Connecting the Board

It's a very simple circuit as shown in the picture. As the R1 (resistor 1) value changes, Vout changes. In this case R1 will be the thermistor and its value will change relative to the temperature. Vout is connected to our analog port on the Arduino so we can monitor it.

Step 3: Install the APP

Once you have installed the required software mentioned in step one:

  1. Create a folder in your desktop. Call it generative_jar.
  2. Open the command line and cd/generative_jar. (Go to the folder with the command line). Here is a simple tutorial for users that do not have experience with the command line.
  3. Once in your folder type the following in the command line:
git clone

You will notice that a folder called TfCD_A2_Generative_Jar has been created, and it contains many files and folders. To proceed:

  1. Open the firmata.ino (inside Firmata > firmata > firmata.ino) file with your Arduino IDE.
  2. With your arduino board connected click on Upload. This will allow us to use Johnny-five to recover data from the arduino file.

Once we have this we can proceed.

Step 4: Test That Board Is Connected

In your command line type:

cd TfCD_A2_Generative_Jar
npm install
node generative.js

If everything goes fine it will look like the image. The connection is set, the temperature is being read, and if you touch your sensor it will increase the temperature (if your body is warmer than the room temperature, of course).

Step 5: Try the App Yourself

Now we can try the app by going to http://localhost:3000 in our browser. It will appear a website with 2 parameters that the user can input and a figure that will be generated automatically every time we click on Generate it Again!.

Arduino Contest 2017

Participated in the
Arduino Contest 2017

Be the First to Share


    • Puzzles Speed Challenge

      Puzzles Speed Challenge
    • CNC Contest 2020

      CNC Contest 2020
    • Secret Compartment Challenge

      Secret Compartment Challenge