Posts

Showing posts from 2010

DIY CNC Milling Machine Control Panel for EMC2

Image
This is meant to be an addition to a regular industrial style alphanumeric keyboard with trackball. It contains the most widely used functions as far as I now know. Since I am using a CNC4PC C11G I only have 5 inputs. All these functions are available on the keyboard within EMC2 and will not require a separate input. This panel will require a keyboard encoder either bought, ripped from an old keyboard, or made with a custom pcb. Keyboard encoders are available from Hagstrom, Ultimarc ($40) and Vetra. Beyond Logic has all the information for rolling the code for your own keyboard controller which has some advantages. If you code your own then you can include functions for rotary switches (that include one-shots) and analog inputs. This control panel is meant to be a cheap way of controlling the machine before or in conjunction with an MPG. This panel can be made for less than $200 which is a lot cheaper than an MPG. One of the things this is missing is indicators/blinken lights

Sparkfun Freeday - A Bust

So many people on the net know about Sparkfun. It is a quirky website out of Boulder Colorado that sells electronic kits/gadgets/pcbs/components for building your own whatever. They concentrate on Ardunio type single board computers. Today was "Freeday" where they gave away $100 to the first 1ooo customers. But before today they made a big deal about how they tuned up their servers to handle the load. Maybe they were a bit optimistic but MANY people who tried to participate (including myself) spent 2 hours hitting "refresh" when all we had to do was click "confirm order." Now I (and many other people) have a huge level of frustration that because the site wouldn't let us through, we lost out. In other words the "free" offer was not played fairly because their servers slowed to a crawl. I would totally accept having the money go quickly (in something like 5 minutes) and I just missed out. But clicking refresh for 2 hours (literally

Rotation Around a Point

There are lots of code example that show rotation or a 2D point around the origin but what about around some arbitrary point? This is important if you are translating airfoils into G-Code... To do a rotation around a point without matrix math you translate the point to rotate around the origin (0,0,0), then rotate the point, and translate it back. So basically you subtract the location of the rotation point from the x coordinate, rotate the new point, and add the location of the rotation point back. Here it is in Python from math import * def rotate2d(degrees,point,origin): """ A rotation function that rotates a point around a point to rotate around the origin use [0,0] """ x = point[0] - origin[0] yorz = point[1] - origin[1] newx = (x*cos(radians(degrees))) - (yorz*sin(radians(degrees))) newyorz = (x*sin(radians(degrees))) (yorz*cos(radians(degrees))) newx = origin[0] newyorz = origin[1] return newx,newyorz