Hello, we have a project where we use an Arduino Mega 2560 for datalogging. The arduino sends periodically (2s cycle) a string containing different sensor values. On the PC (Windows 7 and Windows XP) we use logview for visualization (www.logview.info/) which works well for our purposes. The stringformat for logview is described here: http://www.logview.info/cms/d_formatbeschreibung.phtml Our problem is that logview hangs up from time to time. The serial logging stops and logview can't open the COM-Port anymore. The only solution is to unplug and reconnect the USB-cable. Unfortunately, this isn't an acceptable solution for us. What we have tried so far: - We removed all sensors/actors from the Arduino Mega 2560 and sent only dummy strings over USB -> logview still hangs up - We reduced the baudrate --> it seems, that the device doesn't hangs up so often (but still hangs up) - We used shorter USB-cables --> it seems, that the device doesn't hangs up so often (but still hangs up) - We used on the PC a simple PC-program writing serial data to a file (instead of logview) --> also hangs up - We connected an additional arduino USART/USB converter to the second USART from the Arduino and sent the same strings over both UARTS. On PC we watched both ports with logview and putty -> both hanged up - We tested this also with different PC's. You have any idea? We think that it could be - problem with ground - problem with windows Best regards
Is the Arduino powered over USB? If, try an USB-Hub with own power source. Maybe some voltage drop causes an reset? Another point could be the Auto-Reset from the Arduino-Board. Try to put an 120 Ohm Resistor (min 110, max 124 Ohm) between Reset and 5V or cut the wire "Reset EN" on the board. (see: http://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection ) When you say the device hangs up, do you mean that the arduino stops working or is it just the communication that breaks?
The arduino itself does not hang up: In the test where we sent the output string over two UARTS they boths hang up independently (not at the same time). So we can be sure that the arduino continues to send the strings after hangup. The only thing is that the COM-port on the PC is lost and our visualization tool stops operating. When we unplug and reconnect the USB-cable the visualization works again (without reseting the arduino). Best regards
bernhard86 schrieb: > The only thing is that the COM-port on the PC is lost and our > visualization tool stops operating. When we unplug and reconnect the > USB-cable the visualization works again (without reseting the arduino). Usually (that means you didn't do anything to avoid this) the arduino is reseted every time a serial connection (over the usb-plug) is established. Can you confirm, that the arduino is not resetting when the connection gets lost?
Ok, when rethinking the whole test scenario I am not able to confirm that the arduino is not resetting. It may also be possible that the arduino restarts, but this isn't a problem since the arduino starts logging again immediately. But we will try to find out ... We will also try to cut the wire "Reset EN" and to run a long time test again - but this isn't a good solution since the arduino isn't programmable any more (via remote access). best regards
If you need auto reset don't cut it, use the resistor. Just found out that there is a second µC on the MEGA 2560 managing the usb connection. In its firmware there were some bugfixes affecting buffering. Eventually check if the firmware on your Arduino is the newest one.
I also have sometimes Problems with COM-Driver for Arduino and Windows. I think, it is a Windows-related problem. With Linux I talk directly over libusb, without a Com or TTY driver. And there are no problems over several monthes.
We have checked the firmware on our Arduino: it is the newest one. At the moment we try the same test with a debian-linux pc. Best regards
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.