Git Product home page Git Product logo

wire-bender-control's Introduction

Control Software for Arduino 3D-Wire-Bender based on Processing

This Processing sketch allows to control a 3d-wire-bending machine designed by How To Mechatronics given the associated firmware is installed on the arduino.

screenshot

Installation

Clone the repository and run the sketch in the Processing environment by opening src\WireBenderControl\WireBenderControl.pde.

To make it a stand-alone executable, Processing allows you to export a program for your specific operating system within the Processing IDE.

Features

This software provides a rudimentary interface to communicate with the machine. Features include:

  • manually controlling all stepper motors and servos (feeder, bender, bender rotation, bend pin)
  • setting step sizes for all manual controls
  • make a single bend
  • loading shapes as csv (for format, see Shapes)
  • 3d rendering of imported shape
  • calculating necessary steps to bend wire to certain shapes
  • send instructions to bender in order to bend shape

Usage

General

You need to upload the firmware to the arduino that provides a serial communication interface to communicate with the software.

Next you need to find the USB-port your arduino is connected in the ports list, select it and connect to it.

If a connection could be established, you will be able to move all the machines stepper and servo motors manually.

Since our build of the machine does not have the limit switch installed, you'll have to set the home position of the bending head manually. The home position needs to be set in order to be able to make a automatic bend or send a sequence of instructions to the bender.

Import shapes

To import a path defined by a set of points into the software, press the LOAD button and select a csv-file following this format:

x,y,z
0.0, 0.0, 0.0 
10.0, 0.0, 0.0
20.0, 10.0, 0.0
...

(for some examples shapes see examples)

The software will calculate each individual step needed to achieve this shape by bending the wire.

By pressing SEND TO BENDER the instructions are sent to the bender and the wire will be bent accordingly.

Simulation of result

The 3d view shows a simulation of the wire after it has been bent into shape.

The view can be navigated by using the mouse, where the mouse wheel zooms in / out and the left mouse button will rotate the camera when pressed.

Settings

The config file defines some constants the arudino firmware uses when executing instructions.

Most of them are some numeric constants by which some value will be multiplied in order for bending angles or feed distances to match their actual radius / length. So for example, the FEEDING_CONSTANT can be adjusted to calibrate the feeder.

Choose a higher value, and the feeder will feed more wire. The correct values for those constants depend on the actual machine (e.g. diameter of feeder head) so determine them by trial and error.

In order to adjust the values, open the config.json in any text editor, change the values and save them back to file. In the WireBenderControl window you can then go to SETTINGS and update by pressing RELOAD. This will send all the constants to the arduino.

A short description of the adjustable parameters can be found below.

"DEFAULT_PORT"              : "< default Port of the Arduino - will be set on program start >",
"FEEDING_CONSTANT"          : < affects the amount of wire fed for 1 unit >,
"Z_ANGLE_CONSTANT"          : < affects the angle the bending head rotates for 1 unit >,
"OFFSET_FOR_NEG_BEND"       : < affects the amount the bend pin travels when switching sides in order to perfom bend with negative radius >,
"BEND_ANGLE_CONSTANT"       : < affects the angle for a bend with radius bigger than 0 >,
"NEG_BEND_ANGLE_CONSTANT"   : < affects the angle for a bend with radius smaller than 0 >

Limitations

This software was developed for a university project and should be considered rather prototypical. Furthermore, it will not be maintained. Below is a list of known shortcomings and features that i did not manage to implement in the little time I had.

  • The code needs some refactoring, for sure.
  • No support for a hardware limit switch for setting the home position of the bender head is provided
  • The way the bending instructions are calculated can be improved by using a more sophisticated approach for determining the direction of rotation for the z-axis.
  • The way instructions are sent to the bender could be optimized, and an option should be implemented that allows for stopping a sequence.
  • Animation of the bending process.
  • Checking for collisions of the wire with the machine could be implemented rather easily and would be beneficial since the biggest shortcoming of the machine by design is that the bending head often collides with the already bent wire when rotations about the z-axis are performed.
  • ...

wire-bender-control's People

Contributors

martinfg avatar

Watchers

 avatar

wire-bender-control's Issues

Model Preparations

This grasshopper script converts curves into point lists in .csv format. Import the polyline (eg. dxf-format) into rhino and start the grasshopper script. An interface will help you to pick the curve, adjust the number of points, and choose a folder to save the pointlist. It will also tell you the length of the polyline, which will help to prepare the wire.

Model_Preparations.zip

improve the way a program sequence is sent to bender

  • Either send data step by step and wait for response from stepper after execution of every single step (would allow user to stop execution of sequence without threading)
  • Send sequence as whole (would either mean, that a sequence cant be stopped, or receiver would have to check, if user has sent a stop-command after the execution of every step)

fix bug (on linux?) when closing window with P3D renderer

when closing a window with P3D renderer on Ubuntu, the following error occurs:

X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 2/2, reusable (open, marked uncloseable): 0, pending (open in creation order): 2)
X11Util: Open X11 Display Connections: 2
X11Util: Open[0]: NamedX11Display[:0, 0x7f2d0400ce90, refCount 1, unCloseable false]
X11Util: Open[1]: NamedX11Display[:0, 0x7f2d04027c30, refCount 1, unCloseable false]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.