Picture a suit cast in one piece from translucent silicone rubber. It covers the outsides of the arms and legs, the hips, spine, shoulders, upper chest, and hoods the head, with just enough strapping over the rest of the body to keep it on. It is covered with feather light guides made of the same rubber, with a cluster of RGB LEDs at the base of each feather, and a network of fine black wires runs through it between the LEDs. The light from the LEDs fills the feathers.
The LEDs can display all possible colours at all intensities up to a very high brightness, and each changes individually. Rippling, shifting and writhing patterns of light and colour run over the surface of the suit in response to the wearer's movement.
This is what I'm working on at the moment. I'll post more about progress and the technical details as the project progresses.
Sunday, 15 February 2009
Saturday, 22 November 2008
Making joystick buttons run simple CNC commands
It's pretty easy to get a button to do something simple (run any one line of G-code).
Create a new HALUI MDI command with one line in your .ini file:
This causes a new HAL pin to be created, called halui.mdi-command-00. Then wire that pin up to the joystick button that you want to cause that command to be run, with an line in your .hal:
Now pressing that button (in this case, the thumb 2 button) runs G92 X0 Y0, just as if I'd typed it in the MDI box. This setup allows me to use the joystick to jog to the place that I want my origin to be, and then set that to be my XY origin by pressing the button.
You can have any number of MDI_COMMAND .ini lines, and they each make make their own mdi-command-xx pin, ordered in the order they appear in the file.
Each one can run any one liner. In the next post I'll talk about running more than one line from a single button.
Create a new HALUI MDI command with one line in your .ini file:
[HALUI]
MDI_COMMAND = G92 X0 Y0
This causes a new HAL pin to be created, called halui.mdi-command-00. Then wire that pin up to the joystick button that you want to cause that command to be run, with an line in your .hal:
net setXYOrigin input.0.btn-thumb2 => halui.mdi-command-00
Now pressing that button (in this case, the thumb 2 button) runs G92 X0 Y0, just as if I'd typed it in the MDI box. This setup allows me to use the joystick to jog to the place that I want my origin to be, and then set that to be my XY origin by pressing the button.
You can have any number of MDI_COMMAND .ini lines, and they each make make their own mdi-command-xx pin, ordered in the order they appear in the file.
Each one can run any one liner. In the next post I'll talk about running more than one line from a single button.
Friday, 21 November 2008
The Joy(stick) of Machining
I control my router with EMC2, which rocks, BTW. It's extremely versatile and extensible, while being easy to use, and has a vibrant community of contributors. I thoroughly recommend it.
The most accurate way that I have of measuring the offset between the tool and some fixed point (for example, in order to set the tool length offset) is to move the tool to that point, and see the offset in machine coordinates. At the moment I do that through the jog GUI in AXIS, which is slow and awkward, so task number one is to improve that.
I've got a USB joystick, and I'm following these instructions on the EMC Wiki. The rest of this post assumes that you have read them.
If you don't understand EMC and the HAL the instructions and the logic behind them won't make much sense, in which case I recommend reading an introduction to EMC2.
The joystick setup process is simpler than it looks: download joypad_v3.hal, tweak it, put a reference to it in your .ini file, and install joyhandle. The two snags that I hit were with getting the hal_input module to see my joystick and getting joyhandle helper module to work.
I had trouble with the hal_input for two reasons: I hadn't followed the "setting the permissions for input devices using udev" instruction closely enough, and had to mess around with the name pattern for the joystick to get one that hal_input would accept.
joyhandle is a HAL module designed to set a deadband around the center of a joystick axis, and provide power law and linear scaling for the value of that axis. There is a precompiled version on the EMC2 Wiki, but it's for a rather old RT kernel, so it doesn't work. Luckily, there's also a .comp (source) file. I installed the emc2-dev package to get comp (the HAL module compiler). After that, building and installing the module was as simple as:
$ sudo comp --install joyhandle.comp
And the man page:
$ sudo mv joyhandle.9.gz /usr/share/man/man9
Then it just worked. :-)
By itself, the addition of the joystick has made my old method of measuring tool offset or stock position quicker and easier, but the full benefits will come when I combine it with automatic offset recording for X and Y, and automatic probing to detect the tool length.
The most accurate way that I have of measuring the offset between the tool and some fixed point (for example, in order to set the tool length offset) is to move the tool to that point, and see the offset in machine coordinates. At the moment I do that through the jog GUI in AXIS, which is slow and awkward, so task number one is to improve that.
I've got a USB joystick, and I'm following these instructions on the EMC Wiki. The rest of this post assumes that you have read them.
If you don't understand EMC and the HAL the instructions and the logic behind them won't make much sense, in which case I recommend reading an introduction to EMC2.
The joystick setup process is simpler than it looks: download joypad_v3.hal, tweak it, put a reference to it in your .ini file, and install joyhandle. The two snags that I hit were with getting the hal_input module to see my joystick and getting joyhandle helper module to work.
I had trouble with the hal_input for two reasons: I hadn't followed the "setting the permissions for input devices using udev" instruction closely enough, and had to mess around with the name pattern for the joystick to get one that hal_input would accept.
joyhandle is a HAL module designed to set a deadband around the center of a joystick axis, and provide power law and linear scaling for the value of that axis. There is a precompiled version on the EMC2 Wiki, but it's for a rather old RT kernel, so it doesn't work. Luckily, there's also a .comp (source) file. I installed the emc2-dev package to get comp (the HAL module compiler). After that, building and installing the module was as simple as:
$ sudo comp --install joyhandle.comp
And the man page:
$ sudo mv joyhandle.9.gz /usr/share/man/man9
Then it just worked. :-)
By itself, the addition of the joystick has made my old method of measuring tool offset or stock position quicker and easier, but the full benefits will come when I combine it with automatic offset recording for X and Y, and automatic probing to detect the tool length.
The many steps to 4 axis machining
I'd like to run some "all round" machining jobs on my router. To do that, I need a rotary axis. I intend to convert a rotary milling table into a CNC rotary axis by fitting it with a servo (more on that later).
To do that, I need to do some 3 axis machining, but there are a few obstacles that I'd like to get out of the way first.
At the moment it takes me annoyingly long to set up my CNC router after I change the stock or tool, and even then the results are often compromised by poor calibration of tool length and stock position. The next few posts will explore faster and more accurate ways to do this calibration. At some point I'll have to find out how the pros do fixturing, too.
The old way (if you care)
To measure tool length I fit the tool, and then jog it down close to some datum (such as the router bed or the top surface of a flat piece of stock). Then I use a feeler gauge to measure the offset and setting that to be Z=n with:
G92 Zm
with m=n + measured offset, in the MDI window of AXIS (the tab that's in the background in http://www.linuxcnc.org/docview/html//gui_axis.html#cap:AXIS-Window).
I'm using oversize stock, positioning it by eye, fixing it down, and then jogging the router until the spindle is in approximately the right place above the stock and setting that to be X0 Y0 with:
G92 X0 Y0
in the MDI window of AXIS.
To do that, I need to do some 3 axis machining, but there are a few obstacles that I'd like to get out of the way first.
At the moment it takes me annoyingly long to set up my CNC router after I change the stock or tool, and even then the results are often compromised by poor calibration of tool length and stock position. The next few posts will explore faster and more accurate ways to do this calibration. At some point I'll have to find out how the pros do fixturing, too.
The old way (if you care)
To measure tool length I fit the tool, and then jog it down close to some datum (such as the router bed or the top surface of a flat piece of stock). Then I use a feeler gauge to measure the offset and setting that to be Z=n with:
G92 Zm
with m=n + measured offset, in the MDI window of AXIS (the tab that's in the background in http://www.linuxcnc.org/docview/html//gui_axis.html#cap:AXIS-Window).
I'm using oversize stock, positioning it by eye, fixing it down, and then jogging the router until the spindle is in approximately the right place above the stock and setting that to be X0 Y0 with:
G92 X0 Y0
in the MDI window of AXIS.
Tuesday, 28 October 2008
Time for a novel approach to CAM?
I'm now pretty familiar with SolidCAM (a SolidWorks CAM plug in), and I've had a look at the screen shots and sales blurb for a bunch of others. I am not impressed.
The state of the art CAM seems to be stuck on an unnecessary plateau: Slick but dumb. The user is presented with a fixed toolbox of slightly adaptive machining strategies and expected to choose an appropriate sequence of them to apply to various parts of the stock in order to produce an acceptable result. The process is both slow and demanding of human skill and attention, and the results are far short of optimal.
The better tools do have some optimisations that help a bit: Adaptive step over when milling with a ball nose, to limit the scallop to some maximum height; Feed rate adaption to varying cutting load; Solid modelling so that later machining steps only cut the material left by previous steps; etc.
However, this falls far short of what is possible: fully automatic generation of a far more optimal set of machining instructions. It seems to me that the local definitions of a good cut are fairly simple. A cut that is within the capabilities of the machine, at optimal feed rate and chip load, leaving only an acceptable scallop, and not gouging the part, is a good start, and would be better than the current approach can uniformly produce.
Ratings for all of these cut properties can be calculated, and a single merit function could be a weighted product of those ratings. This allows us to use any local search strategy to generate a complete tool path, by creating a sequence of locally (near) optimal cuts.
Global merit would include completing the task in minimum time, with minimum machine and cutting tool wear, with maximum quality. A simple hill climb optimisation would produce an improved but still substantially sub-optimal path. Simulated annealing, a genetic algorithm, or similar, would further improve the result.
In future posts I'll propose an algorithm in detail and get in to the implementation details, with the intention of cutting alpha release code in python and starting an open source project to get this in practical use.
The state of the art CAM seems to be stuck on an unnecessary plateau: Slick but dumb. The user is presented with a fixed toolbox of slightly adaptive machining strategies and expected to choose an appropriate sequence of them to apply to various parts of the stock in order to produce an acceptable result. The process is both slow and demanding of human skill and attention, and the results are far short of optimal.
The better tools do have some optimisations that help a bit: Adaptive step over when milling with a ball nose, to limit the scallop to some maximum height; Feed rate adaption to varying cutting load; Solid modelling so that later machining steps only cut the material left by previous steps; etc.
However, this falls far short of what is possible: fully automatic generation of a far more optimal set of machining instructions. It seems to me that the local definitions of a good cut are fairly simple. A cut that is within the capabilities of the machine, at optimal feed rate and chip load, leaving only an acceptable scallop, and not gouging the part, is a good start, and would be better than the current approach can uniformly produce.
Ratings for all of these cut properties can be calculated, and a single merit function could be a weighted product of those ratings. This allows us to use any local search strategy to generate a complete tool path, by creating a sequence of locally (near) optimal cuts.
Global merit would include completing the task in minimum time, with minimum machine and cutting tool wear, with maximum quality. A simple hill climb optimisation would produce an improved but still substantially sub-optimal path. Simulated annealing, a genetic algorithm, or similar, would further improve the result.
In future posts I'll propose an algorithm in detail and get in to the implementation details, with the intention of cutting alpha release code in python and starting an open source project to get this in practical use.
In praise of a good workshop
Having a good space to work in makes it massively easier to do good work.
At first my workshop was the spare bedroom: a tiny child's room. Then I got my CNC router, took over the dining room too. This meant that most of my tools and materials were stored in one place, and I was working in another, which resulted in a huge waste of time and a perpetual battle against clutter. It was also impossible to keep the metal swarf out of the rest of the house.
Now I've moved, and I have a single garage as a workshop. It's still a bit cramped, but it's a massive improvement.
Here are some of the highlights of what I've set up.
Around the spindle you can see the flood coolant delivery to the four orange nozzles, and the compressed air with optional mist to the grey locline with the red tip. I'll post later on building and using the coolant systems.
Between the flood nozzles is a ring brush that surrounds the bit. The open middle of the ring goes to a shop vacuum cleaner via the the big black hose.
Thursday, 23 October 2008
Is this thing on?
Hello.
This is a blog about making things.
I find the transformation of idea into object uniquely satisfying, and oven the coming months I'll be sharing my projects with you as they bubble up in my fevered brain as ill-formed ideas, struggle and compete for the sunlight of my attention, and flower or wither by turns as may may be.
I expect to write about CAD (especially SolidWorks), CAM, CNC (especially Linux and EMC2), milling and machining, casting, composites, resins, elastomers, programming and electronics. It's my intention to share useful insights, techniques, and lessons in these areas as I learn them, and my hope to receive similar in return.
Some projects will be entirely for my personal amusement, while others may result in commercially exploitable products. I may be a little cagey about some of the latter.
I'm currently working on, amongst other things, a light weight high performance geodesic dome made from advanced fibre composites and metalised polymer film, a totally silent high performance PC, and a costume for next years Burning Man that includes a 3000 channel 1kHz LED PWM dimmer and 1000 lightguides cast in clear elastomer in the shape of feathers.
I hope that you get some part of the joy from reading about my projects that I get from working on them.
This is a blog about making things.
I find the transformation of idea into object uniquely satisfying, and oven the coming months I'll be sharing my projects with you as they bubble up in my fevered brain as ill-formed ideas, struggle and compete for the sunlight of my attention, and flower or wither by turns as may may be.
I expect to write about CAD (especially SolidWorks), CAM, CNC (especially Linux and EMC2), milling and machining, casting, composites, resins, elastomers, programming and electronics. It's my intention to share useful insights, techniques, and lessons in these areas as I learn them, and my hope to receive similar in return.
Some projects will be entirely for my personal amusement, while others may result in commercially exploitable products. I may be a little cagey about some of the latter.
I'm currently working on, amongst other things, a light weight high performance geodesic dome made from advanced fibre composites and metalised polymer film, a totally silent high performance PC, and a costume for next years Burning Man that includes a 3000 channel 1kHz LED PWM dimmer and 1000 lightguides cast in clear elastomer in the shape of feathers.
I hope that you get some part of the joy from reading about my projects that I get from working on them.
Subscribe to:
Posts (Atom)