Home › Forums › TinyG › TinyG Support › Is it possible to spec the \"polarity\" of Spin and Coolant I/Os?
Tagged: Spindle Coolant I/O
- This topic has 5 replies, 2 voices, and was last updated 6 years, 5 months ago by cmcgrath5035.
-
AuthorPosts
-
May 25, 2018 at 4:36 pm #10992jimtellierMember
I’ve got a dual relay board with optoisolator inputs that don’t want to work with the 3.?V outputs of Spin and Coolant pins. The board probably wants +5. But I am
able to use an “active low” trigger voltage, which would work just fine (I believe
the optos must have built in weak pullups, but no schematic so just a guess).
I don’t see a way to specify Polarity for these control outs; if that’s possible,
I’d love to just go that way, otherwise, do you have any suggestions for driving
such a board from TinyG? Anyone used any kind of “interface board” or such?
Thanks for any ideas!
JimMay 25, 2018 at 5:08 pm #10993cmcgrath5035ModeratorCaution – “optos must have built in weak pullups, but no schematic so just a guess” — Pullups to what voltage??
If any tinyG in or out sees more than 3.3V, weak or not, death could be imminent.I would verify first that the opto leads are completely isolated from any potentially large voltages.
It is likely that the tinyG outs can sink more current than it can source, but there is not easy logical(software) way to flip the “on” level for these outputs
Have a look at https://github.com/synthetos/g2/wiki/G2core-on-DUE—External-Interfaces
A single MOSFET switch such as shown in the “External Interface Suggestions” would work for your need.
the DUE and tinyG device hardwrae is similar, 3.3V logicMay 26, 2018 at 12:34 am #10994jimtellierMemberAh, good call on the pullup speculation! I’ll measure it, to be sure!
But looking at your link to interface recommendations, I don’t quite
see an exact parallel of my scenario to the DUE interface. I could
clearly use a MOSFET (P-channel, if I understand correctly) IF there
were a voltage source (e.g. +5) such as that available on the DUE.
But all I have available is +24V (TinyG, fan and relay coils), and the
+3V logic outs of Spin and Coolant pins.
I’m kinda flying blind here, without schematic for the relay board (which
btw is a SMAKN 24V 2-channel Opto-isolated board; the only spec they provide
is that it requires “5ma trigger current” – no voltage spec. I figured if it’s
a diode drop, 3V ought to do it, but setting the jumpers to “HI” trigger doesn’t
respond to +3 from the TinyG I/O’s. Jumpering to “LO” active inputs works by
setting the trigger inputs to GND. See my dilema?May 26, 2018 at 6:17 am #10995cmcgrath5035ModeratorOptoisolator inputs are typically an led in series with a limiting resistor of some sort. A fully on LED is generally around 2V.
tinyG has a Vmot to 12v regulator on board for driving 12V fans, I have used that to provide bias for interfaces like this. Most opto interfaces are rated for 5v to 18V or higher, but there is by no means a standard.
You may have to experiment a bit to determine if an external resistor would be needed to limit input current to 5ma if a FET switched 12V on and off.
May 28, 2018 at 5:14 pm #10996jimtellierMemberWell, I finally “got woke” and decided that since I’ve got +24V
available for the relay coil, I just found a switching NPN
and calc’d resistors to convert that to a 0 -> +5V emitter output, gated by
the 0 -> +3V. Using the “HI” mode on the relay board now works fine!
Thanks for the helpful info – steered me down the right path!
JimMay 29, 2018 at 9:53 pm #10997cmcgrath5035ModeratorGood news and good luck with your project.
-
AuthorPosts
- You must be logged in to reply to this topic.