Solved Duet 3 Mini 5+ controlling Power Supply with SSR
-
Recently changed my set-up from RAMPS 1.4 with Octoprint to Duet 3 Mini 5 + and trying to turn my power supply on and off using the PSON pin (in my case, io4.out) with a solid state relay.
This set-up worked fine with my raspberry pi but I can't seem to get the relay to switch on and off using the Duet. I think it is a wiring issue as I have added the Power ON/OFF to the web GUI and tried M80 and M81 commands. I've tried using IO_4 5V_EXT, io4.out and GND but that didn't work. The set-up already includes a flyback diode which was present when it worked with my raspberry pi.
The solid state relay takes +, - and a trigger input pin.
Which pins should I be connecting these three pins to on the Duet 3 Mini 5 +?
-
@jaclop do you have a datasheet or schematic for the SSR board?
-
@dc42 it's an G3MB-202P 1565E, 5VDC Input Relay. Here's a datasheet of the relay https://components101.com/sites/default/files/component_datasheet/G3MB-202P-Datasheet.pdf and can't find a schematic for the board itself but it is this one: http://wiki.sunfounder.cc/index.php?title=1_Channel_5V_Solid_State_Relay_Module
-
@jaclop my AV program won't let me access that second link.
Additionally, you appear to have a transistor connected between the three wires on the left and the board.
What are the labels next t the three terminals on the left hand side of that boar in your photo? The wires are obscuring them.
I don't understand why that board is needed at all, other than to make it easier to connect to the SSR. The Duet can drive an SSR directly. Usually the control inputs of the SSR are connected + to _5V and - to PS_ON.
-
This is the ciruit with the transistor I used previously with the transistor, diode and resistor that can be seen in the previous photo:
https://www.susa.net/wordpress/2012/06/raspberry-pi-relay-using-gpio/
Here are the labels of the board:
I guess I can directly connect 5V to DC+, PSON to DC- and 3.3V to CH1?
Then when I use M80 and M81, I expect it will turn the relay on and off.
-
@jaclop As noted in the thread, the Duet board is designed to drive a SSR directly, and doesn't need the board, but with the board, I'd connect DC+ to 3.3V, DC- to GND, and the CH1 to io4.out. All three connections can be made on IO_4 header. This is making use of the fact that on a mini-5 IO_4 and ps_on are the same signal (but driven at different levels).
If that doesn't work, DC+ to a 5V connection somewhere on the Duet board, DC- to a GND connection somewhere on the board and CH1 to the pson pin. I don't think you can get the 5V from the EXT 5V connector, because that's just for feeding 5V in, you'll need to get it from somewhere else (this is why this is my second choice).
In either case you then need to test which polarity activates the SSR - ie whether you want
M80 C"pson"
orM80 C"!pson"
(the board markings suggest probably pulling the output low will switch the SSR on, but it's more definitive to try both and see what happens). -
@jaclop I can see that the board has a transistor driver on it. Please post a photo of the underside of that board, which may enable me to confirm my guess about how it should be connected.
-
Thanks for your help.
-
@jaclop thanks. I can see the traces clearly on the underside, but not on the top side. So I still can't work out the schematic. Can you provide a photo of the top side with good lighting?
I am a little concerned that there are high voltage connections close to low voltage connections on that board:
-
@dc42 Thanks again for your patience and help.
-
@jaclop it looks to me that you can connect DC+ to +5V, DC- to GND, and CH1 to the PS_ON pin.
-
@dc42 Thanks. Is it also recommended to use a snubber like so between the two live wire contacts? In the past, I had to replace the SSR every 9 months or so which I'm guessing were failing due to voltage spikes.
-
@jaclop a snubber is usually only needed when the SSR drives an inductive load.
I suspect that the SSR may have failed because the surge current that the PSU draws when you start it up was too large. A larger SSR such as SSR25DA might be a better choice and can be driven directly from +5V (+ve control input) and PS_ON (-ve control input). Note, many Fotek SSR25DA listings on shopping sites are fakes.
-
@dc42 Thanks. I could not get the SSR module working and due to the likelihood of future failures I have installed the SSR25DA but this is also not working.
I have M81 C"!pson" in my config.g file. I tried initially with i04.out and now have the positive input of the SSR25DA connected to 5V_EXT of IO_4 and the negative input of the SSR connected to pson. I have tried sending these commands: M80 C"!pson", M80 C"pson", M81 C"!pson", M81 C"pson, but the relay is not turning on the 12V PSU. My Duet Mini 5+ is being powered via the Micro USB using a 5V 2.5A power supply.
Am I doing something wrong or is there something I can try to troubleshoot this issue?
-
@jaclop
Which RRF version? -
From Machine-Specific General Tab:
Board: Duet 3 Mini 5+ (Mini5plus)
Firmware: RepRapFirmware for Duet 3 Mini 5+ 3.3RC2 (2021-05-11)
Duet WiFi Server Version: 1.26 -
-
@DIY-O-Sphere I added M80 to the end of the config file and applied the new configuration by running it but it did not activate the relay.
-
@jaclop
https://forum.duet3d.com/topic/19161/smart-remote-power-control?
Maybe the wiring diagram helps. Have a look on the input side of the relay.
You need the +5V and the middle pin of PS-On -
@DIY-O-Sphere Re-checked my wiring but I still can't get the relay to activate.
This is the relay, the 5V_EXT connection and the PSON connection:
Is activating the relay using a GPIO pin an option? If so, how would I do that?