CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Hobby Projects > Hobby Discussion


Hobby Discussion Discuss other CNC-related Hobbies here.


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 07-26-2011, 10:46 PM
herring_fish's Avatar  
Join Date: Apr 2011
Location: USA
Posts: 60
herring_fish is on a distinguished road
More Power for the Slide.



I have a black plastic rack and pinion that was designed for TV cabinet doors. The rack is attached to an aluminum rail that slides on a fixed Teflon type carriage. The rack and rail weight about 3 oz. together and offers little resistance. It is oriented vertically so I just goes straight up and down.

As you can see in the video, The motor isn't quite strong enough. I need to give the slide a little boost to get it started.

After I took the video, I added some code to give it acceleration but that wasn't enough to do the trick.

What can I do to make the motor have more torque? I don't know anything about electronics. Can I just up the voltage? I am using 12v now. ...or do I up the amps? I am using a 1.0A wall wart now. I also use 30V for the bigger first axis stepper motor. I also have a small box full of wall warts of various voltages but I might need to buy a higher amperage power supply.

This is the stepper motor:
Pololu - Stepper Motor: Bipolar, 200 Steps/Rev, 28x32mm, 3.8V, 670mA
This is the driver board:
Pololu - A4983 Stepper Motor Driver Carrier with Voltage Regulators
This is the code that I am using:
Code:
void lowerTheBoom()
{
int j;
int decelerate = 10000;
    digitalWrite(enablePin, LOW); // set the enablePin low so that we can now use our stepper driver.
    delayMicroseconds(2);         // wait a few microseconds for the enable to take effect 
                                  // (That isn't in the spec sheet I just added it for sanity.)

    for(j=0; j<=lowerTheBoomSteps; j++) 
      {
      digitalWrite(stepPin, LOW);
      delayMicroseconds(2);
      digitalWrite(stepPin, HIGH);
      delayMicroseconds(decelerate);  // was 1000
      // Serial.println(decelerate);
      if(decelerate >1000)
       {
       decelerate = decelerate - 100;
       }
       //delay(100);
      }
    digitalWrite(enablePin, LOW);
    
}
Reply With Quote

  #2   Ban this user!
Old 07-28-2011, 03:14 PM
Zygoat's Avatar  
Join Date: Feb 2010
Location: United States
Posts: 316
Zygoat is on a distinguished road
Buy me a Beer?

will it work in the horizontal position? if it does then the motor may not be strong enough to lift it. if it does not then it is probably something with your code.


try accelerating and decelerating it gradually. this is normally how steppers are used in cnc control. they gradually accelerate up to top speed, then gradually slow to a stop. asking it to go from 0 to 100, instantly is too much for any motor.
Reply With Quote

  #3   Ban this user!
Old 07-28-2011, 04:26 PM
herring_fish's Avatar  
Join Date: Apr 2011
Location: USA
Posts: 60
herring_fish is on a distinguished road

I just finish adding acceleration to the code and it didn't quite do the job.
Reply With Quote

  #4   Ban this user!
Old 07-28-2011, 07:40 PM
doorknob's Avatar  
Join Date: Jan 2010
Location: USA
Posts: 1,240
doorknob is on a distinguished road
Buy me a Beer?

How are you setting the current to the motor (to equal the rated winding current)?

Does your wall-wart have a built-in current limiting regulator? Maybe the wall wart is preventing your driver from supplying adequate current to the motor.

Do you have a power supply with a higher current rating (for example, one that can supply 2 amps)?

What step size are you using? Can you set the step size from the microcontroller, or is the step size hard-wired?

If you are using microstepping now, have you tested it with full- or half-stepping to see whether it starts by itself in those modes?
Reply With Quote

  #5  
Old 07-29-2011, 01:41 PM
Gold Member
 
Join Date: Oct 2005
Location: Australia
Posts: 2,251
RomanLini is on a distinguished road

I remeber that rack from another thread...

That stepper motor is rated at 8.7 oz-in, which is VERY small amount of torque. Your pinion gear has a radius about 0.55 inch so even under *perfect conditions* with NO friction it will only make about 8.7 / 0.55 = 16 ounces of linear force.

Throw in a bit of friction or the weight of that long rack (if vertical) and that motor just won't move it.

Maybe you can add some gearing to the motor, or even get a much larger motor? Do you need that motor to lift the full weight of the rack slide and everything on it?? If so it's going to need some weight figures and some calculations...
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 07-29-2011, 10:31 PM
herring_fish's Avatar  
Join Date: Apr 2011
Location: USA
Posts: 60
herring_fish is on a distinguished road

Yes I have had to be helped through every phase of this project. This is my sixth thread including the last one that you helped me with:
http://www.cnczone.com/forums/hobby_...eed_brake.html
The 8.3 oz. is a good though! It does have enough power to lift the slide rack straight up hill with power to spare but not enough to get it started. I only plan to add a very small plastic clip to hold a ¼” or 3/8th tube. It just drops the tube into the larger tube/tower so that the water and food don’t spray all over the place, missing the tower opening. Thing of all the times you see the evidence of guys missing the toilet.

If the second axis works, I hope to add dividers between the towers so that popping air bubbles don’t splash plankton from one culture to the next, providing cross contamination. The second axis will get up and over them and help deliver the food and water below the rim of the towers.

I’m wondering if going to a 2A power supply would help?
Reply With Quote

  #7  
Old 07-31-2011, 05:08 AM
Gold Member
 
Join Date: Oct 2005
Location: Australia
Posts: 2,251
RomanLini is on a distinguished road

Ok, you said the motor will lift the weight of the rack and you seem committed to that motor. Personally I like a large torque surplus, as it might be heavier when wet, or something light get sticky later etc.

But if you want to keep with that motor you can overdrive the current, which will increase torque. The problem is greatly increased motor heating but if I understand you right this will only be used for a few minutes every few hours? In that case try upping motor current by about +60%, and try that. You can even try +100% for short periods of time (like a minute or so).

I assume you are using a microstepping mode on the driver, like 16th stepping? That is probably best, it has less holding torque than the full step mode but with your large pinion diameter the microstepping will give much less resonance when in motion which is probably more important.

Your acceleration code uses a linear change in period per step, which gives a poor acceleration curve. At the very least you can change to a percentage change in period per step that will allow much better acceleration. You could modify your code to be something like this;

Code:
if(decelerate >= 1024)
{
       decelerate = (decelerate - (decelerate/1024));
}
What that does is subtract 1/1024th of the period every step, so at the start when period is 10000 it is subtracting about 10 each step, and near the end it is only subtracting about 1 each step. That gives you a much improved acceleration curve.

Good luck.
Reply With Quote

  #8   Ban this user!
Old 08-02-2011, 10:15 PM
herring_fish's Avatar  
Join Date: Apr 2011
Location: USA
Posts: 60
herring_fish is on a distinguished road

I hope to be able to stick with the small stepper motor. I don’t mind spending more money on a different power supply if needed but I want that motor because it is so light weight. If this one doesn’t do the job well enough, I might try a geared motor but I have a lot of time invested in it.

I added the acceleration code (thank you) and I tuned it a little. I also tuned the current limit pot on the controller board more closely.

With that, I got it to work. I haven't aligned all of the parts like the angles of the motor mount and the alignment of the slide guides but with that, it should work better.

It does appear to have the power but at the low end, it is still right at the edge, just barely starting. It does bind a little, on start up once in a while, usually the first time I run the program. I think that with more tuning of the code, I can get it to be smoother.

As you can see, there isn't much of a margin of error. I don't know if I should buy a power supply with 2A's or just use a wall wart with a higher voltage and then retune the limiting pot.

Reply With Quote

  #9  
Old 08-03-2011, 01:28 PM
Gold Member
 
Join Date: Oct 2005
Location: Australia
Posts: 2,251
RomanLini is on a distinguished road

Well congrats! You've got it most of the way.

I would still be a little wary of being so close to the limit. It's nice to have a decent safety margin, so your machine is reliable.

You said you tuned the current limit pot, what current are you running the motor on now?
Reply With Quote

  #10   Ban this user!
Old 08-03-2011, 02:16 PM
herring_fish's Avatar  
Join Date: Apr 2011
Location: USA
Posts: 60
herring_fish is on a distinguished road

I will need to put a meter on it. Up until now I just turned it until it started to malfunction and them back it off just a little.

THe guy that sell it said that once it is set, you don't have to re-tune it if you change the V or the A but I should measure it now AND if I change it.
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 08-05-2011, 10:08 PM
herring_fish's Avatar  
Join Date: Apr 2011
Location: USA
Posts: 60
herring_fish is on a distinguished road

I wrote and asked for help and got some but as I've said, I'm not an electronics guy. I just didn't understand how I was suppose to measure current of voltage. While the explanations would be clear to someone else, I am embarrassed to ask over and over again. The explanations have all been over my head. This is the best so far.

I suggest you disconnect your Arduino from the stepper motor driver (which wire?) and measure the current flowing through one of your stepper motor coils while the STEP and DIR pins are connected directly ground( both connected to a ground pin?). Your current limit will equal this measured current divided by 0.7, and you can adjust it to your desired limit by turning the pot.

Alternatively, you can measure the Vref voltage directly on the driver pin labeled REF. A voltage of approximately 270 mV on this pin corresponds to a current limit (per coil) of 670 mA. (I touch the REF pin but I touched GND but I got nothing). This is probably the easiest way to set the driver's current limit as you don't even need to have a stepper motor connected. All you need is to power the board and hold the STEP and DIR pins fixed low or high.
Can you tell me what wire goes where or what do I measure? This is the way that I wired the motor.
Reply With Quote

  #12   Ban this user!
Old 08-05-2011, 11:02 PM
doorknob's Avatar  
Join Date: Jan 2010
Location: USA
Posts: 1,240
doorknob is on a distinguished road
Buy me a Beer?

I don't think that you can easily measure the actual current through a motor winding, because the driver "chops" the voltage going to the winding.

So, instead, it should be easy to measure the voltage at the pin labeled "REF", and then calculate the maximum current setting of the driver based on that voltage. The driver will send that much current through each motor winding as long as your power supply is capable of supplying that much current. The driver is rated to handle up to 2 amperes of current per winding (if I have read the specs correctly).

First, you need to be set up to measure the voltage at the REF pin. Then you need to do a quick calculation to convert that voltage reading into the corresponding current limit.

After you've figured out the current limit setting, if you then want to change the current limit setting, you can use a small screwdriver to turn the potentiometer (which I believe is on your driver board) to a different value, and then go back and repeat the voltage measurement and current calculation.

Following the instructions that you quoted, first disconnect the arduino from the driver board, then connect the DIR and STEP pins of the driver board to GND (you can use alligator clip leads for that if you have them, just be careful not to short out any other pins or parts of the board).

Then, take a digital multimeter, set it to read DC volts with a maximum range of 1.0 volts or 2.0 volts or whatever low range you have. Connect the black lead of the multimeter to GND. Connect the red lead of the multimeter to the REF terminal of the board. If your multimeter has a separate on/off switch, turn it on.

Then apply the 5 volt power to the driver board (for this measurement, I don't think that it matters whether or not the motor power supply is also turned on).

You should be able to read a voltage from the voltmeter. It may be a decimal fraction that is less than 1 volt. Write down that value.

To calculate the maximum current setting from that voltage, you need to use the formula given on page 7 of the Allegro A4983 datasheet at http://www.allegromicro.com/en/Produ.../4983/4983.pdf

That formula is: Current = Voltage divided by (8 times the value of the current sensing resistor)

Based on the schematic for the Pololu driver board (shown at the bottom of Pololu - A4983 Stepper Motor Driver Carrier with Voltage Regulators), it looks like the value of the current sensing resistor (labeled either R10 or R11 in the schematic) is 0.05 ohms.

8 x 0.05 = 0.4

So, to get the maximum current setting, divide the voltage that you measured above by 0.4.

For example (as given in the instructions that you quoted), if you measured the voltage at the REF terminal as 0.270 volts (which is another way to say "270 mv" or "270 millivolts"), then you need to divide 0.270 by 0.4, which gives you 0.675 amperes as the maximum current limit. 0.675 amperes is equivalent to 675 milliamperes, which is close to the nominal maximum current rating of your motor winding.

If you adjust the on-board potentiometer to a different value, measure the resultant voltage on the REF terminal, and recalculate to get the new maximum current limit.

Hope that makes sense.
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compund slide table and NEMA 23 stepper enough power? Apples Linear and Rotary Motion 6 11-01-2010 02:49 PM
z slide JackBlack Want To Buy...Need help! 0 01-29-2009 06:51 PM
Home made cross slide power feed for small lathe monte55 General Metal Working Machines 3 12-16-2007 01:30 PM
SX3 -- Can't get the bed to slide off~~ krazatchu Syil Products 5 11-19-2007 06:29 PM
THK slide bearing Bill Davis Mechanical Calculations/Engineering Design 2 08-26-2006 06:31 PM




All times are GMT -5. The time now is 06:59 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361