Full-step on X-axis destroys ATMEGA328

Post Reply
Smundo
Posts: 2
Joined: Mon Dec 07, 2015 8:36 pm
Location: Stuttgart, Germany

Full-step on X-axis destroys ATMEGA328

Post by Smundo » Mon Dec 07, 2015 9:30 pm

Hi, fellow enthusiasts!

I just stumbled over an (sadly reproducible) issue that might be worth sharing.
When switching X and Y to fullstep mode with 10 steps/mm, some pins of the micro controller (I have not found out witch yet, but must be somehow all from D2-D7) are destroyed.

A little bit of background information about my setup:
I am running an eShapeoko with Nema23@400 step/rev on X, Dual Nema23@400step/rev on Y and Nema17@200step/rev on z.

The board is powered via a 24 V / 8.4A power supply. I had two different GRBL-shields in operation, the GAUPS by cvoinescu from GB and a shield produced by myhobby-cnc from Germany. Four Pololu DRV8825 are used as the stepper drivers.

With both shields, I managed to destroy the micro controller when switching to fullstep with X and Y.
Luckyly for me, they ATMEGA328P does not cost too much (~2.50 € each), I have a ton lying around from other projects and an ISP to burn new bootloaders to the chips.
This made error-finding not as costly as it could have been, but it still is annoying.

More about the problem
After the error occurs, I can still connect to the Arduino UNO, configure GRBL and process GCode, the machine just does not move anymore.
If I replace and reprogramm the ATMEGA328P, everything works like a charm again. Also, ich can set Y (with two motors!) to fullstep at 10 steps/mm which seems not to cause any problems. As soon as I also bring X to fullstep at 10 steps/mm, the uC is destroyed again.
With my 24V setup, I am running very close to the limits of the DRV8825, but the motors run quite smooth and do not get hot. Also the motor drivers remain cold to the touch.

I find this behavior to be confusing and I do not understand, what is happening. I will probably try again tomorrow and sacrifice another ATMEGA328 to be really sure, the X-Axis settings cause the problem .
Has anybody experienced this problem before? Am I missing something? Should X and Y probably never be set to fullstep?

As soon as my TinyG arrives, I will hopefully leave this kind of troubles behind, but I still Find this behavior to be odd enought to start a new thread over it ;)

Best regards
Simon

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: Full-step on X-axis destroys ATMEGA328

Post by cvoinescu » Tue Dec 08, 2015 11:07 am

That is... disturbing.

I suspect that, somehow, when running in full-step mode, back-EMF from the motors manages to reach the digital pins. I think your DRV8825 may be broken. Also, it makes sense that the Y axis (which has two drivers connected to it) does not suffer from the same problem. If you're willing to destroy another 328P, maybe swap the drivers around first.

Can you please check that the four electrolytic capacitors on the GAUPS are installed the right way round? Also check that the ground pins of the X-axis driver are soldered properly (the GAUPS has insufficient thermal relief for ground connections, making them much harder to solder than the other pins. That's my bad, sorry.)

You say 24 V is close to the limit. The DRV8825 is rated for 45 V, IIRC, so there should be plenty of headroom.

I admit I never tested anything on full step, because I thought nobody used that.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

WillAdams
Posts: 8488
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: Full-step on X-axis destroys ATMEGA328

Post by WillAdams » Tue Dec 08, 2015 12:00 pm

I tried it once on an Azteeg X5 mini Smoothieboard, but movement was loud, harsh and sudden — would tuning have fixed that?
Shapeoko 3XL #0006 w/Makita RT0701 Router w/0.125″ and ¼″ Elaire precision collets
Nomad 883 Pro #596 (bamboo)

Smundo
Posts: 2
Joined: Mon Dec 07, 2015 8:36 pm
Location: Stuttgart, Germany

Re: Full-step on X-axis destroys ATMEGA328

Post by Smundo » Tue Dec 08, 2015 12:30 pm

Tuning was a pain and there was only a range of ca. 5° on the Pololu drivers where ther motors would be running smoothly.
But then, yes, as smooth as on 1/8 step.

@Catalin This happend with two compeltely different sets of DRV8825 (the ones on the GAUPS were others then the ones on the my-hobbycnc shield).
The four capacitors were installed the right way, the board and the shapeoko were running fine for around 6 months... until I decided to go full step.

Anyway, I will try again with another DRV8825 on x (my last one) and see what is happening. I will keep you guys informed!

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: Full-step on X-axis destroys ATMEGA328

Post by cvoinescu » Tue Dec 08, 2015 3:23 pm

Then it's probably just something the DRV8825 drivers do when they have large step changes in coil current. Microstepping would change in smaller increments, so it would not cause ringing or massive ground spikes. I don't have another explanation. I'll try this when I have a chance, maybe with current-limiting resistors to keep the microcontroller from getting fried.

I assume your power supply is connected with the V- to the "-" screw terminal and V+ to the "+" terminal on the GAUPS, without any other connections -- and if there's an emergency stop or power switch, it's on the V+ line, not on V-.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

Post Reply