First test, lost Serial connection

265 views
Skip to first unread message

Marco Iannelli

unread,
Jul 16, 2016, 6:48:57 PM7/16/16
to OpenPnP

Hi guys,
I'm Marco.
I made my pnp machine based on your fantastic project Jason.
I appreciate all discussions and efforts, all this gave me the possibility to realize a PNP machine,it's a dream that came true for me. Thank You.
I'm a beginner but I would like to learn more about this project. If it's possible I would like to contribute.
I started with a design that is more or less based on openbuilds HW but more economic with cromed rod and ball bushing.
The machine works, I can pick up and discard, I never run a job, but randomly openpnp gives me an error, seems that lose the USB serial connection."Timeout waiting for response..."
I tried to stave off the board from the engines, nothing.
I tried to change USB cable, I'm using usb cable with ferrites, nothing.
I tried to reinstall everything. I tried latest version but the problem still remain.
I tried to change the bound rate but nothing.
Probably I'm losing something.
my laptop has Windows 10, 64 bit.
Any advice? please.
bye

MI

Jason von Nieda

unread,
Jul 17, 2016, 6:34:57 PM7/17/16
to OpenPnP
Hi Marco,

Can you send me your machine.xml please? I'll take a look there and get some information and then will advise next steps. You can find out where to find the machine.xml here:


It may also be worth looking at https://github.com/openpnp/openpnp/wiki/FAQ#how-do-i-turn-on-debug-logging to see how to turn on debug logging. Use "trace" instead of "debug" so you can see all of the serial communications.

Thanks,
Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/d418c9ae-b184-4d3b-b478-5845382f2328%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marco Iannelli

unread,
Jul 18, 2016, 5:30:15 PM7/18/16
to OpenPnP
Hi Jason,
I tried to make some change but no results.
I downloaded the latest version and remade the xml machine file. now:
OpenPnP 0.0.1-alpha-SNAPSHOT build 4ca13e OpenPnp x64 bit
before the stable version x64.
The machine seems to be slower, i didn't touch the smoothie config file.
I have an error moving to park position as you can see in the log file. And another that seems to be random, It does not seem to happen with the same instructions.
After the last log update I can't do anything, I can only exit openpnp. And restart Openpnp.
The only HW difference from your master HW design is the Z endstop, I unmount that, I use the spring to zero the Zaxis as your latest design.
In the config file i put:
# Z
gamma_min_endstop                            nc               #1.28^! min pin
gamma_max_endstop                            nc                  #1.29^! max pin
gamma_homing_direction                       home_to_max      # home_to_min
I don't know if this could cause problems.
Thank you Jason!

M
OpenPnP.log
machine.xml

Jason von Nieda

unread,
Jul 18, 2016, 6:27:01 PM7/18/16
to OpenPnP
Hi Marco,

It looks like your Smoothie is perhaps losing it's connection after a long period of working fine. I don't see anything strange in the log except that near the end it fails to respond to an M400 and then continues to fail. 

A few things to check:
* What kind of Smoothieboard are you using? Is it an official one, or a knockoff?
* Are you running any other programs that access the serial port? Perhaps Pronterface or a terminal or anything?
* Are you using a very long USB cable? Is it shielded?
* Does it seem to fail at the same time every time? After some amount of minutes? Or after a number of commands?

Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

mojalovaa1

unread,
Jul 18, 2016, 6:30:09 PM7/18/16
to OpenPnP
I m have same problems with arduino  and after  I m add  ferit rings on cable  and all is ok after that  , maybe this info will help .

Now all time  have connection . 
 

SMdude

unread,
Jul 19, 2016, 9:46:17 AM7/19/16
to OpenPnP
On my setup, as I was impatient, I ended up setting up my power supply as 2 12v batteries in series for 24v. I also have a battery charger connected to these. When I turn on the battery charger, the smoothie looses connection to my laptop, which is powered by it's own battery. I currently don't have any ferrites on my usb cable. There is a snippet on the smoothie site that discusses usb vs network.

Check that your power source is not getting any glitches/spikes etc. Could be a good idea to run the pnp from a UPS

Marco Iannelli

unread,
Jul 19, 2016, 6:44:17 PM7/19/16
to OpenPnP

Hi to all,
- The Smoothieboard it's the original one.
- I have repetier host but it's not running;
- I tried all the cables in the photo;
- Now with the best cable with ferrite as suggested by mojalovaa1 (thanks for that) after some minutes, I lose the connection but the board 2-3 leds still flashes and the sd card is accessible;
x Smdude thank you for your suggestion, I tried this to avoid possible mass loop but fail the same;I supplied power with a stabilized isolated power supply for laboratory; In the smoothieware board the power seems to be given by the USB cable as standard supplied.
I would try to change motors cables...with twisted or shielded cables may help.

thank you to all
bye

MI

Jason von Nieda

unread,
Jul 19, 2016, 6:54:19 PM7/19/16
to OpenPnP
Hi Marco,

Two things I would try:

1. Use a terminal app, or Repetier host, or Pronterface and connect to the Smoothie. Send a command every couple seconds (M114 would be enough) for 10 minutes or so and see if it ever disconnects. This will help us determine if it's the board or OpenPnP.
2. Look in your Windows event viewer ( https://en.wikipedia.org/wiki/Event_Viewer ) and see if there are events that show the device connecting and disconnecting. This might help us determine if the disconnect is happening at the OS level.

Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

Rich Obermeyer

unread,
Jul 19, 2016, 8:23:40 PM7/19/16
to ope...@googlegroups.com
Marco,
Measure the voltage or current passing between the ground of your computer and the ground used by the Smoothie board.  If its more than 2-3 volts or 50mAmps you might need an isolated USB.  Very common to have the ground shifting and disrupting your USB connection.  I have seen systems with Amps flowing between grounds (USB cable) because of cheap Chinese power supplies.
I think all products that have >50watt power supply should have an isolated USB interface built in.
That's how I would design them :-)


For more options, visit https://groups.google.com/d/optout.



--
Rich

Marco Iannelli

unread,
Jul 20, 2016, 9:30:10 AM7/20/16
to OpenPnP
Hi Jason,
I tried, the disconnection appears also with repetier host.
I attached the logs:
1- repetier host log;
2 - windows log tab;
3 - windows log detail;
Go well these windows logs?
sorry but I'm not able to determine who is the problem!

Maddog I tried also with this :
https://www.poscope.com/PoUSBiso
No improvement

log windows tab.txt
log repetier.txt
log windows detail.txt

Henrik

unread,
Jul 20, 2016, 2:24:34 PM7/20/16
to OpenPnP
Yeah, USB for high power stuff can be really touchy. On my big CNC mill I'm using a USB connected motion controller (the Smoothstepper (not to be mixed up with the Smoothieboard). That thing is a bit notorious for being sensitive and in my case I eventually had to to mount the board IN the PC case and connect it to an internal USB header using a very short cable in order to have it NOT drop out,

What I'd suggest you try, which relates to what Maddog mentions, is run an extra, fairly thick, wire (1mm Square or something) between the case of the USB connector on the Smoothie and the case of the PC (both being GND at their respective end).

Try powering down everything else and disconnect the stepper motors from the board (if you're using the internal drivers) then try again and see if it still drops out after a while.

Also, and this is important, if you're powering the Smoothieboard from the same DC supply as other stuff (solenoids, lights and what not) make sure you utlise a star ground topology, don't daisy chain the ground wire from device to device to device, especially if the devices are "hungry" and the wires long and thin.

/Henrik.

Matt Baker

unread,
Jul 20, 2016, 6:17:57 PM7/20/16
to OpenPnP
Lots of good advice given above.  This certainly sounds like a noise problem of some sort, likely with the ground as suggested.

Since it looks like you are using a laptop, you could test for ground loop issues by floating (unplugging the AC adapter) it.  Then your laptops ground reference will be through and to the smoothieboard, though this may not necessarily be true depending on what else is plugged into your machine -- external monitor, powered USB hub, etc.

The smoothieboard having a common motor and logic ground wire is one source of noise that would be made significantly worse with a ground loop present.

spanner888

unread,
Jul 20, 2016, 7:06:20 PM7/20/16
to OpenPnP
What everyone else has said is important, but note everyones system behaviour is different, so you just have to try all the advice to sort out the issue.

Key areas are power input, grounding and electrical noise. Focus on each of these, for example:

power input:-
  • That Lab power supply - not all are designed to supply motors/steppers - are you certain it can cope with peak load spikes (and is not going into protection mode on peak output). Are you able to test with a different power supply?
  • can you use osciloscope to view supply voltages/stability?
grounding:-
  • star ground - really important - carefully review all aspects and do a block level diagram of the modules, power AND grounds.
  • also review your mains power input connections. Try isolating motor power supply to seperate power point/circuit, use and EMI filter....
  • ... noticed that Smoothie board has metal frame behind it. If not already done, that should also be connected to to star ground point - and make sure EACH section of that frame is properly grounded. This may require scraping the paint off.
electrical noise:-
  • Make sure that power (240 and stepper) wires are not run in parallel to any other Smoothie/end stop wires, if they need to cross over, do at right angles. Also keep the power wires well away.
  • also look at grounded metal enclosure for Smoothie ... with good ventialation
  • it may be necessary to rotate smoothie board 90 degrees to minimise noise - you need to try every combination
  • Also double check that Smoothie has isolated mounting holes - if not, then the mounts need to be isolated from the grounded frame.

Terminal mode is especially useful. I my case debugging CNC comms issues it helps see if end stops have triggered (noise on end stop wires), or if the controller board reset - and yes I originally had both issues occurring. Now just the latter when using a 30 year old Dremel that has no electronic speed control and the brushes are driven by 240VAC - so it is super electrically noisy.

SMdude

unread,
Jul 21, 2016, 7:39:46 AM7/21/16
to OpenPnP
Another thing to try is to make sure your Sd card is unmounted, as in when your computer recognises the sd card drive, go to where you "safely eject usb drive" and do that. Noticed that is recommended on the smoothie setup page.

Also, it it possible for openpnp to utilise the TCP/IP network function of the smoothie? This the the recommended connection method for smoothie due to usb reliability ...

Jason von Nieda

unread,
Jul 21, 2016, 11:46:03 AM7/21/16
to OpenPnP
TCP: Currently no, but coming soon, in Release 4: https://github.com/openpnp/openpnp/issues/106


On Thu, Jul 21, 2016 at 4:39 AM SMdude <spiteri...@gmail.com> wrote:
Another thing to try is to make sure your Sd card is unmounted, as in when your computer recognises the sd card drive, go to where you "safely eject usb drive" and do that. Noticed that is recommended on the smoothie setup page.

Also, it it possible for openpnp to utilise the TCP/IP network function of the smoothie? This the the recommended connection method for smoothie due to usb reliability ...

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.

SMdude

unread,
Jul 21, 2016, 10:38:16 PM7/21/16
to OpenPnP
Hi Jason, Good to know! You're a real goer! Keep up the good work and make sure you still get a bit of time for yourself ;)

Another thing with the usb disconnection, this could come down to a simple hardware fault too. Might be worth running the hot air gun around the board and see if you can get it to disconnect.
Another thing, Windows 10... Is anybody else successfully using 10 with a smoothie? It probably starts checking the smoothie mid job to make sure there is no pirated software hiding on it!! :P Or wants to renew the connection cause it's bossy....

When the error happens, does the sd card drive come up again as if the usb has been physically disconnected?

Marco

unread,
Jul 22, 2016, 2:53:34 AM7/22/16
to OpenPnP
Hi to all, I tried all things suggested, but nothing, I changed laptop: windows 7 everything ok run also with another laptop with Windows 10 everything ok. There's something in my laptop... I don't know what. Anyway thank you for the support, I'm happy to hear so much help, it's a great project in every aspects. Bye

MI

Reply all
Reply to author
Forward
0 new messages