Snap Amp Noise affecting USB connection

Moderators: TomKerekes, dynomotion

ZooBDoo
Posts: 38
Joined: Tue May 07, 2019 4:35 pm

Snap Amp Noise affecting USB connection

Post by ZooBDoo » Mon Nov 25, 2019 5:03 am

Is the Snap Amp PWM on all the output channels synchronized. i.e. do all the PWM positive pulses on all the bridges activate at the same time? I realize that the pulse widths would be different for each bridge so they would turn off at different times.

I'm having noise issues with a couple of brushless motors causing USB disconnection even though I have an isolator installed.

The reason I'm asking is I built a system with multiple small DC motors a while back and found that if I installed inductors in each motor leg, all the noise issues were eliminated completely. So, if all the bridges PWM signals activate in the same direction at the same time, maybe I could install one inductor in each bus power leg to accomplish the same effect with fewer inductors.

AZ

User avatar
TomKerekes
Posts: 902
Joined: Mon Dec 04, 2017 1:49 am

Re: Snap Amp Noise affecting USB connection

Post by TomKerekes » Mon Nov 25, 2019 8:26 pm

Hi AZ,

I don't think they switch at the same time depending on mode, enable/disable, direction and such. Shorting SnapAmp Full Bridge Outputs together would likely cause damage. Probably not a good idea to put an inductor in series with the supply either.
Regards,

Tom Kerekes
Dynomotion, Inc.

ZooBDoo
Posts: 38
Joined: Tue May 07, 2019 4:35 pm

Re: Snap Amp Noise affecting USB connection

Post by ZooBDoo » Sun Dec 22, 2019 3:37 pm

What is the SnapAmp switching frequency?
I'm looking at installing inductors in the motor lines and the ones that look like they'll be best are frequency dependant.

AZ

User avatar
TomKerekes
Posts: 902
Joined: Mon Dec 04, 2017 1:49 am

Re: Snap Amp Noise affecting USB connection

Post by TomKerekes » Sun Dec 22, 2019 8:10 pm

32.5KHz
Regards,

Tom Kerekes
Dynomotion, Inc.

ZooBDoo
Posts: 38
Joined: Tue May 07, 2019 4:35 pm

Re: Snap Amp Noise affecting USB connection

Post by ZooBDoo » Mon Dec 23, 2019 5:10 pm

Thanks Tom,

I was looking too deep in the documentation, I should have just referred to the first website page and there it is!

AZ

ZooBDoo
Posts: 38
Joined: Tue May 07, 2019 4:35 pm

Re: Snap Amp Noise affecting USB connection

Post by ZooBDoo » Mon Jan 20, 2020 4:37 pm

I installed inductors on all the brushless motor phases, 2 motors , 3 phases. and I have two ferrite cores on the stepper motor wires. These are all installed within 6 inches of the SnapAmp output terminals.

The inductors seem to have eliminated the USB comms disconnections due to the servos but it looks like the stepper still causes intermittent disconnect. If I run the system with inductors with the servos only and disconnect the power input to the stepper bridge, the system will run for hours without problems either standing still or running G code. If I connect the bus power to the stepper bridge, the USB will disconnect after 30 min to 1 hour of running whether stationary or running G code.

I have dual SnapAmps and this happens no matter which Snap Amp I use for the stepper, and it doesn't matter whether I have the Stepper sharing an amp with a brushless servo or running on it's own.

I have also tried adding inductors to the stepper outputs and it made no difference.

The USB disconnection are the only indication of a problem as there is no other indication of noise issues on the encoder counts or mis positioning and everything runs smoothly. Oscilloscope readings on the 5 volt supply at the 50 pin ribbon cable shows very minimal (0.5 volt) noise. I have used a Snap Amp on dual microsteppers before with no issues so I'm wondering if there is something slightly different when using the stepper bridge configuration in the SnapAmp that could cause this?


Also, when I perform a HomeBrushless C program on init, sometimes it takes multiple revs past the marker channel to detect it and sometimes it catches it immediately. How can I make this more consistent? See attached init program.

AZ
Attachments
HomeBrushlessCGI_0_2j.c
(10.21 KiB) Downloaded 12 times

User avatar
TomKerekes
Posts: 902
Joined: Mon Dec 04, 2017 1:49 am

Re: Snap Amp Noise affecting USB connection

Post by TomKerekes » Mon Jan 20, 2020 5:31 pm

Hi AZ,

Regarding noise/disconnects. You might see here. Can you describe/diagram your grounding and shielding? Are your supplies isolated? What current are you running the Steppers at? Can you tell is KFLOP is being reset or is only the PC disconnecting the USB? You might turn off an LED that will turn back on if KFLOP resets.



Regarding detecting Index pulse: That program loops every 1 millisecond so the Index pulse must be longer than 1 millisecond to be reliably detected. You can change:
Delay_sec(0.001); // wait a millisecond

to:
WaitNextTimeSlice();

to loop every 180us which is more than 5X faster.

You should also change the rotation speed by changing this line:

Write3PH(ch2,A, ++k/1000.0); // move the pole

This causes the motor pole to be moved one cycle every 1000 loops (originally 1 second). So you might change this to 10000.0 to be about 2 seconds after the above change.
Regards,

Tom Kerekes
Dynomotion, Inc.

ZooBDoo
Posts: 38
Joined: Tue May 07, 2019 4:35 pm

Re: Snap Amp Noise affecting USB connection

Post by ZooBDoo » Tue Jan 21, 2020 3:29 pm

See attached sketch. It's wired this way currently to isolate the issue. There are other motors but they will be running on the other SnapAmp and are not connected now. None of the power supplies are grounded. The stepper motor frame is not currently grounded but will be once mounted on the machine, as will be the other motors / encoders.

It turns out that the K flop must be resetting as I have a flashing led running in a C program that shuts off when the disconnect happens. During the last test it ran about an hour with the motor running at about 10% FRO on a G code program.

Conversely if I have the servo motors running the same program or just sitting idling enabled, It will stay running over 2 hours (when I stop the test) as long as the stepper DC bus is not connected. It also doesn't matter which Snap Amp I connect it to or which channel of the amps is used.
The 9mh inductors were added to try to deal with this issue because they seemed to eliminate all the noise issues with the servos. The inductors extended the run time on the stepper from 15 minutes without the inductors to about 70 minutes with the inductors.

Stepper motor current is set to microstepper amplitude of 60, Snap Amp curr limit set to 10
I also attached an init file that includes all the stepper settings ( Axis 1) as well as all the currently disconnected motors. I modified the C program and G code axis designation so the stepper is on the x axis and is the only one enabled.


BTW:" the modification to the Home Brushless marker channel detection worked great! Thank you.

AZ
Attachments
HomeBrushlessCGI_0_2j.c
(10.21 KiB) Downloaded 9 times
IMG_0607.JPG

User avatar
TomKerekes
Posts: 902
Joined: Mon Dec 04, 2017 1:49 am

Re: Snap Amp Noise affecting USB connection

Post by TomKerekes » Tue Jan 21, 2020 8:30 pm

Hi AZ,
It turns out that the K flop must be resetting as I have a flashing led running in a C program that shuts off when the disconnect happens. During the last test it ran about an hour with the motor running at about 10% FRO on a G code program.
So that would indicate it is not a USB issue but rather a power/GND/noise/Reset issue.

What Rev of KFLOP do you have? Rev 1.3 (years ago) add more filtering on the Reset. Most of the KFLOP connectors expose Reset on one pin. If this is connected to a long wire/cable and noise or cross talk affects it a Reset can occur.

What Version of KMotion are you using?

One possibility is the 5V Power Supply and/or its wiring. What is its rating? Could it be overheating or intermittent? How close is it to KFLOP?

The 50 pin breakout also has 5V (and GND) going to your encoders and hand wheel. You might remove that as a test to see if noise is entering there.

On a minor note regarding the C Program. It is poorly formatted and hard to read. Please read this.

Also there is forever loop inside a forever loop which doesn't make logical sense. See also here.
Regards,

Tom Kerekes
Dynomotion, Inc.

ZooBDoo
Posts: 38
Joined: Tue May 07, 2019 4:35 pm

Re: Snap Amp Noise affecting USB connection

Post by ZooBDoo » Wed Jan 22, 2020 3:38 am

I must apologize for the C code and formatting. I'm a novice at C so I've a lot to learn. My C programming amounts to "see and hack until it works". Not too much finesse yet.

The Kflop has version 1.3 silkscreened on it and I purchased it July of 2019. I also have another k flop that is at least 2 years old with the same silk screen.

The Kflop software is 4.34.

I have a hard time seeing anything but the stepper setup causing the problem because if the Stepper DC bus is disconnected the problem goes away. Both servos running will run for hours. The stepper system is so compact and there is nothing there but SnapAmp, Kflop motor and 2 feet of motor wire that is no where near any other wiring. No feedback wiring, no shielding, No grounding. It seems that there is no external path to generate a reset so it must be coming from within the boards.

I agree that the K flop is being reset and I keep thinking that it has something to do with the little ground wires running from the the Snap Amps to the K flop. Or that there are two SnapAmps and somehow with the two of them running they will occasionally get into a PWM "Beat frequency" that permeates the system and causes a reset. But I keep getting back to the fact that it only happens with the stepper in the system no matter how the dual amps are configured. The symptom seems to follow the stepper and I've tried with two different stepper motors, different brands etc. so that would seem to eliminate power supply issues or other wiring.

If I install a filter cap on one of the ribbon cable connectors RESET lines, would this same capacitance / filtering be "seen" on all the other reset lines to the other connectors or would I have to install a filter at each connector??

I will also try running it without the 50 pin breakout. As you can see in the sketch, the only connectors on the K flop are to the Konnect and the SnapAmps. I'm going to completely remove one of the SnapAmps to see what happens if I run one SnapAmp with the stepper. I ran a system with two steppers on a Snap Amp about 6 years ago and never saw this problem. Report coming...


AZ

Post Reply