Skip to content
This repository has been archived by the owner on Aug 20, 2023. It is now read-only.

MCP2200 Resets on power surge #19

Open
rupin opened this issue Sep 4, 2014 · 8 comments
Open

MCP2200 Resets on power surge #19

rupin opened this issue Sep 4, 2014 · 8 comments

Comments

@rupin
Copy link

rupin commented Sep 4, 2014

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?

@Traumflug
Copy link
Owner

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.

@rupin
Copy link
Author

rupin commented Sep 4, 2014

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" notifications@github.com 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
#19 (comment)
.

@Traumflug
Copy link
Owner

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.

@rupin
Copy link
Author

rupin commented Sep 4, 2014

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 notifications@github.com 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
#19 (comment)
.

@Traumflug
Copy link
Owner

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

@rupin
Copy link
Author

rupin commented Sep 4, 2014

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" notifications@github.com 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
#19 (comment)
.

@rupin
Copy link
Author

rupin commented Oct 24, 2014

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?

@Traumflug
Copy link
Owner

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/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants