hybris
Posts: 52
Joined: Mon Jun 03, 2013 8:50 pm
Location: Tyrol / Austria

Re: LinuxCNC

Thu Aug 01, 2013 8:25 pm

1: i'll try them and will tell you if they worked!

2: great, thanks!

greets

MrGreg
Posts: 66
Joined: Sun Jun 10, 2012 7:25 pm

Re: LinuxCNC

Thu Aug 01, 2013 10:32 pm

@ Hybris

I would not think that chip is capable of delivering the necessary power to a nema 23 series stepper to achieve anything close to maximum rated dynamic torque especially in a micro stepping mode. It all rather depends on how fast you expect it to go and a load of other stuff as well.
It will spin it OK, but you may find does not have the output power you expect
A good place to start would be motor manufactures data sheet.

They are V cheap so no harm in trying.

Good luck

Beutrocks
Posts: 52
Joined: Mon Apr 22, 2013 4:00 am

I know your no expert

Thu Aug 01, 2013 11:01 pm

Does anyone know if this motor I purchased would work with pololu boards or any inexpensive board. Or should I return it because I have heard it is bad for cnc mills. I may still be able to return it.

EDIT: I forgot the link it is http://www.mpja.com/Stepper-Motor-NEMA- ... 5837%20MS/

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: I know your no expert

Thu Aug 01, 2013 11:24 pm

Beutrocks wrote:Does anyone know if this motor I purchased would work with pololu boards or any inexpensive board. Or should I return it because I have heard it is bad for cnc mills. I may still be able to return it.

EDIT: I forgot the link it is http://www.mpja.com/Stepper-Motor-NEMA- ... 5837%20MS/
This is a 5 pin unipolar motor. This will not work with your pololu driver.
42

Beutrocks
Posts: 52
Joined: Mon Apr 22, 2013 4:00 am

Phew

Fri Aug 02, 2013 12:42 pm

I just cancelled the motors order and will place another. I had done some much research only to realize by myself that the motor wouldn't work with the pololu I will find another.

Beutrocks
Posts: 52
Joined: Mon Apr 22, 2013 4:00 am

More Motors

Fri Aug 02, 2013 1:40 pm

I bought 3 motors from ebay. I had passed the offer a few times but after looking back it is a really good deal. nema 17 stepper 50 something oz-in holding torque and are new . They also are cheap to ship here is the link http://www.ebay.com/itm/Stepper-motor-N ... 4ab3b748b9 also would this work with pololu.

EDIT: More information is available as I got into contact withe the seller who seems to be nice. He said there is no official documentation "but hey 1 high quality new motor for $10 I'm not complaining." THough he did know that it has about 45 oz-in holding torque when run as bipolar and 38 oz-in holding torque as a uni polar motor. He also said they work nicely for him when he runs them at 1 amp and 12 volts. Good luck and if you need cheap motors I would highly recommend them.
Last edited by Beutrocks on Mon Aug 05, 2013 1:36 am, edited 1 time in total.

hybris
Posts: 52
Joined: Mon Jun 03, 2013 8:50 pm
Location: Tyrol / Austria

Re: LinuxCNC

Sat Aug 03, 2013 2:20 pm

@ MrGreg

You're right, it's maybe not powerfull enough.
My Nema23 has got 1.8 Nm and 2 Amps per phase. I'm planning to connect it bipolar serial. I googled a bit, now i found a chip which should supply enough power for the motor. It also needs a pwm signal, choppertype to reduce the power consumtion, input frequency is high enough i think, its microstep-able, it provides 3.5 amps maximum and its made for a bipolar serial connection.
what do you think about it? Or have i forgotten something?
http://www.toshiba.com/taec/components2 ... _27885.pdf

Thanks and greets
Tom

MrGreg
Posts: 66
Joined: Sun Jun 10, 2012 7:25 pm

Re: LinuxCNC

Sat Aug 03, 2013 9:42 pm

what do you think about it?
I think this stepper discussion is sliding off Topic !

However
The 6560 is commonly employed in Cheap Chinese type stepper drives.
Eg
http://www.ebay.co.uk/itm/3-Axis-TB6560 ... 53fb853b1e

Prob cheaper than you could source the parts to build one?
I have a similar one, It's OK but no more than entry level / just adequate ish
You might find this of interest?
http://www.geckodrive.com/support.html
If you really need power & speed, you prob want something like Gecko G540
But they are rather expensive

Back to LinuxCNC on the RPi :D

hybris
Posts: 52
Joined: Mon Jun 03, 2013 8:50 pm
Location: Tyrol / Austria

Re: LinuxCNC

Sun Aug 04, 2013 3:02 pm

I think this stepper discussion is sliding off Topic !
right!

But to complete this: I try the 6560 (don't know yet if i buy a circuit or build my own)
they are so cheap, if i'm not satisfied with them i can still switch to the gecko!
Back to LinuxCNC on the RPi :D
:D

greets
Tom

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: deb files

Mon Aug 05, 2013 2:39 pm

The following debian files can be installed on a normal Raspbian setup:

libxenomai1_2.6.2.1-git_armhf.deb
libxenomai-dev_2.6.2.1-git_armhf.deb
linuxcnc-git_2.6.0~pre_armhf.deb
linux-image-3.8-xenomai-git_3.8.13-xenomai-git_armhf.deb
xenomai-runtime_2.6.2.1-git_armhf.deb

MD5SUMS

Code: Select all

914b454debc06c0c307c0af0888a53db  libxenomai1_2.6.2.1-git_armhf.deb
7d2acbe296b331e027e6c1bf21c3885b  libxenomai-dev_2.6.2.1-git_armhf.deb
44738c6712e68b32897cbacdde0bb6f1  linuxcnc-git_2.6.0~pre_armhf.deb
3ceb1b6d125e33ce2b6c08391eabf25c  linux-image-3.8-xenomai-git_3.8.13-xenomai-git_armhf.deb
d154e8b64ab33c991070192f56c60de5  xenomai-runtime_2.6.2.1-git_armhf.deb
The following steps were tested on a 2013-07-26-wheezy-raspbian.img setup.
Update: The steps also works on 2013-09-25-wheezy-raspbian.img .

Installation:
  • Install dependencies

    Code: Select all

    sudo apt-get install --no-install-recommends bc libglu1-mesa libgl1-mesa-swx11 \
    	bwidget libboost-python1.49.0 yapps2-runtime libboost-serialization1.49.0 libboost-thread1.49.0 \
    	libmodbus5 gtk2-engines-pixbuf python-gtk2 python-cairo 
    
  • If you need to recompile linuxcnc, install the following additional packages

    Code: Select all

    sudo apt-get install --no-install-recommends libglu1-mesa-dev libgl1-mesa-swx11-dev libglib2.0-dev \
    	libgtk2.0-dev tcl8.5-dev tk8.5-dev libxaw7-dev libreadline-gplv2-dev libncurses5-dev \
    	libboost-python-dev libboost-serialization-dev libboost-thread-dev libmodbus-dev libudev-dev gettext
    
  • Install the downloaded debs

    Code: Select all

    sudo dpkg -i linux-image-3.8-xenomai-git_3.8.13-xenomai-git-1_armhf.deb
    sudo dpkg -i libxenomai1_2.6.2.1-git_armhf.deb
    sudo dpkg -i xenomai-runtime_2.6.2.1-git_armhf.deb
    sudo dpkg -i libxenomai-dev_2.6.2.1-git_armhf.deb
    sudo dpkg -i linuxcnc-git_2.6.0~pre_armhf.deb
  • Add user pi to xenomai and kmem group

    Code: Select all

    sudo usermod -a -G xenomai,kmem pi
  • Update .bashrc

    Code: Select all

    echo ". /opt/linuxcnc/scripts/rip-environment" >> ~/.bashrc
  • Edit /boot/config.txt and add or edit the following line

    Code: Select all

    kernel=kernel_xenomai.img
  • Reboot

    Code: Select all

    sudo reboot
  • Perform a quick test by running the following command

    Code: Select all

    /usr/lib/xenomai/testsuite/latency
Note:
To use gladevcp, install the following files:

Code: Select all

sudo apt-get install python-gtkglext1 python-glade2 python-gtksourceview2 python-xlib
Update:
Removed the latest kernel as it is unstable:
linux-image-3.8-xenomai-git_3.8.13-xenomai-git-1_armhf.deb
Last edited by kinsa on Sat Mar 08, 2014 12:32 am, edited 7 times in total.
42

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Tue Aug 06, 2013 10:22 am

I have updated the linux kernel deb as the usb fixes were not applied. I can now use the joypad without skipping or stuck keys.

If you have installed the old kernel, just remove it by running the following before re-installing:

Code: Select all

sudo dpkg -r linux-image-3.8-xenomai-git
UPDATE:
The old kernel is much more stable than the latest one. :)
Last edited by kinsa on Wed Dec 04, 2013 1:39 am, edited 1 time in total.
42

hybris
Posts: 52
Joined: Mon Jun 03, 2013 8:50 pm
Location: Tyrol / Austria

Re: LinuxCNC

Wed Aug 07, 2013 7:35 am

i modified the circuit, the step/dir signals are on terminal blocks, so it could be wired to the driver board.
Image

driver board:
http://www.ebay.at/itm/Bausatz-Schrittm ... 1c349e60c9

how do i write or modify the firmware?

greets

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Wed Aug 07, 2013 8:34 am

hybris wrote:i modified the circuit, the step/dir signals are on terminal blocks, so it could be wired to the driver board.
Are you designing this for a printer or a mill? The breadboard version would be easier to modify if this is for a mill.
42

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Wed Aug 07, 2013 10:13 am

hybris wrote: how do i write or modify the firmware?
You'll need to modify the hardware.h file.

Do note that there is no code to handle the ADC yet as my printer isn't ready yet.

Regards
42

hybris
Posts: 52
Joined: Mon Jun 03, 2013 8:50 pm
Location: Tyrol / Austria

Re: LinuxCNC

Wed Aug 07, 2013 10:29 am

i'm building a mill.
Thanks, but which ADCs do you mean?

greets

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Wed Aug 07, 2013 10:59 am

hybris wrote:i'm building a mill.
Thanks, but which ADCs do you mean?

greets
The connectors J9 - J12 and the corresponding circuitry are for 3D printing which is not needed for your setup. You can greatly simplify your circuit if you use the breadboard version.

Regards
42

hybris
Posts: 52
Joined: Mon Jun 03, 2013 8:50 pm
Location: Tyrol / Austria

Re: LinuxCNC

Wed Aug 07, 2013 11:03 am

Great! :)

And the problem with ADCs is also with the printer only?

greets

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Wed Aug 07, 2013 11:24 am

hybris wrote:Great! :)
And the problem with ADCs is also with the printer only?
Yes.

It's not really a problem, it's still work-in-progress ;)
42

hybris
Posts: 52
Joined: Mon Jun 03, 2013 8:50 pm
Location: Tyrol / Austria

Re: LinuxCNC

Wed Aug 07, 2013 12:00 pm

kinsa wrote: Yes.

It's not really a problem, it's still work-in-progress ;)
Yeah, that's what i meant! :)

Beutrocks
Posts: 52
Joined: Mon Apr 22, 2013 4:00 am

wrapping up

Thu Aug 08, 2013 8:31 am

Alright I got my steppers and drivers but I was wondering of three 3 pololus could be powered by the raspberry pi 5v because I don't think I will use the micro stepping feature. Also how do I configure all the boards and such.
Thanks
Last edited by Beutrocks on Wed Feb 08, 2017 2:39 am, edited 1 time in total.

MrGreg
Posts: 66
Joined: Sun Jun 10, 2012 7:25 pm

Re: LinuxCNC

Thu Aug 08, 2013 10:16 pm

@ Beutrocks

We are sliding off topic and back into a stepper discussion again.......!

Re your Question
Errrr NO you really don't want to do that!
See, for all info on Pololu's

http://www.pololu.com/catalog/product/1182

Back to RPi LinuxCNC :)

MrGreg
Posts: 66
Joined: Sun Jun 10, 2012 7:25 pm

Re: LinuxCNC

Sun Aug 11, 2013 9:31 pm

@ All

I have not posted on this project for some time as I have been busy testing and re testing various iterations of Kinsa's lcnc for RPi. I guess around 100+hrs of actual cnc time (bench test rig) and prob another 50+hrs tinkering about & trying stuff.

So in reverse order:
The latest version
http://www.raspberrypi.org/phpBB3/viewt ... 03#p399603

Which I am currently testing on a Rev2 512M RPi and using Kinsa'a original PICnc board. This version is an installable which can be installed/integrated into a stock version of Raspbian (July 26 release).
So far:
This version is looking V good! Been running for circa 20hrs with no errors at all. There may be a slight memory leak in the Alpha / Development version of lcnc that this uses as mem usage seems to be steadily increasing, but I guess that is down to it being experimental pre release. There is greater cpu load compared to the previous lcnc-rpi 1.0 which had a stripped down GUI for a generally leaner OS. There is apparently a deal of development work going on at lcnc to make lcnc in particular the Axis GUI much more efficient. Guess we will have to wait a while for that to happen. Possibly late this year?
I have also tried this version on the earlier Rev1 256M RPi. It does work for a while, but crashes, I believe due to it running out of memory. Given that it only has 256 to start with, running this somewhat more demanding experimental version seems to be a bit much for it at the current time. Perhaps this may be resolved in due time?

Couple of notes:
You will need to do Updates & Upgrades first to get the necessary dependencies to load.
Also the deb install instruction for lcnc itself seems to be missing from Kinsa's instructions (See above) although this may be due to me having problems with getting the dependencies to install correctly first time?

Next.... Previous version lcnc-rpi 1.0

This and the early first version was tested on a Rev1 256M RPi with the Orig PICnc board + some fixes and experimental mods. (courtesy of Kinsa behind the scenes)
The last test run went well with no apparent errors for some 40hrs+ This version seems to be better suited to the early 256 RPi. It ran TKMini (Mini) GUI quite comfortably at circa 80%cpu and Axis GUI could be run at slightly less than 100% cpu by increasing Display CYCLE_TIME = 0.25 which seemed a reasonable compromise between backplot display and general responsivity.

So to sum up:

This LinuxCNC project for the RPI is looking really Really viable! I hope and believe it will have a great future with modest CNCers, the 3D Printer people and other cnc type applications.
This is though a very developmental/experimental project and is still a "Work in progress" So not a finished and ready for everybody solution just yet. But getting quite near!

Big Thanks to Kinsa for doing an enormous amount of work to make this happen and publishing Open Source and providing accessible support documentation, firmware, hardware schematics, examples of sample configurations, and the list goes on....

Cheers

MrGreg

Edit: Brief addendum. Main test gcode was Axis Splash code & arcspiral.ngc from lcnc Examples folder

jessejames
Posts: 1
Joined: Wed Aug 14, 2013 12:09 am

Re: LinuxCNC

Wed Aug 14, 2013 12:28 am

I'm new to the Raspberry PI, as in 3 days new.
I have a cnc router being put together which I have bought these nema 23 stepper motor drivers to run the cnc http://www.evarobotics.com/evodrive/st- ... rive-st-23.
My question about the PICnc project is this board an attempt to execute Linuxcnc from the PI to generate the gcode to run the steppers?
I'm a little confused on what you are trying to accomplish.

What I'm looking for is to use my PC running Aspire to model and generate the gcode and send this gcode to the SPI wirelessly.
However, I will need to incorporate an estop and limit switches.
Excuse my ignorance but is this what the PICnc is attempting to accomplish or is this a complete Linuxcnc stand alone?

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Wed Aug 14, 2013 1:41 am

MrGreg wrote: Couple of notes:
You will need to do Updates & Upgrades first to get the necessary dependencies to load.
Also the deb install instruction for lcnc itself seems to be missing from Kinsa's instructions (See above) although this may be due to me having problems with getting the dependencies to install correctly first time?
I've fixed the typo and updated the instructions.

Thanks for testing! :)
42

kinsa
Posts: 457
Joined: Sat Dec 01, 2012 10:16 pm

Re: LinuxCNC

Wed Aug 14, 2013 7:12 am

jessejames wrote:Excuse my ignorance but is this what the PICnc is attempting to accomplish or is this a complete Linuxcnc stand alone?
Basically RPi + PICnc board + stepper driver is equivalent to a PC + lpt port + stepper driver. Note both are running Linuxcnc.
42

Return to “Automation, sensing and robotics”