@injoi9000 I know this thread is very old, but I'm trying to do something almost exactly similar (control 88 solenoids). I'm very curious, did you manage to make it all work?
Posts made by arvest
-
RE: How to control 100 solenoids?!
-
RE: challenge: controlling 88 output pins
@dc42 good ideas here, thank you!
yes, we have our own slicer for this.
the voltage of the valves is 24V, current draw is about 70mA on average, peak current draw I have no idea, they are of the solenoid type. They will have there own power source, there will be a 3.3/5V control / communication signal to the valve controller board
So to summarize: you would use a separate valve controller (arduino + shift registers) to which you send the pattern for the current layer through M118 before starting the layer, and then using G1 + P parameter to pass the current position so the valve controller energizes the correct nozzles.
-
RE: challenge: controlling 88 output pins
@alankilian I guess you mean M118: Send Message to Specific Target to send it to the second UART.
Yes this would be definitely an option. I can also imagine using SPI would be an option, but I don't see any reference to that in the G-code documentation, other then misusing M150: Set LED colours for controlling LEDs, which apparently uses SPI?
-
RE: challenge: controlling 88 output pins
@dc42 please find here a rough sketch of the basic numbers on the printer.
So: 88 nozzles spread out over the Y axis, moving in X-direction. They are spaced 10mm apart, and spray a pattern of 5 mm wide. At the end of each stroke, the nozzles move 5 mm in Y-direction, and the other half of the print bed is covered on the back stroke (in the future this may be increased to 3.3mm Y-movement over 3 strokes).
Speed is ~0.2 m/s.
Thinking more about the X position update: 0.2mm is indeed quite extreme.. 1 mm resolution is more than plenty (even considering the possibility of 3.3mm spray size)
The X travel is actually 1380mm.
-
RE: challenge: controlling 88 output pins
@dc42 For a accuracy of 0.2 mm over 1000 mm, I guess around 13 bits would be the minimum. However, as the X motion is a constant speed motion, I can also imagine sending pulses every 0.2mm, possibly with some sync pulses every X centimeters.
-
challenge: controlling 88 output pins
Hello,
I would like to use the Duet3D 6HC main board for running a 3 axis 3d-printer. This printer however, uses 88 valves+nozzles to spray water on a print bed. It does this in a scanning motion, so for every X position there is a certain state (open/close) of all the 88 valves. This means I need 88 digital outputs.. which is not trivial on the Duet3d.
I was wondering what kind of ideas some of the experts here have to make this possible. I have full freedom in the design of the electronics that actually control the valves, so I could add a CAN or UART based port expanders, or some Ethernet based solution etc. Important is that the 88 outputs are controllable from the g-code (currently, in my prototype, I am using 3 valves using the M670 IO port bit mapping feature, but this won't scale up to 88 outputs as far as I know).
I am also considering a alternative solution of just sending the X position (either as a absolute value, or as a pulse-signal) to a external controller which has the pattern of the valves stored, which then sends the signals to the valves based on the position. But this is a bit more complex logistically, as each time the pattern needs to be uploaded to the external controller, plus the two need to communicate to synchronize beforehand). I prefer having everything in one g-code file.
I am curious what you think could be the possibilities, and what would be the easiest to implement / utilize.
-
RE: Control multiple nozzles
Digging around in the Firmware and documentation, got me to https://duet3d.dozuki.com/Wiki/M578 and from there to using the P parameter on the G1 command. It allows you to set a pattern of bits, mapped to GPIO pins defined in the M670 command.
This I think is exactly what I am looking for, and it seems the
SUPPORT_IOBITS
flag is enabled for the Duet2 WIFI (i.e. DuetNG), so it should work out of the box. I'll will try it as soon as I have the opportunity. -
RE: Control multiple nozzles
@deckingman Thanks for the reply. This is indeed something that could possibly work. I would have to do an experiment in how fast the tool change command is processed, as when I used M42 to set an GPIO output in between two G1 commands, I observed a delay.
I'll post an update when I get the chance to try this.
(Still, having an extruder set per GPIO would be the most elegant solution, still wonder if that is possible)
-
RE: Control multiple nozzles
@deckingman Ok, i'll upgrade the firmware asap and see if that allows for some new possibilities.
I think I didn't explain myself correctly. The problem I am having is that all nozzles need to be active all the time. While the print head makes a scanning move, along the path I need to repeatatly open/close each nozzle (not necessarily at the same time), without any delays/slow down of the printhead.
I guess using different tools would not be the cleanest, as then you'd have to change tool midway, which isn't a buffered command.
If I could use three extruders, one for each nozzle, I imagine the gcode could look something like:
... G1 X50 E1:0:1 ; move to X50 with nozzle 1 and 3 open, 2 is closed G1 X100 E0:1:1 ; continue moving to X100, but close nozzle 1 and open 2. Leave nozzle 3 open. ...
I hope I made myself more clear.
Is there maybe a way to create a new extruder based on a GPIO instead of a drive?
-
Control multiple nozzles
I'm building a machine to print cement using an array of nozzles, currently three of them.
My goal is to move in a scanning-type fashion, moving over the print bed in straight lines, with the line of nozzles perpendicular to the motion. Then I switch the nozzles on/off where water needs to be deposited, kind of like a dot matrix printer.The nozzles/valves accept a 3.3V and/or 5V signal to open. I'm using a Duet2 Wifi board, currently with firmware 2.03.
My question now is how to best configure the Duet. Currently I have it working for one nozzle: , I connected the nozzle to the FAN1 output, disabled the fan, set up a tool that uses extruder 0 and then using M571 made the FAN1 (=P21) to turn on with the extruder. Then with G0/G1 with a Ex.xx command, the fan will turn on.
However, as far as I could find, the Duet2 Wifi only allows two extruders to be defined (M563), so I cannot perform this trick for 3 nozzles.
I have read about laser mode, but I can also not find how to control more thane one 'laser' in that mode.
I have tried as well to use M42 to just switch the nozzles on/off in between move commands, but this results in a very slow switching. It needs to be bound the G0/G1 commands for smooth/fast switching.Any ideas about the best way to approach this?