Generation_7_Electronics icon indicating copy to clipboard operation
Generation_7_Electronics copied to clipboard

MCP2200 Resets on power surge

Open rupin opened this issue 11 years ago • 8 comments
trafficstars

I have a gen7 1.5 board with all the default setup. One peculiar thing I noticed yesterday while printing. The print was going on, and the doorbell rang.

1)The computer beeped of a USB port being ejected. 2) The mega ofcourse had in its cache some instructions to execute and it happily did for the next 10 seconds.
3) Print head stopped, but none of the fans or LED's blinked.

Is this a problem of the MCP2200 being reset because of a surge? Anyone noticed this?

rupin avatar Sep 04 '14 06:09 rupin

That's a general problem with externally powered USB devices. PC and device (in this case your Gen7) connect ground, but not supply voltages. Fluctuations in power can lead to a loss of supply voltage, which causes the ATmega to reset.

There is no real solution, but putting mains power connectors of your PC and controller close together (same mains outlet) and shielding the controller (grounded conductive housing) at least minimises the problem. Using a small PC, like the RaspberryPi from the same power supply should solve the problem even better.

As USB isn't fixable, a helpful aids might be to add opto couplers into the internal serial line, so USB runs entirely on PC power and the ground connection between PC and ATmega is cut.

Traumflug avatar Sep 04 '14 08:09 Traumflug

But the Atmega never resets. It continues to print even after the beep is heard from the laptop( which is before the print stops)

Its i think the MCP that gets reset, not the atmega. If the atmega were to be reset, the print would stop immediately.

When i see the circuit for the gen 7 1.5 board, the mcp is powered by the power from the atx psu, and not the usb. I think the usb power connection is left unconnected.

Will adding a beefier capacitor on the board help? On 04-Sep-2014 1:46 PM, "Traumflug" [email protected] wrote:

That's a general problem with externally powered USB devices. PC and device (in this case your Gen7) connect ground, but not supply voltages. Fluctuations in power can lead to a loss of supply voltage, which causes the ATmega to reset.

There is no real solution, but putting mains power connectors of your PC and controller close together (same mains outlet) and shielding the controller (grounded conductive housing) at least minimises the problem. Using a small PC, like the RaspberryPi from the same power supply should solve the problem even better.

As USB isn't fixable, a helpful aids might be to add opto couplers into the internal serial line, so USB runs entirely on PC power and the ground connection between PC and ATmega is cut.

— Reply to this email directly or view it on GitHub https://github.com/Traumflug/Generation_7_Electronics/issues/19#issuecomment-54428789 .

rupin avatar Sep 04 '14 09:09 rupin

Yes, 5VUSB is unconnected to avoing making things worse. Also, USB has no error recovery, in some circumstances messages can simply get stuck. Enhancing the G-code sending host to reset USB in case of USB getting stuck might be a worthwhile enhancement. For this, auto-reset should be disabled by removing C21.

Traumflug avatar Sep 04 '14 09:09 Traumflug

Are you saying, that if I remove c21, then the problem of the USB reseting can be partially solved, as the atmega wont be reset again if a new connection from host is initiated?

Will it work, if I use a USB serial dongle and bypass the MCP2200 entirely?

I will also check if the MCP2200 has a reset threshold that can be changed in software. worth a try.

On 4 September 2014 15:19, Traumflug [email protected] wrote:

Yes, 5VUSB is unconnected to avoing making things worse. Also, USB has no error recovery, in some circumstances messages can simply get stuck. Enhancing the G-code sending host to reset USB in case of USB getting stuck might be a worthwhile enhancement. For this, auto-reset should be disabled by removing C21.

— Reply to this email directly or view it on GitHub https://github.com/Traumflug/Generation_7_Electronics/issues/19#issuecomment-54443042 .

rupin avatar Sep 04 '14 09:09 rupin

Using a serial "dongle" doesn't change the problem. And yes, disabling auto-reset avoids automatic reset.

Traumflug avatar Sep 04 '14 10:09 Traumflug

The easiest is that I replace the erratic bell.

Apart from yanking out c12, what would be anything else that can be done?

Will connecting a thick wire from board ground wire to the psu body work? On 04-Sep-2014 3:30 PM, "Traumflug" [email protected] wrote:

Using a serial "dongle" doesn't change the problem. And yes, disabling auto-reset avoids automatic reset.

— Reply to this email directly or view it on GitHub https://github.com/Traumflug/Generation_7_Electronics/issues/19#issuecomment-54444424 .

rupin avatar Sep 04 '14 11:09 rupin

I am going over this problem to understand what is being said. I am using a laptop to run my printer. Are you saying that the surge is actually coming in from my laptop, rather than the printer SMPS? If I run my laptop on battery, this problem should go away I think?

rupin avatar Oct 24 '14 07:10 rupin

The surge is a difference between laptop behaviour and controller behaviour. Both are fine on their own, but together it sometimes doesn't work out. See "ground loop USB":

http://forum.arduino.cc/index.php?PHPSESSID=mvvkk4ra33taduic3ciikboe22&topic=64948.0;nowap http://www.kvraudio.com/forum/viewtopic.php?p=3254930 http://k7rpm.com/2013/09/12/usb-ground-loop-problem-solved/

Traumflug avatar Oct 24 '14 10:10 Traumflug