DerAndere1 / contact_DerAndere1

Create an issue to communicate with DerAndere1 (DerAndere)
0 stars 0 forks source link

Make Syringe pumps with RAMPS #3

Closed scientistnobee closed 2 years ago

scientistnobee commented 3 years ago

Dear DerAndere,

I would like to make 3D-printed syringe pumps using RAMPS 1.4 board as the main controller. As far as I know, standard Marlin won't let me control each axis independently using G-code. Therefore, I would like to know if your firmware is more flexible in this regard. I know that you made IJK axis as async, but I want to know if I can run all the axis async, so that I can the pumps through G-codes. Many thanks in advance.

DerAndere1 commented 3 years ago

Sorry for the late reply. The newest Multi-axis-Marlin is in branch https://github.com/DerAndere1/Marlin/tree/6axis_dev, documentation at https://github.com/DerAndere1/Marlin/wiki . I never made the async feature work and thus removed it. So movement of all axes will start and stop simultaneously if you issue a single command like G1 X10 Y20 Z30 A40 B50 C60. Not a big deal if you just need specific volumes transfered by each syringe while feedrate does not matter as much. If feedrate matters, you would have to move each axis sequentially one after the other by issuing seperate commands per axis like

G1 X10
G1 Y20
G1 Z30
G1 A40
G1 B50
G1 C60
scientistnobee commented 3 years ago

Dear DerAndere,

Thanks for coming back to me on this matter. Your explanation for how to move the axis makes sense for syringes. However, If one wants 3 pumps at different feed rates simultaneously then it seems difficult to achieve with your current set-up. Am I right with that assumption. Also, I would like to know if you are still making an open-source liquid robot. Thanks again for your reply.

On Mon, Jan 4, 2021 at 4:02 PM DerAndere notifications@github.com wrote:

Sorry for the late reply. The newest Multi-axis-Marlin is in branch https://github.com/DerAndere1/Marlin/tree/6axis_dev, documentation at https://github.com/DerAndere1/Marlin/wiki . I never made the async feature work and thus removed it. So movement of all axes will start and stop simultaneously if you issue a single command like G1 X10 Y20 Z30 A40 B50 C60. Not a big deal if you just need specific volumes transfered by each syringe while feedrate does not matter as much. If feedrate matters. you would have to move each axis sequentially one after the other by issuing seperate commands per axis like

G1 X10 G1 Y20 G1 Z30 G1 A40 G1 B50 G1 C60

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DerAndere1/contact_DerAndere1/issues/3#issuecomment-754060410, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB427XTXCFFMBLCJSLWNJA3SYHRBDANCNFSM4UTQOLFQ .

DerAndere1 commented 3 years ago

G-code G1 is intended to deal with movement /positioning in 3D Space. If you have multiple independent steppers, they should be controlled by a custom protocol or using Custom-G-codes. The Evobliss project (https://bitbucket.org/afaina/evobliss-software/wiki/Home) with their Evobot took that route. They added custom commands for their Syringe, see https://bitbucket.org/afaina/evobliss-software/src/master/firmware/Marlin/Syringe.cpp. Explanation how to add custom G-codes or M-codes to Marlin-2.0.x is discussed here: https://3dprinting.stackexchange.com/questions/13705/adding-custom-m-or-g-codes-to-marlin-2-0

Regarding my robot: I plan to add circuit diagrams to the documentation, but other than that, not much. Maybe I will add a gripper. it was never my intention to invest more time in the hardware part. So my PipetBot-A8 will stay a basic test-bed. But you could get in touch with user @Daniele-Dondi (https://github.com/Daniele-Dondi) by commenting at https://github.com/DerAndere1/Marlin/issues/42 . (S)he is currently working on a lab robot.

DerAndere1 commented 2 years ago

The multi-axis support is now part of official https://github.com/MarlinFirmware/Marlin. I had a look at the Marlin fork of the evobliss project "evobot-software". From what I understand they also use custom G-codes M290 to move the syringe plunger and M291 to home the syringe: https://bitbucket.org/afaina/evobliss-software/src/master/firmware/Marlin/Marlin_main.cpp. They use command M295 to set the max feedrate for each axis. Something similar would also work for multiple syringe pumps with current official Marlin (using command M203). The G-code generator / CAM software needs capabilty of internal volume tracking. Then one would calculate the moves required for dispensing certain amounts of liquid in the G-code generator. The G-code generator splits the dispension up into individual G1 commands, whenever the number of simultaneously moving axes or the speed of any axis has to change. Lets say you want to dispense in total 110mL liquid from pump U and in total 150 mL of liquid from pump V at different (overlapping) timepoints and with different feedrates. The G-code generator / CAM software has to split this up into the following steps, e.g.:

  1. Dispense 100 mL U over 1 minute (requires speed: U 100mm/min)
  2. Dispense 10 mL U and 20 mL V over 1 minute (requires speeds: U 10 mm/min, V 20 mm/min)
  3. Dispense 30 mL V at same speed (required speed: V 20 mm/min)
  4. Dispense 100 mL V at 200 mL/min (required speed: V 200 mm/min)

For this example the G-code generator / CAM software needs to generate the following G-code script:

M203 U100 ;           set max speed U 100 mm/min
G1 U100 F99999 ;      try to move U at 99999 mm/min (Any high feedrate would work). will be limited by M203 max feedrate setting
M203 U10 V20  ;       set max speed U 10 mm/min, V 20 mm/min
G1 U10 V20 F99999 ;   try to move U, V at 99999 mm/min. will be limited to 10 and 20 mm/min by M203
M295 V20 ;            set max speed U 20 mm/min
G1 V30 F99999 ;       try to move U, V at 99999 mm/min. will be limited to 20 mm/min by M203
M203 V200 ;           set max speed V 200 mm/min
G1 V100 F99999 ;      try to move V at 99999 mm/min. will be limited to 200 mm/min by M203