I've attached an encoder to mig welding wire feeder unit to mesure and track the speed of motor subsequently using raspberry pi to monitor the pulses.

Thread Starter

Seema01

Joined Jan 11, 2020
58
The pulses generated by encoder. pulses are properly counted till the machine is swithed off but due to emi/emc once machine is turned on the readings are going berserk. how can I eliminate noise to get consistant encoder pulses. I'm using raspberry pi to monitor the pulses generated by the encoder.
 

Irving

Joined Jan 30, 2016
5,068
With some difficulty.... That's one of the worst possible environments.

What type of encoder is it?? Optical, inductive, magnetic, etc,? Signal level/polarity, and how connected to Pi? Pulse rate? Linky to data sheet?

Is problem when welder just switched on, or only when actually welding?

Obvious steps:
Screened cable from encoder to Pi.
Pi in grounded metal box.
Single ground point for encoder ground/screen, Pi, Pi supply.
Filtering on Pi input.
 
Last edited:

tautech

Joined Oct 8, 2019
496
Why ?
Wirefeeds are normally dumb and if you need control regulation it normally points to a dirty or stuffed liner.
I have had success in flushing the liner with solvent to remove the gunge buildup but an old trick is to feed the wire through a foam ear plug to wipe it clean before it gets to the feed rollers and liner.....but shitty wire will always give substandard results.
 

Thread Starter

Seema01

Joined Jan 11, 2020
58
Why ?
Wirefeeds are normally dumb and if you need control regulation it normally points to a dirty or stuffed liner.
I have had success in flushing the liner with solvent to remove the gunge buildup but an old trick is to feed the wire through a foam ear plug to wipe it clean before it gets to the feed rollers and liner.....but shitty wire will always give substandard results.
the torch is new so liner is absolutely clean an the wire is also uniformly coated. its just about having data from the machine from preventive perspective.
 

Thread Starter

Seema01

Joined Jan 11, 2020
58
With some difficulty.... That's one of the worst possible environments.

What type of encoder is it?? Optical, inductive, magnetic, etc,? Signal level/polarity, and how connected to Pi? Pulse rate? Linky to data sheet?

Is problem when welder just switched on, or only when actually welding?

Obvious steps:
Screened cable from encoder to Pi.
Pi in grounded metal box.
Single ground point for encoder ground/screen, Pi, Pi supply.
Filtering on Pi input.
Thank you for your reply.
Encoder is optical, kubler 8.5000.835B.1024.0020
single ground point is there. how do i filter the PI input??the problem starts by switching on the welder, welding might make it worse
 

Irving

Joined Jan 30, 2016
5,068
Thank you for your reply.
Encoder is optical, kubler 8.5000.835B.1024.0020
single ground point is there. how do i filter the PI input??the problem starts by switching on the welder, welding might make it worse
That's one seriously expensive encoder (if bought new!). Just to confirm, 835B is the one with the 10-30v push-pull output and integral cable? How have you connected it to the Pi?
 

tautech

Joined Oct 8, 2019
496
the torch is new so liner is absolutely clean an the wire is also uniformly coated. its just about having data from the machine from preventive perspective.
Hardly necessary IMHO.
Better to reverse engineer the circuit should it fail and take some voltage/readings for future reference.
Wirefeed circuits are pretty simple.
 

MisterBill2

Joined Jan 23, 2018
27,316
To reduce the pickup of that really serious noise, you need to use insulated wheels that contact the wire. The wire is directly coupled to the welder output, so the noise is many volts. AND then also use an opto isolator on your encoder output. A better scheme would be to count revolutions of the wire feed spool.
 

MaxHeadRoom

Joined Jul 18, 2013
30,595
The raspberry Pi inputs are only 3.3v !
I would also bond the common to earth ground in common with the machine common you are using. if interfacing other equip.
 

MisterBill2

Joined Jan 23, 2018
27,316
The raspberry Pi inputs are only 3.3v !
I would also bond the common to earth ground in common with the machine common you are using. if interfacing other equip.
I suggest caution if the encder connections are connected to the encoder body that is probably tied to the shaft,and thus tied to the welder output circuit. MANY AMPS at some noisy voltage.
 

MaxHeadRoom

Joined Jul 18, 2013
30,595
My phylosphy has always been to earth ground all parts of a system where at all possible, I recall one such implementation of Plasma Arc M/C that was ran with a ordinary PC, and used four PC controlled servo's via a Galil PC card.
The 18ft table was connected to a central GND rod together with the service earth conductor, and everything from the PC cabinet to the table was all earthed to this central GND rod.
It ran without any hicups whatsoever even through the 'noisy' Pilot arc stage.
 

MisterBill2

Joined Jan 23, 2018
27,316
ALL of the wire-feed welder systems that I have seen have the weld wire feeding from the NON_GROUNDED OUPUT of the weld power source. The isolation from the encoder grond wires would need to be rather carefully done.
 

MaxHeadRoom

Joined Jul 18, 2013
30,595
I recently worked on one shop that produced automotive exhaust systems, the whole work & jig was at ground potential, Others I recall were of the same construction?
Obviously the wire potential itself is above GND.
 

panic mode

Joined Oct 10, 2011
4,935
Encoder is optical, kubler 8.5000.835B.1024.0020
single ground point is there. how do i filter the PI input??the problem starts by switching on the welder, welding might make it worse
no link to the manual? signals are supposed to be differential, each on a different twisted pair, and have at least overall shield, better cables have also shield on every pair. external shield should be foil and braid, all shields tied together in one point - same point that ties them all to ground. everything need to be isolated. any cables with data/signals need to be away from sources of noise. for example they should be in a separate cable tray that need to be grounded. because of skin effect, grounding conductor need to be large and stranded or braided. grounding at one point is meant to prevent ground loops because they permit large current very close to signal and over long distances. so connecting shields together only at one place means loops are impossible. sometimes it is impossible to keep distance between cables. in that case they should be crossed to minimize coupling effect.

so what exactly is this "large grounding conductor". spot and arc-welding robic cells normally use 16mm^2 stranded wire or comparable braided wire.
1772744829451.png
1772744864645.png
 

MaxHeadRoom

Joined Jul 18, 2013
30,595
The encoder is 5vdc min, as Irving asked, how are you integrating to the Pi,?
What ver Pi is it, ? Latest Pi5?
Personally I would have used an incremental encoder type.
 

panic mode

Joined Oct 10, 2011
4,935
that was "mechanical" part of the problem. the other is interfacing to RPI.

this encoder appears to have simple push-pull 10-30V outputs. this is less than ideal since it is meant for simple (minimalist) interfacing to PLC but this is not good for noisy environment. the problem is that outputs are not differential - so all inverted lines are missing and that means no balancing and noise rejection. the 8.5000.835B supports inverted signals but this is only available on 8-pin or 12-pin connector versions, i don't see this available on a version with cable that you got.

things you need:
opto-isolation and level shifting ( 6N137 or similar, do NOT use common PC817 optocouplers - they are slow and will turn square wave into triangles)
optional but recommended differential receiver. although your signals are single ended (push-pull), using differential signal converter can improve noise immunity. if you do not plan on long cable run, just use Schmidt triggers on all three lines.
STP cabling with shield connected to GND at the controller (RPI interface).
enabled RPI watchdog to auto-reboot pi if EMI causes system to hang.
signal filtering in hardware ("light" RC filtering) 100pF or similar at optocoupler input (keep the noise on the "dirty" side, away from RPI input)

this is a low resolution encoder (only 1024 counts) so with 300kHz output up to some 17000RPM would be ok.
so i would use 2k2 at input and 1k to 2.2k at output of the optocoupler. if you are only using existing cable, it should be ok but if you are extending it (beyond 2m) you must use STP. treat A/A- and B/B- pairs as high-frequency data lines.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,316
I recently worked on one shop that produced automotive exhaust systems, the whole work & jig was at ground potential, Others I recall were of the same construction?
Obviously the wire potential itself is above GND.
Exactly my point!And the steel wire spool is also above ground, and probably the encoder housing, as well.
 

panic mode

Joined Oct 10, 2011
4,935
The Incremental pulses can be used x2 or x4 by using 2 edges or all four for both differential signals. !
of course... and nothing wrong with that - it is more than enough for this application. it is just that i rarely see them this low. most of the time i am looking at 16-24 bit per revolution (ST).
 

MisterBill2

Joined Jan 23, 2018
27,316
I revisited post #1 AND the thread title. Actually we have no clue as to the encoder instalation. AND I am guessing that there is an error : " pulses are properly counted till the machine is swithed off but due to emi/emc once machine is turned on the readings are going berserk. " I suspect the correct word would be "WHILE" the machine is switched off. This agrees with: " the problem starts by switching on the welder, " (Post #5)
While the encoder model is provided we have no detailsaboutte interfacebetween the encode output and the "PI" input.

In post #16 P.M. mentions: "this encoder appears to have simple push-pull 10-30V outputs."
With that sort of output I suggest adding a series diode and current limiting resistor and feed the output to an LED innput opto isolator with an adequate voltage rating , and a photo-transistor output. THAT should allow a noise free pulse string to the micro. Of course all of the connections to the isolator and micro should be isolated from both the welder power and the wire feed system.
 
Top