Hello Guest it is March 28, 2024, 07:38:04 PM

Author Topic: Motor changing direction at random  (Read 3593 times)

0 Members and 1 Guest are viewing this topic.

Offline MN300

*
  •  297 297
    • View Profile
Re: Motor changing direction at random
« Reply #10 on: January 09, 2021, 11:55:47 PM »
From left to right, IC2 buffers  B-step, B-dir/relay, PWM, and enable. Enable uses 3 buffers, the last buffer is unused.

You measured 4.5 volts on the parallel port pins showing that 3.3V is not an issue. If they don't change when they should the problem is in the PC.

I didn't follow your last sentence. Do you mean the port pin doesn't change when you reverse direction in MACH3 or that the motor reverses without a change in the direction voltage?
Re: Motor changing direction at random
« Reply #11 on: January 10, 2021, 12:04:51 AM »
Yes, the motor reverses without a change in the direction voltage.

I'll have another computer to connect tomorrow, so that'll be interesting.

It could still be Mach3  ???

Offline MN300

*
  •  297 297
    • View Profile
Re: Motor changing direction at random
« Reply #12 on: January 10, 2021, 12:18:03 AM »
That's very strange.  I'll wait to hear if the other computer behaves the same.
Re: Motor changing direction at random
« Reply #13 on: January 10, 2021, 12:39:49 AM »
Heisenberg would be thrilled

Offline ZASto

*
  •  423 423
    • View Profile
Re: Motor changing direction at random
« Reply #14 on: January 10, 2021, 04:03:21 AM »
Yes, the motor reverses without a change in the direction voltage.

I'll have another computer to connect tomorrow, so that'll be interesting.

It could still be Mach3  ???

No. It is the voltage levels on parallel port.
According to the datasheet of HC245, your higj logic levels could be somewhere in undefined area for Vih.
Make no mistake between my personality and my attitude.
My personality is who I am.
My attitude depends on who you are.
Re: Motor changing direction at random
« Reply #15 on: January 10, 2021, 04:26:02 AM »
Hi ZASto, would you please explain that in layman's terms?

Offline ZASto

*
  •  423 423
    • View Profile
Re: Motor changing direction at random
« Reply #16 on: January 10, 2021, 06:00:52 AM »
OK, here are the input voltage levels for HC245

If Vih is on the higher side, and your parallel port does not have the 3.3V levels but a bit lower, then HC245 will have it's outputs "somewhwe" where it wants to be at the particular moment.
« Last Edit: January 10, 2021, 06:03:16 AM by ZASto »
Make no mistake between my personality and my attitude.
My personality is who I am.
My attitude depends on who you are.
Re: Motor changing direction at random
« Reply #17 on: January 10, 2021, 06:52:30 AM »
Yes, I can see how that could change the direction at random.

At rest though, the parallel port supplies the HC245 STEP Input with 4.5 V and the DIR Input with 108.6 mV. When the motors are activated the parallel port supplies the HC245 DIR Input with 4.5V in the positive direction and 108.6mV in the negative direction. Therefore the parallel port can supply the HC245 with more than 3.3V when it is required. So I now think it is a 5V parallel port. Also, the random direction changes only occur on the Y channel, which ever way it is hooked up between Mach3 and the Y motor.

There must be something I don't as yet see at the moment and maybe the anomaly is in the computer hardware, although the Y direction changes did not occur when the CNC was attached to the Maxpath42 circuitry .... that just blew up ..... I'll see tomorrow when I hook the other CPU up.

I did not test the voltage on the HC245 outputs with the motors running ... I'll do that tomorrow as well before I connect the other CPU

I have read blogs that state that although stepper coil wiring colour codes are specified by the manufacturer, sometimes the coils are wired differently, which, if not detected, can cause random direction changes. I have interchanged the motors though, and the random direction change always occurs to whatever motor is connected to the Y channel.

Offline MN300

*
  •  297 297
    • View Profile
Re: Motor changing direction at random
« Reply #18 on: January 10, 2021, 07:46:49 AM »
Does the motor ever run the wrong direction when the DIR line is at the low voltage?

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Motor changing direction at random
« Reply #19 on: January 10, 2021, 07:59:29 AM »
here:

https://www.youtube.com/watch?v=uglCm_qsojk&t=84s

is a good tutorial how to check the parallel port for supplied voltage.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.