Gpio pins duet wifi
-
Is there any way to use the pins on the expansion header to control a 3 volt relay without using an expansion board. I basically need a fan to turn on and off it doesnt need pwm. If it is possible is there an ideal pin to use ?
-
Yes, you can use any of the 5 heater pins on the expansion connector.
-
would i need to put use M307 H4 A-1 C-1 D-1 to make heater 4 pin available first then reassign it to a fan? sorry this is all very new to me.
-
@davidvh86 said in Gpio pins duet wifi:
would i need to put use M307 H4 A-1 C-1 D-1 to make heater 4 pin available first then reassign it to a fan? sorry this is all very new to me.
Yes if using RRF 2.05.1. No if using RRF 3.1.1.
-
So no need for an m307
M950 F3 C"heater4" Q500
So would putting this code turn heater 4 pin into a fan?
-
@davidvh86 said in Gpio pins duet wifi:
So no need for an m307
M950 F3 C"heater4" Q500
So would putting this code turn heater 4 pin into a fan?
Yes.
-
@dc42
awesome thanks for your help. -
In case it wasn't clear, the pins can only sink it source a tiny current. So you'll most likely need to buffer it with a transistor of sorts of you want to control a relay (unless it's a ssr with a turn on current of about 2mA or less). Some pins may be able to do a little more, ref datasheet page 1350++ or so.
-
@bearer
well thats gonna be an issue lol. So it only has approx 2 ma of current? -
I got a Optocoupler Relay that has the has a separate power and signal input. hopefully it triggers properly.
-
you might be okay if its a darlington optocoupler, otherwise 2ma might be pushing limits. i'd either look up specs or measure the input current at 3.3v supply and add a series resistor to get below 2ma and see if it still works if needed.
-
I need help for setting up a relay in my Duet 2 wifi.
I connected the relay as in the picture, but it doesn't work ...
Commands assigned in config.g:TEST HEATER7
M950 P6 C "exp.heater7" Q500; allocate GPIO port 0 to heater3 on expansion connector, 500Hz
; M42 P6 S1; set 100% PWM on GPIO port 0 (Turn ON)
; M42 P6 S0; set 0% PWM on GPIO port 0 (Turn OFF)
Thanks. -
@gianluca Perhaps best to start a new thread with some more details.
-
I made a new post.
https://forum.duet3d.com/topic/23202/duet-2-wifi-relay-control-via-gpio