Steppers have no power...Arduino v 1.2 SNAP
June 04, 2008 12:34PM
Finishing the build for the OIT RepRap with the Arduino electronics. Have everything wired together correctly--host starts and runs the stepper exerciser--but when I move a motor in a given direction all it does is make noise and/or vibrates a little. On occasion it will actually drive the axis a ways but this only happens intermittently.

I'm sure it isn't too much load on the axis or too stiff of a drive screw. I'm using precision ground ball screws and recirculating ball nuts for this. Everything is milled in aluminum and lined up in the GD&T lab for accuracy down to about .001".

I think the problem is a torque issue with the drivers. I fiddled with the Trim pot on the boards--didn't really know what it went to but I thought I would try it. No go. Also changed the boards to full-step from half-step. No luck. Ran the motors without any load on them what-so-ever. Same behavior. I thought maybe it was too little power from the power supply. Ran only one motor driver board and the arduino. No luck, same behavior--intermittent motion, noise, vibration. Tried changing the number of steps in the arduino code to 200 step motors. No luck. Thought maybe I had the motors wired the wrong way. Changed the wires around reverse but got nothing and tried swapping a coil winding--ie switched two wires--but didn't have any better results. Still nothing.

I kinda need this project to be done as I'm leaving directly after this term and I don't want to leave them with a half-functional RepStrap. Any Help?

Demented
VDX
Re: Steppers have no power...Arduino v 1.2 SNAP
June 04, 2008 02:47PM
Hi Demented,

... try to get an oszilloscope and then check the signals, timing and polarity and the curve-forms at the coils.

Viktor
Re: Steppers have no power...Arduino v 1.2 SNAP
June 04, 2008 03:13PM
Is your answer here?

[reprap.org]

Where you need to swap a coil over?

My problem at the minute is the stepper exerciser works in reprap on snap 1.3, but when I load a stl and try and build using the host software the steppers dont do anything at all moody smiley

J.
Re: Steppers have no power...Arduino v 1.2 SNAP
June 04, 2008 04:54PM
We are attempting to get an o-scope for this purpose but haven't had any luck yet. The reason we think it is a timing issue is because if we set the steppers trying to move and then adjust the speed we get spots where it turns very well. We think these corresponds to harmonics of the frequency we are sending to the motors. If any resistance is applied to the motor at this point--they are not connected to the shaft--they reverse direction or just start vibrating.

My question is: even if this is the case--I.E. the timing is off--how would I adjust that?

Demented
Re: Steppers have no power...Arduino v 1.2 SNAP
June 04, 2008 05:43PM
That sounds like exactly the problem I had yesterday, issue one I had was my SMPS kept dropping the 12v line every second or two for a few milliseconds, fixed by switching to a proper bench supply.

The second problem I had was I needed to tune speed pretty accurately to get good results - I did this using the code sample on the stepper driver page.

As for an oscilloscope, the link below looks pretty cool, but if you have a 10x scope probe just plug it straight into arduino AI and stream it to the serial port will be more than fast enough!

[www.coolcircuit.com]

J.
Re: Steppers have no power...Arduino v 1.2 SNAP
June 04, 2008 07:07PM
A few ways you can miss-wire it that would stop it turning: -

If it is an 8 wire motor and you are wiring the coils in series then if you wire half of the A coil in series with half of the B coil it will not work.

If you wire one half opposite polarity to the other half it will cancel out the field and not work.

If you wire one end of a coil to the A drive and the other end to the B drive it will not work.

If you reverse either coil, or swap the coils over, it will simply reverse the direction and work fine.


[www.hydraraptor.blogspot.com]
Re: Steppers have no power...Arduino v 1.2 SNAP
June 05, 2008 12:51AM
@John

I'll try the power supply thing and see if that works. That was a question we had as the power supply we are using is running the computer and the electronics and is only 250W. I'll see what speed they run best at and set that in the program. I was fiddling with that via setting the steps per mm really high so that it took a long time to traverse when I use the stepper exerciser and I had time to fiddle with the speed settings. These two issues in conjunction could definitely be my problem.

@Nophead

The motors are wired correctly. No other configuration works. I also double checked it on the page and by comparing it to my RepStrap which use the same motors. All the same. Plus I did get them to turn randomly while messing with the stepper exerciser.

What a pain. Thanks for the input. I'll test these things out and post again.

Demented
Re: Steppers have no power...Arduino v 1.2 SNAP
June 05, 2008 06:36PM
Okay, results...

Hooked a scope up to it and saw the wave-form we are getting. We are getting a pretty steady sine wave at a given range of speeds--fairly limited speed range. I think that is the wave-form we want. Wrong?

We tried several other power supplies and the results were really no different. We are getting enough power. The motor will run stable if at the right speed setting until a bit of a load is put on it at which point it starts switching directions and jittering wildly.

We are trying a bipolar-parallel configuration now. Better results--i.e. it worked with a it more torque--but still not able to drive the system. When I say it lacks torque, I mean I can get it to reverse direction by pinching it between two fingers fairly lightly.

Any other ideas or test we can do? I'm looking for *any* ideas. Even if it means fiddling with the firmware a bit. I can program pretty well and wouldn't be adverse to mucking about with hardware programming.

Demented
VDX
Re: Steppers have no power...Arduino v 1.2 SNAP
June 06, 2008 03:09AM
Hi Demented,

... straight sine wave didn't sound so good - when you step in the range from some houndred Hertz to 1 kHz it should be more square maybe with some ripples in the beginning ...

Which frequency can you count?

Which motors (0,9
Re: Steppers have no power...Arduino v 1.2 SNAP
June 06, 2008 12:22PM
Like Viktor says, you should be a square wave like the picture below

[www.enginova.com]

Not a sine wave

[www.csounds.com]

Assuming its the former your seeing rather than the latter it should be just about running, if you put a second probe on one of the coils it should be out of phase with the first if it is working properly.

Try uploading the following code to your arduino and see if it runs better (change the pin assignments as necessary), its the version I modified from the website which made debugging my problem easier.

J.

#define stepPin 4
#define dirPin 5

void setup()
{
Serial.begin(9600);
Serial.println("Starting stepper exerciser.");

pinMode(stepPin, OUTPUT);
pinMode(dirPin, OUTPUT);

digitalWrite(dirPin, HIGH);
digitalWrite(stepPin, LOW);
}

void loop()
{
int i, j;

for (i=1650; i>=600; i-=150)
{
Serial.print("Speed: ");
Serial.println(i);

for (j=0; j<2000; j++)
{
digitalWrite(stepPin, HIGH);
delayMicroseconds(i);
digitalWrite(stepPin, LOW);
delayMicroseconds(i);
}

delay(500);
Serial.println("Switching directions.");
digitalWrite(dirPin, !digitalRead(dirPin));

for (j=0; j<2000; j++)
{
digitalWrite(stepPin, HIGH);
delayMicroseconds(i);
digitalWrite(stepPin, LOW);
delayMicroseconds(i);
}

delay(1000);
Serial.println("Switching directions.");
digitalWrite(dirPin, !digitalRead(dirPin));
}
}
Re: Steppers have no power...Arduino v 1.2 SNAP
June 09, 2008 01:58PM
It is a square wave in half-step mode and a sine-wave in full step mode. We are supposed to use it in half-step mode so I guess that is okay. No?

The torque is up there now--don't know what we fixed or changed--but the direction it goes is still random. We've found that the speed works best at 180. I'm going to use the test code to fiddle with it again. See if that helps.

Any other ideas?

Demented
Re: Steppers have no power...Arduino v 1.2 SNAP
June 09, 2008 02:13PM
My only theory is that perhaps your chopping frequency is way too low so that it is beating with your step frequency.

When the motor is supposed to be stationary, does it make any noise or vibrate?

Check you have fitted the correct resistor and capacitor that sets the chopping frequency.


[www.hydraraptor.blogspot.com]
Re: Steppers have no power...Arduino v 1.2 SNAP
June 09, 2008 02:33PM
Yeah, it does vibrate and make some funny noises but only occasionally and mostly when it should be moving. What resistor and capacitor are those?

We tried the test code again. It must be the firmware because we get the same result regardless of what code we run.

We had checked the components of the boards but we will do so again. Is the documentation right about what the resistor and capacitors should be?

Demented

Edited 1 time(s). Last edit at 06/09/2008 02:34PM by Demented Chihuahua.
Re: Steppers have no power...Arduino v 1.2 SNAP
June 09, 2008 02:43PM
R6 and C7, they are correct according to the datasheet. They should give a switching frequency which is about 20KHz, i.e. ultrasonic, although Vik reported his was audible.

f = 1/0.69 RC

R = 22K, C = 3.3nF


[www.hydraraptor.blogspot.com]
Re: Steppers have no power...Arduino v 1.2 SNAP
June 09, 2008 02:50PM
These are the two components that are directly together on the board, no? They are 22k ohm and 3.3 nF respectively.

I'm lost now. Anything else--becoming a common refrain in this thread. :-)

Demented
Re: Steppers have no power...Arduino v 1.2 SNAP
June 09, 2008 03:11PM
Yes and there is a three pin jumper connected to them that has to be the right way.


[www.hydraraptor.blogspot.com]
FYI I see some similar behavior with the Kelling steppers on PIC based electronics when I jack the speed all the way up to 253 or more. I don't have a scope sad smiley and I haven't finished my Cartesian frame assembly ( it's a HUGE gantry setup ) yet, so I haven't actually loaded the steppers with anything other than my fingers yet.
Re: Steppers have no power...Arduino v 1.2 SNAP
June 10, 2008 04:17PM
It's a mess right now. We have funky wiring of the steppers that gives power to them. Similar to bipolar-parallel but not standard at all. I'm not sure why this is working of even if it is good for the boards but it gives us a bit more power--at certain speeds--and also gives us directional control. However, we now have this odd humming and vibration when they are supposed to be still. Like the board is pulsing the coils instead of just energizing them. Very weird but workable.

In other news...we burned out a few resistors--the big ones on the stepper driver boards and are having problems with the opto endstops due to that. Very not nice. Could--and almost certainly does--have something to do with the non-standard wiring of our steppers. We have deeper issues that we are not addressing. Frustrating.

@ [cave]

would like to see pictures of your build!

Demented
VDX
Re: Steppers have no power...Arduino v 1.2 SNAP
June 11, 2008 04:00AM
Hi Demented,

what type of motors do you have?

Can you post the data and the wiring-details?

It seems the current exceeds the limitations, so possible your drivers could burn too ...

Viktor
Re: Steppers have no power...Arduino v 1.2 SNAP
June 11, 2008 04:19AM
It seems like your chopping frequency is way too low, it should not be audible, other than perhaps a hiss or fizzing sound.

Other than that it could be parasitic oscilation due to poor ground connections, etc. Try disconnecting the step signal to see if the buzzing stops.

Can you post a picture of your PCB.


[www.hydraraptor.blogspot.com]
Re: Steppers have no power...Arduino v 1.2 SNAP
June 11, 2008 08:18PM
nophead,

Yeah, I need to get some pics up there of the boards themselves. I don't have any currently of the Stepper boards in the wild but I'll get some tonight and post tomorrow. In the mean time, you can look at all the pics I have of the oit reprap here:

[picasaweb.google.com]

I'm updating the googlepages site we have of it too so keep an eye on that.

oitreprap.googlepages.com

We are prettying the machine up right now for a bit of a photo shoot and then i'll pack the damn thing with me on the move to Portland Oregon to work on it some more over the next couple weeks. We are submitting a paper to an engineering education conference in France on the 15th and we hoped to have a functional machine to post results on. I'll be making that happen within the next month even if I have to throw my electronics in the schools machine. Stupid issues!

Cheers and thanks for all the help!

Demented
Demented,

fyi I'm using .75" 1/16" box tubing, so I'm curious what you welded that frame with? ( nice welds, at least they're way better than mine smiling smiley

I'll take some pics when I my camera gets sent back from repair at cannon sad smiley
Re: Steppers have no power...Arduino v 1.2 SNAP
June 13, 2008 01:54PM
TIG welded by Noah Anderson. Available for consignment at the Oregon Institute of Technology. I'll have more pics up on the website today. Take a look, the Borg is coming!!!!

Demented
Re: Steppers have no power...Arduino v 1.2 SNAP
June 15, 2008 01:37PM
For what it's worth, I completed my first stepper driver board yesterday. I'm using the Keling stepper motors from RRRF, and the arduino version of the stepper driver.

It seems to work fine, except if loaded, or driving fast (600 delay with the tester program) - in which case the power supply seems to shut down, and I have to switch it off and on to get power again.

The power supply is an old 200 W AT power supply. It claims to deliver 8 A on the 12 V line, and according to the stepper wiring page the Keling stepper uses max 1.5 A when wired as recommended (which I did), so I'm not sure why it shuts down.

I'll build the other two stepper drivers today and see if the problem was some broken component on the first stepper driver (the large diodes were hard to solder in, maybe I overheated them), or the old power supply.


I also do get some audible sound of different frequencies (roughly in 100-1000 hz range) when running the stepper motor at different speeds with the tester program, I though that was normal?

-- zzorn

Edited 1 time(s). Last edit at 06/15/2008 01:38PM by zzorn.
Re: Steppers have no power...Arduino v 1.2 SNAP
June 15, 2008 03:18PM
The comms and power distribution board for the PIC electronics had a big cap across the 12V rail. Not sure if there is an equivalent on the Arduino system.

The problem might be that the diodes return power to the 12V rail from the back EMF of the motor. If there isn't much load on the rail then it could get driven above 12V and if the PSU has over voltage protection it could shut down. A big cap or a dummy load on the 12V rail may fix the problem.

Yes audible noise when stepping is normal as the step frequency is in the audible range. The chopping frequency should be ultrasonic so when not stepping the motors should be quiet or perhaps just sizzle or hiss a bit.


[www.hydraraptor.blogspot.com]
Re: Steppers have no power...Arduino v 1.2 SNAP
June 15, 2008 04:39PM
Ok, I remember reading about a dummy load elsewhere. Perhaps it will behave better with all the boards plugged in and drawing a bit of idle current, otherwise I'll try a cap.

Thanks for the clarification about the noise. Yes, the steppers are indeed almost quiet when not moving.


-- zzorn
Re: Steppers have no power...Arduino v 1.2 SNAP
June 19, 2008 10:59AM
What value of cap would you recommend nop? I'm open to trying new things here. I've relocated to Portland Oregon from Klamath Falls--much better location--and had to take the machine with me as it is not finished yet. So, what cap size and where?

Demented
Re: Steppers have no power...Arduino v 1.2 SNAP
June 19, 2008 01:02PM
The power comms board has 4700uF across the 12V rail.


[www.hydraraptor.blogspot.com]
Re: Steppers have no power...Arduino v 1.2 SNAP
June 25, 2008 12:23PM
***UPDATE***

I've been fiddling around with the machine at home this summer--can't just leave a project half-finished!--and have come up with some interesting results.

I tried various combinations of the correctly wired stepper motors on my electronics and on the OIT electronics--PIC and Arduino respectively--and was having some horrible thoughts. Initially I ran my steppers on my electronics to prove that they work. They did. I then hooked one of the OIT steppers up to my electronics and it didn't work. I smelled major trouble at this point. It seemed like the steppers were dead.

Before drawing any hasty conclusions however, I wired up one of my steppers to the OIT electronics...they failed to work! Well, I supposed at this point that I had burned out my motor and was getting really bummed. Called my prof and told him the bad news and then continued on about my night just avoiding the machines.

Later in the evening it occured to me that a common denominator of all this stepper failure is that I was running the steppers off of the wires in the OIT machine every time they failed. Now, I continuity tested all lines in the frame of the OIT machine previously so I know they are shorting or anything. What haden't occured to me until that point is that I may be getting interference and even cross-talk in the wires going through this huge STEEL frame! I'm an idiot!!!

So I pull out the motors that supposedly don't work and put them on my electronics only this time OUTSIDE of the OIT machine frame wiring. Lo! They work! All of them. So I'm getting serious noise from the frame. Problem identified.

Now, how do I solve that outside of taking the entire wiring harness out of the frame? Any ideas?

Demented
Re: Steppers have no power...Arduino v 1.2 SNAP
June 25, 2008 04:09PM
Very odd, I can imagine noise from stepper wiring affection other things, but not other steppers. It would seem that the chopper circuit becomes unstable due to coupling between the cables.

First thing to try would be earthing the frame. Then using twisted pairs for each coil, finally resorting to screened cable. Or perhaps just moving the wires outside the frame might be easier.

The chopper drives I use recommended using screened cable but I could not find any rated for the current so I just used twisted pairs inside some plastic tubing. They don't run close to anything else or each other though.

Another thing to try might be to run the driver boards in master slave mode. That will synchronise all the chopping, perhaps making it less likely to interfere from motor to another.


[www.hydraraptor.blogspot.com]
Sorry, only registered users may post in this forum.

Click here to login