Multiplexer 8 dry contacts to a 4-20mA or 0-10V analog

Thread Starter

baleck

Joined Nov 11, 2024
7
Hello,

For a project, I need to be able to generate a 4-20mA or 0-10V signal from 8 dry contacts input. Basically, the idea is to be able to encode a byte on the analog signal, to use it in a solution supporting only 4-20 or 0-10V.

I have been looking for hours for a simple solution, but the only solutions I can figure out involve expensive PLC. Ideally, I would like an on the shelf solution as I would like to avoid buying parts from different provider.

I have looked at PLC, FPGA & microcontrollers but could not find a simple, DIN rail ready device I could use for my development.

If any of you has a suggestion, I am all listening !

Thanks
 

MaxHeadRoom

Joined Jul 18, 2013
30,562
Have you looked at custom Pic micro source?
There are several options for custom PCT DIN rail mounting.
How are you using the term 'Dry Contact'??
 

KeithWalker

Joined Jul 10, 2017
3,603
You have only given us a very narrow window on your project. What exactly are you trying to do?
Will not a simple resistive divider do what you want?

D_A.jpg
 

Thread Starter

baleck

Joined Nov 11, 2024
7
The 8 "dry contact" (0 or 1) are 8 alarm status from a device to monitor.
I want to integrate at minimal cost these 8 status into a system with a 4-20mA interface.
The idea is to create a bitfield from these 8 status to create a byte (0-255) I want to encode on the 4-20mA.
As mentioned, I would like a fully integrated device and only have to flash some code to do the encoding.
I will look at PIC, do you have any advice on which one to use?

The resistive diviser looks like it will work, but I doubt it exist as a fully finish product.
 

KeithWalker

Joined Jul 10, 2017
3,603
We are still missing key information. In what format do you want the 8-bit data to be in on the 4-20mA bus? Do you want a serial digital stream or an analog level ? In other words, what does the part of the system that you have not told us about at the receiving end expect to see on the 4-20mA loop?
 

ericgibbs

Joined Jan 29, 2010
21,391
I plan to use the 4-20mA as a linear analog level 0 being 4mA and 255 being 20mA.
hi baleck,
That is a 16mA span, which when encoded on 8 bits is 256, gives only 62.5uAmps per Bit level.

Using 'dry contacts input' contacts is going to give serious bit resolution problems.

Can you say what is the actual project application?
E
 

Thread Starter

baleck

Joined Nov 11, 2024
7
Well, I can afford loosing one or two bits to improve the resolution. The idea is to develop a POC to see if it can work, and if yes, what are the drawbacks. That's why I am looking at the price.

I plan to integrate this to a monitoring system having a 4-20mA / 0-10V interface. I would like to combine as many status as possible in only one device to avoid having extra hardware. On the application side, I will then have a value representing the combination of all my alarms. I will be able to decode and know which status is triggered based on the value.

I have no other ways to integrate these status to the application.
 

KeithWalker

Joined Jul 10, 2017
3,603
An analog current loop is a really bad choice for transmitting 8 bit data. It will be very prone to intermittent false readings! Why are you not considering a simple digital data bus?
 

Thread Starter

baleck

Joined Nov 11, 2024
7
I am aware about the risks of false readings but again, there is no other way to integrate into the application.
Initial idea is to make a proof of concept. If I can transmit 6bits accurately, it will be good enough to me
 

Ya’akov

Joined Jan 27, 2019
10,226
I would do it serially, with two bits—mark and space. Divide the range in half, then scan the N contacts and send that serial string of bits using Manchester coding with some framing including a parity bit.
 

Thread Starter

baleck

Joined Nov 11, 2024
7
Well, this would be indeed a good design, but again, the only solution I have is a 4-20mA level. I don't have any control on the Monitoring system.

From my initial question, I guess I am going to use an arduino even if I would have preferred an industrial design.

Thanks for the inputs
 

MisterBill2

Joined Jan 23, 2018
27,186
It sounds a lot like the false economy of using an 8 bit D/A converter to generate an analog voltage in the zero to ten volt range, and then, at the other end,decode that analog value with an 8 bit A/D converter. That allows (256 minus 2) discrete messages, because zero and full scale can't be used. You can also do the same thing with two cheap PLCs from Automation Direct, but now it costs more.
 

MaxHeadRoom

Joined Jul 18, 2013
30,562
The 8 "dry contact" (0 or 1) are 8 alarm status from a device to monitor.
I will look at PIC, do you have any advice on which one to use?
The PIC starts at 8 pin up, dependent on what features you need.
Also 'Dry Contact' in my book has always been the usual definition of not being the primary switch, but one that does not directly switch power, as in an enable contact etc.
 

MisterBill2

Joined Jan 23, 2018
27,186
The 8 "dry contact" (0 or 1) are 8 alarm status from a device to monitor.
I want to integrate at minimal cost these 8 status into a system with a 4-20mA interface.
The idea is to create a bitfield from these 8 status to create a byte (0-255) I want to encode on the 4-20mA.
As mentioned, I would like a fully integrated device and only have to flash some code to do the encoding.
I will look at PIC, do you have any advice on which one to use?

The resistive diviser looks like it will work, but I doubt it exist as a fully finish product.
You are exactly describing a D/A converter IC, which will deliver an output voltage or current based on a digital 8 bit input. Since great speed has not been specified as a requirement, the device will be less expensive. And the technology is at least 60 years old. So there is a lot of data available. You are certainly not creating anything new!!
 

Thread Starter

baleck

Joined Nov 11, 2024
7
Well, I know I am not describing something new, but I cannot find any on the shelf product, only chipset and I would like to avoid buying the chipset, din casing, cabling and mount everything myself.
I might need up to 50 devices so I would like to avoid spending time on it
 

MisterBill2

Joined Jan 23, 2018
27,186
OK, now I understand that the TS is not seeking an IC device, but rather a complete D/A assembly. I doubt that such is currently available just because most applications that would use that sort of function also include a fair amount of digital logic, most often a processor. Those sort of assemblies went obsolete around 1970 .

In addition, K.W. is quite correct in post #19: It is not practical even though it is possible. And under no conditions is that scheme a good choice.
 
Last edited:

KeithWalker

Joined Jul 10, 2017
3,603
A device that converts 8 bit data into an 4-20mA loop is not practical so you are not going to find one. There are much simpler and more reliable ways to transmit 8 bit data.
 

Ya’akov

Joined Jan 27, 2019
10,226
Well, this would be indeed a good design, but again, the only solution I have is a 4-20mA level. I don't have any control on the Monitoring system.

From my initial question, I guess I am going to use an arduino even if I would have preferred an industrial design.

Thanks for the inputs
If this was a response to my post above it, then let me be clear that I was suggesting using your 4-20mA/0-10V channel for ASK serial data. And yes, will need some sort of MCU on each end.
 
Top