Ideas on simple data line

Thread Starter

Man_in_UK

Joined May 13, 2008
180
I'm looking for ideas to help me solve a problem. There might be a perfect device out there that I don't know about ...yet.

At work we have a line of 10 machines with very simple controllers. If a machine drops into 'safe' mode it sounds a pathetic sounder and a team member is supposed to go and sort it out. It is easy to not hear the sounder so I am going to build something to make life better.

My device will monitor the sounder supply using a PIC chip and flash a light to help indicate this state with a visual indicator.
Simple.

I then thought about running a pair of wires, daisy-chained through all 10 machines to end up at a remote box that can also trigger a light/sounder if any of the machines go 'safe'. This can even be placed in a separate room.

Now to my problem. I would like to have a display to show what machine has gone 'safe'. Running 10 separate pairs of wires is not an option so I am looking for a simple, robust circuit that could use a daisy-chain pair to transmit an I.D to a decoder to indicate what machine has activated.
I know that PIC chips can easily talk to each other when placed in a circuit but these 10 machines are spread over 100 meters. I think I need more power captain!

A self contained transmitter/receiver module might do the trick but I have no experience in such things. Any advise would be most welcome.
 

Ya’akov

Joined Jan 27, 2019
9,071
While it's bigger than a PIC, I might lean towards something like Arduino Nanos with RS-485 transceivers.

RS-485 should do what you want from a communications perspective, and the Nano would offer easy interfacing with a lot of I/O if you want most diagnostics to be transmitted.

Just an idea.
 

AnalogKid

Joined Aug 1, 2013
10,987
For long distance and relatively low speed in an industrial environment, nothing beats RS-485. Like RS-232, it is a hardware protocol only. You use any data format you want. Most commonly, it is substituted for RS-232 in a situation like yours. Linear Tech, TI, ADI, and Maxim make RS-485 transceiver chips. Some PICs have a hardware UART built in, so the only thing left is the programming.

Having been down this road, let me say that a daisychain through multiple points over that distance is not automatically easier, cheaper, or more reliable than 10 home runs.

If history indicates that two or more machines never fail at the same time, an alternative is to put at optocoupler in parallel with each sounder, with a resistor in series with the output transistor. Use a different resistor value for each machine. Connect the 10 machines in parallel (2-wire parallel bus, not a daisychain), drive the loop with a relatively large resistor or current source, and look at the loop voltage to determine which machine has a fault. Zero programming, although a small PIC with an A/D input could read the bus voltage and generate a message or drive an indicator.

ak
 

Ya’akov

Joined Jan 27, 2019
9,071
You don't need any arduino nano a small 6 pin pic would do the job
Yes, but the effort to create the RS-485 network is much less with an existing module. Getting the PIC to talk RS-485 would end up with more complication than the cheap, premade, flexible Nano.
 

Ya’akov

Joined Jan 27, 2019
9,071
If history indicates that two or more machines never fail at the same time, an alternative is to put at optocoupler in parallel with each sounder, with a resistor in series with the output transistor. Use a different resistor value for each machine. Connect the 10 machines in parallel (2-wire parallel bus, not a daisychain), drive the loop with a relatively large resistor or current source, and look at the loop voltage to determine which machine has a fault. Zero programming, although a small PIC with an A/D input could read the bus voltage and generate a message or drive an indicator.

ak
This is a clever approach, but it has so many possible failure modes and seems like it would take a lot more development than sending a digital ID with status messages. It's also very narrow, while whatever digital method is adopted, it could be extended to include more information as needed.
 

MrChips

Joined Oct 2, 2009
30,714
Digital signalling over RS-485 is elegant and expandable.
However, I would go with a simpler solution.

1) Start with the cabling. To reach 100m, choose lamp cord (twisted or non-twisted pair).
2) For the device output, use a small mechanical relay.
3) For signalling, I like the idea of the parallel resistor. However, I would choose current loop.

If you have 12VDC or 24VDC available, each machine closes relay contacts that connect a resistor across the lamp cord pair. Select a unique resistor to create a current loop from 1mA to 20mA in steps of 1mA.

If you have 24VDC available, here are your resistance values:
Machine - Resistance (ohms)
1 - 24K
2 - 12K
3 - 8000
4 - 6000
5 - 4800
6 - 4000
7 - 3400
8 - 3000
9 - 2700
10 - 2400
11 - 2200
12 - 2000
13 - 1800
14 - 1700
15 - 1600
16 - 1500
17 - 1400
18 - 1300
19 - 1260
20 - 1200

For the higher machine numbers it becomes less accurate and you need to subtract the resistance of the cable. Place the highest numbered machine closest to the indicator end (where the 24VDC source is supplied).

It might be a good idea to have a permanent bridge of about 100kΩ across the wires to drive a minimum current loop of 0.24mA. This can indicate a fault if there is a break in the cable. If you do this, adjust the resistance value for the first two machines.

At the indicator end a simple ammeter or equivalent current measuring circuit will do.
 

BR-549

Joined Sep 22, 2013
4,928
The effect of a proper strobe lite can be quite impressive....like lightening. Gets everyone's attention in real time.

Attach a strobe to each machine, that turns on in save mode..... for a certain duration or an intermittent duration. Until reset.

I don't know your layout.....but like a welding arc.....line of sight is not always necessary.

Shouldn't be hard to integrate. A silent alarm.
 

pmd34

Joined Feb 22, 2014
527
You could look at using something like the Holtek encoder / decoder ICs - HT12A etc, to send an encoded - device specific signal down the cable as TTL or using an RS 485 / 232 IC. Though it gets more complicated if you have to be able to cope with more than one machine sending a signal at once.
 

Ya’akov

Joined Jan 27, 2019
9,071
Digital signalling over RS-485 is elegant and expandable.
However, I would go with a simpler solution.
At the indicator end a simple ammeter or equivalent current measuring circuit will do.
This is a nice approach. My own suggestion was based on my experience that “simple” things never stay that way. That wire is just might start looking attractive at some point (possibly to someone else) as infrastructure for some other signaling or control.

When I build systems, I try to work out the cost-benefit of a platform that can serve foundation for other imagined but not yet required uses. In this case, the engineering costs of doing it “simply” seems to be the same as doing it with premade parts that offer something to grow on.

I’ve had excellent empirical success with the “think big and scale down” method, so I tend to go there immediately. My approach may violate unstated constraints, the only one I saw was “I can only run one wire”.
 
Last edited:

Ya’akov

Joined Jan 27, 2019
9,071
Could you describe very briefly an example other than the current one? Gracias.
Whenever a project requires creating an infrastructure, for example a communications network, or a database, or a physical structure, the first thing I do is imagine how I might expand the use of that part. I don't try to limit those ideas, initially. Just imagine how it could be used in the future, because, in my experience, there is a very good chance someone (very possibly me) will try to piggy back on it.

Then, I consider what the additional cost (time, effort, money) would be to make the platform more flexible and compare it to the cost of making it more narrow. Sometimes, it is no more costly; sometimes it is slightly more; and in some cases I have found that thinking in this way gets me something less costly and more flexible while solving the original problem as well or better.

In some cases it means breaking a monolithic system into modular subsystems that can be reused or replaced as needed.

One case I can explain relatively easily was in the design of some research equipment for a robotics lab. It was for studying "swarming" behavior, and required the use of very simple robots controlled by sensors and discrete logic (comparators. etc). In the original design, it was monolithic and the graduate students involved (EE, but not very well up on circuits, which happens in research focused institutions) had a lot of trouble with reliability because of poor signal conditioning in the various designs they were building. Simple stuff was neglected because they simply weren't circuit designers.

So, we switched to a set of modular boards, each with standardized power and signal connectors, each producing standardized, conditioned outputs and accepting standardized inputs. The pinouts allowed them to be plugged together in a sort of DWIM (Do What I Mean) way, they would either work because it was a sensible connection or simply not work, but not blow up or damage each other.

It would have be "simpler" to have a competent designer do each configuration as required. Trivial for the right person. But, it was not terribly expensive to do what we did, and it paid for itself as new and unexpected configurations for other experiments were made possible.

So, in the end, this was the simpler option, for the imagined and realized future application.
 

AnalogKid

Joined Aug 1, 2013
10,987
Expanding on post #3 with various non-digital-datacom methods.

1. Nothing will be more reliable and have a lower TCO than 10 pieces of #18 shielded twisted pair, a home run from the monitoring station to each machine. Note that before CAT-x, 8-conductor, twisted-pair, home run topologies took over the world, there were not one but two, two-wire distributed bus standards for Ethernet and other LAN topologies. (The two wires were the center conductor and shield of coax.) They both lost out because they were a gigantic pain to troubleshoot; low and distributed COI (Cost of Installation), large TCO (Total Cost of Ownership). This is the most simple approach - a connection at each machine, an LED at the monitoring station, end. No chips, transistors, programming, common-ground issues, etc. If the power available at the sounder is not enough for the required LED brightness, then a bank of opto-couplers and a wall wart can drive any indicators you want.

2. Next up is the multiconductor cable approach. Separate pieces between machines will be more reliable than a single 100 meter length with wires broken out of the jacket at each machine. 12-conductor gets you dual-redundant grounds. The nine between-machine runs are identical; each piece has a male connector on one end and female on the other. At each machine is a short male-to-female jumper harness with one wire broken out for that machine. This is less reliable than #1 above because a connector problem at machine #5 can disrupt the signal from machine #9, and I can't stress enough that that will be a problem that will be in the future. Still, it is an 80% reduction in total wire length. To prevent un-common ground issues there has to be an optocoupler or small relay for each machine, and at least a wall wart at the indicator panel.

Both 1 and 2 are extremely simple approaches. If you really want to do a simple-but-distributed signalling system, then ...

3. If you don't want to do #1, I think a distributed, 2-wire analog bus is better than #2. There is a trade-off between low bus impedance (greater noise immunity) and higher bus current (more current to switch at the machines), but even with a relatively high current like 20 mA, the power dissipated in the current source circuit in a 12 V system would be less than 150 mW . A small power transistor can handle that without a heatsink. I'll try to get out a prelim schematic later.

TS - what is the sounder in each machine? type, voltage, current, etc.

Mr. Chips - Is there a reason you suggest a relay over an opto?

ak
 

MrChips

Joined Oct 2, 2009
30,714
Mr. Chips - Is there a reason you suggest a relay over an opto?

ak
Two reasons:

1) Zero resistance drop across a pair of mechanical contacts (I am suggesting current loop here),
2) The number of times the relays will be activated will be very low.
 
Top