Controlling 5V relay via duet 3
-
Hi all,
A newcomer here and still learning the internals of duet 3/reprapfirmware.
I would like to control a 5V relay via duet 3 with a simple gcode command. It will turn on/off a 24VDC coil / 110VAC output contactor to power on/off the heatbed. Its just an extra safety feature that the heatbed wont powered on itself until duet 3 initiates the relay via a gcode command.
How should I approach this? Can I use 5V pins on ANY IO_0/IO_8 outputs to turn on/off the relay via gcode. How should I wire it correctly?
Here is the relay I have.
https://www.amazon.com/Qunqi-Channel-Optocoupler-Expansion-Raspberry/dp/B078478SZ9/ref=sr_1_14?dchild=1&keywords=5v+relay&qid=1598836680&sr=8-14 -
@astrn I did the same for a duet2 Eth. The wiring would be the essentially the same concept for the Duet 3. I am not familiar with the Duet 3 config file change required.
If it helps I have my wiring diagrams here:
https://www.randoprojects.com/2020/07/30/duet-2-soft-power-control/ -
@astrn said in Controlling 5V relay via duet 3:
Can I use 5V pins on ANY IO_0/IO_8 outputs to turn on/off the relay via gcode. How should I wire it correctly?
You can use the 5v for positive supply, but you'll need to get the negative from outn as the ion.out pins are not suited for high currents, nor have diodes to snub the coil in the relay.
-
@bearer I will power the relay via a dedicated PSU. I suppose I need to connect the relay control pin to either io.(X)in or io.(X)out pins, but which one?. Also what gcode command I should use to remap any of these pins and how? Sorry if sound as a total newbie. Still trying to learn.
-
Driver Current:15-20mA each
relay module, right. but still too much current for the ion.out pins, so you still have to use the outputs outn intended for fans etc.
look at M950 to configure the output, and M42 to control it.