Stepper motor signal input & convert to PWM output

Please forgive the newb nature of the post. I've been doing searches but haven't quite found what I'm looking for. The title pretty much describes what I'm wanting to do ideally...

I am wanting to take the output from a signal destined for a 4-wire stepper motor to be read in and converted into a PWM output. I know the number of steps the controller for the stepper motor is designed for is 255 steps max.

The application of this would be in a car with a standalone ECU. Unfortunately, the ECU only has controls for a 4-wire stepper motor IAC (Idle Air Controller) which is used to bypass air around the throttle in order to maintain a stable idle. However, the IAC unit in the car is a PWM solenoid type. The easy solution would be to fabricate an adapter to facilitate a stepper motor type IAC but I would prefer to have a slightly more elegant solution (and more experience in doing this.)

I've been reading up on controlling PWM outputs. I have been reading on Stepper motor controls for outputs, but I haven't found any info on what specifics I would need to do in order to be able to read/intercept the stepper motor signals to be used as the basis for the input.

To make matters more difficult this is my first foray into trying to program for a physical device. All my previous programming experience has been relegated to simple number crunching in C++. Thanks in advance for any assistance or advice anyone may be able to provide.

I have a similar question. Have you found a solution for this?

If the stepper motor controller has two signal wires in, one wire goes high every time the stepper motor needs to step. The other is HIGH or LOW depending on the direction that the motor needs to step. The design of the stepper motor is such that it holds still at any given position unless told to move.

The PWM solenoid type needs to be fed a continuous signal, or it begins to return to the original position.

You should be able to connect the step signal wire to the Arduino, and trigger an interrupt when the step signal goes high. Connect the direction signal wire to the Arduino, and trigger an interrupt when the direction signal changes.

In the step interrupt handler, increment or decrement a counter, based on the direction signal state.