View previous topic :: View next topic |
Author |
Message |
ufkyldrm
Joined: 21 May 2018 Posts: 27
|
5V parasite problem on long wires and environmental effects |
Posted: Fri Jul 27, 2018 11:30 am |
|
|
Hi guys.
I'm using pic on some industrial projects. Getting pulse from sensors with reed switch is one of them.
I'm getting wrong pulse signal because of environmental effects or cable length.
Is there any way to get this signal without parasite?
My wires are 10 meter but are surrounded by power cables for big machine. So they have magnetic field.
24v circuit with relay can be solution for that?
I heard capacitors can be used for that, do u have any filter solution? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19549
|
|
Posted: Fri Jul 27, 2018 11:35 am |
|
|
Big question. What type of wire?. Shielded cable?. Twisted pair?. Makes a huge difference. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Fri Jul 27, 2018 11:49 am |
|
|
I can run 10 to 15 MILES of solid copper wire and not get 'corrupted data', have so for 30 years.Industrial buildings, some with rooms FULL of arc welders and other 'noise' sources.
As Mr. T asks, what type of wiring AND what data speed / protocol / signalling are you using ? |
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Fri Jul 27, 2018 11:51 am |
|
|
Also, have you had a look (with an 'scope) at the interference signal from your big machine?
Will give you an idea of the size of problem you're dealing with.
Mike |
|
|
ufkyldrm
Joined: 21 May 2018 Posts: 27
|
|
Posted: Fri Jul 27, 2018 11:52 am |
|
|
Ttelmah wrote: | Big question. What type of wire?. Shielded cable?. Twisted pair?. Makes a huge difference. |
My cable is on link
https://www.igus.com.tr/product/1108 |
|
|
ufkyldrm
Joined: 21 May 2018 Posts: 27
|
|
Posted: Fri Jul 27, 2018 11:58 am |
|
|
temtronic wrote: | I can run 10 to 15 MILES of solid copper wire and not get 'corrupted data', have so for 30 years.Industrial buildings, some with rooms FULL of arc welders and other 'noise' sources.
As Mr. T asks, what type of wiring AND what data speed / protocol / signalling are you using ? |
thank u for your interest.
my cable is on link.
https://www.igus.com.tr/product/1108
I'm not using protocol for getting data. I'm getting direct pulse signal from mechanic water meters with reed switch, Just on off data. |
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Fri Jul 27, 2018 11:58 am |
|
|
Can you draw a simple diagram of your wiring arrangement?
Grounds, terminating components etc.
Mike |
|
|
ufkyldrm
Joined: 21 May 2018 Posts: 27
|
|
|
elcrcp
Joined: 11 Mar 2016 Posts: 62 Location: izmir / Turkey
|
|
Posted: Fri Jul 27, 2018 12:37 pm |
|
|
That is a problem commonly seen on industrial applications. Although there are several solutions suggested, what I would suggest is what I did.
-Use shielded cables and connect shields to common ground at one end (prefably on main circuit)
-Connect filter capacitors (in parallel) from picofarads to milifarads at main power input on your circuit
-(Optional) Use filter coils at both ends of signal cables like these ones https://www.ebay.co.uk/p/10pcs-5mm-Clip-on-Noise-Ferrite-Core-Ring-Bead-Filter-RFI-EMI-Cable-Clip/8014413332?iid=173142890423
First two option together solves the problem generally. _________________ There is nothing you can't do if you try |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19549
|
|
Posted: Fri Jul 27, 2018 12:42 pm |
|
|
Quote: |
Can you draw a simple diagram of your wiring arrangement?
Grounds, terminating components etc.
|
Ok Agree wholeheartedly with this question.
I'm getting the suspicion, you are just using the reed relay to pull the signal either up or down, and possibly just a pull up resistor taking it the other way.
Is this correct?.
Where is the power for this coming from?.
Draw the wiring.
How is it connected at the PIC end?.
What cores of this wire are used for what?. (Two core wire).
How is the shield connected?. Are you drawing power through the shield?. |
|
|
ufkyldrm
Joined: 21 May 2018 Posts: 27
|
|
Posted: Fri Jul 27, 2018 1:16 pm |
|
|
Ttelmah wrote: | Quote: |
Can you draw a simple diagram of your wiring arrangement?
Grounds, terminating components etc.
|
Ok Agree wholeheartedly with this question.
I'm getting the suspicion, you are just using the reed relay to pull the signal either up or down, and possibly just a pull up resistor taking it the other way.
Is this correct?.
Where is the power for this coming from?.
Draw the wiring.
How is it connected at the PIC end?.
What cores of this wire are used for what?. (Two core wire).
How is the shield connected?. Are you drawing power through the shield?. |
Im just using reed switch to on off signal, thats all. dont be suspicion.
Power is coming from 5 V arduino autput on machine panel. Arduino has other mission on the machine. Im just using its 5V supply and gnd. Is there a problem?
Im using two core wire.
I solders cable shield to the gnd. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19549
|
|
Posted: Fri Jul 27, 2018 2:05 pm |
|
|
So from the circuit, you have the wire shown coming out of the top of the Arduino board as one core in the cable, and the ground as the other?.
What resistor value?.
Which end of the cable is the shield connected?.
The resistor value wants to be low. The shield should be connected just at the PIC end. Then given this is not going to be a fast signal, a reasonable capactor between the signal and ground at the PIC end. |
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Fri Jul 27, 2018 2:12 pm |
|
|
Mr. T. and I suspect that you are not understand the nature of the problem you're facing.
I do not think you are being devious in any way.
You started by complaining of problems caused by a "big machine".
But you are not supplying the necessary detail of your system.
You've told us that your components are as below :-
Code: |
5V ----WWWWWW---------- ---------------------------------- ------|
| One of twisted pair cores |
\ |
Reed Switch \ ---------------------------------- ------|
| Other twisted pair core |
| |
0V--------------------- ---------------------------------- ------|
Screen
Signal Source Screened Twisted Pair Cable PIC
|
However, you are not telling us HOW they are connected.
I've left blank spaces for you to fill in.
Mike |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19549
|
|
Posted: Sat Jul 28, 2018 2:38 am |
|
|
I'm particularly suspicious there may be connections at both end of the shield, which can then result in current flowing in the shield, which can make it worse than useless. Also that the actual drive may be something like 4K7 or 10KR, which means that the line when pulled (up?) by this, is quite high impedance. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Sat Jul 28, 2018 7:16 am |
|
|
I had a look at his link..
Quote: | my diagram in on link. |
He has a 10K pullup on one side of the reed switch, gnd on the other.
At the very least he needs a filter cap (say .68mfd) at the PIC side of the connections. I suspect a fair amount of 'bounce', maybe add a .01 mfd across the reed switch itself.
I'd probably replace the 10K with a 1K pullup, depending on the current capacity of the reed switch. Better to drive 'hard' rather than 'soft'.
Eliminating EMI or 'noise' is 1/2 engineering, 1/2 black magic and 1/2 good luck.
Jay |
|
|
|