0
$\begingroup$

I need some help with a project where I am trying to operate a unipolar stepper motor with a raspberry pi's using the 4 GPIO pins and using a L293D IC as an amp to get it to the operating 12V of the stepper motor. The problem is that to use the method I have which is choose the + or - pairs of each coil on the stepper and switch between them whilst using the 5th wire as a common ground, I need the GPIO pins that are not set to HIGH to not become a ground connection. Any help would be appreciated or another method that I haven't thought of would be good to.

$\endgroup$
4
  • $\begingroup$ GPIO pins that are not set to HIGH to not become a ground connection ........ HIGH and FLOAT $\endgroup$
    – jsotola
    May 19, 2018 at 5:57
  • $\begingroup$ Sorry, I dont quite understand what you've said, do you mean that I should set any pins that arnt HIGH to be in FLOAT? $\endgroup$
    – EON
    May 19, 2018 at 6:35
  • 1
    $\begingroup$ google charlieplexing .... set pin HIGH or set pin as INPUT (float, hi-Z, high impedance) ... en.wikipedia.org/wiki/High_impedance $\endgroup$
    – jsotola
    May 19, 2018 at 16:40
  • $\begingroup$ Not strictly what you asked, but I used on of these... stepper driver $\endgroup$ May 31, 2018 at 8:13

1 Answer 1

1
$\begingroup$

I need the GPIO pins that are not set to HIGH to not become a ground connection.

No you don't. There always needs to be something between your motor and the GPIO, as the GPIO cannot handle motor currents, and in your case either you want a unipolar motor driver or your L293 and a different stepper motor.

If you do use your L293, you don't need to supply a high impedance to it.

If you only drive one coil at a time, you should be able to ignore the common connection. Alternatively, you might be able to connect common to one of the four half bridges, and two of the other four coils to the two opposite sides (I don't currently have time to work out whether this would give you all the states required but I think it will as L293 allows setting each half bridge to be the same or different to each other).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.