Ideas on simple data line

Thread Starter

Man_in_UK

Joined May 13, 2008
192
Thanks everyone for the input.

Some PICs have a hardware UART built in, so the only thing left is the programming.

although a small PIC with an A/D input could read the bus voltage and generate a message or drive an indicator.
ak
I have no experience with using UART but if a PIC can do this, I will be looking into it. I will be using a PIC so getting the next model up to gain this feature will be no hardship. Learning how to use it and the associated hardware might be my limit.

As for the idea on measuring voltage ..... I like it.

If you have 24VDC available, here are your resistance values:
Machine - Resistance (ohms)
1 - 24K
2 - 12K
At the indicator end a simple ammeter or equivalent current measuring circuit will do.
Cheers for a very detailed answer. I have never built anything that would measure 1ma steps before but I think this sort of solution will win over running multicore.


You could look at using something like the Holtek encoder / decoder ICs - HT12A.
I have experience in using the HT12 but it will still need line drivers to get the signal to the remote box.


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.
ak
Very interested in taking a look a the schematic ........... the sounder has not been selected yet. I will probably just put 12 VDC through a small relay to supply something like an KPEG350.
 

AnalogKid

Joined Aug 1, 2013
12,142
I thought (post #1) that the machine controllers already had sounders on them, and you were using that signal to drive your remote system.

ak
 

Thread Starter

Man_in_UK

Joined May 13, 2008
192
I thought (post #1) that the machine controllers already had sounders on them, and you were using that signal to drive your remote system.

ak
True I did say that but I said that to keep things simple. As the sounders are rubbish I will use my PIC to look for a trigger from the old sounder and then do my own thing.
Such as flash a beacon, pulse a sounder or even trigger a remote display.
 

AnalogKid

Joined Aug 1, 2013
12,142
OK then - what are the characteristics of the original sounder trigger signal? Voltage / current / shape (string of pulses, DC, square wave tone, etc.)?

ak
 

Thread Starter

Man_in_UK

Joined May 13, 2008
192
OK then - what are the characteristics of the original sounder trigger signal?
ak
The sounder being used at present is neutral switched but it is going to be removed and replaced by a resistor. I will use this signal to ground a pin on my PIC chip. This PIC will not just be running a sounder and light beacon (and possibly a remote display), there are other things going on but the only thing I cannot figure out just now is how to I.D each machine to the display.
 

Ya’akov

Joined Jan 27, 2019
10,239
The sounder being used at present is neutral switched but it is going to be removed and replaced by a resistor. I will use this signal to ground a pin on my PIC chip. This PIC will not just be running a sounder and light beacon (and possibly a remote display), there are other things going on but the only thing I cannot figure out just now is how to I.D each machine to the display.
Use morse code on the sounder.
 

MaxHeadRoom

Joined Jul 18, 2013
30,671
You could look at either Modbus or CANbus each would be polled by a master and could either all be PIC based or use a enunciator such as Maple Systems display etc.
Max.
 

djsfantasi

Joined Apr 11, 2010
9,237
Use a different resistor value for each machine and use an ADC pin on the μP to read the voltage of the sense wire. Each machine can be identified by its voltage...
 

bertus

Joined Apr 5, 2008
22,928
Hello,

I am with @djsfantasi .
When you have a loop with resistors and the values are 1 , 2 , 4 , 8 , 16 etc. you could add the values to calculate wich machines are down.
You could have NC contacts of relays accross the resistors.
When one or more open, the value can be measured.

Bertus

Edit: added relays info.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
12,142
Hello,

I am with @djsfantasi .
When you have a loop with resistors and the values are 1 , 2 , 4 , 8 , 16 etc. you could add the values to calculate which machines are down.
Don't think so. With 10 machines, you would need to resolve 1024 different voltage levels, with the farthest source 100 m away in an industrial (noisy) environment.

ak
 

Thread Starter

Man_in_UK

Joined May 13, 2008
192
This has been buzzing about in my head for a time now. A different resistor for each machine seems to be the best solution ATM.

A thought came to me yesterday. Rather than measure resistance, why not measure time!

For me, it will be easier to program a PIC to measure time increments in 250ms steps, and to program each machine to cycle a closed relay for the correct duration. If I keep my time steps quite long, I can have a big error margin and still only need a 2 sec signal to indicate machine #10.
If the relay switching times are very stable, I can always drop the steps down to 100 - 150ms at a later time.
 

Ya’akov

Joined Jan 27, 2019
10,239
This has been buzzing about in my head for a time now. A different resistor for each machine seems to be the best solution ATM.

A thought came to me yesterday. Rather than measure resistance, why not measure time!

For me, it will be easier to program a PIC to measure time increments in 250ms steps, and to program each machine to cycle a closed relay for the correct duration. If I keep my time steps quite long, I can have a big error margin and still only need a 2 sec signal to indicate machine #10.
If the relay switching times are very stable, I can always drop the steps down to 100 - 150ms at a later time.
If you are using PICs anyway, why not just send a set of pulses, like a rotary phone, for the ID. If you are concerned about collisions, you can create a very lightweight CSMA scheme. Just have the nodes listen before talking, and use a random fallback. Anyway, it seems like simply pulse codes would solve the problem pretty well.
 

pmd34

Joined Feb 22, 2014
529
I would look at using a mosfet rather than a relay, as switching a relay off and on so fast will be rather noisy, sound and electronic wise.
You could also simply use a 555 timer of MIC 1555 to produce your pulses.
 

AnalogKid

Joined Aug 1, 2013
12,142
Since the timers have to be powered at each machine, and you want to avoid a 200 meter ground loop problem, I think we're back to an optocoupler. It is faster than a relay, and can sink enough current to give a firm indication.

ak
 

MrChips

Joined Oct 2, 2009
34,823
If you are contemplating going the digital coded technique, you might as well consider going WiFi with an ESP8266 module, Omega2 or something similar.

Try one station first and see how it works for you. There is not much to lose in trying.
 

Ya’akov

Joined Jan 27, 2019
10,239
If you are contemplating going the digital coded technique, you might as well consider going WiFi with an ESP8266 module, Omega2 or something similar.

Try one station first and see how it works for you. There is not much to lose in trying.
I just ordered a couple of ESP8266 modules with OLED displays on them for about $5.50 shipped. The little display was very attractive so I thought I'd give it a try.
 

Thread Starter

Man_in_UK

Joined May 13, 2008
192
switching a relay off and on so fast will be rather noisy,.
I was not going to be switching it on and of fast at all. The relay would pull in for 250ms and then turn off, wait a few seconds then repeat.
The second machine will pull the relay for 500ms and then turn of etc etc.

you might as well consider going WiFi
Try one station first and see how it works for you. There is not much to lose in trying.
We did once have Windows tablets across the site all on Wifi. We had to install 3 access points across the site as the connections problems got silly. I love the idea of wireless but not the reliability or the thought of making the software.
 

pmd34

Joined Feb 22, 2014
529
Well if you want wireless, you could just go for some of those 433MHz transceiver modules, you can get some that have a simple way of selecting the address. The main receiver might need a bit of microcontroller work I guess, as its not easy to find modules with many channels, but it would not be too difficult to set up.
 

MrSoftware

Joined Oct 29, 2013
2,273
I only skimmed so forgive me if I'm off center here, but if the goal is to flash some lights when the beeper goes off then you don't need a processor at all. Use some analog parts, a high impedance input to a latching relay, maybe use an OpAmp. When the beeper goes off, sense the power to the beeper with the high impedance input and use that signal to latch the power on to a timer circuit that makes a light blink. Include a push button reset. You can put the lights right on top of each machine so it's obvious which one is in trouble. You might even be able to cobble this together with off the shelf parts from Amazon. If you want remote lights, just run some cat5 or something similar to trigger the remote lights. For a remote display, make a panel with 10 LEDs, one for each machine, and just blink those.
 
Top