ambrop72 / aprinter

3D printer firmware written in C++
Other
143 stars 42 forks source link

use aprinter for cnc laser on arduino due #22

Open mkeyno opened 8 years ago

mkeyno commented 8 years ago

hi guys and thanks for awesome firmware, I'm windows arduino user and I couldn't yet upload your firmware with your instruction , if you have better links or know any guys who did that , kindly let me know, also as well as someone used this firmware for cnc laser or plasma

best regards

ambrop72 commented 8 years ago

Hey, If you seek support please at least specify which board you want to use.

mkeyno commented 8 years ago

hi sorry for not mentioned in text but as in title I've just read about how this firmware would be fast with ARM processes such as Arduino Due , I have some experience to make cnc laser machine with Arduino Mega +Ramps1.4 + Marlin firmware which is wireleesly (HC-6) connected to repeitair but in practical find my machine not very robust due to low Pulse rate that AVR can generate , hence I decide to go with ARM processes, but it seems Marlin is not very rich to use ARM processes capabilities , then find this dime firmware and I really into it , so any help is really appreciated

ambrop72 commented 8 years ago

I would recommend the Duet board if you want to use Aprinter with an ARM-based controller. It is indeed able to generate steps much faster than AVR stuff; I remember testing it up to around 150kHz cumulative (if all steppers are added up). Though I think this is not exactly the best in class, e.g. Smoothie should be faster. And yes I do have some support for lasers (PWM-based output), though I don't know if anyone is using it.

mkeyno commented 8 years ago

tnx Ambrop72, as you may know the most commercial CNC broad have 200khz to 400 khz , . when I used Marlin it can interpret the G code for fire pin and intensity pin which is created with Inkspace plugin , however the Marlin is 3d printer nature and some guys modified code for laser use but the outcome is not real trustworthy and for example I have problem to control speed for travailing and printing mode, can you explain what is your basis for embedding the laser feature in original code?

ambrop72 commented 8 years ago

The current support for lasers is in the form of a single PWM output. It is explained in detail in the readme (see Lasers section).

mkeyno commented 8 years ago

I read your readme file but every laser PSU need two input , one for fire (Active) and one for strength (PWM) bean , do you have any Idea buddy ?

ambrop72 commented 8 years ago

The firmware only controls a PWM output. I admit I'm not familiar with such machines, but why and how would you want to control the Active pin? Are you sure it would be a good idea for the software to control it?

I see from the docs for Smoothieware that they also just drive a PWM output, so I am confused. Many people are using Smoothieware for laser cutters.

mkeyno commented 8 years ago

all laser power have these essential standard 2 pins, Smoothi directly connect active low to the ground and it is totally not commanded by any laser vendor , I use this revision of Marlin which is made by cool guy , https://github.com/TurnkeyTyranny/buildlog-lasercutter-marlin , he used 2 pin for laser power , I recommend check the laser.h and .cpp in his git, but the problem is, his not support and update the code's issue anymore and still have many problem to change the machine speed , but all rest function work very well , however I believe for reliable machine should pass AVR 8bit MCU behind . another mine issue with Smoothi is , it's not Arduino friendly as your code is, hence I have plan to do actual practice with your code

ambrop72 commented 8 years ago

Hey, I will add support for the active pin, it will be set at the exact time that a move which uses the laser begins, and cleared when the move ends and the next move does not use the laser. Also there will be an option to invert this logic. Is this right?

mkeyno commented 8 years ago

I don't know buddy , I've just want to implement your code in actual performance , we should wait and see what will come buddy
however I've just read this https://github.com/MarlinFirmware/Marlin/issues/626 @ scotty1024 links and noticed Smoothi is not very promising for development and many people look for Arduino frigidly ARM base firmware and I think your code would be good candidate , have you had any pull request for your firmware?

ambrop72 commented 8 years ago

Well, you can always try out Aprinter and see if it works for you. It supports quite some boards, including the Due that you are asking about. Please note however that I do not use the Arduino software (I have my own build setup relying on Nix).

have you had any pull request for your firmware?

A few, but I do have to say that it is generally not easy to understand the code, due to the (uniquely good :) design. For example, everything is 100% asynchronous, and I have my own HAL/drivers for most stuff including SD card and the FAT filesystem. Also, I have a very high criteria for code quality, I will not merge accept anything sub-par.

mkeyno commented 8 years ago

I know , I've check your codes before and totally is scary for me and that's why I thought it must outcome of team-working, however I was wondering how could I compile it in Arduino IDE and inserted into due?

ambrop72 commented 8 years ago

You cannot compile it in Arduino IDE. Either have the online web service compile it for you, or follow the instructions for building manually (you will require Linux), then use bossac to upload it to the chip (also in the README). I understand you may be familiar to the Arduino IDE but that is far from being a satisfactory target for software designed to be highly portable. So instead I have a unified build/configuration system built around the Nix package manager.

mkeyno commented 8 years ago

Thanks buddy ,I really appreciated if you could help me out for both configuration and upload-run the codes , also can use bossac in python environment in windows platform ?

ambrop72 commented 8 years ago

I don't know, I've never tried the flash.py script on Windows. I suppose it works if you make that bossac is in PATH. You can get bossac from an old Arduino IDE version (1.5.5).

Note: if you program over the UART (programming port), you need to put the board into boot mode first, by opening the port in baud rate 1200. I haven't tried doing that in Windows. If you can't figure it out, you can alternatively upload via the native port. To do so, connect the USB to the native (left) port, press the ERASE button on the board, then use something like the following bossac invocation:

bossac -p COM5 -i -e -w -v -b aprinter-nixbuild.bin -R

The difference from the command you'd use with the programming port is the absence of -U. Actually, uploading via the native port is the same as for Duet, so these instructions apply.

mkeyno commented 8 years ago

hi @ambrop72 we discuses about your firmware and its capability in this topic , I know you are pro on Due board and really appreciated if we have your idea about that ,