Is it possible to set a digital output to open collector?
Moderators: TomKerekes, dynomotion
Is it possible to set a digital output to open collector?
On my CNC, the spindle relay is currently controlled by an open collector on its ground. Is it possible to configure one of Kflop's digital outputs to be open collector or can they only drive high?
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: Is it possible to set a digital output to open collector?
It depends on the voltage and current. KFLOP IO are basically 3.3V Outputs that drive high and low. Changing to input mode basically makes it “open” but it is still diode clamped to the 3.3V supply.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Is it possible to set a digital output to open collector?
Thanks for the quick reply - your reputation for responsiveness was a major deciding factor in my purchase decision.
To see if I understand correctly and assuming my 5V relay does not pull too much current, the way to do this would be to drive the digital I/O low when I want to turn the relay on and then switch the Digital I/O to an input when I wish I turn it off. Is that correct?
To see if I understand correctly and assuming my 5V relay does not pull too much current, the way to do this would be to drive the digital I/O low when I want to turn the relay on and then switch the Digital I/O to an input when I wish I turn it off. Is that correct?
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: Is it possible to set a digital output to open collector?
Hi dmo9,
KFLOP IO can only sink 16ma max. It is unlikely a relay coil will work with that limited current.
It isn't usually a good idea to connect inductive coils directly to KFLOP. If you do, be sure to ad a reverse flyback diode across the coil.
Setting a KFLOP output high will essentially connect it to 3.3V. So the 5V relay will "see" ~1.7V and likely turn off.
Setting a KFLOP as an input will allow it to float to ~3.8V. So the 5V relay will "see" ~1.2V and likely turn off. Not much difference in your case but if opto couplers are involved where the LED begins to conduct at 1.4V it can make a difference.
Consider using a relay board with coil drivers such as this.
HTH
KFLOP IO can only sink 16ma max. It is unlikely a relay coil will work with that limited current.
It isn't usually a good idea to connect inductive coils directly to KFLOP. If you do, be sure to ad a reverse flyback diode across the coil.
Setting a KFLOP output high will essentially connect it to 3.3V. So the 5V relay will "see" ~1.7V and likely turn off.
Setting a KFLOP as an input will allow it to float to ~3.8V. So the 5V relay will "see" ~1.2V and likely turn off. Not much difference in your case but if opto couplers are involved where the LED begins to conduct at 1.4V it can make a difference.
Consider using a relay board with coil drivers such as this.
HTH
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Is it possible to set a digital output to open collector?
Thanks for the advice, I actually ended up just using an NPN transistor!