News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Driving a Stepper motor with PIC microcontroller and A3955SBT

Started by hmsahir4u, Mar 13, 2023, 05:53 PM

Previous topic - Next topic

hmsahir4u

Respectable forum member,
Please guide me how can we run the stepper motor in both direction with PIC 16F877 microcontroller using the following microstepping ic.
https://www.alldatasheet.com/datasheet-pdf/pdf/55110/ALLEGRO/A3955SB.html
Thanks.

flosigud

Yes, but you need two and you must make a pcb.Much easier to use an inexpensive ready made controller that you control with step and direction signals. Price for such a driver on eBay is from $2.

SCV

The A3955SB is discontinued.

Choose a different driver with an integrated microstepping translator, Pololu.com and Sparkfun.com do some neat drivers which may be easier for you. I've used A4988 with 18F26K22 quite successfully before.
Drive with step and direction pins, keep track of position by incrementing/decrementing a register by the step size for each step. You will need a method to home or zero at power up.

hmsahir4u

Respected SCV,
You are right that this Driver ic is discontinued and that is the main issue for me. Let us Change the Question in an other way. the Truth table says that we have to manage the 8 pins of 2 A3955SBT from the microcontroller to operate a bipoler stepper.
Now My problem is that it is used in a machine and I have search a lot its alternate.
How can I use another driver whille the microcontroller sending the signal on 8 pins but not in step and direction mode. Please suggest me how can I Alternate another driver.
I was also looking for the sake of knowledge that what is the possible logic to operate A3955 from PIC microcontroller.
Can You share the code example for A4988?
 Thanks

SCV

In principal I setup two registers, ACTUAL and DEMAND then within a regularly accessed loop (triggered from the ISR timer loop), I compare the registers and supply a pulse in the desired direction to make them equal. The interfacing of control and feedback signals can then be handled outside the 'servo loop'.

Are you intending to use existing hardware or make new hardware? what generates the control signal? how is the feedback signal generated? just too many options to give you more help.

Tim.

hmsahir4u

Hi Tim
Actually this Ic is used in the vinyle cutting machine and now it is discountinued. So that I was looking for the method to replace it with any other driver in the existing hardware. The driver controlling it is 89C51 microcontroller.
is it possible to replace this part directly with any other solution?
Thanks