Author Topic: When stepper start to run I can't debug anymore  (Read 627 times)

0 Members and 1 Guest are viewing this topic.

Offline YarooooTopic starter

  • Regular Contributor
  • *
  • Posts: 71
  • Country: it
When stepper start to run I can't debug anymore
« on: October 20, 2020, 09:28:08 am »
I've a problem on a board that's composed buy MCU + Stepper Driver. MCU is a 32bit PIC series from Microchip. When debugger is connected to the board and program runs with stepper disabled, there's any problem. But at the moment when motor starts to move, debugger disconnects with an error message. The board wasn't developed by me, but I'd like to solve this problem to avoid a complete redesign of PCB. Programming strip is routed on Top of the board and connected to PIC KIT 4 . What do you think I can try to suppress noises on programming lines? A resistor on line or a ferrite choke on cable?
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6756
  • Country: ro
Re: When stepper start to run I can't debug anymore
« Reply #1 on: October 20, 2020, 12:05:57 pm »
I would start by putting ferrite beads on each wire coming from the programmer, right near the PCB connector side, maybe some ferrite glandules, too, or pass the cables through donnut ferrite cores, whatever available, as seen in the first 5 mins here



The idea is the high frequencies spikes will be reflected back by the ferrites, so the ferrite should be put at the noise source side of a cable.  Some chokes on the motor wires might help, too, if possible.

Also decoupling caps on the power lines of the MCU, right near the MCU pins, are a must, but I'll assume the board already has proper decoupling.  Beware of ground loops, too, the GND should be connected in only one point, preferably near the MCU GND pin.

Series resistors on the programming wires (or even in series with the motor wires if allowed) might help, too, but those are mostly to dampen the reflections and ringing, they won't stop much of the spikes getting into programmer.

You didn't said the error.  If the error is on the USB side, and not in the programmer, and if the above measures does not solve the issue, then you might need a USB galvanic isolator.
« Last Edit: October 20, 2020, 12:11:51 pm by RoGeorge »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf