Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How is correct from the attached diagram?

Status
Not open for further replies.

pasidu

Member level 3
Joined
Jul 16, 2016
Messages
58
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
494
How is corrct from the attached diargam

Dear All,

I need to drive 6 stepper motors according to signal coming from WiFi Module. Motors are drive some time simultaneously and some time two motors and n various way

Our It Instructor advice flowing picture

cct1.JPG

But I suggest following way

cct2.JPG

Please advice which one is most appropriate

Thanks in advance
 
Last edited by a moderator:

Re: How is corrct from the attached diargam

I agree - the Arduino Mega should have sufficent digital IO pins to drive four stepper controllers even if you have more signals than direction and step, e.g. reset, step size, etc.
this saves the complexity of a multiplexor with the Arrduino UNO
 
  • Like
Reactions: pasidu

    pasidu

    Points: 2
    Helpful Answer Positive Rating
Re: How is corrct from the attached diargam

Thanks

But his point is

The stepper motor needs 3ms interval of steps
b00000001
delay 3ms
b00000010
delay 3ms
b00000100
delay 3ms
b00001000
delay 3ms

for one motor 3 x 4 = 12ms

our project have 6 stepper motors

12 x 6 = 72ms

in this case 72ms needs to update motors

if MEGA received signal from out side in between motor drive then that signal will lost

please advice

Thanks in advance
 

Re: How is corrct from the attached diargam

if MEGA received signal from out side in between motor drive then that signal will lost
True if "poor man's" delay loop timing is the only option to generate stepper pulses. Presume Arduino libraries will support also timer interrupts, but I'm not yet using Arduino.
 
  • Like
Reactions: pasidu

    pasidu

    Points: 2
    Helpful Answer Positive Rating
Re: How is corrct from the attached diargam

Hi,

3ms update rate should be possible.
even for all four motors.

You didn´t write this, but I assume the 3ms is not fixed. most probably this is the fastest update rate.
The update rate depends on motor speed. Indeed it´s the other way round: Motor speed depend on update rate.

If so, then either you need four interrupts for four motors with independent update rate..
Or you use one interrupt with higher rate (maybe 3000Hz for small granularity in time) and use four software NCO-like clock generators for controlling motor speed.

This is how I´d do it. The benefit is that you have a NCO control variable that is proportional to the motor speed. This makes (the necessary) acceleration and deceleration more easy.
Nice job for an ISR ;-)


Klaus
 
  • Like
Reactions: pasidu

    pasidu

    Points: 2
    Helpful Answer Positive Rating
Re: How is corrct from the attached diargam

Dear FvM

Thanks for the reply

Which will be the most appropriate diagram that you will suggest with reason


Thanks in advance
 

Re: How is corrct from the attached diargam

A brief view at the standard libraries shipped with Arduino shows that the software isn't particularly strong in scheduling events. But the contributed libraries MsTimer2 or Metro can possibly work for this application.

- - - Updated - - -

If it was my project, I had the ambition to make it with a single processor, which is surely possible.
 
  • Like
Reactions: pasidu

    pasidu

    Points: 2
    Helpful Answer Positive Rating
Re: How is corrct from the attached diargam

You did not mention so far for what kind of application all the 6 motors will be used, but if there is the need of real time geometric calculations to be done by the uC ( eg not synchronized steps, but interspersed at non-integer rates ), the use of delays will ruin the operation - or at the best case, will dramatically reduce the maximum speed of motors . As mentioned above, you should use interrupts to generate the cadence of the steps.
 
  • Like
Reactions: pasidu

    pasidu

    Points: 2
    Helpful Answer Positive Rating
Re: How is corrct from the attached diargam

Dear Andre

Thanks for the reply

This is a automated system
The website select the number of motor rotations in format and send to via WiFi module the WiFI module receive the data using arduino
 

Re: How is corrct from the attached diargam

will dramatically reduce the maximum speed of motors . As mentioned above, you should use interrupts to generate the cadence of the steps.

As per my example I got 3ms steps but it should be at least 100ms or more I think
 

Re: How is corrct from the attached diargam

3 ms (330 Hz step frequency) is in the range of start/stop frequency for most stepper drives. Start/stop frequency is the step rate that can be applied immediately without loosing steps or performing acceleration/deceleration ramps. An application may of course run at much lower step rates, but a stepper motor drive should be able to run at this speed. It means that in simultaneous operation of multiple motors up to 6 new pulse patterns must be set every 3 ms.

I still think that it's possible with Arduino, besides the already mentioned libraries, the SoftTimer seems promising. It does already provide multi-tasking step motors.

A practical problem is however that Arduino hasn't enough digital outputs to drive the step motors directly. It might be that the necessity to use additional output registers or serial port expanders promoted the idea of using intelligent step motor drivers instead.
 
  • Like
Reactions: pasidu

    pasidu

    Points: 2
    Helpful Answer Positive Rating
Re: How is corrct from the attached diargam

In this case

We send the signal to MCU pin RA3 and RA4 from MUX to tern on and off Motor driver

Also before we send the signals to RA3 and RA4. Send the signal to tern on the MCU first

After motor drive, then again send the signal to turn off the MCU

MCU power on and off control by MUX using transistor

Hoped you understand this

Please advice On and OFF of MCU is relabel or continuously power on
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top