DG4S Sampling time and Noise

This Section is for users to discuss hardware

DG4S Sampling time and Noise

Postby andrea.bignozzi » Mon Dec 04, 2023 11:19 am

Hi All,
I had a cnc with 3 DC motors (1.32mH and 0.7 Ohm) connected to 3 DG4S.
Everything was working fine, but after some maintenance to the X axis, the drive is loosing steps (0.5mm and more at random iteration), and the same problem is on Y axis that we dont' touch.
I tried to retune the PID with servoconfig, but it has random spikes that send the driver in error generating the position error.
I partially solved the problem (in long steps 1000) increasing the sampling time to 15 or more, but when testing on smaller steps (100) the system is instable
I checked the encoders with an oscilloscope, and the seem's working fine. I notice a spiky noise across all the channels and power (Image1). [Yellow A, Purple B, Cyan A_, Green B_],
The noise is present also if the encoreder is disconnected (Detail with disconnected encoder) so I think it's generated by the DG4S on the power line. [Yellow A, Purple B, Green is Power supply]
The noise, in some cases exeed the 1.6V, so should it be confused by the logic for a changing ede?
The frequence of the noise is around 17.6kHz, very near to the sampling base of 60us -> 16.66kHz (but should be the same because the measure I made is not so precise)

Any suggestion is welcome!

SDS00003.jpg
Image1

SDS00006.jpg
Detail with encoder

SDS00007.jpg
Detail with disconnected encoder

Spikes.jpg
Spikes

Capture.PNG
Instable

Capture2.PNG
Big overshot but stable
andrea.bignozzi
 
Posts: 4
Joined: Sun Jan 22, 2023 2:32 am

Re: DG4S Sampling time and Noise

Postby cncdrive » Mon Dec 04, 2023 12:14 pm

I don't understand the issue clearly.
I mean you wrote that the system was working properly, I assume it was tuned, but now is oscillating and loosing steps and that the same thing happens on both axis.
I think that loosing steps and oscillation are too different things, I mean they probably have different reasons.
The oscillation is likely bad tuning and maybe rotor to driven axis inertia problem or maybe the motor inductance and resistance is too low.
You could try to install some series inductance coil with the motor coil to see if it solves the problem.

For the lost steps I would check for noise on the step/dir lines and on the encoder lines, because if the steps are lost then one or both of these can happen.
Possibly use shielded encoder wires with the shield connected to ground on one side only.

Also verify that the powersupply voltage is not fluctating too much.
If the motor powersupply voltage is fluctating then install more capacitors on the DC bus and try to use shorter/thicker powersupply wires.
cncdrive
Site Admin
 
Posts: 4727
Joined: Tue Aug 12, 2014 11:17 pm

Re: DG4S Sampling time and Noise

Postby andrea.bignozzi » Mon Dec 04, 2023 3:13 pm

Let me clarify the problem.
I'm talking about steps on servoconfig3, so step/dir lines ar not the problem.
The problem should be the DG4S, The Motor, the Encoder, or the PID configuration.
We registered the X axis mechanics, so some difference in inertia should be possible, but y was untouched
I tried to rest the DG4S and reconfigure with the old working config, but some times it's stable (1/5) some time goes in error (4/5) and do not reach the target.
I run a 100 step test (0.5mm on the axis) and some times it moves 0.5 some other overshots and stops ad 0.8 or 1mm. (motor reset due to error exceeding 20000)
The power line is a double wave bridge that outputs 70V with 3 capacitors of 33000uF 15cm away from the bridge and 10cm from the DGS. They are connected with 2 couples of 6mm^2 cables to each DG4S. I'm testing only one motor at a time so I'll esculde the supply fluctuations.

Noise is present, and for me quite high (1.4/1.5V spikes on a 3.3 logic), but its generated from the DG4S, because is present in the 5V line, also with the encoders and DRVE disconnected and motor not running (see "Detail with disconnected encoder" picture)
It has a frequency very near to the max sampling freq of the DG4S 60us -> 16.67kHz so I think it's generated from the internal logic of the DG4S.
The cables are shielded, and grounded to one side both from encoder to DRVE and from DRVE to DG4S (the DRVE is half the way between encoder and DG4S).

Is there any internal filter for encoder noise? should I provide one?
I can try to add some coils to the motor, any suggestion on uH to use?
andrea.bignozzi
 
Posts: 4
Joined: Sun Jan 22, 2023 2:32 am

Re: DG4S Sampling time and Noise

Postby cncdrive » Wed Dec 06, 2023 7:18 pm

There is no 3.3V logic. The DG4S logic side is working with 5Volts.
MAybe you talking about the encoder lines Voltage, that could possibly work with lower voltages than 5V because the 26LS32/31 differential lines are current driven.
The DG4S logic side cannot really generate noise, I mean the logic side is fully isolated from the power side.
I would verify that the 12Volts powersupply Voltage is stable?

Also it is a question to me that when you saying that the motor is not reaching the target, does this mean it lost steps or does this mean it just did not reach the target?
The question is if the movement ends is there a remaining position error according to the servoconfigurator and is the error size is the same as the position remaining error?
cncdrive
Site Admin
 
Posts: 4727
Joined: Tue Aug 12, 2014 11:17 pm

Re: DG4S Sampling time and Noise

Postby andrea.bignozzi » Fri Dec 15, 2023 12:30 am

The problem was the encoder.
After a bit of research, (and changing point of view) I recognize the the channel A and B, as you can cleary see in the oscilloscope print in my previous posts, are no more in quadrature. The encoder was mechanically broken.
I replaced it with a new one (1000ppr) and on X axis the problem was solved.

I replaced also the Y encoder, and its running smooth, but in servoconfig, after 5/6 tests the controller resets.
Y_Drive.PNG

If I test with UCCNC, in a repetibility test (start from 0, go away 5cm and come back to 0) I loose 0.05mm more or less every run (measured on the table with a comparator)
If I run the test with servoconfig open in the diagnostic page, there is no correlation between the mm lost and the error cumulated.
In my setup I have 800steps=1mm -> 40 steps=0.05mm, so when I loose 0.05mm on the table, I expect to find a 40 steps increase on the error count in servoconfig, but after more the 1mm lost the error count is about 64 steps, and it does not increase every time I loose mm on the table, but quite in a random way.

The PID has a long tail with a 1 step error (+1 / -1) that I'm not able to remove. If I keep the Ap low (as in the picture) the motor do not react to the oscillation (no noise) and every think seems to work fine
If no step are commanded the 1 step noise continues (I see it on the error monitor), but the error counter do not increase, so no reset is triggered.
If I command movement (-300 steps), like in the picture, after 4/5 times a run the test the controller resets (if I increase max error for example 20.000, the reset occurs after 10/15 times).
The picure attached is the one that triggers the error, but I cannot see a 2000 step error nowhere (no spikes, no offset)
Can some one explain me how the error mechanism that triggers the reset is working?

In the X axis, that is working fine, there is NO oscillation on the tail and the controller does not reset, so I think the porblem is the oscillation, but I don't understand why...
andrea.bignozzi
 
Posts: 4
Joined: Sun Jan 22, 2023 2:32 am

Re: DG4S Sampling time and Noise

Postby cncdrive » Fri Dec 15, 2023 1:55 am

The reset of the drive can be triggered by a pulse on the reset or error input lines of the drive or a 12Volts input voltage drop.

Try to change the encoder decoding mode from 4x to 2x to see if it makes any difference.

Also verify that the encoder counting is OK?
I mean in the servoconfigurator you can check the step counts and compare it with UCCNC position and then you can see if it is lost steps on the step/dir lines or if it is an encoder count issue.
cncdrive
Site Admin
 
Posts: 4727
Joined: Tue Aug 12, 2014 11:17 pm

Re: DG4S Sampling time and Noise

Postby kissgallery » Fri Dec 15, 2023 12:44 pm

Hi Andrea,

It seems like the issue might be related to electrical noise affecting your DG4S drives. Considering the observed noise frequency and its impact on smaller steps, it could indeed be influencing the system stability. Since the noise persists even with the encoder disconnected, it's likely originating from the DG4S power line.

One potential approach is to implement additional filtering or shielding on the power supply lines to minimize the impact of the noise. You may also want to verify the grounding and ensure that all connections are secure after the maintenance.

If the issue persists, reaching out to the manufacturer's support for specific guidance on handling noise-related problems with DG4S drives could be beneficial.
kissgallery
 
Posts: 1
Joined: Thu Sep 21, 2023 10:55 am

Re: DG4S Sampling time and Noise

Postby cncdrive » Sun Dec 17, 2023 5:11 am

A noise like that is basically impossible with disconnected encoder, because if the motor gets power to one direction then it will never reverse direction, because there is no encoder feedback,
so then the motor would just rotate to one direction until it reaches the programmed limit, it will not oscillate without an encoder.
cncdrive
Site Admin
 
Posts: 4727
Joined: Tue Aug 12, 2014 11:17 pm

Re: DG4S Sampling time and Noise

Postby andrea.bignozzi » Sun Jan 14, 2024 6:44 pm

Hi all,
during holidays I had time to make some more tests and to solve the problem.

The oscillation at the end of the pulse (servoconfig3 step) was caused by the windup of I, so lowering the value around 2000 solved the problem.
Now X, Y, Z run smooth with pratically no overshot.

The pseudo random error in Y axis was due to a mechanincal issue (the counter nut in the axis was unscrewed), I'm now fixing it.

Thx for the support.

Andrea
andrea.bignozzi
 
Posts: 4
Joined: Sun Jan 22, 2023 2:32 am


Return to Hardware

Who is online

Users browsing this forum: No registered users and 4 guests