Welcome! Log In Create A New Profile

Advanced

Change from Sanguino to RAMPS: Motors going way too far

Posted by Freakaz0id 
Change from Sanguino to RAMPS: Motors going way too far
August 27, 2014 01:40PM
Hi guys,

this is my very first post here and I really hope you'll be able to help me.

I had my Prusa Mendel up and running on a Sanguinololu with Sprinter firmware for quite some time now without any mentionable problems. For a research project I am now in need of an additional stepper Motor and a servo.Therefore I wanted to change the electronics to RAMPS 1.4. I got the following equipment:

- SainSmart Mega2560 AVR ATmega2560 ATMEGA8U2
- RAMPS 1.4 board
- ATX power supply
- 5x Stepstick A4988
- 5x Nema 17 stepper motors
- Modelcraft MC-410 servo (Not important for now)

As the printer was running before, I already knew the required steps/mm (80.8,80.8,2560,920), but when I'm moving the axis with a host program the driven distance ist about 15 times higher than commanded. The z-axis won't move at all (it's just making high pitched noises). I had the same results for Spinter, Marlin and Repetier firmware. Switching back to Sanguino made it fine again.
Also when commanded to home the x,y-axis, the motors do nothing but squeek. Turning the potentiometers didn't help. Also the drivers seem to be ok, as the drivers from the Sanguino board showed the same effect, when put onto the RAMPS board.
Adjusting the steps/mm will not work either. Could it have something to do with micro stepping or any setting like that? Also I was wondering: I had to set the baudrate to 115200 instead of 250000 because of connetion issues with the host software. I don't know if that makes any difference.

I'm really out of ideas and working towards a deadline here, so I would really appreciate any suggestions.
Re: Change from Sanguino to RAMPS: Motors going way too far
August 27, 2014 04:25PM
Quote
Freakaz0id
As the printer was running before, I already knew the required steps/mm (80.8,80.8,2560,920),
How did you compute those values? Not saying they aren't right, but 80.8 sounds like an odd value.

Quote

when I'm moving the axis with a host program the driven distance ist about 15 times higher than commanded.
15 is close to 16. And 16 is one of the microstepping values. Do you have all the jumpers on under the stepper drivers?

Quote

The z-axis won't move at all (it's just making high pitched noises)...Also when commanded to home the x,y-axis, the motors do nothing but squeek. Turning the potentiometers didn't help.
Likely turn up the current although depending on your steppers, you may be close to the limit of the driver IC. You also could be trying to move them too fast. Start off with a slow mm/sec value and work your way up. What is your computed Vref and what is it currently measured at? What sense resistor is your driver using? What steppers do you have or what are the specs?

Quote

I had to set the baudrate to 115200 instead of 250000 because of connetion issues with the host software. I don't know if that makes any difference.
Not uncommon but likely not related.

Edited 1 time(s). Last edit at 08/27/2014 04:26PM by cdru.
Re: Change from Sanguino to RAMPS: Motors going way too far
August 28, 2014 03:28AM
Quote
Freakaz0id
As the printer was running before, I already knew the required steps/mm (80.8,80.8,2560,920), but when I'm moving the axis with a host program the driven distance ist about 15 times higher than commanded.

It's likely 16 times. Either adjust your steps/mm or your microstepping jumpers.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Change from Sanguino to RAMPS: Motors going way too far
August 28, 2014 09:52AM
First of all thanks for the quick support.

Quote
cdru
How did you compute those values? Not saying they aren't right, but 80.8 sounds like an odd value.
I started off with 80, because i calculated so. After printing a cube and measuring, I corrected them to 80.8 and was quiet pleased with the result. My guess would be, that the belts streached a little.

Quote
cdru
And 16 is one of the microstepping values. Do you have all the jumpers on under the stepper drivers?
Quote
Traumflug
It's likely 16 times. Either adjust your steps/mm or your microstepping jumpers.
The jumpers were indeed missing. I figured also figured that out in the middle of the night ;-) Obviously the ebay vendor I got the RAMPS from was too cheap to include them. I set them all to 1/16 now and they work fine, although I still can't figure out why my old values do not apply. I have to use approximately 196 instead of 80.8 although the Sanguinololu worked on 1/16 aswell...

Quote
cdru
Likely turn up the current although depending on your steppers, you may be close to the limit of the driver IC. You also could be trying to move them too fast. Start off with a slow mm/sec value and work your way up. What is your computed Vref and what is it currently measured at? What sense resistor is your driver using? What steppers do you have or what are the specs?

I still have to wor on that. I had no time jet to measure the current. As I wrote the stepsticks are A4988 types.
Still unable to get rid of the sqeeky noises. Really annoying.


On topic of the servo I got so far:
On repetier firmware I changed servo0 to the D11 pin and enabled servo support. As suggested, I connected the 5V and Ground pin of the servo directly to the power supply and sinal to D11. With the command M340 P0 S500 I should now be able to let it turn to 0° and M340 P0 S2500 should make it turn to 180° (S500-2500 for everything inbetween) if I understood correctly. I does move on the first command (e.g. M340 P0 S1500), but afterwards ignores commands and only does little oscillating movements. Any ideas on that?

Thanks again for your help so far
Re: Change from Sanguino to RAMPS: Motors going way too far
August 28, 2014 12:10PM
Quote
Freakaz0id
I still have to wor on that. I had no time jet to measure the current. As I wrote the stepsticks are A4988 types.
Still unable to get rid of the sqeeky noises. Really annoying.
There are various designs of stepsticks. Some follow the origial "reference" design, others use whatever parts they wanted changing the sense resistor to a different value. Are these new stepsticks or were they used in the old printer? If they were reused with the same motors, then they should work with about the same settings as long as theres not a lot more additional drag with the new printer design. But if they are new, then you'll need to compute the values to get you in the ball park, or if you're lazy do as Traumflug said in a recent thread and just crank them up until they don't squeal.

Quote

As suggested, I connected the 5V and Ground pin of the servo directly to the power supply and sinal to D11.
Just a note, the MEGA's voltage regulator may not be able to supply sufficient voltage to run servos. Some people have discovered that with erratic servo movements. If this happens, use either +5v from the power supply, or use a LM7805 to supply sufficient power to the 5v pin.


Quote

With the command M340 P0 S500 I should now be able to let it turn to 0° and M340 P0 S2500 should make it turn to 180° (S500-2500 for everything inbetween) if I understood correctly. I does move on the first command (e.g. M340 P0 S1500), but afterwards ignores commands and only does little oscillating movements. Any ideas on that?
Your range appears to be correct. Different firmware handles things differently whether the S value is a angle, value betwen 0-255, or pulse length in microseconds. Repetier I believe is the latter. Different servos will have different characteristics based on their strength much like steppers, so it may take some trial and error to figure out what pulse length gets you exactly the right value. Does a different value work? Like instead of S1500, does S2500 work but then you can't change beyond that? The problem you are having may actually be related to the insufficent power mentioned above. I'd try a different 5v power source. Then you might try asking in the Repetier-specific forum. I've only used a servo with Marlin.
Re: Change from Sanguino to RAMPS: Motors going way too far
September 18, 2014 01:42PM
Well in conclusion the problem was the firmware itself. After a couple of depressing attemps to make repetier work I changed to Marlin and verything went fine. The steps/mm ration is like it's supposed to be and even the servos work fine (in this case with the M280 command). Even the noisy squeeking stopped. I'm quite pleased with the results.

Thanks again for your help
Sorry, only registered users may post in this forum.

Click here to login