delayMicroseconds fails below 210

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: Nema 23 + DQ542MA Driver - Motors, Mechanics, Power and CNC - Arduino Forum

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.

Are you being serious?

AWOL:
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.

Your provision of meaningful detail would be appreciated.

sparkandhale:
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

sparkandhale:
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

Robin2:
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.

sparkandhale:
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

Robin2:
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.

And yes

Robin2:
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.

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... :slight_smile:

Robin2:
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.

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.. :slight_smile: