. .

Thread: Raspberry Pi

Page 3 of 5 FirstFirst 12345 LastLast

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by irving2008 View Post
    Nice n cheap and I might yet get one to play with but it doesn't have what i want on board, like the Ethernet...

    Here's one that does:


    http://www.ebay.co.uk/itm/NXP-LPC176...item3f19dcb8f9


    Or:


    http://www.ebay.co.uk/itm/Developmen...ht_5481wt_1139


    I reckon I'll get one of those, not sure which...
    Old router build log here. New router build log here. Lathe build log here.
    Electric motorbike project here.

  2. Quote Originally Posted by Jonathan View Post
    Here's one that does:


    http://www.ebay.co.uk/itm/NXP-LPC176...item3f19dcb8f9


    Or:


    http://www.ebay.co.uk/itm/Developmen...ht_5481wt_1139



    I reckon I'll get one of those, not sure which...
    Both nice boards tho without the touch screen of the original one you listed, but amazing pricing...

    But with only 512k rom/64k RAM you're going to have to do primarily bare-metal programming which is fine for a bit of bit-bashing, but (and I admit I've not done much research yet) I'd not want to write my own Ethernet software, web server, etc., etc. I guess there are examples of these around, but I want to focus on the CNC stuff not getting the basic platform up and running... a little googling suggests that there is limited info about this (compared to the Linux world) and a shed load of work even to do basic stuff like turn an LED on and off from a web page...

    But don't let me stop you....

  3. Nice n cheap and I might yet get one to play with but it doesn't have what i want on board, like the Ethernet...

    Give me a few days and I should have something sort of working... just getting my head round this linux stuff...

  4. Update:

    Have the bare bones of a program now that takes a buffer of step requests (# of steps, step rate, direction) in 4 dimensions X/Y/Z/A and outputs these under interrupt driven timing to the GPIO outputs. Without having to resort to a kernel level interrupt handler (which I will do when I've worked out how to get the Linux cross compiler to work) and using an out of the box user-space handler I am able to get 5,000 steps/sec on each axis with <10uS delta between channels (10kHz interrupt). That uses around 50% CPU on an unclocked Pi.

    Next is to get a basic G-code interpreter running and do the vector maths to handle acceleration/deceleration.

  5. #5
    I have a working G code reader written in C# for Microsoft Visual Studio if that would help?

    It's only really interested on G0-3 and tool changes but could be expanded.

  6. Quote Originally Posted by Robin Hewitt View Post
    I have a working G code reader written in C# for Microsoft Visual Studio if that would help?

    It's only really interested on G0-3 and tool changes but could be expanded.
    Thanks Robin, I'm sure it'll save me some effort... I'll PM you my email in case you've lost it :)

  7. #7
    Oops, forgot the cutarc() subroutine

    Let me know what else I forgot

    Robin
    Attached Files Attached Files

  8. Quote Originally Posted by Robin Hewitt View Post
    Oops, forgot the cutarc() subroutine

    Let me know what else I forgot

    Robin
    Thanks.

    Been playing around with interpolation routines but run into a snag... so need to go back and rethink the code I've written. Issue is this... in 2D to make it easy... want to move from 0,0 to 1000,1300 say (steps, not mm). Lets assume that the feed rate requires this to take 1 second... then the x rate is 1000steps/sec and the y rate is 1300 steps/sec. But I have a base rate of 5000 steps sec (10khz interrupt/2). so X is every 5th interrupt and y is every 3.85 interrupts.. but you cant do 3.85.. so i need a much higher interrupt rate and some interpolation... in this case 50000 and divisors of 38,38,39,38,38,39,38,38,38,39 per 5000 gives 1301 with a max error of 2 steps... So i need to get that kernel level interrupt working... in the meantime, i'll have to run it all at 1/10 speed :(

  9. #9
    bobc's Avatar
    Lives in Eastbourne, United Kingdom. Last Activity: 23-02-2015 Has been a member for 9-10 years. Has a total post count of 19.
    Quote Originally Posted by irving2008 View Post
    Thanks.

    Been playing around with interpolation routines but run into a snag... so need to go back and rethink the code I've written. Issue is this... in 2D to make it easy... want to move from 0,0 to 1000,1300 say (steps, not mm). Lets assume that the feed rate requires this to take 1 second... then the x rate is 1000steps/sec and the y rate is 1300 steps/sec. But I have a base rate of 5000 steps sec (10khz interrupt/2). so X is every 5th interrupt and y is every 3.85 interrupts.. but you cant do 3.85.. so i need a much higher interrupt rate and some interpolation... in this case 50000 and divisors of 38,38,39,38,38,39,38,38,38,39 per 5000 gives 1301 with a max error of 2 steps... So i need to get that kernel level interrupt working... in the meantime, i'll have to run it all at 1/10 speed :(
    You could try the Bresenham line algorithm, it extends to n dimensions.

  10. Quote Originally Posted by bobc View Post
    You could try the Bresenham line algorithm, it extends to n dimensions.
    I'm already using a modified form of that. The issue isn't one however of where the line goes, but how fast it goes in each axis. If the pulse rate is derived from a fixed clock, then the granularity of the pulse rate is limited.

Page 3 of 5 FirstFirst 12345 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. cnc print a raspberry
    By george uk in forum General Discussion
    Replies: 7
    Last Post: 13-06-2014, 01:13 PM
  2. Raspberry Pi as a PC + Mach3 .. very possible
    By Fivetide in forum General Electronics
    Replies: 2
    Last Post: 05-09-2012, 11:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •