Page 1 of 1

How to connect a stepper with 2 Coil?

Posted: Wed Oct 19, 2016 5:18 pm
by stefan.erni
How to connect a stepper with 2 Coil?
Stepper.PNG
(14.05 KiB) Downloaded 11648 times

Re: How to connect a stepper with 2 Coil?

Posted: Wed Oct 19, 2016 5:40 pm
by Benj
Hello,

You need something like a dual H-Bridge driver to allow you to push and pull on all four stepper motor pins.

Something like this would do.
http://www.matrixtsl.com/webshop/e-bloc ... board.html

The datasheet shows you the schematic.
http://www.matrixtsl.com/resources/getr ... php?id=887

Something like an L298D would also do the job but as this is transistor based and not FET based you will loose more voltage in the driver IC itself and therefore the driver IC will be able to drive less current and will get hotter.

Re: How to connect a stepper with 2 Coil?

Posted: Thu Oct 20, 2016 10:38 am
by stefan.erni
Hi Ben

I have for the 4 pins a driver.


stepper-driver.PNG
(24.43 KiB) Downloaded 11632 times
I use the pin B9,B8,B4,B3
the pin B9,B8 has a nice signal but the B4,B3 are always high.
If I use "output" for
B4,B3 and set them to low ,they are still always high.

Re: How to connect a stepper with 2 Coil?

Posted: Thu Oct 20, 2016 11:30 am
by Benj
the pin B9,B8 has a nice signal but the B4,B3 are always high.
If I use "output" for
B4,B3 and set them to low ,they are still always high.
Ok what chip are you using and can you post a simple test program so we can have a look.

Re: How to connect a stepper with 2 Coil?

Posted: Thu Oct 20, 2016 1:40 pm
by stefan.erni
Hi Ben

The PIC32MX440F256H
I made a board with 4pcs 9Pol connector
The connector 1 is for stepper nr:1
pin B9,B8,B4,B3

The connector 2 is for stepper nr:2
pin E6,E7,F1,B12
I wrote a small program and the stepper 2 is moving 360deg and 360deg back
but the stepper 1 has a Problem with B4,B3. This pin are always high.

I hope it's possible to use "generic stepper" from matrix, because the simulation with the stepper and and my 3D parts is working nice and it's realy a big advantage from FC7.

Re: How to connect a stepper with 2 Coil?

Posted: Thu Oct 20, 2016 3:00 pm
by Benj
Hello,

The B4 and B3 problem may already be fixed by applying the latest files from here.
http://www.matrixtsl.com/mmforums/viewt ... 63&t=18209

Hopefully once the pins are fixed then everything should then work as expected.

Re: How to connect a stepper with 2 Coil?

Posted: Thu Oct 20, 2016 4:00 pm
by stefan.erni
Hi Ben

I did the update, but still the same.
The RB4 is on the same pin as C1IN-/CN6
"AN4/C1IN-/CN6/RB4"
Is there a problem with "Comparator 1 Negative Input"?

Re: How to connect a stepper with 2 Coil?

Posted: Thu Oct 20, 2016 4:38 pm
by Benj
Yes the stepper motor generic should be able to do the same thing as you're doing in your program.

Please can you post an example where you are controlling the B3 and B4 pins. I can't see anything that would cause an issue but there may be something lurking in the code.

Re: How to connect a stepper with 2 Coil?

Posted: Thu Oct 20, 2016 5:05 pm
by stefan.erni
I'm using now the stepper (nema8) Model from FC.
It's working on the connector 2 this is for stepper nr:2
pin E6,E7,F1,B12


The connector 1 is for stepper nr:1
pin B9,B8,B4,B3
is still not working because of B4,B3
I prepare now a software with 2 stepper and send it to you.

Re: How to connect a stepper with 2 Coil?

Posted: Thu Oct 20, 2016 5:26 pm
by stefan.erni
Hi Ben
here is the Code


Stepper 1 is not working

Re: How to connect a stepper with 2 Coil?

Posted: Thu Oct 20, 2016 5:41 pm
by Benj
Thanks I'm investigating now.

If you change your C code to the following does this help at all?

Code: Select all

DDPCON=0;
CM1CON=0;
CM2CON=0;

Re: How to connect a stepper with 2 Coil?

Posted: Wed Oct 26, 2016 4:28 pm
by stefan.erni
Hi Ben

I insert the 3 line but still the same problem with the Pin B4,B3

regards

Stefan

Re: How to connect a stepper with 2 Coil?

Posted: Wed Oct 26, 2016 4:45 pm
by stefan.erni
Hmm in the Manual I found a part I dont understand. maybe You can help me.

How can I Usb "not enable" ?
USB-Enable.PNG
(43.13 KiB) Downloaded 4987 times

Re: How to connect a stepper with 2 Coil?

Posted: Wed Oct 26, 2016 4:59 pm
by Benj
I think to disable USB would be.

Code: Select all

U1CON = 0;
However this should be set to 0 automatically after a reset, unless the chip you're using has a USB bootloader which is not cleaning up after itself.

Re: How to connect a stepper with 2 Coil?

Posted: Wed Oct 26, 2016 5:03 pm
by stefan.erni
Thank You

I did not help.......

Re: How to connect a stepper with 2 Coil?

Posted: Wed Oct 26, 2016 5:12 pm
by stefan.erni
I think You are right
I found this in the manual and of corse I dont now to remove or turn off .......
"
Connect your device in bootloader mode to the computer (for PIC32-PINGUINO-MICRO hold
BUT and press RST after connected). Start the IDE from it's shortcut. .........
"

Re: How to connect a stepper with 2 Coil?

Posted: Thu Oct 27, 2016 4:07 pm
by stefan.erni
Hi Ben

I have further configured the inputs and outputs from the board. Also the input from the switch for the bootloader and some more. Now it works.
thank you for the friendly help.

regards

Stefan

Re: How to connect a stepper with 2 Coil?

Posted: Thu Oct 27, 2016 5:09 pm
by Benj
Great glad you've got it working now.

Do you know if the problem was related to the hardware or the bootloader?

If Bootloader related what commands did you have to use to get the pins working correctly?

Re: How to connect a stepper with 2 Coil?

Posted: Tue Nov 01, 2016 3:49 pm
by stefan.erni
Hi Ben

Now it's clear, it was a problem in the hardware I did. It was never a problem of FC. Sorry.

Stefan