Translating digital inputs to analog voltage

WBahn

Joined Mar 31, 2012
32,920
The TS stated this:
What happens if two of them DO fault at the same time? What voltage is going to be seen by the receiver?

Does he just make all sixteen units promise to never fail if another unit has failed?

Your overview description has each unit producing a unique voltage in the event of a fault.

So, again, how do you envision taking the information from all sixteen units and conveying that to the receiver, in light of the fact that the possibility of multiple units faulting at the same time has to be allowed for?

One possibility that comes to mind would be a 16:1 analog mux that continuously cycles across the channels. The advantage of having the sixteen distinct voltage levels is that there's no need to set up a frame structure in order to determine which unit has faulted, since that information is conveyed by the voltage level. In fact, it doesn't even matter which unit is connected to which mux input, so there's a degree of ease-of-use and tolerance to set up errors that has some attraction. But it does come at the cost of quite a bit of complexity of implementation and/or set up depending on how the 16 distinct voltage levels are created.

A similar approach that is much easier to implement and set up would be to use something like the the CD4067 16:1 analog mux and then use resistor packs to create identical voltage divers for each channel that produce a voltage significantly different from Vdd.

Then take a binary counter that has at least five bits of output and connect the lower four bits to the channel select pins and the msb to the inhibit pin. Then put a weak pullup on the output to Vdd. At a clock of some kind (555 or watch crystal oscillator or whatever) and you are done. Your data now comes out as a 32-bit frame. Half of the frame is at Vdd and the other half has the data, at either 0 V or Vfault (or close, since it will be pulled off some by the passive pullup on the output). The receiving system uses the Vdd part of the frame to detect when the data portion of the frame starts. It could also use the length of the Vdd part of the frame to servo the sampling time, but with only 16 bits in the data portion of the frame, it should be pretty easy to avod framing errors.
 

Ian0

Joined Aug 7, 2020
13,158
What happens if two of them DO fault at the same time? What voltage is going to be seen by the receiver?
The TS said that "The analog value could only tell me one error at the time, but its better than nothing…."
That's why I suggested a priority encoder.
If there is more than one fault, any fault will alert the user who will attend to the machine and fix it. When it is restarted, and the highest priority fault is fixed, the remaining fault will be displayed; but the technician will then be present to fix it.
 

WBahn

Joined Mar 31, 2012
32,920
The TS said that "The analog value could only tell me one error at the time, but its better than nothing…."
That's why I suggested a priority encoder.
If there is more than one fault, any fault will alert the user who will attend to the machine and fix it. When it is restarted, and the highest priority fault is fixed, the remaining fault will be displayed; but the technician will then be present to fix it.
I was responding to a response to my response to a different suggestion. ;)
 

Thread Starter

Salomonander

Joined Mar 31, 2022
43
Well if it is possible to somehow show more than one error it would be amazing. But its no must. As soon as one unit fails i have to run to the installation anyways to fix it.
And no, the gsm is not out to date. G2 is here to stay in Germany. They have no plans of shutting it down anytime soon and its the most reliable net here.
 

Thread Starter

Salomonander

Joined Mar 31, 2022
43
The time based version sounds great - but way over my head :) im not good with all of this… if anyone provides a schemtic i can build it no problem. But i have hardly any knowledge about circuits.
 

WBahn

Joined Mar 31, 2012
32,920
Well if it is possible to somehow show more than one error it would be amazing. But its no must. As soon as one unit fails i have to run to the installation anyways to fix it.
And no, the gsm is not out to date. G2 is here to stay in Germany. They have no plans of shutting it down anytime soon and its the most reliable net here.
So here's an idea from the extremely simple end of the spectrum.

Take 16 resistors and connect one end of each to the fault indication output of one of the units. Then connect the other end of all sixteen together. They make resistor packs that have eight resistors connected just this way. Use two of those with the common pins tied together and you are done. That common connection is the voltage that you send over your GSM connection.

If I remember correctly, your units each produce a fault signal that is 0 V in the no-fault case and 24 V when a fault is detected. If that's correct, then under no fault conditions your voltage will be 0 V, but if one unit has a fault then your voltage will be about 1.5 V. Since you have to go regardless of which unit has the fault, how important is it to know which unit failed until you get there. If multiple units are faulted, the voltage level with have a 1.5 V for each a one (so if 4 units failed, the voltage will be about 6 V).
 

Thread Starter

Salomonander

Joined Mar 31, 2022
43
Thanks. But i want to know which unit failed. A failure of more than one is highly unlikely. And in a regular error scenario an identification would be great. Otherwise i could simply connect all fault units to one of the Gsm binary inputs.
 

Thread Starter

Salomonander

Joined Mar 31, 2022
43
What about the phoenix contact modules? Dont they do exactly what i need? I can get them cheap and whatever i would build, would need to be in that mechanical format. so buying them might even be cheaper than building something diy with extra housing etc. im just not certain if they really fit my purpose. Each unit does 8ch which i could connect to my 2x0-10V inputs
 

WBahn

Joined Mar 31, 2012
32,920
Thanks. But i want to know which unit failed. A failure of more than one is highly unlikely. And in a regular error scenario an identification would be great. Otherwise i could simply connect all fault units to one of the Gsm binary inputs.
No, do NOT simply connect all of the fault outputs together directly. If you do, then when there is a fault you will have one output trying to pull that wire to 24 V and fifteen outputs trying to pull it down to 0 V. This is known as contention and, depending on the circuitry in the units, could cause everything from excessive currents draw to misbehaving units to physical damage to the units.

You could still use this approach, except with different resistor values on each output so that you get a different voltage level depending on which unit has a fault. Thus if you get a single fault, you will know which unit faulted. If multiple units fault, then if you pick the resistor values with this in mind you can at least ensure that you get a voltage level that is different than you get for a single fault condition, letting you know that you have multiple faults, but not necessarily identifying how many or which ones.
 

Thread Starter

Salomonander

Joined Mar 31, 2022
43
But my fault units do not connect to ground in a „no error“ scenario. They are simply open - floating. Please correct me if im wrong.
 

du00000001

Joined Nov 10, 2020
191
You guys helped me a great deal before…. So ill try again. Asking for help politely :)
i do have an installation that features around 16 fault signals. Meaning, if any of my 16 units have an error
the according channel switches 24v. Now im looking for a way to translate these digital signals to a voltage that indicates to me which unit is faulty. I have a gsm that allows me to check a 0-60v input on the go. So my idea was to find a way to translate the 16 inputs accordingly. Say unit #1 goes down gives 1V, unit #5 goes down gives 5V, unit #12 = 12V and so on. I dont mind if it works for more than 16 channels. But thats not a must.
Any idea how to go about this? My supply voltage is a single 24V line.

Thanks!
proverb said:
If you've got a hammer, every problem looks like a nail.
Why this hassle with D2A and A2D conversion?

In our daily work we use shift registers: requires a slim SPI interface (MOSI is not required) and 2 8-Bit shift registers. Bit banging is an option if a hw SPI is not available.
Input adaptation (aka level adjustment) according to your preferences (from simple resistive divider to constant current load with adjustable load current).
That's it.

'HC(T)166 or 'HC(T)299 would do the job.
 

crutschow

Joined Mar 14, 2008
38,533
What about the phoenix contact modules? Dont they do exactly what i need?
That's an 8-bit D/A converter.
Don't see how you would use that for the 16 fault signals(?).

So if you are satisfied with just having only one fault at a time monitored then all you need is a resistor network of 17, 1% resistors in series.
For a 1V difference for each fault switch, connect a 787Ω resistor to the 24V power in series with 16 100Ω resistors, with the last one tied to ground (below).
Connect one terminal of each NO fault switch to the junction of its respective 100Ω resistor (shown for SW1 and SW16).
Connect all the other terminals of the fault switches together and connect that to the SMS A/D analog input, along with a 50kΩ resistor to ground.
Thus if any fault switch closes, the A/D input voltage will be from1V to 16V, with the voltage approximately equal to the closed switch position.

That all make sense?

1663344225352.png
 
Last edited:

pyroartist

Joined Oct 9, 2015
131
Can't you just hook up 16 LED/resistors and see which one is on to show the fault?
Also what is a GSM? Something to do with cell phones? I agree with kaindub. Almost all US cell phone networks now only function with 4G or 5G equipment. (I think he meant to say GPRS).
 

crutschow

Joined Mar 14, 2008
38,533
Can't you just hook up 16 LED/resistors and see which one is on to show the fault?
Also what is a GSM?
If you read all the posts you wouldn't need to ask those questions. :rolleyes:

The TS wants the information remotely which is sent by the GSM module.
And the TS is in Germany, not the US, where GSM is still used.
 
Last edited:

crutschow

Joined Mar 14, 2008
38,533
regarding the phoenix contact module, well id need two of them for 16 inputs.
Okay, so you would connect each Phoenix module's analog output to a respective GSM's A/D input (since it has two).

The module D/A generates an 8-bit, 10V output, so the minimum voltage step between different input faults would be 10V / 255 = 39.2mV.
The GSM module has a 15-bit, 60V, A/D input range, giving a resolution is 60V / 32767 = 1.83mV, thus you should have enough resolution (21.4 steps on the GSM A/D for one Phoenix step) to readily detect if there was more than one fault at a time, and which fault line(s) are active.
 
Last edited:
Top