Posts

A new project - 1969 MGB

Image
Here is the MGB when I bought it.  My boys helped me make my purchase. It had sat there for 4? years since the PO bought it from a classic car junk yard for $3500.  I gave him $1000 and had it running with only an alternator, fuel pump, and battery. It is titled as a 1970 but appears to be a 1969 in the parts and design. My older son asked if he could drive it to prom and the younger reminded him.  "Paul, remember what Dad said about when we could drive it if he buys it?"  Paul replied, "Oh yeah.  NEVER!" ​​ It isn't close to pretty yet but I work on one piece at a time and do it right.  I don't always use original mechanical components but I do a valid redesign on with each piece.  I am an engineer so I do have to make my mark on the car.  I do like everything else  original .  I have learned over the years that a worn but working original piece is always better than a new repop. I do restoration for the love...

Hardinge Cataract BB57 Lathe on Craigslist

Image
Found this post on Craigslist in Twin Falls, ID Old lathe - $50 (Sun valley) Cool old lathe for decoration                                                                       make / manufacturer:  ? Yes, that is a Hardinge Cataract BB57 Bench Lathe such as the one pictured below: Photo from http://www.lathes.co.uk/cataract/ It has a 7" swing, a 36" bed with 17" between centers, and a 5C collet.  The thing weighs a ton and has a massive Jacobs chuck in it.  Yes, I know because I drove down to Ketchum, ID and bought it. I have the tailstock in a electrolysis bath of water and washing soda right now to see if the metal is pitted. If it is usable I will have a nice lathe after some paint. It is missing the bottom portion with the pulleys and speed change mechani...

Holy Cow Python 2.7/wxPython/wxGlade Install!

Image
I started back into my work on Python CNC as the Bozeman Makerspace has a Shapeoko that my son wants to learn to use. I looked at a bunch of software packages and feel there is a need for a simple SVG based drawing program that has direct g-code output.  Sure you can use a plugin in Inkscape and there is  jscut but I want something that is a little parametric.  I imagine a program with a list of shapes on the right where you can link a milling function to each with a graphical display of the tool paths on the right. This is based on my own process and the tools I used to mill on my Bridgeport CNC.  I started with a CAD drawing and then built code from the drawing with my own Python objects.  Then after outputing the g-code I would import it into NCplot to verify the tool paths.  Then off to EMC2, now known as LinuxCNC, to run in air first and then on a test piece. For the Shapeoko the process is similar: SVG in Inkscape Load it in jscut Output...

Apache2 configuration for embedded PHP in HTML files

If you want to use PHP scripts on your web server it is a simple thing to add a script inside a page and save it as a .php file extension. Listing of phpinside.php     <?php        echo "Hello PHP World!"     ?> When this file is browsed if looks like this: Hello PHP World! With the default installation of Apache2 and PHP, however, Apache2 does not know to render an html file as a PHP script. If you name the above file phpinside.html, you will instead see elements of the PHP code when you view the file in a browser. There are thousands of (old) posts for Apache configuration of PHP by editing the httpd.conf file to include HTML as an application/x-http-php type. However, few make note that Apache2 has a new config file structure for Debian (Ubuntu). Refer to the page that I found for a better explanation: Control Escape - Configuring Apache2 on Debian, Ubuntu Now the "AddType application/x-http-php" d...

Free CAD/CAM Options

There was a time when CAD and CAM software was simply not available for anyone without paying a substantial sum of money.  The version of AutoCAD 10 (which came on 10 floppies) that I used for a year at MFJ Enterprises to do product documentation cost almost $1000. Even low quality programs cost upwards of $99 or more.  However, in the past few years there have been many new free versions of software available that are high and even professional quality. Sketchup Arguably the first really free CAD software that was good quality was Sketchup . Sketchup was written by a company called  @Last Software which sold the software for $495.  The company wrote a plug-in for Google Earth and soon afterward Google bought the company.  In 2006 at Google Developer Day the developers of Sketchup were there presenting the software and giving away free Sketchup socks.   An important feature of Sketchup is that users can write short snippets of code in Ruby...

Python and MySQL

Although PHP is used a lot for SQL scripts, Python is a fine alternative. The commonly used SQL library in Python is MySQLdb.  MySQLdb is an thread-compatible interface to the popular MySQL database server that provides the Python database API. ( from the documentation ) An example showing the guts of a Python MySQL script. import MySQLdb conn = MySQLdb.connect (host = " localhost ", user = " root ", passwd = " admin ", db = " databasename ") db = conn.cursor() db.execute ( " SELECT * FROM table1 ") data = db.fetchall() #do something with the data db.close () conn.commit () conn.close () Looking over the code example : After the import is a connect request to an SQL database.  The database in on the localhost and has the default username and password.  The the actual database name must be specified.  MySQL databases can have multiple databases on one host. Note that on all the code accessing data or running commands on the data...

Setting up a Python CGI Sandbox on Windows

It makes sense sometimes to set up a sandbox for development of CGI.  By sandbox I mean a computer isolated from the web running all the programs needed to develop for CGI.  If you have a Windows machine there are fewer resources available online for setting up Apache, etc than for a Linux box. Note that installing a Apache server does take some resources but I noticed no difference on the 3 GHz Pentium D machine with 1 Gb RAM that I was using. follow these steps in setting up a windows machine: Install Python If you are going to put scripts on a server at an ISP such as 1and1 or GoDaddy you should be aware of the version of Python available to your hosting package.  For 1and1 I installed Python 2.5.  Also be aware that neither 1and1 nor GoDaddy use modpython at this time.   Install Apache Use a standard install of Apache.  It should take only a few minutes to install and configure.  When you are setting up make it "localhost". Add python as a C...

CamSoft System CS-209 - $1991.00

Image
When I bought my Bridgeport CNC Mill, it came with a CNC CS-209 control package made by CamSoft.   Here is a description from the CamSoft Website: CNC Lite software, AS3000 3D CAD/CAM system, USB Jog Stick Handheld Controller, CS 14000 - 4 axes stepper motion board, cables with user provided computer. CNC Lite Software AS3000 Cad/Cam System USB Jog Stick Motion Boards Limited time special offer starting at $1,991 I was excited about using this to retrofit the mill.  Considering the kit had never been installed I thought that it should be pretty easy to get the mill up and running.  The kit even comes with CAD software which is a big expense for CNC machining. The CAD software is called Advanced System 3000 and requires a hardware key (I think).  The software was on the computer that came with the mill but it was not very intuitive.  I have used AutoCAD and Solidworks extensively so I was surprised that I could not really just start drawing. Th...

Simple User Settings in a C# Windows Forms Application

There is a lot of confusion and long programming blog posts on application settings for a Windows Forms Application in C#.  I needed a quick and simple way to save a few user specific settings such as com port settings and names of labels on a customizable GUI. I have used the Python config package written by Vinay Sajip in a previous project.  The nice thing about the package was that it opened a config file and made an object which could be accessed as config.ports.baudrate .  Since Python is not typed the config file, which is simply Python code without any punctuation marks, is flexible, fast and easy to create. I had hoped that C# would have an easy way to build something similar.  I found an post early on suggesting using app.config.  After reading MANY posts on configuration and trying a lot of code that would not work on Visual Studio 2011 I had about given up and started writing my own. Luckily I found a simple solution. A settings file is alread...

Setting up Ubuntu for Automatic Turn-on in Emc2

After booting Ubuntu, logging in, and starting up Emc2 for the past year, I am getting lazy. So I setup Ubuntu to automatically log in to my main account and start the EMC2 program. It is different than doing the same thing on Windows but possible (all thing that are possible in Windows are so in Linux usually with MANY more options...) Setting up the computer to automatically log in to an account: NOTE: This should probably not be done if the machine is on a network. This one is simple and easy to find with a Google search: Click on System -> Administration ->Login Window Click on Security The click on "Enable Automatic Login" And select the name of your user in the box below it. Setting up the machine to run a program like Windows "Start Menu" My first thought was to modify the .login file which is the old school way to start programs outside of a windowing environment (back in 1987...) With Ubuntu you have to start a program after the wind...

C# Textbox - Enter to go to next control

I was building a Windows Form Application in Visual C# Express 2010 and had a problem that needed a lot of searching to figure out.   I could not get a value to "enter" and tab to the next textbox when I hit the  Enter key. After much trial and error (most of which would work but I still got a bell when I hit Enter ) I found this. Enter this as the KeyDown Event. Note that KeyPress uses KeyChar return types. private void textbox1_KeyDown( object sender, KeyEventArgs e) {       //checks for Enter, suppresses it and sends a tab       if (e.KeyCode == Keys .Enter && e.Modifiers == Keys .None)     {         e.SuppressKeyPress = true ;  //eliminates the enter key *BELL*         SendKeys .Send( "{TAB}" ); //changes focus to the next control     } }

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

Parabola in G code

The following Python script produces a parabola in G-code. #This code produces g-code for a parabola using the equation #(y - k)2 = 4a(x - h). The parabola is open to positive x. #a = x coor of focus #k = x coor of back of parabola #h = y coor of focus #r = resolution #ymax, ymax = limits of iteration a = 2.0 k = 0.0 h = 0.0 ymax = 5.0 ymin = 0.0 resolution = 0.1 lastx = 0.0 lasty = h def frange3(start, end=None, inc=None): """ A range function, that accepts float increments... http://code.activestate.com/recipes/66472/ """ import math if end == None: end = start + 0.0 start = 0.0 else: start += 0.0 # force it to be a float if inc == None: inc = 1.0 count = int(math.ceil((end - start) / inc)) L = [None,] * count L[0] = start for i in xrange(1,count): L[i] = L[i-1] + inc return L #top half for ystep in frange3(ymax+resolution,ymin,-resolution): x = ( ((ystep - k)*(ystep - k)) + 4*a*h ) / (4*a) print "G01 X"+str(x) +" Y"+str(ystep)...

Repost: Summary of the Retrofit

In a response to Where the heck? What the he11? HUNH? on CNCZone I posted the following. I realized later that it is a good summary of my retrofit so I will repost it here. I am in the process of doing the same thing (a Bridgeport Boss CNC Retrofit). I have the gecko drives working, a Automation Direct GS2 VFD, and a power supply built with T1 (the 240 v to 120v transformer tapped at 40v). I already had Gecko 201s but the 203s would be better because of the auto short circuit protection circuitry. Just remember that "common" on the Gecko 201s is 5 volts to power the opto-isolator LED. Also just wire 2 windings of 4 of the stepper motors because the windings are in bifilar (which means that 2 windings are wound together). There are jumpers on the motors that show which terminals are the ends of the windings and then wire to the other side. I have 1 sigma and 2 superior and the geckos work fine so far. I used a C11G breakout board from CNC4PC which has some extras AC relays f...

Angle Tight II Precision CNC Machine Vise at Enco

I have frequently bought from Enco because their prices are much better than other places especially if you shop from the Enco flyer. Recently a machinists vise came up on sale. It is a presumably Chinese copy of a Kurt vise and seemed a good deal. However, while all the "good" vises such as Kurt or Parlec gave some kinds of specs for repeatability, flatness or parallelism the Angle Tight II ads listed nothing but holding force. So I emailed Enco... to EncoTechandParts@use-enco.com date Thu, Sep 24, 2009 at 2:49 PM subject Angle Tight II Precision CNC Machine Vise PN SU327-5893 Questions I am interested in the Angle Tight II Precision CNC Machine Vise PN SU327-5893 that is on sale right now for $159.95. I want to use it as an inexpensive CNC vise but there are no specs published in the flyer or the catalog. What are the specs for accuracy, flatness or parallelism of the jaws? Is the bed ground to flatness? Also, do Kurt style soft jaws fit the vise? I am sure with some of...

Power Supply for CNC

One of the first things that one needs to retrofit a Bridgeport Boss CNC machine is a power supply for the steppers. That is assuming that one has drives which I do in the form of Geckodrive G201s. The original Bridgeport power supply for the steppers put out 56 volts dc so most people use this voltage although some use 60 or even higher voltages. As far as current goes most people use 6-7 amps, 7 amps being the maximum that G201s will source. While researching stepper power supplies I found a great reference on Gecko's website. http://www.geckodrive.com/upload/Step_motor_basics.pdf This document not only shows how to wire the drives but gives a good example of a power supply with sample component values. Basically a power supply (unregulated) only needs a transformer putting out a desired voltage that is rectified by a full diode bridge and filtered by a big capacitor. To get 56vac you need un-rectified 39vac. (56 v /1.414 = 39.6 v) For a capacitor value C = (80000 u...

Tooling and Retrofit Status

Image
Before I go much further I should note that I am new to CNC and machining in general. Which means I have no tooling. I do have a good set of import drills and a set of inexpensive end mills but no test indicator, to tool holders, etc. One of the first things I looked at when I got the machine was the taper. These machines came with 2 types of Quick Connect tapers, either QC#30 or Kwik Switch 200. My machine has Kwik Switch 200 which according to users of CNCZone is far superior to R8. Unfortunately tool holders are not as common as R8 or as inexpensive. The first tool holding device I acquired (or am acquiring) is a keyless chuck and a 1 JT Kwik Connect 200 adapter. This is what the one that I won in auction looks like. Although I did win the auction a while back, I have still not received the adapter. I first bought a 1 JT adapter but plan on getting a 2 JT and 3 JT adapters. I also bought a 5/15" keyless chuck for the 1 JT and will get a 3/8" for a 2 JT ...

Software Options

CNC Software is something that I have researched for many years. I actually have a set of three stepper drivers, a couple good NEMA 23 motors and a small XY table that I bought from Grizzly. What was always missing was the software (both CNC and CAD/CAM). Over the last few years I have searched and collected demos and free software. The best option for free software for CNC control is EMC2. http://www.linuxcnc.org/ Although the software runs on Linux it is a very good option for CNC work. The Bridgeport actually came with software and a computer running Win 98. The software is made by CamSoft and is both a CNC control package and a CAD/CAM package. A while back I downloaded a CAM program demo from MecSoft called VisualMill. I have not yet installed it but will try it out. My interest in VisualMill was because of a plug in for Rhino. A friend's husband uses Rhino to design hulls of hydrofoil assisted catamarans , very cool technology. He suggested that he program is a good v...