Go Down

Topic: delayMicroseconds fails below 210 (Read 439 times) previous topic - next topic

sparkandhale

Aug 27, 2018, 09:15 am Last Edit: Aug 27, 2018, 11:12 am by sparkandhale
Hi all

Objective: move a 10kg+ drawer in and out.
Approached Solutions: Use a stepper motor and spiral rod to push drawer back and forth.
  • Board: Leonardo
  • Driver: DQ542MA orDM542 (both show the same behaviour)
  • Stepper Motor: Nema23
  • Power supply: 24VDC, 4amps max
  • Software library: non, sending HIGH and LOW in between delayMicroseconds(100)
  • ISR: not using interrupts, not using Serial.println in the code.


Status: works perfect, but too slow.
Approach: set the microseconds break in between the pulses to 100 to double the speed.
Observation on approach: every value below 210 microseconds will stall the motor. Values between 210 and 280 mostly have a light ot heavy jitter at start.
Cause of stall and jtter: unknown.

QUESTION: Is it a physical limitation of the processor/pin/mhz (Leonardo), the driver (DQ542MA/DM542) or the Nema23?

Stepper Configuration: At minimum of pulse/rev 400. 3.4Amps max.
Thread with the same observations: http://forum.arduino.cc/index.php?topic=491056.0

SPEC DM542: http://tinel.com/uploads/DM542.pdf
SPEC Nema23: https://motion.schneider-electric.com/downloads/quickreference/NEMA23.pdf
RAIL SYSTEM: https://www.aliexpress.com/item/linear-rails-cnc-effective-stroke-600mm-linear-rails-and-slides-SFU1605-linear-rail-slider-23nema-stepper/32843623111.html?spm=a2g0s.9042311.0.0.27424c4dMB9loa

Thanks for any help in reflecting on where I should focus.

AWOL


sparkandhale

Are you being serious?
What are you refering to?


  • The idea of the appliance? Yes, pure luxery but appropriate in this difficult layout of the building.
  • The dimensions of the material? The weight could increase to 50kg thus a big Nema23 with that torque is adequate.
  • My question is too dull or the answer obvious? I would not have asked if it would be easy for me to pinpoint the limits in the specs.
  • The questions relates to the wrong forum topic? My appologies. I gladly move it if you have a recommendation.


Your constructive suggestions are welcome.

AWOL

Your provision of meaningful detail would be appreciated.

Robin2

#4
Aug 27, 2018, 10:27 am Last Edit: Aug 27, 2018, 10:42 am by Robin2
Thread with the same observations: http://forum.arduino.cc/index.php?topic=491056.0
Why have you started a new Thread when there is a lot of useful info for us in your earlier Thread?

Click Report to Moderator and ask to have this merged with the older Thread.

Apologies for any confusion - when the OP (here) mentioned the earlier Thread I thought he had also started it.
...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Robin2

Observation on approach: every value below 210 microseconds will stall the motor. Values between 210 and 280 mostly have a light ot heavy jitter at start.
Cause of stall and jtter: unknown.
You need to post your program.

If you want a stepper motor to work at high speed it must be accelerated and decelerated so it does not miss steps.

The torque of a stepper motor declines significantly with speed - maybe your motor cannot move the load at the higher speed - even with acceleration.

...R
Stepper Motor Basics
Simple Stepper Code
Two or three hours spent thinking and reading documentation solves most programming problems.

sparkandhale

Why have you started a new Thread when there is a lot of useful info for us in your earlier Thread?

Click Report to Moderator and ask to have this merged with the older Thread.


You have not told us what you have learned from the earlier Thread.

...R
Because I understand that the core question of CharlesTechnologist is about acceleration. Acceleration is of zero (or minor) concern to me. He has short "bursts". In contrast I require speedy long runs. Thus I focus only about moving the drawer on the tracks faster. The rod is pushing the drawer on SBR16 on linear guided rails. i.e. It barely is in demand of torque/power (FYI, I can push the drawer with my little finger and it slides/rolls all the way back).

I'm looking for a hint how I can calculate/estimate/understand the limitations of the microseconds, which I could not derive from the old threat. Maybe changing the stepper motor to a dc motor is an option - but it would not add to my understanding of stearing by microseconds. That's why I opened a new thread. I want to understand the source of limitations, CharlesTechnologist looked for a solution, IMHO. My question: why does the motor stall below 210microseconds pausing? Because of the Hz or the Voltage or any other variable/combination?

Also the width of the spiral rod (I think that is called the "transmission" in English) greatly influences the speed. The wider, the faster. But again, the devices of the appliance is not what I want to discuss.

This is the linear rail and motor (1200m version):
https://www.aliexpress.com/item/linear-rails-cnc-effective-stroke-600mm-linear-rails-and-slides-SFU1605-linear-rail-slider-23nema-stepper/32843623111.html?spm=a2g0s.9042311.0.0.27424c4dMB9loa

Thanks for taking time to reflect on this.

Robin2

#7
Aug 27, 2018, 11:22 am Last Edit: Aug 27, 2018, 11:23 am by Robin2
My question: why does the motor stall below 210microseconds pausing? Because of the Hz or the Voltage or any other variable/combination?
Once again, I apologise for the mixup in Reply #4. You were perfectly in order to start your own Thread.

There is no simple answer because a working motor is a combination of electrical inputs, physical outputs and external physical forces.

Maybe think about it like this. If you try to lift a heavy load from the floor to a table it will take you some time during which you are exerting as much force as your muscles can produce. Let's say it takes you 5 seconds. Now think what will happen if you are only allowed to exert that force in bursts of 1 second with complete relaxation in between. The load will never get more than a few centimetres off the floor because when you relax your muscles it will fall back to the floor.

Increasing the motor power supply voltage may help because it enables the full motor current to be reached more quickly.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

sparkandhale

You need to post your program.

If you want a stepper motor to work at high speed it must be accelerated and decelerated so it does not miss steps.

The torque of a stepper motor declines significantly with speed - maybe your motor cannot move the load at the higher speed - even with acceleration.

...R
Stepper Motor Basics
Simple Stepper Code

Yes, the curves in the spec of the NEMA23 clearly show the decline of torque. But I don't think my NEMA even "sweats" a bit pushing the drawer on the rails. I'm in the need of speed. Not torque.

Hm. Okay. You are saying the acceleration is important to "hook" into a proper rotation at high speed. That would also explain why in between the values of 210 to 280 microseconds delay, it only jitters at the start, but not while running and thus values of 100 microseconds probably could be possible IF accelerated in a proper acceleration curve (which is to be determined by the environment variables). Thanks. I'll implement the acceleration (Accel stepper library), measure and then extra/interpolate a curve.

sparkandhale

#9
Aug 27, 2018, 12:21 pm Last Edit: Aug 27, 2018, 12:22 pm by sparkandhale
And yes
Increasing the motor power supply voltage may help because it enables the full motor current to be reached more quickly.

...R
And yes, I will replace the 24V power supply with a 48V as the driver accepts that. I'll do the changes one after the other to come up with new observation materials for other to learn. e.g. min microseconds delay 24v vs 48v.

Thanks.

TomGeorge

Hi,
Have you read the manual for setting up either of the stepper drivers?
Have you set the current limit correctly, have you read the trouble shooting tables?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

sparkandhale

Maybe think about it like this. If you try to lift a heavy load from the floor to a table it will take you some time during which you are exerting as much force as your muscles can produce. Let's say it takes you 5 seconds. Now think what will happen if you are only allowed to exert that force in bursts of 1 second with complete relaxation in between. The load will never get more than a few centimetres off the floor because when you relax your muscles it will fall back to the floor.

Increasing the motor power supply voltage may help because it enables the full motor current to be reached more quickly.

...R
Adding acceleration from 1000 microseconds linearly down to 110 microseconds works smooth. That is acceptable.

Next improvment suggestion is to increase the supply Voltage from 24VDC to 48VDC - also recommended by Robin. Thanks. I'll report the outcome here.

TomGeorge

#12
Aug 28, 2018, 12:11 am Last Edit: Aug 28, 2018, 12:20 am by TomGeorge
Hi,
How quick do you want the drawer to open close?
10kg to 50kg, you need to do some calcs, and take acceleration into account.
You are trying to get a mass UP to SPEED, this is acceleration, it takes torque/power.

If you drive a car,  you can accelerate gently by holding the pedal at the position you want your final speed at.
OR
If you want to get to you final speed faster, you push the pedal further to the metal, then back off when you get to your final speed.
The pedal is the TORQUE/POWER you need to get this accomplished.

I hope you are not trying to get an "Open All Hours" cash register type operation.

A DC motor type actuator would have probably been a lot better.

Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

Go Up