Driving two steppers with one drive

Status
Not open for further replies.

Dmed

New Member
I'm driving two step motors with one drive. The drive is control by a PIC microchip.
To switch the motors, DS2Y-S-DC5V relay is used. I also have two limit switches(homing) where they are switch by relay too. The problem comes when I switch motors, I get random data on the PIC such as motor is homed when is not. I tried putting diodes across the relay coils, but no change.

Any suggestions?

Thanks in advance.
 
If you need to have pinpoint control of the motors position (that's much of the point with steppers) then using just one controller is nogo - the "offline" stepper may drift off position. If using unipolar steppers I guess that using a relay might having no advance compared with two drivers. Either cost or physical size or power consumption.
 
Last edited:
Both motors are sitting flat(horizontal - left to right & vice versa) and they are 4 phases. losing position is not happening. no problem there. the main reason for using one drive is cost and space. main concern is the misreading of the home limit.
 
Can you put some sort of small delay in the PIC readout of the home switch after you operate the relay? That should allow the PIC to ignore the transients after the change.

Alternately could you send each limit switch directly to its own input on the PIC. Then you would not go through the relay for the limit signal but just change inputs on the PIC to read the limit switch of interest.
 
kind of ran out of input, that why i used the same input for both limit. right now, i'm using software to fool the pic, but got a feeling that it's not a good solution. if it is the arcing of the coil of the relay causing the misreading, that will damage the cct in the future. Please correct if i'm wrong.
 
Last edited:
here the schematic for the motors. please ignore the cap and res in the blue square.
 

Attachments

  • s.jpg
    67 KB · Views: 194
Last edited:
You definitely need a diode across the relay coils to suppress the coil transient (one diode will work for all three coils in parallel).

You should have a resistor in series with the LED to avoid excess current and possibly blowing it.

Otherwise I don't see a reason for the problem you are observing, expect for possible relay contact bounce when may be confusing your PIC. That's why I suggested the delay in reading the limit switches.
 
Last edited:
thanks for the suggestions. I actually have 3 diodes across/parallel each coils(k to + and a to GND) will snubber be better than diodes? will be kind of overkill for 5v coils i think. no need to worry about led. it's flash type 24v ones.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…