Connect with us

Stepper motor control as input? Arduino

Discussion in 'Microcontrollers, Programming and IoT' started by Antleo, Jul 19, 2017.

Scroll to continue with content
  1. Antleo

    Antleo

    12
    1
    Sep 6, 2016
    So I have a stepper motor (used to rotate a dial) and want to convert it to a digital on /off per 1/10 (1 step?) of a rotation and make the arduino count those rotations and display them on an lcd. Is it possible? How would I go about doing so? Would a logic shifter (12v to 5v or 3.3) and connect to whay the 2 coils would have been connected to and maybe a current limiting resistor work?
     
  2. kellys_eye

    kellys_eye

    4,281
    1,145
    Jun 25, 2010
    Lots of ways to do it. Google 'stepper motor as encoder' for a million schematics.

    You can only get accuracy as good as the full step spec of the motor (no micro-step accuracy) so whatever steps/rev of the motor is as good as you'll get.
     
  3. Antleo

    Antleo

    12
    1
    Sep 6, 2016
    Encoder was the key word I was looking for. Thanks!
     
  4. Antleo

    Antleo

    12
    1
    Sep 6, 2016
    As I looked further into this, this is not what I wanted to do. If want to take basically from what would be driving the motor and plug that in as an input to the arduino, removing the motor entirely and having the arduino with lcd take its place.
     
  5. kellys_eye

    kellys_eye

    4,281
    1,145
    Jun 25, 2010
    What is actually driving the stepper motor? Usually (but not always) there is a dedicated chip - the chip takes a 'step pulse' input along with a 'direction' input. If you can find those signals (get the datasheet for the stepper driver device and look for the correct pins) then you have the two signals necessary.

    Count the pulses directly or divide by the number of steps to make one rotation and make the count positive or negative depending on the polarity (logic level) of the direction pin.
     
  6. Antleo

    Antleo

    12
    1
    Sep 6, 2016
    It is for an odometer that I am trying to convert to a digital readout. I assume the chip is in the ecm, so that is likely a no go as well, direction is always forward, it is a 6 wire stepper so 2 coils and center taps. (already identified) I assume the output to the stepper is something similar to PWM? So if I use a proper sampling rate, would I be able to pull from the drive wires from one of the coils? My electronics knowledge is semi decent, but I lack any knowledge on stepper motors.
     
  7. kellys_eye

    kellys_eye

    4,281
    1,145
    Jun 25, 2010
    Can you access the sensor on the gearbox that supplies the pickup signal in the first place?

    The ECM will output a signal to the original speedo itself - have you got details of the signal FROM the ECU?

    Those 6-wire steppers usually have an associated driver chip (can't recall the device unit number but ISTR they were I2C serial data controlled).
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-