Hello Arduino lovers!
I am new to Arduino world and I already need your help!
My question briefly:
How could I detect the presence of +/-24 Volts bus signals between two cables? It is not so important to read along the signals, but to distinguish whether there is a communication on the lines or there are just “silent” signals.
My problem in detail:
There is a rail bus system, where rail vehicles communicate over 2 sliding contacts (BUS-A & BUS-B) with the modem of the central controller. The bus communication runs between +/-24 Volts, with a data rate of 46.875 Kbits/s.
There is apparently occasional interruption somewhere in the rail bus system (Some of the vehicles in the system communicate, some not). Unfortunately, these interruptions are usually too short (several seconds to several minutes) to make the appropriate measurements in order to confine the point of interruption.
The idea:
My idea now is to “tap” 4 to 6 points in the rail bus system, measuring the voltage from BUS-A and BUS-B and input the result in the analog inputs of the Arduino. Should an interruption then happens, the Arduino (possibly with LEDs) will indicate which segments still communicate, which are not.
As the Arduino can receive 0-5V input voltage, I’m thinking to use a voltage divider as shown here (see “Measure a DC Voltage Between -15 V and 15 V”:
Microcontroller Interfacing , but for my value range (I used the way described there also to calculate the resistors. I have chosen R1=50k and I have found R2=10,42k and R3=13,16k, but this way does not confirm these resistors’ values in the first drawing Read Positive and Negative Voltage in Arduino - Electrical Engineering Stack Exchange).
Now, the BUS communication is used to send signals when a certain barcode (of the position of the vehicle?) is read, that’s why the current is normally direct but its value also often alternates. So, I think that I should interpret these signals in order to understand the interruption, but that’s a secondary problem to be solved in future.
My question:
Is that idea feasible? Is there another way to make that work? I’m not electrician, that’s why I have preferred the simplest idea.
*** I would be grateful for any useful idea!!***
The 3-resistor idea would work if the voltages are referenced to ground (but It's been a long time since my DC circuits class and it would take me awhile to work-out the ratios).
The problem is they are differential (referenced to each other).
I'd use a pair of opto-isolators (wired in opposite directions) with the output of each opto-isolator into an Arduino input pin.
Since you're not synchronized to the data rate you will read "no differential voltage" during transitions. You'll have to take that into account.
Now, the BUS communication is used to send signals when a certain barcode (of the position of the vehicle?) is read, that's why the current is normally direct but its value also often alternates. So, I think that I should interpret these signals in order to understand the interruption, but that's a secondary problem to be solved in future.
Of course, you'll need to know the protocol. There should be a transceiver chip you can use, but it might run off +/-24V.
Yeah, all the voltages are referenced to ground, that’s what I tried to do at least.
I think I understood, but could you also feed me with a schematic if you have time?
And sorry if the question is a bit stupid, but when you say referenced?
I mean if I use the voltage divider for the voltage of every bus, so two times, and I insert them to the two Arduino input pins and then try to interpret the signals using the info from both, wouldn’t that work?
I am thinking it a bit like Morse code, so I thought that if I monitor the signals, with a lot of effort I could interpret and then program it. As you can tell, I’m a bit better in programming than circuits..
Thanks a lot for your answer!
Use another modem like the one in central control. Connect it up to a laptop and clip onto the cables at various points. That will tell you whether there's a signal there or not.
Or you could disconnect the cables from the modem (at night, when no are trains running) and connect them to a signal generator running at 50KHz. Build a tuned circuit to detect 50KHz and use it to see how far along the line it can detect the signal. When the signal stops, or is badly degraded, you've found where the problem is.
I suspect that the problems are caused by intermittent bad joints. These are notoriously difficult to find.
Problem is the production runs 24 hours and stops only the weekends, but of course you can’t wait that long to fix the problem.. and it’s something that happens approximately once per 1-2 months but causes a lot of problem. And if you are not there the exact time that happens, then, some seconds or minutes later, it runs again and you can’t check about the signal.
The cables of the bus system have this composition if it helps anyhow..:
------------------------------------------------------------------------- POWER
------------------------------------------------------------------------- POWER
------------------------------------------------------------------------- POWER
------------------------------------------------------------------------- GND
------------------------------------------------------------------------- BUS A (+/-24V)
------------------------------------------------------------------------- BUS B (+/-24V)
Also, the problem is not entirely from the modem, because the vehicles that communicate with that modem run till one point normally! So I’m thinking to take the voltage from near there where it stops.
adavradou:
Problem is the production runs 24 hours and stops only the weekends, but of course you can’t wait that long to fix the problem.. and it’s something that happens approximately once per 1-2 months but causes a lot of problem. And if you are not there the exact time that happens, then, some seconds or minutes later, it runs again and you can’t check about the signal.
The cables of the bus system have this composition if it helps anyhow..:
------------------------------------------------------------------------- POWER
------------------------------------------------------------------------- POWER
------------------------------------------------------------------------- POWER
------------------------------------------------------------------------- GND
------------------------------------------------------------------------- BUS A (+/-24V)
------------------------------------------------------------------------- BUS B (+/-24V)
Also, the problem is not entirely from the modem, because the vehicles that communicate with that modem run till one point normally! So I’m thinking to take the voltage from near there where it stops.
You need to read the signals on the two buses. Use a second modem (like the one in central control) to read the signals at your test point. Use a laptop to see what signals this second modem is getting. If one is receiving a signal and the other isn't, then the problem lies between the two. If both get no signal at the same time, then the problem lies past your test point.