Welcome! Log In Create A New Profile

Advanced

Voltage controlled extruder signal

Posted by Pelzeb0b 
Voltage controlled extruder signal
May 03, 2017 02:47AM
Hi guys

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.

Thanks a lot for your help!
Re: Voltage controlled extruder signal
May 03, 2017 02:10PM
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.
Re: Voltage controlled extruder signal
May 04, 2017 08:57AM
Hey

This sounds like a good idea! Thanks for your help. However, I'm a bit lost when it comes to the firmware. Where is the gcode parsing done in the code?

I wonder if it wouln't be easier to somehow edit the gcode beforehand with an M42 command according to the Gcode's feed rate.
Re: Voltage controlled extruder signal
May 04, 2017 11:52AM
The gcode parsing is done in Marlin_main.cpp This is crude... But you can find the M48 handler by searching for 48: (maybe searching twice... But you will find it....)
Sorry, only registered users may post in this forum.

Click here to login