Sunday 17 February 2013

Slight change in direction

This project died for a bit while I modified the z axis to be floating. Now that's done I can get back to work.

So since new year i have been working on two aspects of this project
  1. Port Rewrite the code for the Arduino in AVR studio.
  2. Write a new PC control app in python
The reason for the first action is that Arduino is good but for a project his size the lack of debug capabilities just makes it useless and no code folding means you need to scroll through lots of code to get to the bit you want to read. (the main file over 1200 lines long now) The main stumbling block to this was the Arduino libraries like the ones for the serial port and buffer needed to be rewritten. but that's all done now. I have also changes the data structures that hold all the global variables for the programme. with the removal of a jumper trace I found I could use and Atmel Dragon to debug the code on chip using DeBugWire.

The second action was brought about by the Raspberry Pi. if I write the control app in python then I can put it on a Pi and with a small monitor I have a cheap high powered CAM and GUI on my machine. The latency and timing jitter for a multitasking operating systems makes running the stepper driver straight from the Pi a no starter (a problem I came across years ago when I tried something similar and converted a Boxford Duet controller to a PIC18F4550 and use VB to calculate the steps and timings).  So the best solution is to have the fast computer (Pi) do all the fancy stuff and then just tell the uC (Arduino) what to in terms of lines and arcs and at what speed. this means that the machine need only implement G0,1,2 and 3 as well as a few others and a handful of M codes making the coding much easier and then things like G53 and G54 or G90 or G20 all get dealt with by the python host controller.

So its all getting somewhere and I shall post some pics/code in a few days, all being well.

1 comment:

  1. I have one Colinbus Profiler.
    I think in try your solution when you post the python program.

    Thanks.

    ReplyDelete