Hello,
I found the code attached to this post and thought it might work for my project. Although the more I look at it I begin to think that it won't work for me, I was hoping someone might be able to take a look at it and clear up a few questions.
Basically, I have a PWM signal that needs to go through the Arduino nano and out to a easy driver stepper driver (ROB-12779)
Will this work to accomplish this if I connect the PWM wire to pin 0?
I believe the PWM signal is a ground and doesn't supply voltage. I feel as though the Arduino would have to reference 5v somehow, is this possible?
Originally there was a PWM valve that was supplied with a 12v wire and this PWM circuit but I must use a stepper version now in order to accomplish my goals. Any help is much appreciated, thanks.
In particular note the advice to Auto format code in the IDE and to use code tags when posting code here as it prevents some combinations of characters in code being interpreted as HTML commands such as italics, bold or a smiley character, all of which render the code useless
are you suggesting that an arduino input a PWM signal representing a voltage applied to a DC motor and presumably determining that motors speed to control the speed of a stepper motor?
if so, shouldn't the PWM value determine the time between steps?
gcjr:
are you suggesting that an arduino input a PWM signal representing a voltage applied to a DC motor and presumably determining that motors speed to control the speed of a stepper motor?
if so, shouldn't the PWM value determine the time between steps?
Yes it is supposed to input a PWM signal then translate that and output to a stepper driver. The PWM signal is created by a engine management computer that determines what to send based on Coolant temp. lower temp = open the valve, higher temp = Close the valve.
a pulse width modulated signal is a binary (having 2 possible values) signal that switches values within some period of time to represent an analog voltage based on it's average value. a stepper motor is driven with at least 2 binary voltages that alternate polarity. their order determine direction.
so a single PWM signal cannot directly driver a stepper motor. but the code you posted measures the PWM signal (presumably RC filtered) to determine a value between 0 - 1024 which can be used to represent a position a stepper motor is driven to.
the code drives the stepper with a stepper driver circuit that has a direction and step pulse input
so the code along with some circuitry appears capable of doing what you describe