Interference from stepper driver - Page 1
Forum section: electronics / beginners

author: Zynch
author_rank: Newbie
timestamp: December 31, 2021, 08:18:09 pm
content: I'm having issues with what seems to be interference from the stepper driver.I am making an macro-rail powered by an arduino, where I'm using a 16x2 lcd and a rotary encoder as the interface to control a stepper motor.If I power my circuit without the stepper attached everything works as it should. (this is how I was debugging my code) But when I power it with the stepper connected the rotary encoder barely works, mostly recognizing one direction no mater in which direction you turn it and sometimes recognizing a lot of rotation at once (probably should've limited that in code aswell).The encoder is being read with falling edge interrupts, and when an interrupt is triggered I check the value of both lines to decide if it was moved, since both have to be low on a step.I've also added 47nF caps between the encoder pins and ground to get a nicer signal (I've had double triggers before this)Any ideas as to how I can get rid of my issues?

author: Martin Miranda
author_rank: Regular Contributor
timestamp: December 31, 2021, 08:32:27 pm
content: - first option is to get a higher pull-ups. start with 1k resistor. (i will not use a internal pullup for this application)- rewiring your steppers is also a good idea.

author: wizard69
author_rank: Super Contributor
timestamp: December 31, 2021, 09:49:36 pm
content: QuoteThis is very important. If you are any distance from the driver it would be a good idea to run a shielded cable. Even then keep the cabling separated from the other electronic wiring.I'm making a leap here is believing that the macro rail is a photography device. To go a bit further I'm guessing a lot of anodized aluminum. If so understand that anodized aluminum is not at all that great of a conductor as the anodizing creates a surface that resist electrical conduction. This might create grounding issues, as such it might be a good idea to run a ground wire to the stepper motor and mount it with care to a known conductive surface. In other words don't assume that a metal chassis is a good conductor. Other gotchas include synthetic linear bushings or ceramic bearings. Basically don't assume that all of those metal parts are connected in an optimal way for electrical conductivity.The next thing to look into is the motor driver itself. If the drive is DIY, there is always the possibility that something was overlooked and that is causing excessive electrical noise. If you are doing step and direction I'd consider an externally mounted drive, of a different manufacture and see if that causes the same issues. That is work to isolate what is causing the issues. Also make sure you drive current is correct for the motor.

author: Zynch
author_rank: Newbie
timestamp: December 31, 2021, 11:35:21 pm
content: Quote from: Martin Miranda on December 31, 2021, 08:32:27 pmI'll give it a try tomorrow.Quote from: wizard69 on December 31, 2021, 09:49:36 pmYesQuote from: wizard69 on December 31, 2021, 09:49:36 pmThe whole thing is steel, it's heavy, like really heavy. I did not ground it, as that would require getting a separate mains plug just to connect it to ground, since I'm using a power brick to power the whole thing. Same reason for not using shielded cables (also space constraints), I'd have to ground the shield for it to have effect I believe.Quote from: wizard69 on December 31, 2021, 09:49:36 pmThe driver is not DIY (as can be seen in the picture). I wanted to avoid having it mounted separately to have everything put away nicely in a box.As to why my suspicion falls on the driver, like I hinted in my original post, I've been originally trying it out without a motor connected and it looks like the driver is smart enough (would have to check the datasheet) to recognize there is nothing connected to it so it doesn't do anything. If I connect a stepper to it, that is when the troubles start.Also yes, could've moved the stepper wires to the side, but that is more or less out of the question without remaking the box. I should've made the boxbit bigger from the start.

author: m3vuv
author_rank: Super Contributor
timestamp: January 03, 2022, 10:26:11 am
content: i had simillar issues with a homebrew 3 axis milling machine i made,it would keep reseting the arduino,traced it down to the limit switch wires were picking up electrical noise,i then used shielded cables with 100nf decoupling caps on all the wires except the stepper motors,if you are using polulo drivers they fry without a stepper motor hooked up.

author: MarkLiu
author_rank: Newbie
timestamp: January 14, 2022, 09:20:32 am
content: It should be the driver interference, you need to use shielded cable. You can take a look at stepperonline'sstepper driver, which offers many wiring consulting services.

author: Kleinstein
author_rank: Super Contributor
timestamp: January 14, 2022, 11:53:21 am
content: The modern stepper drivers use PWM to get current regulation and thus have quite some nasty signal (kind of PWM with maybe 12 or 24 V) on the cables to the motor. So a shielded cable is a good idea and maybe also connect the motor case to the shield. For the very high frequency part some ferrite beads for the 4 drive signals, close to the driver can be a good idea, especially if net yet inside the driver. This would be more for RF EMI, not so much the digital signals.If in doubt the signal cables, e.g. to the switch should also be shielded, to lower the pick up.