Issue 7i92 and Arduino Relay

More
10 Jul 2025 15:07 #331636 by hitchhiker
Issue 7i92 and Arduino Relay was created by hitchhiker
 

Hi dudes !i have a 7i92 .. on the gpio i have the IN from a relsy board.VCC 5V and GND are connected.GND is from 5V Powersupply and GND ftom the ID26 from the 7i92.Relay has a optocoupler.another relay has many jumper settings. i try both options no successhcan someone bring me back to the right route..? please 
Attachments:

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
10 Jul 2025 15:17 #331638 by tommylight
Replied by tommylight on topic Issue 7i92 and Arduino Relay
Is the same power supply powering Mesa and relays?

Please Log in or Create an account to join the conversation.

More
10 Jul 2025 15:29 #331640 by hitchhiker
Replied by hitchhiker on topic Issue 7i92 and Arduino Relay
yes same powersupply same GND and GND from the IDC parallel.


the relays work when i power them and put GND to the IN pin.

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
10 Jul 2025 15:34 #331643 by tommylight
Replied by tommylight on topic Issue 7i92 and Arduino Relay
How are you testing them?

Please Log in or Create an account to join the conversation.

More
10 Jul 2025 15:46 #331644 by PCW
Replied by PCW on topic Issue 7i92 and Arduino Relay
Is the 7I92 GPIO pin driving the relay set to output mode? 

Please Log in or Create an account to join the conversation.

More
10 Jul 2025 16:03 #331645 by hitchhiker
Replied by hitchhiker on topic Issue 7i92 and Arduino Relay
good question!

#*******************
# SPINDLE
#*******************


# ---setup spindle control signals---

net spindle-vel-cmd-rps <= spindle.0.speed-out-rps
net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
net spindle-vel-cmd-rpm <= spindle.0.speed-out
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs
net spindle-enable <= spindle.0.on
net spindle-cw <= spindle.0.forward
net spindle-ccw <= spindle.0.reverse
#net spindle-brake <= spindle.0.brake
net spindle-revs => spindle.0.revs
net spindle-at-speed => spindle.0.at-speed
net spindle-vel-fb-rps => spindle.0.speed-in
net spindle-index-enable <=> spindle.0.index-enable

net spindle-cw => [HMOT](CARD0).gpio.028.out
net spindle-ccw => [HMOT](CARD0).gpio.029.out
net spindle-enable => [HMOT](CARD0).pwmgen.00.enable
net spindle-vel-cmd-rpm => [HMOT](CARD0).pwmgen.00.value

setp [HMOT](CARD0).pwmgen.00.scale [SPINDLE_0]MAX_OUTPUT

# ---Setup spindle at speed signals---

net spindle-at-speed <= [HMOT](CARD0).gpio.017.in_not



This is all about it.

BUT the relay works with GND to the IN Pin.

I try to change over cross the Optocoupler pins.
then 5v should activate the Optocoupler.

on a other machine i have a different relay.. this works but need a 220ohm resistor between gpio and gnd to dont activate the relay when linuxcnc is closed..

i read this in the forum anywhere and it works for me.. think when linuxcnc is closed the busdrivers all send high to every gpio. or i am wrong??

thanks

Please Log in or Create an account to join the conversation.

More
10 Jul 2025 16:19 #331646 by PCW
Replied by PCW on topic Issue 7i92 and Arduino Relay
For a 7I92 (not 7I92T) you want the relay to be ground activated
as the 7I92 GPIO has pullups so will be high when LinuxCNC is not
running.

No 7I92 GPIO output will work until set into output mode, in addition
if the output is active low, you will likely want to invert the output
so a high hal signal activates the output. Something like:

setp [HMOT](CARD0).gpio.028.is_output  true
setp [HMOT](CARD0).gpio.029.is_output  true
setp [HMOT](CARD0).gpio.028.invert_output  true
setp [HMOT](CARD0).gpio.029.invert_output  true


 

Please Log in or Create an account to join the conversation.

More
10 Jul 2025 16:40 #331647 by hitchhiker
Replied by hitchhiker on topic Issue 7i92 and Arduino Relay
I try to cross the Optocoupler and reverse the led..

i have a 7i92t
Attachments:

Please Log in or Create an account to join the conversation.

More
10 Jul 2025 16:52 #331649 by hitchhiker
Replied by hitchhiker on topic Issue 7i92 and Arduino Relay
i saw i my other config that i done it how you said!

its a 7i92
now i have another machine with a 7i92t!

i check before solder action

Please Log in or Create an account to join the conversation.

More
10 Jul 2025 16:58 #331650 by PCW
Replied by PCW on topic Issue 7i92 and Arduino Relay
If you have a 7I92T, you can change the GPIO resistors to be pullups or pulldowns
so for active high devices, you should select the pulldown option.

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.117 seconds
Powered by Kunena Forum