Active chamber heater
-
Hi everyone. I have been experimenting with an Arduino controlled active chamber heater for a Prusa i3. This has been successful and so my next step is to build a chamber heater for my Duet 3 Mini 5+ delta machine. This got me thinking as to how I might control the chamber heater. Presently the Arduino
does everything, so brings the chamber up to temperature and then I start the printer printing. Then later when I see the print is done I can slowly cool the part down. All very manual.For the Duet I'm thinking there is possibly a better way to do this. So I took a look in the Duet instructions and I see info on how to connect a simple chamber heater with thermistor and heating element. The thing is my chamber heater is more elaborate (Eg. multiple independently controlled fans) and so it would be better if the Duet could somehow tell the Arduino the desired temperature and the Arduino could report back the current temperature. Or something like that. I'm wondering if there is a meaningful way to do this and how. My brief searches suggest that canbus is used by a number of external boards, but if I went down this path would this require changes to the Duet firmware?
On one hand I have experience building and writing code for canbus devices for my day job. On the other hand, I don't want to embark on a massive mission.
-
@martinv There's a few ways you can control the Arduino from the Duet:
- Via serial port: you could send commands to the Arduino via the PanelDue port. The Arduino needs some programming to understand what is being sent, but could also provide feedback. This is probably the preferred method. A couple of projects that do this: https://docs.duet3d.com/en/User_manual/Connecting_hardware/IO_CNC_Pendant and https://github.com/mule1972/NeoPixelBLVmgn
- Via a pin that supports I2C: somewhat similar to the above
- Via a digital or PWM pin: you could use a digital (for on/off) or PWM pin on the Duet, and set that at a specific output, for the Arduino to read and set the chamber heater.
All of the above have been done at various times, search the forum for examples. Note that Arduinos usually run on 5V, while Duet run on 3.3V, so you may need to level shift between them, depending on which Arduino you have.
Ian
-
@droftarts the serial port sounds like a good idea to me. As you say there is the opportunity for feedback. Thanks for the idea!
-
@droftarts Hmm, having had a look at those two projects as well as generally reading up on PanelDue it looks to me like the Duet sends status information (bed, hotend temperatures etc.) to the PanelDue and the PanelDue sends control information like axis movements to the Duet. So if you're wanting to get in the middle of that, it's all good. I'm not presently seeing how I might use this for a chamber heater interface however. The communication looks to be in the wrong direction, as in the Duet might tell the PanelDue the chamber temperature, not the other way round. Am I missing something?
What I kind of need is a way to see the G-code "as it goes by" to the printer so that I can control the chamber heater. Then somehow to report the chamber temperature back to the Duet. Hmm...
-
@droftarts Ahh! I think I might have found something useful - M118.
Eg. M118 P2 S"SET_TEMP 60"
This looks to send the string "SET_TEMP 60" to serial port 2 of the Duet, which I could pick up using the Arduino. Not sure yet how I could send info in the other direction though; like chamber presently at 53C. Or how I could get the Duet to wait until the temperature hits 60.
-
@martinv using M118 to send custom commands is one possibility. Another would be to replace the Arduino with a SAMMYC21 development board and adapt the code that we provide for that board to include the functions that the Arduino does currently. That way you would use regular M141 and/or M191 commands to control the chamber heater. See https://docs.duet3d.com/en/Duet3D_hardware/Duet_3_family/Using_the_Sammy-C21_development_board_with_Duet_3.
-
@dc42 Thanks for the reply. I took a look at the link, but decided that's quite a departure from the Arduino and would be quite a lot of work to re-implement everything for a new development environment that's otherwise low on my radar. I'll hopefully set up a quick test in the coming days to have a look at the M118 command in more depth.