Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Motor mount and mirrored plot
jempolar
Newbie
Posts: 2
Permalink
Post Motor mount and mirrored plot
on: March 19, 2019, 14:10
Quote

Hello!
I'm building polargraph with Arduino Uno + A4988 drivers + Nema17 motors. I used to mount motors as in tutorial Image

I made a few tests, and all worked fine.
Then I changed motors mount to 180 deg, so it was mounted at front

Image

I changed wiring of motors, so left motor connected as right, and right - as left.
The problem is that plot is mirrored.
I tried to change set setPinsInverted(true/false...) for left and right motor in different combinations. But the best result was when polargraph drew mirrored image. In other cases it draws with 90 deg rotation shift.

I just want to ask is it hardware of software problem? Should I change some part of code in polargraph_server_a1 to fix moving calculation? Or I should find the solution in stepper connection (switch A+ A- and B+ B- for example)
Thanks!

sandy
Administrator
Posts: 1376
Permalink
sandy
Post Re: Motor mount and mirrored plot
on: March 19, 2019, 17:56
Quote

Hello! Good work so far, but I guess the error is that you swapped the left and right motors rather than just changing the sequence of the wiring for each. The left motor is still the left motor, the right motor is still on the right. Swapping the pairs of wires changes the direction of movement of the motor.

There's a page here: https://github.com/euphy/polargraph/wiki/It's-going-the-wrong-way! that has some help which expands on what's written in the instructable (which is just "You just need to swap your two pairs of wires around.").

You don't need to change any code, this is purely a wiring modification.

Good luck!
sn

jempolar
Newbie
Posts: 2
Permalink
Post Re: Motor mount and mirrored plot
on: March 20, 2019, 10:08
Quote

Thanks a lot for your help! Now everything works correctly! The problem was in A4988 (its broken or buggy) - direction pin didn't react on HIGH and LOW level. That's why I had wrong direction on one stepper.
Thanks!

sandy
Administrator
Posts: 1376
Permalink
sandy
Post Re: Motor mount and mirrored plot
on: March 20, 2019, 23:35
Quote

Good work - well done on getting to the bottom of it!

sn

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.037 seconds.