Reading stepper signal

Hi everyone.

I am repairing a portable heater cooler machine. One of its stepper motors went bad. This linear stepper motor opens and closes a valve depending if you want cold or hot water. I could not find the original stepper motor so I had to buy the closest one that will match the size constraints.

Since the motor does not match the original one, when the installed and the machine turned on the motor does not open or close all the way. It seems the stepper signal is different so I must code my own signal. I know how to code it the problem is putting everything together.

How do I sense when its going forward or backwards? Do I just compare 2 wires, depending which one turns on first?

How do I power my circuit and my stepper? I can only find a 36V DC source. I guess I would use a regulator with 12v and 5v output, one for the motor one to drive the stepper.

I have a stepper driver and coded a working program for my stepper motor it's just putting it together that bogs me down.

DO I need to down regulate the original stepper signal in order to read in which way its going, since its 12v? I dont think the arduino can read in 12v.

Halp

You have provided very little information from which to offer any advice.

  • Post a picture of the original motor showing any printing on it and post a link to the datasheet for the replacement motor.
  • If the system used a stepper motor it will have had a microprocessor with a program to control the motor. How do you propose to alter that program to deal with the new motor?
  • You have not told us by how much the new motor is failing to move the valve - is it only moving it 50%? Or what?

These links may help Stepper Motor Basics Simple Stepper Code

...R

I make a blind try.
Is it a bipolar, 4 wire motor?
Then You need to find out which wires belongs to each coil. Do know which ones belong together?
One method to find the pairs is to connect 2 wires and try to rotatae the motor shaft. When 2 wires from the same coil is shorted it will be significantly more difficult to rotate the shaft.
Shorting one cable from one coil with a cable from the other coil will not be senced compared to rotate the shaft without any´cable connected. Select one cable and test against the other 3.

One of its stepper motors went bad. This linear stepper motor opens and closes a valve depending if you want cold or hot water.

Are you sure it's a stepper? A stepper motor would only be needed if you need "warm" settings (between hot & cold).

Robin2: You have provided very little information from which to offer any advice.

  • Post a picture of the original motor showing any printing on it and post a link to the datasheet for the replacement motor.
  • If the system used a stepper motor it will have had a microprocessor with a program to control the motor. How do you propose to alter that program to deal with the new motor?
  • You have not told us by how much the new motor is failing to move the valve - is it only moving it 50%? Or what?

These links may help Stepper Motor Basics Simple Stepper Code

...R

UBL 13 Z55 is the original stepper motor. heres the link for it https://docs-emea.rs-online.com/webdocs/0534/0900766b80534d04.pdf

The replacement is http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Robotics/39BYGL.pdf

It is moving about 50%.

There is no dedicated board for the motor, its just one big board that controls pumps, valves, display etc etc.

I dont want to alter the program that controls the motor, I just want to sense when the motor should turn and use my own circuit to control my motor.

Railroader:
I make a blind try.
Is it a bipolar, 4 wire motor?
Then You need to find out which wires belongs to each coil. Do know which ones belong together?
One method to find the pairs is to connect 2 wires and try to rotatae the motor shaft. When 2 wires from the same coil is shorted it will be significantly more difficult to rotate the shaft.
Shorting one cable from one coil with a cable from the other coil will not be senced compared to rotate the shaft without any´cable connected. Select one cable and test against the other 3.

Yes it is a bipolar. What I want to read in is the 12v volt signal. Since the wire will turn on in a different pattern depending which way its rotating, maybe I can use that to determine which way my motor should turn.

Been reading a lot and maybe I have a solution. Let me know what you guys think.

Use a optocoupler or other opto reciever to read in the 12v as a 5v signal in order to determine when to turn on my motor.

Use two DC-DC regulators to power my circuits. One for my 12v stepper driver and one for my 5v circuit/microcontroller.

Do those stepper motors move a shaft linearly? I can't see a figure for steps per revolution.

For the original motor I see a figure of 0.033 or 0.041 mm per step. For the replacement the figure seems to be 0.01 mm/step so I would expect it to move 1/3rd or 1/4 of the distance, not 50%.

And following from your Reply #6 it may be possible to use an Arduino to detect the pulses sent by the system board and produce a faster rate of pulses for your new motor - 2 for 1 or 3 for 1 as required.

Another thought is whether it might be possible to modify the mechanical linkage so that the shorter movement of the motor has the required effect on the valve.

...R

Robin2:
Do those stepper motors move a shaft linearly? I can’t see a figure for steps per revolution.

For the original motor I see a figure of 0.033 or 0.041 mm per step. For the replacement the figure seems to be 0.01 mm/step so I would expect it to move 1/3rd or 1/4 of the distance, not 50%.

And following from your Reply #6 it may be possible to use an Arduino to detect the pulses sent by the system board and produce a faster rate of pulses for your new motor - 2 for 1 or 3 for 1 as required.

Another thought is whether it might be possible to modify the mechanical linkage so that the shorter movement of the motor has the required effect on the valve.

…R

Thanks for taking a look.

No, I cannot modify the mechanical linkage of the new motor.

I will post a schematic of what I want to do.

edit***

My schematic looks pretty bad, but its the general idea of what I think should work. I know ground shouldnt be drawn like that, I just used two connection for each component :grin: even though I know its a common ground for all.

Whadaya think?

Image from Reply #8 so we don't have to download it. See this Simple Image Guide

...R

I'm not sure that will work. The stepper driver will be expecting a load with a similar impedance to a stepper motor and not a high-impedance load like an opto-coupler. My knowledge of electronic circuits is not sufficient for me to offer advice.

ALSO BE AWARE that the quickest possible way to destroy a stepper driver is to allow the wires to the motor to become disconnected, even briefly, while the driver is powered.

And even if you can build a circuit to capture the pulses it could be a major challenge to make sufficient sense of the output from the stepper driver. Have you got an oscilloscope?

...R

Robin2: I'm not sure that will work. The stepper driver will be expecting a load with a similar impedance to a stepper motor and not a high-impedance load like an opto-coupler. My knowledge of electronic circuits is not sufficient for me to offer advice.

ALSO BE AWARE that the quickest possible way to destroy a stepper driver is to allow the wires to the motor to become disconnected, even briefly, while the driver is powered.

And even if you can build a circuit to capture the pulses it could be a major challenge to make sufficient sense of the output from the stepper driver. Have you got an oscilloscope?

...R

The optocoupler is there to sense the stepper motor signal from the machine. My stepper motor is driven by my stepper driver and my 12v source.

ebmeneophite: The optocoupler is there to sense the stepper motor signal from the machine.

Maybe I misunderstood. I am under the impression that you are proposing to connect the opto-coupler to the wires that would normally go to the original stepper motor - i,e. the motor output of the built-in stepper driver.

...R

Be aware that the polarity of the stepper power is changing. I wonder if there are any optocouplers that handle AC. If I am right, that will force You use 2 optocouplers for every coil to register all pulses.