Hello! has anyone used duet for other purposes? like artwork?
-
@Freddiester I built a sand table that is using a Duet2 controller.
The table is about 2m x 1m. The sand is pure white baking soda, and is edge lit in blue on one side of the table and red on the opposite side. I used a corexy mechanism to move a 1" cube N52 neodymium magnet that pulls a steel ball through the sand.
The patterns are generated by a javascript program called Sandify that I did not write. The pattern files consist of a header full of comments followed by a long series of gcode commands that tell the ball where to go. In the video you'll see some wasted back and forth motion along the edges of the table. Some patterns have a lot of that and some don't have much. I have written a perl program to strip out that excess motion that reduces wear and tear on the mechanism, but more importantly, makes it more interesting to watch by cutting out a lot of the boring edge motion, and speeds the pattern completion on the table.
The Duet board is especially nice for this application because of the high microstepping and wifi access point mode. I can generate new patterns and upload them to the table via wifi, so the controller can be kept out of sight. The M98 gcode command allows playlists of patterns to be strung together so the table can be made to operate for as long as you want without any intervention.
-
Excellent!
You should consider attending Burning Man with your art.
3mm (aka playa-name..."Burner von Tron")
-
@mrehorstdmd
woww what a project! I am glad to hear that you like the duet board!
Nice documentation of your projects on your website also! Thank you! -
@bearer
sorry,
I may have had some mistake with my description, but what I meant was that I want to understand if it is possible to control stepper motors without the G-code.I think example of something similar is as the video below:
https://www.youtube.com/watch?v=fHAO7SW-SZIhope this is clearer! thank you!
-
@T3P3Tony
Thank you, I look forward to sharing the projects here! -
@Freddiester said in Hello! has anyone used duet for other purposes? like artwork?:
@bearer
sorry,
I may have had some mistake with my description, but what I meant was that I want to understand if it is possible to control stepper motors without the G-code.I think example of something similar is as the video below:
https://www.youtube.com/watch?v=fHAO7SW-SZIhope this is clearer! thank you!
Let me re-phrase, you'll need code to run the stepper drivers in one form or another. g-code is just by far the easiest. if you describe the motion your're after I'd be surprised if its not doable with g-code
-
@bearer
Thank you for the reply! I understand that G-code can control motors for any kind of motions. I just wanted to know if people tried to control it without, for example like hooking it with the xbox controller.
-
@Freddiester said in Hello! has anyone used duet for other purposes? like artwork?:
@bearer
Thank you for the reply! I understand that G-code can control motors for any kind of motions. I just wanted to know if people tried to control it without, for example like hooking it with the xbox controller.
If you're prepared to write the firmware for it, anything can be done! However, the Duet is a more complicated microcontroller than the simple Arduino Uno as shown in the clip you linked. For one, the processors, Atmel SAM4E8E in WiFi/Ethernet and Atmel SAM4S8C in Maestro, are not supported by the Arduino IDE (though the older Duet 0.6 and 0.85 boards are). This will mean using a different development environment to write the firmware, eg Eclipse, which is what RepRapFirmware is developed in.
The other problem is motor control. In the video you linked, the presenter is effectively writing a motor controller and motion planner. This has already been done in RepRapFirmware! It seems a bit crazy to duplicate that effort.
If you're just trying to hook up a USB Xbox controller to make motors move, probably the easiest thing to do is to use an intermediate board, like a Teensy, ESP8266, or Arduino, to take the input from the Xbox controller and convert it to commands the existing RepRapFirmware understands. This thread should help: https://forum.duet3d.com/topic/11389/cnc-style-pendant/22
Then you can set up any number of axes, linked to the relevant control on the Xbox controller, but with all the functionality that the RepRapFirmware allows.
Ian
-
All you need to drive stepper motors is some appropriately timed pulses going into a stepper driver chip. You can create them using crude stuff like 555 timer ICs and logic gates, or microcontrollers. No gcode is required just to spin a motor, but if you want to do much more than that, gcode can make it easier.
-
Hi Ian,
Thank you so much for your in depth reply! I now understand better about the board and am quite excited about the strength and the expandability of this thing! I look forward to put my hands on them soon!
Best,
F -
Reading an Xbox controller, from an Arduino, or a Raspberry PI, or an ESP32 is EASY. Part of my halloween costume this year used a Wii joystick controller being read by an ESP32 (which is a $4 or $5 imbedded processor, most noted for its "internet of things" uses) to then change some of the things on the costume. Simple. Easy. Cheap. And only took a few hours to code everything.
Making pulses to move one stepper motor, on any of the above platforms, is EASY. Making pulses to move several steppers is almost as easy.
Making a "motion controller" to achieve "Coordinated Linear Motion" of a physical object such as a 3D printer head, a CNC cutter, a magnet for a sand table, is HARD.
Consider the simple case of a CNC cutter moving along at some non-trivial speed in a straight line. Coming soon is a 90 degree corner. The physical carriage cannot instantly stop moving along the existing line, and cannot instantly start moving in along the new line. It must be smoothly deccelerated; this is likely to involve changing the rate of several motors. Once the corner is reached, the carriage must be accelerated along the new line. Again, likely this takes coordinated motion of several motors. And so on and so forth. This is complex code and takes lots of time to develop and test. Also, it exists, inside numerous controllers like Grbl or TinyG or Marlin or Klipper or Duet.
Same thing if an Xbox controller is feeding, only worse, because the motion planner cannot "look ahead" and see the next direction changes. So the carriage is moving along at a good clip and all of the sudden the person pulls the joystick almost directly opposite. Again, must decel, then accel, etc, etc. This is complex code.
So, yes, the Duet and other G-Code based controllers are designed to have "look ahead" planners that work from a sequence of commands. That's probably not the place to start for human (or other non-predictable) input to control steppers to move objects. It is most definitely the place to start for any motion that can be described or calculated or listed in advance.