Thread Tools
May 24, 2012, 03:24 PM
Registered User

CNC without PC?

Picaxe CNC?
I would like to make a Picaxe NC Zaggie foam wing cutting machine that will operate independently from a PC and am seeking help with the numbers in the NC bit.
Concord (below) has the ability to redistribute X-stations and choosing 100 stations gives 200 'hairy' data points which could be used for a Picaxe program given some smoothing.
Is there some simple way to manipulate these columns of large numbers, deleting the X value column, subtracting the large Y value numbers to give increment values from one station to the next in byte size for direct pasting into programs as Data statements?

Free Flying wing profiles and information.

Free Concord coordinate converter.

Free download of Profile 2.2 airfoil plotting program in multiple A4

I posted the above in the Picaxe forum but have received no response. My hope is to make the cheapest possible foam wing cutting machine and results so far are most encouraging but lacking a better method of inputting textual data it is likely to remain Zaggie only.

Having translated the shape of my Zaggie wing hand cutting templates into Y data points I am now cutting narrow sections in EPS foam to find numbers for cutting length, height, speeds and heat.
The directly coupled X stepper motor drives a 1/2" threaded rod which carries a second stepper for the Y axis with it's threaded rod and the nut which supports one end of the cutting bow.
Zagi style flying wings are sharply tapered so the other end of the bow is located to provide the required taper. This is functionally similar to the hand pulled cut in the video below.
A Picaxe 08M 8pin (Pic12F683) microcontroller with internal Basic interpreter drives the X axis with a Picaxe 18M2 on Y where a simplistic linear interpolation is done between each of the 200 stations previously entered into Data memory.

Thank you


Hotwire demonstration (3 min 30 sec)
Sign up now
to remove ads between posts
Jun 01, 2012, 02:11 PM
Cheese eating monkey.
Originally Posted by orraman View Post
Is there some simple way to manipulate these columns of large numbers, deleting the X value column, subtracting the large Y value numbers to give increment values from one station to the next in byte size for direct pasting into programs as Data statements?
I suppose that you have two options. The first one is to write a small script (using Python for instance) that does the number crunching, the other is to use a spreadsheet software.

How does the end result must look like?
Jun 02, 2012, 06:46 AM
Registered User
Greetings Panoramix,

Thank you for your suggestions.
Unfortunately I have no understanding of programming a PC and have no experience of spreadsheets but willing to try.
I once programmed in octal then hex but the editors I used had more functions and could find spaces, new lines and operate on columns.
Now I can get by with Picaxe Basic for my small control programs.

Each Picaxe chip has 256 bytes of eeprom that can be loaded with data before the program is run.
The stepper motor requires not the Y value given in the plot but the increment from the previous Y point.
When the increments have been found it is best if they can be manipulated so that the largest value is near 256.

From the first link above a section of the MH45 airfoil is shown after having been entered into MH ConCord program above.
X values on the left set to 100 stations then the Y values then the results of subtracting adjacent Y values and dividing by 3.
These results represent the vertical movement required while still remaining within the byte value of 256.

MH 45
0.00700000 0.03041638 86
0.00600000 0.02782013 72 }
0.00500000 0.02566095 115 } This anomaly will need manual correction
0.00400000 0.02220387 109
0.00300000 0.01891154 124
0.00200000 0.01518162 151
0.00100000 0.01065502

Picaxe Basic will accept this data in this fashion.

Data (151,124,109,115,72,86)

The photo shows a short test section from the machine on hand pulled wings.

Jun 02, 2012, 04:23 PM
Cheese eating monkey.
If you can do picaxe basic, you can do a small script, it isn't harder. Now that I understand what you need, I will try to find the time to write it so that you can understand how it works. I use Python because it is accessible to non expert like me!
Jun 02, 2012, 05:19 PM
Registered User

Thank you for being willing to help, it is much appreciated.

Jun 03, 2012, 07:00 AM
Cheese eating monkey.
OK, I have done something. It starts directly from this data:

and transforms it in instructions

# -*- coding: utf-8 -*-
Created on Sun Jun 03 10:14:47 2012

@author: Panoramix
import easygui as eg #I am using EasyGUI to enter the data
#EasyGUI is easy to code but don't expect a polished user interface 

fieldValues = []  # we start with blanks for the values
looping= True

while looping == True:
    #Asking the user to enter the data
    msg         = "Enter the profile information"
    title       = "Transformation of airfoil coordinate into picaxe friendly instructions"
    fieldNames  = ["Airfoil","Scaling coefficient"]
    #Assigning the values entered by the user
    fieldValues = eg.multenterbox(msg,title, fieldNames)
    #The coordinates are split lines by lines in a list
    coordinates = fieldValues[0].splitlines()
    coeff = float(fieldValues[1])
    #Now we have a list of lines with two numbers in each
    #We just want the second number for each lines and want to 
    #compute the difference and multiply it by the scaling coefficient
    X=[] #a list of the x coordinates
    Y=[] #a list of the y coordinates
    deltaY=[] #a list of the deltay coordinates
    Steps=[] #a list of the steps for the Picaxe
    Firstline = True
    for XY in coordinates:
        xy= XY.split()
        X.append(x) #We add the value we found to the list
        if not Firstline:
            deltay = y-Y[-2] #Y[-1] is the last number in the list Y
            step = int(deltay * coeff)
            deltaY.append(deltay) #We add the value we found to the list
        Firstline = False
    #We now have computed all the info, it is time to format it
    max_number_steps = max(Steps)
    Picaxe_instructions = "Data (" + ", ".join(map(str,Steps)) +")"
    Output = """There are %s instructions
    The max number of steps is: %s \n %s""" % \
    (len (Steps), max_number_steps, Picaxe_instructions) 
    eg.textbox("You can copy the results with Ctrl C","Data for the picaxe", \
    looping = eg.boolbox("Do you want to conitnue?")
You still need Python installed on your machine to run it, I need to package it in a windows executable.
Jun 03, 2012, 12:22 PM
Cheese eating monkey.
Here is the script as an executable. It is a bit heavy as I didn't take much time to package it.

I believe this does what you need.

To use it unzip it and launch "RC_script"

For it to work you may need to have 32 bit or 62 bit version of the "Microsoft Visual C++ 2008 Redistributable Package" installed.
Jun 04, 2012, 04:30 AM
Registered User
Thank you for all the work you have done.

On first seeing the program I searched for information and found a Wickie on Python with some small examples which I studied but had difficulty following. I returned to your program and tried to follow it.

I must apologise profusely for failing to give you sufficient information regarding the way this machine works and the requirements of the input.

For simplicity the stepper motor for the horizontal threaded rod is driven by an 8pin Picaxe 08M which can only step in one direction at a fixed rate till reversed by a 'High' on its input pin. This chip has limited capability and is unable to alter the stepping rate.
This means that the X stations must all be at equal intervals but this is not normal for airfoil plots where the designer concentrates most of the data points at the leading edge where the rate of change is greatest.
The ConCord program can replace the original X values with a given number of stations at pre set intervals and calculate new Y values to fit the airfoil curve. I chose 100 stations at intervals of 1 so the original X values must be discarded.

I have great difficulty reading and transcribing numbers and as ConCord is able to output to the scratchpad I was hoping to paste the new Y values directly into a program such as yours or some application where I could copy and paste the results into the Picaxe Programming Editor which accepts this type of transfer.
If this were possible then all the thousands of airfoil profiles available on the web could be used by machines of this type where low cost is paramount.

Again my apologies and my thanks for the work you have put in on this project.

Jun 04, 2012, 05:54 AM
Cheese eating monkey.
Ooopps, actually after rereading your second post, I can understand what you want.

It isn't catastrophic.

It isn't too difficult to modify the software so that it interpolates the foil data at regular interval (just one step to add!) or I could also possibly use the Concord output. I think that if my software do it all in one go without the need to use concord, it would be better. Do you agree?

Unfortunately I don't have much time on my hand right now, but will try to put it right.

Actually I think that this is a great idea that you had and if you can make it work, I may try to build one myself!
Jun 04, 2012, 04:13 PM
Registered User
In Concord I have had mixed results when I have used the Standard x-Stations when set to 100 incrementing by 1 using hand plotting. Sometimes with data points are scattered close to a reasonable curve with the odd large number close to a number of zeros which can be evened out, Sipkill is one which I am working to smooth; slowly.

HM45 is causing me problems with unusually extreme numbers associated with several zeros.

But to spread the points crowded into the close fitting leading edge a spline function is usually used to smooth the curve and avoid the facets created by linear interpolation.

Anything you could offer where cut and paste operates in both directions would be welcome.

Regarding making it work I am getting closer and still not spending.

Still cutting narrow test pieces but the photo shows the stepper threaded rod, 2 thinner threaded rods that connect the wooden block that carries the lower bearing. The lollypop stick is the anti rotation fitting for the nut that carries the wire.
Jun 15, 2012, 01:34 PM
Cheese eating monkey.
I haven't forgotten but didn't have much time... and look pretty busy in the coming weeks.
Feb 22, 2013, 12:09 PM
Registered User



To Panoramix and those who had sufficient interest to view this thread.
Stepper motors are being used to replace servos on the new Homebrew forum in the boat section and I was reminded of this thread, I wanted the bits to fiddle with.

Many tests on narrow sections of foam at the centre section and the wingtip had been turning out rather well using the "circular" method shown in the video in Post #1. When full length wings were attempted things did not go too well.
The sharply tapered wing required that the wire heat be kept as low as possible to prevent over melting the foam at the tip and this necessitated a heavy drag force at the centreline.
Starting at the trailing edge for a 'circular' cut caused so much sag on the wire that when the steppers were pulling the wire round the leading edge at the centre the wire was 1/2 inch behind at the tip.

However by making separate cuts for upper and lower surfaces and starting at the leading edge and taking advantage of the almost constant angle towards the rear of the section the cut could be extended beyond the trailing edge to clear the sag.

The motors were selected for duty and to fit directly into the 1/2" Whitworth 12 threads to the inch threaded rod, I have a wee lathe.
The horizontal motor being Philips V14, 27.5 Ohms/Coil, step angle 7.5 . 6 wire but used as unipolar. Each motor drawing 0.55A via bench type power supplies.
The vertical being OKI DC 4.0V, 0.9 A, 1.8 Deg/Step used as bipolar. At max airfoil thickness this motor was reversed
Cutting wire is diameter 0.019" nicrome drawing 1.8A, on a separate bench power supply.

There was no connection between the Picaxe chips, both were switched on at the same time and left to get on with it. Once it was all sorted it was quite therapeutic to watch them chuntering on with their own little jobs creating a sense of having beaten them into shape.

The wing chord was divided into 100 equal horizontal data stations. The horizontal motor moved the vertical motor with it's pendulant threaded rod, nut and wire at a set rate.
A fixed time delay for all horizontal stations such that taken with the horizontal rate of transport would result in a cutting length of 13.5" over the centreline but as the foam blank is skewed to allow for the sweep of the wing this results in a wing chord of 12".
Each vertical data value was compared dY/dT to the time delay to provide a linear interpolation between stations to increase the number of vertical steps and so reduce the size of each step.

First class wings, possibly better than those my wife and I have been cutting for the last 35 years. But in this sparsely populated area only a couple Zaggie wing sets were wanted, others including myself have moved on to Swift2 EPP ready built wings etc.

Having proved to 'our gang' the viability of the machine the various parts were returned the original lenders and 4 or 5 potential Zaggies reside in the loft, awaiting locals with more sense than money.

Last edited by orraman; Feb 22, 2013 at 12:22 PM. Reason: Dissleccik Dave
Feb 23, 2013, 07:19 AM
Cheese eating monkey.
I am glad that you made it work at the end. Sorry I didn't find the time to modify my first script last year, I got busy and then moved from England to France.
Feb 24, 2013, 04:59 AM
Registered User
Greetings Panoramix,

I really did appreciate the work you had put in and particularly your willingness to help and if things had proved more difficult on the manual conversion I would felt comfortable in asking you for further help.

The span and the taper ratio of root to tip were changed by moving the pivot near or away.
The kerf compensation was by lifting the pivot to the up position for the top cut and lowering it for the bottom cut.
The chord length was changed a number of times by altering the "fixed" horizontal time delay which was a simple declaration.
The section thickness was altered by division of the vertical data and this provided the thinner section for a successful glider.

I had been messing with an 8pin Picaxe 08M, (1/8 the memory of the 08M2) for a stepper project with data in eeprom. Airfoil profiles can have as few as 18 stations above and below datum so would 200 suffice for steppers?

This started as a bit of a joke fuelled by the terrible 'non' flying weather last year and everything used was scrap, or junk from previous projects and I recon that with canny sourcing it could be replicated for about 100. Without the anti-rotation lolliepop stick and rubber band hold-downs.

Having taken up the kitchen for too long, me, the lash-up machine and what my wife dared refer to as JUNK were banished to the garage or garden.
Further foul weather brought a change of heart from my long suffering wife, a double clothes rack for the machine, the seat tube from her exercise bike for the pivot for the bow and time limited use of the kitchen.

At that point I had a 100cm long printout of the Sipkill airfoil, 200 stations measured with a jeweller's loupe and entered when the laptop died.

Last edited by orraman; Feb 24, 2013 at 02:14 PM.
Feb 24, 2013, 09:19 AM
Cheese eating monkey.
That's quite impressive, where did you get the stepper motors from? How do you connect the picaxe to the stepper motor?

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Cellpro Multi4 Preset without PC Goekeli Batteries and Chargers 4 Jul 20, 2009 11:19 PM
Question Chargers that log charge results without PC? Neil_SC Batteries and Chargers 4 Jul 13, 2009 11:51 AM
Help! Dualsky Programming without the PC Cable Motobiman Power Systems 0 Jul 16, 2008 02:06 AM
Rant Help - PC PSU won't work without PC!? rlfgary Batteries and Chargers 3 Mar 21, 2005 01:53 PM