I'm trying to connect a syringe pump to my 3D printer (UM2+). The extrusion speed of the pump is controlled by an analog voltage (0-10V) signal . I will connect the pump to the digital pin 13 on the ultimainboard and use an analogWrite to get the voltage for the speed. This is still fine. However, now I want to link this signal to the extrusion signal of the printer.
As I understand it the controller gives a step-signal (0V/5V) to the stepper driver at the speed that the extruder should run. When I look at the stepper.cpp it seems that the speed of this extrusion is controlled by step_rate. Would it be possible to send an analog signal relative to the step_rate instead of a High/Low signal during extrusion? I tried to get my head around the extrusion process of marlin but wasn't able to fully understand the whole thing.
Yes. This can be done. But shift gears a little bit... Each GCode command for movement will have a feedrate associated with it. If the feedrate is too high... the step rate of which ever axis is going to limit the movement will be used. You can probably just use the GCode's feed rate to map directly to an analog voltage. And then set the voltage to zero at the end of the movement. Marlin accelerates and de-accelerates the various axis. You could probably ignore that initially. But later once it is working some what... you could keep output new voltages as marlin accelerates the speed the carriage is going.
Edited 1 time(s). Last edit at 05/03/2017 02:11PM by Roxy.