Embroidery machines are a combination of an industrial sewing machine and a computer controlled XY frame or pantograph.
There are a large number of machine manufacturers, with their own internal machine formats.
Most machine manufacturers with handle the .dst or digital stitch tajima format, with an import function to convert these to internal machine code.
Due to the original input source for these machines being 8bit paper tape, there are a limited set of commands for encoding embroidery design data for machine embroidery.
There are a number of special functions that can be encoded in a .dst file.
Originally the “colour” was not encoded in the .dst so a supplementary printout would be supplied with a digitised file to assist an operator to encode the colour changes required to correctly sew out a design.
The “trim” is not always available on a machine, so once a design has been sewn out, then manual trimming would be completed.
Newer machines have automatic trims, colour changes, and additional special functions such as punch, sequin and appliquÃ© may also be available.
Each stitch is encoded as a relative position from the last stitch, and typically is encoded with a maximum stitch length of 12.1mm for a single stitch, with a resolution of 0.1mm in X and Y for pantograph placement.
The embroidery machine toolchain typically consists of
Digitising is likely to be outside of the realm of the smoothie project as far as implementing embroidery machine operations, however is included to assist with an understanding of some of the concepts that will later result in machine move operations.
This stage is where the customer's artwork is digitised into stitches, usually using a digitising application, such as Punto, Willcom, or a wide variety of other toolsets.
[https://www.softeamweb.com/en/punto Punto Embroidery Digitising Software - I work with the australian distributor for this software package]
Punto specifically can take in vector based artwork from illustrator/corel etc as the basis for a design, apply additional digitising hints for stitch directions, and apply stitch types to the artwork.
[http://www.images.cx/Images/Samples.html some example digitised embroidery designs]
The simplest form of stitching, the running stitch is a row of single stitches, much like the output of a normal sewing machine. This may follow a path to provide an outline or detail highlight for a design.
The satin stitch is a progression of tightly placed sawtooth stitches along a path, so that the frequency (or stitch density) in the sawtooth is approximately the same as the thread width,( typically 0.3mm or so) and the amplitude of the sawtooth is the “satin stitch width”.
Complexity arises when a satin stitch follows a curve, as the density is different across the amplitude, so a compensation is required to be implemented with the stitch placement so that “bulking up” does not occur.
A compensation technique is to place shorter stitches every second or third stitch, so that the thread does no attempt to fill the same location in the fabric when the stitches are sewn.
The fill stitch is a progression of running stitches to fill an area with colour. with a single direction fill, each subsequent row of stitches is offset (as per running stitch) by the fill density, and a return run of stitching follows offset by the density calculation in the next row.
Complications with fill stitching include:
Navigating to start and end points, so that fills may be split in sections, and the machine can exit where required for the next stitch section.
Curved fills, as per satin, the decision on how to approach maintaining density in stitch placement whilst producing the desired visual effect.
The underlay stitch is a special group of stitching, usually of a lower density and inset from a fill or satin.
The goal is to both secure the fabric to the vilene underlay support, and also to suppress the pile of the fabric, to reduce show through of the underlying fabric colour through the completed embroidery.
Export to machine format file
Exporting a design file is likely to be outside of scope for any smoothie embroidery control project.
Once the digitising process is completed, a machine format file would be produced, along with a design sheet, for transfer to an embroidery machine for sampling or production.
Typical transfer methods may include:
- Punched paper tape
- DD Floppy disks
- USB volumes
- Coax ethernet
Each manufacturer of machines have their own internal formats, but most will receive some standard file formats from digitising software.
It should be noted that embroidery files for machine production are typically not scaleable, as the stitch placement is based on embroidery thread width, so any change in size will either reduce coverage, or overload the material with too many stitches to produce a desirable result.
Tajima .dst format
Very simple form for communications, which makes no assumptions of specific machine capability, and encodes special functions as “STOP” commands for later interpretation when reading the file in. the function encoding is why the supplementary design sheet is usually provided with the .dst file to communicate colours to be used, output file size and other design information like thread used and start point information.
Some documentation of the file format is located here I have not yet verified this to .dst codes in hand.
Import to embroidery machine
Depending on the implementation with smoothie, the import function is likely to be required in order to take a generic embroidery design and make it ready for the specific machine implementation. the .dst file for example is similar to a .gcode file, however is not complete run information, as the colour change and special functions are not yet available as digital information.
The import stage of a design commences with the selection of an exported embroidery file.
This is then scanned and set of questions will usually follow:
- Orientation of design
- Stops to Colours (Needle assignment)
This then would result in an input file ready to run in the machine.
More feature complete embroidery machines would also allow
- The edit and insertion of machine commands into the imported file,
- Colour Changes
- Special Functions
- Selection from memory of which design to sew next
Embroidery Machine setup
Specific machine implementations may require the selection of pantograph drivers
- Cap Frames require different acceleration curves to flat work
- Cap frames may also include compensation for circular drives to ensure dimensional accuracy with hardware attachments
- Badging frames are typically heavier overall machines and so have different acceleration curves an maximum speed settings.
Pre Production Sample
In a production environment,
- The embroidery threads are loaded onto the machine (6, 9, 11 15 colour machines are common, with each sewing head loaded up with threads per colour
- A sample of fabric is hooped up
- The machine start position is adjusted
- The machine sewing speed is adjusted
- A Trace function is run to travel a path on the machine to the external frame of the design to confirm no collisions with the hoop are likely
- Usually the trace detail level can be adjusted fine to coarse
- Usually the trace speed can be adjusted fast to slow
- at any point in the trace, the trace may be stopped, and the needle dropped into the design to confirm no collisions for size constrained designs
- Once the trace is completed, the embroidery is commenced.
- Should a thread break or other sensed error occur, a machine error will be displayed for operator attention.
- Where a thread break is fixed, the machine will usually need to back up a number of stitches, to the point before the thread break, and then sewing re-commenced from that point in the design.
- The design position may be displayed on a monitor, or inferred by watching the pantograph movements of the design as it is rewound.
- On multi-head machines a thread break may occur on a single head or on multiple heads at once.
- It is important to be able to determine which heads are to start sewing from the rewound position, and which heads are to resume sewing from the last sewn stitch prior to the thread break.
- Once the design completes successfully, the machine returns to the start position and the start needle and ceases operation, alerting the operator to the end of the cycle.
- The design is inspected for colour, tension, and any other criteria before being signed off and cleared for production
Once the sample has been signed off and the machine has returned to start position, the next items to be embroidered are loaded up onto the machine, and the start button pressed.
Embroidery continues until a thread break occurs or until the cycle completes
Thread breaks are repaired, rewound and restarted as per the pre-production description above
in the last production cycle, there may not be a complete machine full of embroidery to be run, so some heads will be turned off, and should not sew during the final embroidery cycle.
The embroidery machine hardware consists of a number of elements
The XY Pantograph is used to position the work relative to the embroidery machine needle.
The embroidery machine must record the position of the pantograph and stitch count following any machine moves, so that work can be resumed in case of an emergency stop.
Some machines will implement encoders to feed back current position to the machine, others will work relative to start position and rely on the operator to know what they are doing.
Different pantograph implementations may be required on a single embroidery to machine to account for physical and positional differences for
- Badge Framing
- Hoop Sizes
- Cap Framing
Each of these hardware attachment options may want to implement a positional boundary (max bounds) beyond which the machine will not travel. (this would require encoded position in hardware for implementation in software)
== Sewing machine
The core of the embroidery machine is an industrial sewing machine.
This typically has a positional encoder along with a direct drive motor.
Larger machines will have a brake attached to this drive motor to stop the machine as required.
The rest position of a ZSK machine is approx 64 degrees past TDC.
In operation these typically place 500 - 1200 stitches per minute.
=== Forming the stitch
The thread is delivered from the needle frame above the work, with a bobbin thread carried below the work.
In each stitch cycle, the needle is moved through a Z axis of motion, piercing the work, and bringing the embroidery thread down to the bobbin case.
the bobbin case is mechanically tied to the needle so that they are in correct alignment at all times.
when the needle begins its return journey upwards, the friction of the fabric restrains the embroidery thread and forms a loop for the bobbin hook.
The hook passes through the loop, and carries it under and around the bobbin thread, then releases the loop.
The thread take up levers which are also timed mechanically to the needle and bobbin are timed to pull upwards once the embroidery thread passes around the loop, and with correct thread tension settings will pull the stitch closed, before pulling addition thread from the supply
=== Critical hardware positioning information
Any time the needle is at or below the work, the pantograph must not be moving. Even the slightest move (accel or decel in positioning the pantograph or inertia in the supported work ) whilst the needle is in the work will cause the needle to deflect and possibly break, or scar the bobbin case.
This means that there is only a very short window for each stitch to position the work ready for the next stitch, so the pantograph module essentially needs to start to move in XY, arrive at destination and have the work finish moving as well before the needle reaches the work again on the next stitch.
On a multi head embroidery machine, the connection between the sewing motor and the needle drive bar is enabled by a solenoid.
If the solenoid does not release the needle, then the stitch does not occur on that sewing cycle.
On a single head embroidery machine, the needle bar may be in constant mesh with the sewing motor. In this case the entire sewing motor would not actuate in a jump stitch operation.
Jump stitch operation.
When a stitch is required that is longer than the maximum stitch length (12.1mm) a Jump Stich can be encoded,
This results in the Drive solenoid not actuating for an intermediate stitch and so the skipped stitch can be up to the length of two single stitches (24.2 mm)
Jump stitches can look bad as the thread is not held to the work, and can catch on fingernails etc, but is sometimes required.
Trim operation is performed in order to finalise the colour being sewn.
A stitch will be performed, but prior to the thread returning from the bobbin, a knife cuts the remaining end, and a solenoid controlled wiper will pull the end of the thread out of the work and back into the thread keeper.
This requires a timed operation between the mechanical sewing motor, the trimmer and the catcher.
The Trimming operation must not occur when the needle is in the path of the trimmer, or needle breaks and damage to the knife will occur.
Needle Change Operation.
Production embroidery machines typically have 6, 11, 15 needles per head.
There will be a needle position sensor to determine which colour is presently selected.
When a colour change is required, a number of operations will occur.
- The thread will need to be trimmed
- The needle returned to home position (64 degrees on ZSK)
- The Needle change cycle through (usually one needle position at a time)
A needle change must not occur when the needle/sewing motor is not in the home position.
Typically the first stitches on a new design or following a trim or colour change will occur at slow speed.
This gives a chance for the lock stitch to form and the thread to be tied into the work.
After these start stitches (3-5 stitches) full speed embroidery will commence at the set embroidery speed.
Some machines will have a potentiometer control on the machine others will have key inputs to allow slower/faster operations.
Usually sequins are placed using an replacement needle assembly for one of the end needles.
A sequin is placed when the command is actuated, which is then sewn into position using the active needle.
Other Hardware Machine Controls
It is imperative that the emergency stop immediately stops all machine motion.
Essentially this kills power to the machine drives, and in some cases to the machine completely.
X/Y position placements, usually a matrix of 4 buttons.
Single button to rewind 1 stitch which repositions the stitch counter, and the machine pantograph to the correct position for that stitch
Commence sewing at the current location in the design file
Stop embroidering at this stitch.
may be used to enter design information or key in a design name
may be used to enter needle numbers when importing designs
Speed Control Slider
Some machines have an analog position slider to set the machine speed between min and max speed.
Others have this set in a software menu
Other Software machine controls
- Software assisted positioning of the sewing motor
- Software actuated trimmer
- Software actuated catcher
- Software actuated brake
often changing work colour (e.g. navy to white fabric) will require a single colour change (e.g. lettering changes from white to navy)
For example Needle assignment allows that any call for needle 6 for this embroidery cycle is replaced with needle 9. This persists until needle assignment is removed.
Ok.. so how much time have you gotâ¦
in its simplest form, allows the keying in of some text, selecting a font and size, and clicking Go.
- pre-digitised fonts
- at the right size
- with intelligent endpoint solutions for highest quality
Applique involves the design phase and the production phase.
Once sewing commences a guide line sewn in stitches will show the operator where an overlay must be placed.
the machine will stop at the appropriate point, the operator places the additional material
the machine sews a cover stitch to hold the additional material
the machine stops to allow trimming if required.
the machine then finalises the design, usually by sewing a satin stitch edge to hold in the fabric overlay edges.
In order to drive an embroidery machine, the smoothie project may need to implement a number of hardware interface modules:
- positional encoder
- Dc drive
- positional interrupt (event?) based on positional encoder - depending on the details of timing, this may just be the normal event model
To complete the toolchain, the embroidery machine may be implemented as G-Code functions:
- Colour Change
- The operation of the machine will want to maintain the embroidery motor sewing speed, so the pantograph moves will need to occur at specific points of the sewing motor rotation.
Consideration should be given to implementing a pantograph module between the G-Code interpreter and the machine positioning hardware.
This would consist of separate config for
- Acceleration tables based on attachments added to the machine
- X/Y Scale factors based on attachments added to the machine
- speed and machine bounds specific to the attachments to prevent machine damage.
- Additional User support compensations.
- Sometimes labelled “Swing” this is an amount added in X or Y or both to provide additional compensation with items with significant inertia or heavy pile to provide better output.
If the machine is implemented as G-Code a translation and configuration module will be required to
- read an embroidery machine format file e.g. .dst
- allow for the insertion of specific details
- needle colour
- output as g-code ready to sew.
[http://www.fineemb.com/blog/archives/dst-file-encoding.html some information regarding the header of the .dst file format]
[http://www.achatina.de/sewing/main/TECHNICL.HTM tabular view of the .dst file format]
[http://code.google.com/p/pyembroidery/source/browse/trunk/pyembroidery.py example code handling .dst file format]
This does not necessarily need to occur within smoothie board, but would be a good value-add to the project, and would allow standalone machine operation.
Where to from here?
My goal is take the next step in breaking down a particular hardware implementation of an embroidery machine.
I have surplus machines of the type Toyota AD 830
0000310_toyota-ad-830-embroidery-machine_300.jpeg these have failed motherboards, and due to the age are difficult and expensive to replace.
I am expecting to be able to connect to the pantograph hardware, and also implement trim, needle change and potentially sewing operations on this machine.
The catchâ¦ I have no smoothie board, so.
Vote for this documentation effort in the smoothie contest, and I may have the hardware resources I need to take the next step!
I remain focussed on my smoothie hardware documentation and delivery.
The goal here is to work towards a documented smoothie brained AD830 firmware/driver replacement.
I have in hand 3 AD830 machines and am working through the requirements to get these connected to smoothieboard
The modular approach is intended to produce staged (think agile sprints) results,
As further modules are completed, the capabilities are expected to build to complete a full list of functionality over time.
libembroidery appears to be a useful component in later iterations, depending in the details of licensing etc, and ensuring this fits with smoothie's goals.
The deliverables along a critical path of minimum viable product will allow useful extension of the embroidery firmware for smoothie
* Release 1
- moving the XY pantograph hardware with smoothie board MVP
- closed loop position encoding of XY pantograph nice to have
- sewing motor actuation and speed control MVP
- sewing motor positional encoding MVP
- sewing a stitch MVP
- Release 2 * Trim MVP
* Catcher MVP
* Jump Stitch MVP
* Colourchange MVP
* Cap Framing (modular) Pantograph MVP
* Release 3 * Speed Control MVP
* Design Trace MVP
* input pad integration MVP
* Release 4 * LCD module integration MVP
* DST file format input MVP(potentially utilising libembroidery or http://code.google.com/p/pyembroidery/source/browse/trunk/pyembroidery.py )
* Stops to Colours needle assignment MVP = Machine Control with G-Code
g-code implementation: I would suggest there are a couple of things we need to know when sewing a regular stitch on an embroidery machine. where the next stitch is to be
whether the stitch is a “sew” or a “jump” stitch
what speed the sewing motor should be sewing/rotating at.
thus to borrow from 3D printing usages of the G1 code. G92 X0 Y0 E0
G1 X10 Y10 E1 F300 might be interpreted as sew a stitch +10mm in X +10mm in Y with a stitch speed of 300 (mm/sec? rpm? something specific to embroidery machine) G92 X0 Y0 E0
G1 X10 Y10 E0 F300 might be interpreted as jump a stitch +10mm in X +10mm in Y with a stitch speed of 300 (mm/sec? rpm? something specific to embroidery machine) The machine firmware should be able to handle whether the requested speed can be achieved,
this through configuration of acceleration parameters, or velocity ramps based on stitch length
the longer the stitch, the longer it takes to position the machine prior to “critical point” detailed below,
so the slower max speed that the machine can sew regardless of the G-Code request.
Thus it makes sense that a “pantograph setting” is a machine configuration to cover acceleration and speed parameters for a given hardware setup (eg cap framing, badge framing, or tubular framing) stitch specifics: there are some steps in sewing a stitch that can be considered as discreet events, in terms of ordering of occurrence,
but which would need to fit within machine constraints to ensure mechanical compliance:
this might be approached using a rules basis. sewing a regular stitch on a multi head machine involves: * releasing the needle catcher solenoid.
* actuating the sewing motor
* moving the XY pantograph to the location of the next stitch
* feeding back from the sewing motor position and speed to maintain “stitch speed” as a constant speed for this stitch.
* needle reaching work surface (critical point in sewing motor rotation where any movement of the pantograph XY will cause needle deflection and possible machine damage)
* needle reaching bottom dead centre, thread take up lever reaching bottom dead centre.
* bobbin hook reaching thread loop formed when needle is retracted from bottom dead centre (203 degrees on ZSK)
* thread loop carried around bobbin case.
* thread take-up lever drawing excess thread back up to the work
* needle exiting the work surface (critical point in sewing motor rotation where any movement of the pantograph XY is no longer likely to cause needle deflection and possible machine damage)
* engage the needle catcher solenoid
* reaching home position of the needle (64 degrees on ZSK) sewing a regular stitch on a single head machine involves: * as above, but possibly not utilising a needle catcher solenoid to engage the needle bar to the sewing motor. sewing a jump stitch on a multihead machine involves: * as above, but not releasing the needle catcher solenoid. sewing a jump stitch on a singe head machine involves: * as above, but possibly not actuating the sewing motor, if the needle bar is constantly engaged to the sewing motor. special stitches**
Special g-codes for trims, colour changes etc will be elaborated on at a later date.
SmoothieBoard arrived today! 2016-01-11 yaaaay!