DUET 2 relay switch as external trigger
I'm trying to power an external relay switch so that I can supply an external trigger to some hardware I have connected to my CNC setup, however I'm having real trouble getting it going.
I need to draw +5v from the board in order to power the relay, but I really can't see how to set it up. I've spent time scrolling through this forum and looking at blogs on google but I'm drawing a blank on how I supply the two power pins to my relay switch such that I can turn it on and off on command?
Apologies if this is a stupid question, its my first time tinkering with anything like this and I'm doing it for work so really thrown in at the deep end and with time restrictions to work to as well!
So far I've identified the +5V and ground pins from the expansion board, and reading an online blog the PWM fans as a GPIO port but trying to connect them together such that I just have my live and ground going into my two terminals on the relay is confusing me.
Any help or direction to a forum post i may have missed would be very greatfully received
jay_s_uk last edited by jay_s_uk
@hughesymendes if you're not using any fan outputs, set them as 5v and use those
or if you are using them and have them set at a different voltage, use 5v from the board and a negative on a spare fan or heater connector.
if you're not using any fan outputs, set them as 5v and use those
How would I go about doing that? I tried setting Fan 2 as a GPIO with the M950 command; M950 P0 C"fan2" and then plugged one dupont connector onto the left hand pin of Fan 2 and another to ground so I could switch it on and off with the M42 command but nothing happened?
@hughesymendes all the fan outputs switch on the ground, not on the voltage.
either use the fan + supply or use 5v from elsewhere.
So does that mean its on by default and then I should switch off? As I can make that work by switching over my NO and NC on the relay. The only problem I have there is that when I run the FAN2 output through my multimeter and switch it off I'm only getting 0.6V as opposed to 5V when its on. Did you say it was possible to set the voltage on the Fan?
Again, sorry to ask such basic questions. I'm trying to learn this as I go without shorting anything out and blowing it up!
@hughesymendes which duet board do you have?
@jay_s_uk The DUET 2 Ethernet running Duet web control 3.3.0
@hughesymendes using this jumper here
Yeah I have that jumper set on the left two pins for the 5V selection but I'm still reading 0.5V. When I run a test script to switch the output off and on it works, it just isn't supplying 5V?
@hughesymendes as @jay_s_uk mentioned the fan2 control pin switches the ground side, not the 5V side. so you need to connect it to the negative side of the relay and 5V to the positive side of the relay. Before you do though, what current does the relay draw when switching?
Probably wirth doing a quick drawing of how you are planning on connecting everything.
@hughesymendes great you got it working. Just to be clear you don't want to be drawing 2A at 5V from the Duet 2, I assume you mean that the relay is switching 2A max?