I got 2 non arduino boards. One of them has 4 digital inputs expecting a +24V signal and a common gnd.
The other one has digital outputs which switch gnd and a common 24V pin.
Can I interface those two just by putting a transistor in between?
Or what else do I need to make this happen. And what parts would be suitable to make it work?
Thanks for your help
First of all are these two systems powered off the same source?
If yes then you can't connect them up directly because connecting the common 24V to the common 0V will short out the supply.
If no, that is the power supplies are totally floating with respect to each other then you can connect the two directly. You need to measure that the power supplies are totally floating with respect to each.
The simplest, and safest way to couple these two systems however would be to use an optical isolator to transfer the signals from one to the other. Then it would not matter if the supplies were floating or not.
both devices are powered by one single power supply.
So you are saying I should use a SSR to connect both devices?
I need 6 signals in total 8 would be better.
That will take up quite some space and ssrs are not the cheapest.
would this work:
Input----transistor-----common 24V from Input socket
|
|
GND from output
An [u]opto-isolator[/u] is inexpensive. Solid State Relays are also optically isolated, but relays (usually) switch power, whereas opto-isolators switch signals.
An opto-isolator needs a current-limiting resistor on the input (for the LED) and it needs a pull-up resistor on the output. Similarly, a transistor needs a current-limiting resistor for the base and a pull-up.
Either one can be used to step-up or step-down the voltage.
A single-transistor is an inverter - Base-Emitter current enables Collector-Emitter current, which turns the transistor on, pulling-down the collector. With an Arduino that's no problem because you can invert the logic in software. An opto-isolator can work either way, depending on how you wire the LED side, and depending on if the driving circuit can "source" and/or "sink" current.
I got 2 non arduino boards. One of them has 4 digital inputs expecting a +24V signal and a common gnd.
The other one has digital outputs which switch gnd and a common 24V pin.
You save us a lot of guessing and just tell us what these mysterious boards are. If they’re some Chinese bargain card, a photograph would probably help.
Your statement needs clarification, specifically, “switch gnd and a common 24v pin”.
For these outputs, what is the actual switching element? A relay? A transistor? Please explain. Also, is the output setup to source current or sink current? Stated another way, does the unit switch the +24 volt supply to output pin (sourcing) or does it switch the ground connection (sinking)?
Note: Perhaps the value of the resistor needs to be changed, especially the 4.7k, depending on the current value that the input (with common GND) needs.
rtek1000:
Note: Perhaps the value of the resistor needs to be changed, especially the 4.7k, depending on the current value that the input (with common GND) needs.
No.
He said they run off the same supply so connecting common grounds is going to short out the supply.
Well, I was saying that the input that has the GND as common (indicated by the red arrow in the image) may need a higher current to be triggered with high logic value, so maybe the 4k7 pull-up resistor could not be enough,
So I also quoted the circuit in totem pole configuration, so the pull-up resistor is not supplying the current
KOR:
both devices are powered by one single power supply.
Yes, perhaps everything has become confusing, with the issue of "common to GND / common to 24V."
The fact is that the same battery is used for both boards, there is no need to connect the "common" wires, since they are already connected in common, and go to the battery, which is the same battery for both gadgets.
This "adapter" circuit should be enough to interface the two boards.
So you have sourcing inputs and sinking outputs and you want to invert one, which one? Sounds like you have I/O modules from a PLC, can't advise much without more info, post links to both boards.
KOR:
I got 2 non arduino boards. One of them has 4 digital inputs expecting a +24V signal and a common gnd.
The other one has digital outputs which switch gnd and a common 24V pin.
Please post a schematic drawing of what you have in mind, as I don't get what you're trying to do. That's going to be really helpful.
I've read but decided to ignore the rest of the discussion as 1) it seems that they also have no idea what you're trying to do and 2) obviously nobody knows what the others are really talking about. At least all that discussion is doing to me is causing total confusion.