Snap Amp with Stepper Motors

Moderators: TomKerekes, dynomotion

Post Reply
Armorall
Posts: 6
Joined: Thu Jan 09, 2020 4:25 pm

Snap Amp with Stepper Motors

Post by Armorall » Thu Jan 09, 2020 7:25 pm

I'm hoping I've overlooked something simple.
The problem that I’m having.
I have been able to successfully control of one stepper motor #1, which is connected to the Snap Amp (Out1, Out2, Out3, Out4) with a 48 Volt 12amp power supply connected to VS1 and GND.
I have had no success in controlling stepper motor #2, which is connected to the Snap Amp (Out5, Out6, Out7, Out8) with a 48 Volt 12amp power supply connected to VS2 and GND.
In addition, as soon as I apply power to the VS2, stepper motor #1 will no longer do anything at all.
Any Help would be GREATLY appreciated!
Thank You
Paul

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

Re: Snap Amp with Stepper Motors

Post by TomKerekes » Thu Jan 09, 2020 7:52 pm

Hi Paul,

How have you configured the axes?

Note the outputs are 0-7 not 1-8. Was that a typo?

Did you configure axis 0 to use output channels 8 and 9?

Did you configure axis 1 to use output channels 10 and 11?

Did you set Peak Current Limits?

Does the SnapAmp fault LED come on?
Regards,

Tom Kerekes
Dynomotion, Inc.

Armorall
Posts: 6
Joined: Thu Jan 09, 2020 4:25 pm

Re: Snap Amp with Stepper Motors

Post by Armorall » Thu Jan 09, 2020 8:08 pm

Hi Tom,
Yes 1 thru 8 was a typo.
The configuration is pretty much the "SnapAmp 2 Steppers.c" example with a couple of values changed.
StepperAmplitude = 25; // To reduce heat while testing

WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT0,9);
WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT1,9);


If I remove power from VS2, you can hear the the harmonic of the oscillators, of stepper motor #1 energize just as the voltage displayed in the Analog I/O window for Snap0 drops below 1.3V

No Faults, just nothing at all works if power is applied to VS2!

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

Re: Snap Amp with Stepper Motors

Post by TomKerekes » Thu Jan 09, 2020 11:37 pm

Hi Paul,
The configuration is pretty much the "SnapAmp 2 Steppers.c" example with a couple of values changed.
Please post the configuration for both axes.

WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT0,9);
WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT1,9);
Are you sure the SnapAmp Fault light isn't coming on? You might try level 10 if so.

If I remove power from VS2, you can hear the the harmonic of the oscillators, of stepper motor #1 energize just as the voltage displayed in the Analog I/O window for Snap0 drops below 1.3V
It isn't clear what you mean. SnapAmp0 has two sides and voltages. Are you applying supply voltage to both sides of SnapAmp? What are the displayed voltages for each side before and after? When VS2 is removed what happens exactly?

No Faults, just nothing at all works if power is applied to VS2!
Do you mean the SnapAmp Fault LED?

Even without a motor or configuration for the SnapAmp B Side?
Regards,

Tom Kerekes
Dynomotion, Inc.

Armorall
Posts: 6
Joined: Thu Jan 09, 2020 4:25 pm

Re: Snap Amp with Stepper Motors

Post by Armorall » Fri Jan 10, 2020 1:22 am

I did not know the amp had a fault led. There are two on the PCB and one LED is blinking about a 1 second interval, all the time.

I have tried level 10, with no noticeable change.
I*'m not sure if the Snap Amp is 50% defective and no idea how to test it. I really was hoping something simple would stand out. I also tried to use separate power supplies for A and B but as soon as power is applied to VS2, motor #1 goes off. I have also tried a different ribbon cable, same results.
I have a DC motor I could put on the it and a 24VDC power supply and see if it will work as an analog servo, but not sure how it would do without feedback of some sort. I had originally purchased two Geckodrive G201X Digital Stepper Motor Drivers to do this project. When I discovered the the existing Snap amp would supposedly run two motors and since it was already installed in the cabinet, I went that route. Plugging in a ribbon cable was easy and I thought it would be simple and fast. Regrettably this has not been the case.
The Kflop does not seem to know it is not working as the X and Y coordinates go up and down with the feed arrows. The acceleration ramp rate appears to be working, but the motors act as if they are totally disabled.
Thanks for trying to help.

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

Re: Snap Amp with Stepper Motors

Post by TomKerekes » Fri Jan 10, 2020 3:55 am

Hi Paul,

Sorry your having trouble.
I did not know the amp had a fault led. There are two on the PCB and one LED is blinking about a 1 second interval, all the time.
Yes the blinking is an "I'm alive" LED. Blinking is good. The other is a fault.

I have tried level 10, with no noticeable change.
ok, if the fault light is not coming on due to peak current faults then this would not likely make any difference.

I also tried to use separate power supplies for A and B but as soon as power is applied to VS2, motor #1 goes off.
What do you mean by "goes off"? Holding torque goes away and you can turn the motor? Are you sure the fault LED doesn't come on aftyer VS2 is applied?


Please post your configuration for both axes.

If I remove power from VS2, you can hear the the harmonic of the oscillators, of stepper motor #1 energize just as the voltage displayed in the Analog I/O window for Snap0 drops below 1.3V
It isn't clear what you mean. SnapAmp0 has two sides and voltages. Are you applying supply voltage to both sides of SnapAmp? What are the displayed voltages for each side before and after? When VS2 is removed what happens exactly?


SnapAmp has lots of diagnostic capability to tell you what is going on. The KMotion.exe Analog Screen shows the Supply Voltages and Current measurements for both coils of both stepper motors. Please tell us what the 6 values are before turning on VS2 and afterward.
Regards,

Tom Kerekes
Dynomotion, Inc.

Armorall
Posts: 6
Joined: Thu Jan 09, 2020 4:25 pm

Re: Snap Amp with Stepper Motors

Post by Armorall » Fri Jan 10, 2020 4:45 am

"If I remove power from VS2, you can hear the the harmonic of the oscillators, of stepper motor #1 energize just as the voltage displayed in the Analog I/O window for Snap0 drops below 1.3V"
I do hear a high pitched whine when the snap amp is functioning. Somewhere I read the PWM is at 32khz, obviously humans cannot hear that, especially older humans :) So I assume I'm hearing a harmonic from the motor windings.
Even though the X axis is assigned to section "A", I can hear the frequency and feel a slight vibration in the shaft of Motor#1, when I try to index the "Z" axis. Probably noise getting into the input of Side A. But only when power is applied to VS1 only and "X" axis works!

When I connect the power supply to the VS2 input, the Analog I/O reads the proper input voltage of the power supply within .5% with a slight bobble. For instance when I have the 48volt supply hooked up both voltages read 48.1 to 48.3 volts. When I hook the 12 volt supply to either VS1 or VS2, the Analog I/O reads and displays the proper voltage.

"What do you mean by "goes off"? Holding torque goes away and you can turn the motor? Are you sure the fault LED doesn't come on aftyer VS2 is applied?"
Yes, holding torque is gone, there is no resistance to turning the shaft except for the pole cogging of the motor. It is the same as when I pull the Green connector off and try to turn the motors.
No Faults have ever been known to occur, It just does not work if the VS2 voltage is greater than 1.3volts.

I'm at home right now and the configuration code is at work, I can and will send it tomorrow. But it is really the "SnapAmp 2 Steppers.c" example code with the "P" of the P.I.D. set to 10 and the StepperAmplitude = 25. I have increased the StepperAmplitude value to 250 and it makes the Motor#1 really work well, but gets very hot after time, even standing still, as steppers will do. When power is applied to VS2, no current flows, the motors get ice cold!

In anticipation of this, I used thread #1 to initialize the motors with a modified [SnapAmp 2 Steppers.c], I then use and assigned thread #2 as a low power setting and assigned it to "M5", and then thread #3 to "M6" to set the motors to high power for rapid movements, and then back down to a low value for slower travel speeds. I also had thread #4 as a simulated "HOME" which sets the machine coordinates X & Y to "Zero" in case this was some issue. I had planned later to write / adapt code to look for an inductive sensors for a real homing sequence. I also mapped these threads to user "Buttons" [INIT, High Power, Low Power, Home] for ease and quick access!

Armorall
Posts: 6
Joined: Thu Jan 09, 2020 4:25 pm

Re: Snap Amp with Stepper Motors

Post by Armorall » Fri Jan 10, 2020 3:54 pm

Image
Attachments
2axisBrushedRigidHomeAero.c
Thread 4
(2.68 KiB) Downloaded 94 times
Stepper_High Power.c
Thread 3
(147 Bytes) Downloaded 91 times
Stepper_Low Power.c
Thread 2
(145 Bytes) Downloaded 94 times
Aero_2axisStepperStartup.c
Thread 1
(3.02 KiB) Downloaded 89 times
Tool Setup Screen TrajectoryPlanner.JPG
Tool Setup Screen Tool Setup Files.JPG
Tool Setup Screen User Buttons.JPG
Tool Setup Screen M100-M119.JPG
Tool Setup Screen.JPG
KmotionCNC_Main.JPG

Armorall
Posts: 6
Joined: Thu Jan 09, 2020 4:25 pm

Re: Snap Amp with Stepper Motors

Post by Armorall » Fri Jan 10, 2020 4:21 pm

Thanks for helping!

Paul
Attachments
Kmotion Config Analog I - O.JPG
Kmotion Config Channel 1.JPG
Kmotion Config Channel 0.JPG
Kmotion Axis.JPG

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

Re: Snap Amp with Stepper Motors

Post by TomKerekes » Fri Jan 10, 2020 6:37 pm

Hi Paul,

I don't see anything specifically that would explain Axis 0 not working.

The Screen shots don't really help if you don't explain under what conditions they were taken and what you did beforehand.

I would like to do the minimal steps that should work but don't and demonstrate the problem to simplify things.

Please don't run or include information on KMotionCNC until after you have your motors working in KMotion.exe its just a distraction.

We don't recommend Flashing anything into KFLOP. If you do then it is hard to know what state KFLOP is actually in. it seems you have Flashed KFLOP with something as Launch Thread #1 on Startup is set. Please reset KFLOP to its default state by Flashing New Version and do not Flash any programs or configuration into KFLOP.

I see the Initialization program has a few things that don't match the Configuration Screens:
-Output Gains are set to 10 instead of 1.
-Axis 0 is slaved to Axis 1.
-Axis 1 is slaved to itself (Axis 1).
-Various Stepper Amplitudes
-Various SlaveGains

Please perform the following steps exactly:
  1. Turn off all Motor Supplies
  2. Connect Motor0 to SnapAmp
  3. Disconnect Motor1 from SnapAmp
  4. Flash New Version to KFLOP
  5. Turn Off power to KFLOP
  6. Turn On power to KFLOP
  7. Verify SnapAmp LEDs I'm Alive blinking and Fault on
  8. Capture SnapAmp Analog Screen - save as "No Power"
  9. Apply 48V to VS1
  10. Capture SnapAmp Analog Screen - save as "VS1 on"
  11. Run attached program to configure/enable Motor 0
  12. Verify LEDs I'm Alive blinking and Fault off
  13. Verify Motor0 has holding torque
  14. Capture SnapAmp Analog Screen - save as "motor0 enabled"
  15. Apply 48V to VS2
  16. Verify LEDs I'm Alive blinking and Fault off
  17. Verify Motor0 has holding torque
  18. Capture SnapAmp Analog Screen - save as "motor0 enabled VS2"
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply