E1-4 control with XY Joystick
-
Hi All,
I am a total noob hoping to get some guidance on which stones (boulders maybe) to look under..
Simply put I would like to control 4 different extruders (or their stepper motors rather) with a video game style XY controller. For example at center, zero extrusion anywhere, all the way top right, extruder 2 active at E*.* and so on.
I have looked through the forums and seen the PanelDue rotary implementation and other movement based things but I'm at ground zero figuring out how to transmit signals from a controller and turn them into variable control signals for E1-4. Hoping to do this on the fly independent of any running G-code.
Does anyone have any ideas on this? Any and all guidance would be much appreciated.
Thank you in advance for any input.
-JB
-
For your simple case there are "arduino" compatible joysticks, which can be wired to Duets IO pins as external triggers. You'd have to write a macro for each trigger.
-
@Studio3p is it all-or-nothing on each extruder? That is, if you are halfway from centre to top right, do you want extruder 2 running at half speed? Are there positions of the joystick where two (or more) extruders are supposed to run simultaneously but at different speeds?
-
@o_lampe ahhh, ok. I will look into this. I figured something like this would be the way. Thank you.
-
@achrn yes, I am hoping to have it variabl perhaps on a curve between 0 as min and E*.* as max according to position of the controller.
-
undefined Studio3p has marked this topic as solved
-
@Studio3p This is all speculation, but I think it might work (you'd need to do some testing).
You need analogue joystick if you want it to be continuously variable depending upon position, and I don't think triggers is going to help.
Duets can read analog signals (but different boards have different capabilities, and not on all ports) and you'll need at least two analogue inputs. With a joystick that's two variable voltage dividers you could connect the joystick up so the duet reads the values (in some sort of arbitrary scale) as sensors. If you can live with the mix ratio updating only every ten seconds or so then daemon.g could read the values of the sensors, process them and generate a M567 to adjust the mix ratio of extruders.
If the processing of joystick values is more complex you could do it all on an arduino (or similar) and have that spit out M567 commands on a serial port connected to teh paneldue port on the Duet.
The flaw in my approach is that I don't know if M567 will let you redefine mix ratios on the fly (ie as a job progresses), and how quick it takes effect.
-
@achrn said in E1-4 control with XY Joystick:
I don't know if M567 will let you redefine mix ratios on the fly (ie as a job progresses), and how quick it takes effect.
Yes you can, however it will only affect moves that are not already in the motion queue. So it will typically take until the end of the current move plus 2 seconds before it takes effect.
-
@achrn thank you for this update. This helps a lot.
These extruders are going to be independent of any program. It’s all stand alone and on the fly (for now).
-
@dc42 thank you for responding. Will this input work as a live control that is sent direct to the extruders according to the joystick control without a program running?
With this setup I intend to have the robot and main extrusion control on one Duet and these multiple extruders adding various mixtures according to the position of the joystick on another. So the other system will be taking care of all the movement and this system will just be adding to the slurry on the fly.