Page 1 of 1

Stepper Motor Driver and Flowcode

Posted: Sun May 21, 2017 2:05 pm
by Frank607
I have created a simple Stepper Motor flowchart.

The Stepper Motor has Coil1, Coil2, Coil3 and Coil4. How do I connect this in hardware to a DRV8825 Stepper Driver?

I don’t see this.

Thanks for helping.

(Or should I buy an EasyDriver ? )

Re: Stepper Motor Driver and Flowcode

Posted: Sun May 21, 2017 5:03 pm
by Steve001
Hi Frank

do you have a data sheet for your motor ? how many wires are they ?

You could connect two of the coils in parallel

Steve

Re: Stepper Motor Driver and Flowcode

Posted: Sun May 21, 2017 5:24 pm
by Frank607
Hi Steve,

Thanks.

I have a BI polar motor (4 wire). In FlowCode all is working fine but I don’t know how to hardware connect the ports (pin’s from PIC Microcontroller) to the stepper motor.

I must use a driver to power the stepper motor. I have both, the DRV8825 and the EasyDriver 4.5 drivers.

In Flowcode the stepper motor has configured the “Coil 1 … 4” pins, but how must I connect this pins to this drivers.

Specifications of the stepper motor: 3.3V / 2.5A (42BYGHW811)

I also read on internet that I could use some MOSFET’s to this. I have a a lot of IRLZ34N Mosfet’s. (a H-bridge ?)

I realy dont know :-(

Re: Stepper Motor Driver and Flowcode

Posted: Sun May 21, 2017 7:44 pm
by Steve001
Hi Frank

looking at page 10 on the data sheet and your motor

i would connect as:-

Black - Aout1
Green - Aout2

Red - Bout1
Blue - Bout2

have you seen this post ?

http://www.matrixtsl.com/mmforums/viewt ... =7&t=18219

Steve

Re: Stepper Motor Driver and Flowcode

Posted: Mon May 22, 2017 11:50 am
by Frank607
Hi Steve,

I know how to connect the motor to the driver, this is not the issue.

In Flowcode the stepper motor has: (example)

Coil1 > Port B.0
Coil2 > Port B.1
Coil3 > Port B.2
Coil4 > Port B.3

Where must I connect the ports B.0 to B.3 on this driver? (or another driver)

Re: Stepper Motor Driver and Flowcode

Posted: Mon May 22, 2017 3:13 pm
by Benj
Hello,

First of all I wouldn't use the stepper motor component as you are not directly controlling the motor.

It looks like the controller has 5 connections between the IC and the microcontroller.

4 are outputs so I would use LED components to model these in Flowcode.

Step - Toggle low and high to move the motor by a step position
Dir - Controls the direction of the motor
DecayMode - Controls the motor current decay mode
StepSize - How far to move the motor for a single step pulse

1 is an input so I would use a switch component to model this in Flowcode

nFault - Checks for fault conditions.

So you cannot simulate the motor on the panel but you can simulate and test all the signals to and from the controller IC.

You could even create a controller IC component if you wanted to allow you to simulate the motor.

Re: Stepper Motor Driver and Flowcode

Posted: Tue May 23, 2017 1:54 pm
by Frank607
Hi all,

I still don’t get it. I must use now the DRV8825 driver because of its Ampere for the motor. (2.5A)

This driver uses a STEPpin and a DIRpin. If someone could make a simple example in Flowcode (5) than this would be really helpful.

On the internet there are many examples to find but none of them shows how they do the real output from the PIC to the Driver.

Thanks

Re: Stepper Motor Driver and Flowcode

Posted: Wed May 24, 2017 1:06 pm
by Steve001
Hi Frank

Further to bens post above

To control the ic from flowcode as ben suggested above use leds for the output signals and switch inputs for the input signals from the chip. (fault)

You need to configure the chip mode see table 1

when the "step" input from the micro to the ic goes from low to high this causes the indexer to move 1 step, the step size is configured in the chips mode select pins (table 1).

DIR input this enables cw / ccw direction a table of the chips control pins are on page 3

Steve