Welcome! Log In Create A New Profile

Advanced

Communication issues

Posted by N314 
Communication issues
August 20, 2012 01:48PM
Hi-

I have a Prusa Mendel and it works well on prints up to 1~2 Hours.

But in longer prints I am starting to have problems. I have left two prints going to come back with the machine stopped... with nothing in the print log, heater running, just stopped.

Another problem is after an hour or two of printing the communication gets sketchy, with a lot of short pauses... None at beginning of print.

What can I do?

Prusa Mendel running marlin on RAMPS 1.4... Using Pronterface

-Nick
Re: Communication issues
August 20, 2012 09:51PM
I'm not going to cover every possible problem source, but I'll just start the replies off by asking this:

Are you operating with shielded motor cable? Steppers can generate some nasty noise, and comm chips can easily be taken down by the noise currents generated by the motors.
Re: Communication issues
August 20, 2012 10:00PM
I don't think the motor cables are shielded but I think the USB is.

Does motor noise increase as the print goes on?... Because it never is a problem on short prints.

-Nick
Re: Communication issues
August 20, 2012 10:30PM
No, it doesn't go up with time

I'm just offering one probable cause of communications failures. I have no real insight into the quality of your build and it could be any number of things.

I was specifically asking about the motor cabling because it is a known source of high energy noise that can "hump" a communications channel and I've seen it dozens and dozens of times in the field in my professional work over the past couple of decades.

As I said, it could be something else. this is just one possible source.

Edited 1 time(s). Last edit at 08/20/2012 10:33PM by xiando.
Re: Communication issues
August 20, 2012 10:51PM
In case that is the problem...

What can I do to fix it or shield the com chips?

-Nick
Re: Communication issues
August 20, 2012 11:00PM
Just make sure the motor wires are routed away from the USB cable.

It could be a power spike, someone turning on a fluorescent light, AC or something on the same circuit.
Could be something dumb like the computer doing something to disrupt communication.
Could be the fuses in the board overheating.

You really need to watch it fail and see if something stands out.
Re: Communication issues
August 20, 2012 11:08PM
is the avr chip getting warm? i've got the same problem with a sanguinololu board,

I'd be checking to see if its not the firmware, load the teacup firmware in there and see if you get the same problem,
Re: Communication issues
August 20, 2012 11:45PM
As far as a power spike... I have a fan running off the same power strip and once I turned it off because the hotend was getting to cool and the print completely stopped... but not a "fluency" affect.

AVR chip getting warm... I don't know, its covered by the RAMPS.

Cables away from USB... Its a big tangle of wires all mixed. Ill try to clean them up and do a long print.

Two of my relatives were watching it print once when it just stopped. They said there was nothing leading up to it, it just stopped.

Teacup? I haven't heard of it. Is it compatible with RAMPS 1.4?

-Nick
Re: Communication issues
August 20, 2012 11:59PM
"In case that is the problem... what can I do to fix it or shield the com chips? "

IF it is the motor cabling, replace it with proper motor cable, ie, four wire, shielded, twisted pair. That's what the motor mfg's recommend,. and it's what test specs require in "real" installations. For this app, 24ga if you can get it, or 20-22ga, which I'm pretty sure is readily available.

Something like [www.ebay.com], (even if it's a bit oversized for these ~40oz/in motors...) would be far better than loose wires and in general is probably a good idea anyway. Neighbors might not like it if their neato touch lamp keeps turning on and off. The guy who got me into this has that problem with his bedstand light ( 20 feet away in another room) when the printer is running.

As thejollygrimreaper suggested, it could also be an overheating issue on the controller board as well.

Might even be a dubious power supply acting up

There are unfortunately a few different things that can lead to this sort of problem. You just have to go through one by one and address them, either by building with them in mind or by periodically debugging and repairing the assembly to address each as you encounter it..
Re: Communication issues
August 21, 2012 01:30AM
xiando Wrote:
-------------------------------------------------------
> Something like
> [www.ebay.com]
> Ga-Stepper-Motor-CNC-Router-/160632659191#ht_2297w
> t_1064, (even if it's a bit oversized for these
> ~40oz/in motors...) would be far better than loose
> wires and in general is probably a good idea
> anyway. Neighbors might not like it if their neato
> touch lamp keeps turning on and off.

Solid core wire like that would be terrible for the extruder motor or x-axis motor, where the wires need to flex back and forth during printing.


Help improve the RepRap wiki!
Just click "Edit" in the top-right corner of the page and start typing.
Anyone can edit the wiki!
Re: Communication issues
August 21, 2012 04:18AM
Sorry, I missed that it was solid core. The image appeared to be stranded wire, but I must not have paid close enough attention on the ebay item. The point, of course, is still that stepper motors should be wired with shielded cable, because otherwise you can both transmit and receive noise that can compromise your system and those around you.
Re: Communication issues
August 21, 2012 05:49AM
Besides motor wiring, Printrun/Pronterface supports watching serial communications if you use the experimental branch. A pretty recent feature, you can turn it on in the menu ("G-code debug"). This might give some insight in what's happening.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Communication issues
August 21, 2012 06:13AM
the teacup should work with the ramps board,

i don't know what it is with marlin and sprinter, but they don't seem to tollerate much,

where as teacup seems almost bullet proof , the downside is it doesn't do circular interpolation

i personally would recommend going away from all in one boards that use pololu drivers, and go with proper industrial stepper drivers which are comparable in price to the pololus, between that a small relay board and an arduino uno with a screw terminal shield you'll probably have change left over compared to a things like the sanguinololu or ramps packages

bear in mind too that the pololus are a breakout board, they were never really intended to be used like this, in most of these boards be it the ramps or the sanguinololu or most of the newer ones for that matter there is very little or no protection from spikes/ or feedback comming down the logic lines, back into the arduino.....

the teacup firmware runs at half the baud rate that sprinter and marlin do, which is probably why it seems to bullet proof, other bugs aside,

about the best you can do with a ramps board is to isolate all the wiring that goes to the stepper motors from the rest of it, cable tie as much as you can to the frame, get a shielded usb cable with a couple of ferrite cores on it, and maybe take up praying, the same pretty much applied to most of the other boards as well
Re: Communication issues
August 22, 2012 04:57AM
Quote

go with proper industrial stepper drivers

You have such "proper" stepper drivers available for $8 somewhere? Where?

Quote

the teacup firmware runs at half the baud rate that sprinter and marlin do, which is probably why it seems to bullet proof

Sprinter & Marlin can be run at 115200 baud, too. Marlin is recently not as stable as it could be, apparently. People report about motors not moving at all and such things. No idea why, perhaps it's also because there are many more Marlin users, so bugs get exposed a lot more often.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Communication issues
August 22, 2012 06:01AM
I can currently get stepper drivers based on the TB6560 chip which are suitable for an industrial environment from china for about $17.00Aud including delivery and the price goes down the more of them i order

I don't know where you get pololus for $8 but the cheapest sources i can find in Australia are about $16.95 before the postage is put on top, even if i get them from overseas it still ends up costing $16 and above, for me the Tb6560 option is a better one since it's not actually a breakout board but a developed industrial grade product,

> the teacup firmware runs at half the baud rate
> that sprinter and marlin do, which is probably why
> it seems to bullet proof
>
> Sprinter & Marlin can be run at 115200 baud, too.
> Marlin is recently not as stable as it could be,
> apparently. People report about motors not moving
> at all and such things. No idea why, perhaps it's
> also because there are many more Marlin users, so
> bugs get exposed a lot more often.

I agree it can be run at 115200, but there must be something more in the configuration that allows it to actaully work,

I've been though the whole list of things to try to fix the problems, eg using a shielded usb cable, ferrites, upgraded power supplies, replaced whole banks of pololu drivers, replaced the individual avr chips, tried a different board and went to the ramps and the gen7, re-flashing boot loaders and rewiring the entire machine several times over,

to be honest i think my opinion on the whole pololu driver thing is biased against the pololus by the now 7 dead pololus and near $600 worth of boards i cannot use with any degree of confidence that they will run long enough to actaully complete a part, i've got a sanguinololu board here where the avr chip heats up an then eventaully freezes, i gave up on that one, the ramps board wasn't much better the z axis either stopped moving for no aparent reason until i reset it or it would just freeze up mid print and different points, i'm honestly over it,


sprinter and marlin..... it would be nice to just take the circular interpolination code from them and put it into the teacup firmware, the high printing speed is nice, but it's no good to anyone if it not reliable,
Re: Communication issues
August 22, 2012 02:21PM
I don't know why you have so many problems. I've gone through dozens of Pololu drivers, never had a bad one or had one die. I've run a number of 10+ hour prints too. Even on my larger MendelMax, where the motors require more current because the axes are heavier, I've never had an issue. I've run several Sanguinololus, never had the AVR chip heat up. Running at 115200 baud in Marlin I've never had an issue with freezes. Only when trying to run at 250000 baud has it been an issue, so I just set it to 115200 by default. I've never had to rewire a printer out of the dozen or so that I've made.

Did you try shielded motor cables? Although I haven't found them necessary, that is where the biggest source of electrical noise comes from.


Help improve the RepRap wiki!
Just click "Edit" in the top-right corner of the page and start typing.
Anyone can edit the wiki!
Re: Communication issues
August 22, 2012 06:16PM
yep tried the shielded motor cables, didn't make a shred of difference,

just about everyone is on the right track with noise but not quite there, putting aside the bugs with marlin and sprinter,


the stepper motors produce noise we know about that, now the avr chip can live with certain levels of noise and will quite happily go on and on, however things like sd cards fdti chips and a significant number of usb ports out there have a few problems with this,

some will tick on happily, but not all, starting with the usb ports if there is a significant amount of a certain level of noise comming up the port for a certain amount of time, the host controller can reset and drop it connection with all the attached devices , now windows and linux is usaully quick enough to reconnect everything, somtimes it'll give the fdti chip a different serial port number (depends on your windows installation)

the fdti chip, normally quite good with noise, however even it has it's limits, can also be a point where the usb connection can be dropped or even end up in being reset,

for those running things off sd cards, it a miracle it even works, even with the noise, sd cards and micro sd cards are a particular PITA to communicate with via that loosely implemented spi protocol they all claim to follow, these are another device that can completely lock up in the presence of noise, they are only meant for phones and mp3 players after all...

there is a very good reason stepper driver manufacturers go to the effort of putting in optically isolated circuits into their drivers, and it's because of these very problems, it would be the first circuit they would get rid of if they could get away with it!

@NewPerfection the difference between my setups and your setups are very different, we almost certainly don't use the same motors from the same manufacturers, you could put money on it that we didn't get our ramps/sanguinololu boards from the same people and/or the same high quality components were used which can be the differences between a totally unusable board and experiences like yours with nearly no problems, and this seems to be the re-occurring theme

then there is the difference in usb ports between computers - yes i've tried several different computers

the other thing you tend to find and i know I'll cop some flack for saying it but the people on here who tend to handle some of the issues with the boards and the pololus are also the same people making a fair amount of money assembling them and selling them, so they have a vested interest to keep people buying these boards i can't say I'm surprised it is after straight out of the capitalism handbook after all,
Re: Communication issues
August 23, 2012 07:29AM
Quote

it would be nice to just take the circular interpolination code from them and put it into the teacup firmware

If this is important to you, by all means, do it smiling smiley I'm already the Teacup maintainer, a wiki admin and committer, the Visolate developer, a gEDA/PCB developer, the Gen7 developer already and spend several hours a day in this forum, on IRC and in email to help people. Still, my day has 24 hours only, too smiling smiley

That said, you might want to have a look at this Teacup fork: [github.com] Look-ahead for Teacup exists already, it "just" requires getting the changes into acceptable chunks/patches, so Teacup's reliability doesn't suffer.

Quote

i know I'll cop some flack for saying it but the people on here who tend to handle some of the issues with the boards and the pololus are also the same people making a fair amount of money

Wherever I look, shops have their own, seperated forum/support area or people aren't supported at all. If your Pololus blew, why didn't the seller replace them? Why didn't he help to fix the board? What about these blewn Sanguinololus? I think you know the answer already, it's in your capitalism handbook smiling smiley

If there's a Gen7 among all these non-working boards, I ususally fix that if people send them in, for postage stamp compensation (EUR 5.-). Even if you didn't buy it here.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Communication issues
August 23, 2012 08:41AM
I did actaully try to get my money back on the sanguinololu ad the polous, the seller offered my a gen7 board which i took up, it worked for a while with sprinter which still locked up for no reason at near random times, so i swapped that very recently for some stepper motors with somone in melbourne, the seller has been quiet since i still have the ramps board around somwhere,

the sanguinololu i'm talking to the seller at the moment still and i'm just getting the whole list of the usaul things to try, i cannot get it through his thick head that i have it sitting on my desk and that i'm not going to partially rewire my machine for the sake of testing a new cable or different plugs,

I'm looking at putting the circular interpolation in myself i've already added a whole heap of custom mcodes to handle things normally used in cnc milling machines and lathes, I'm also looking at porting it over to run on a faster chip so it can pulse those step lines a lot quicker,

I've got to ask though why weren't optos put on the gen7 boards?

I don't mean to offend people on the topic of the boards and the pololus but so far my experience with them has been negative, and the cause of some of it is the design choices that have been made.
Re: Communication issues
August 23, 2012 09:01AM
There isn't a problem with Pololus directly connected to a micro per se, I have run several machines for years without lock ups. I do use ethernet rather than USB,which is transformer coupled so avoids a ground loop.

Have you tried running from SD without any connection to a PC? I.e. without the ground loop?

Whatever your problem is I don't think it affects most people. I have seen people with rooms full of machines printing 24/7. I am sure they would be making a noise if they got random lock ups.


[www.hydraraptor.blogspot.com]
Re: Communication issues
August 23, 2012 09:17AM
Quote

i've already added a whole heap of custom mcodes to handle things normally used in cnc milling machines and lathes

It whould be kind if you'd provide such stuff. Even if you don't collect money by doing so.

Quote

I've got to ask though why weren't optos put on the gen7 boards?

Optos have to be mounted on the machine, in the proper place? Some people prefer mechanical endstops over optical ones? Something like that winking smiley


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Communication issues
August 23, 2012 11:28AM
My prints stop exactly like that, when i power up a motor of a small disc cutter in another room. I think there is another report of prints stopping when neon luminescent tubes are powered on. I think there is a fair chance that after 1-2 hours you go to your things and do something which affects power lines like that. I also didnt made the connection between things at first, and took me a while to figure that. If it would be random, then it would be just that: random, e.g. 5 mins or 5 hours whatever. But imo, phrase of "after 1-2 hours" its not actually "random".

IMHO, try a test print and do fast all the things which you do in other parts of the house and could affect the mains, see if some certain individual action can be directly responsible to stop the prints. Imo this could be worth investigating.

My personal impression or opinion is that its an issue with mains power, either transients or generally already bad pfc (context of being away from medium to low voltage street transformer or bigger indutive loads / reactive consumers on the premises or smth like that). Including an old fridge starting up or going off. Atx of the pc doesnt usually have emi filter components nor pfc management. I have no proof, but what i suspect or what i think happends, it momentarily pulls the gnd to less than lets say -3V which most ic wont tolerate, and this way probably stops the ft serial chip from working. I think its rather gnd issue than positive voltages, no real proof, so again just an opinion in my head motivated only because of how atx gnd is, its my belief that gnd is more sensible to mains issues than other power sides.

Perhaps it could be fixed maybe with a good cap on usb (comms) 5v line or maybe LC filter (from the above thoughts very unlikelly but maybe worth a try), or with emi filters on mains lines before both pc and printer psu, with or with a small reactive power cap on mains lines preferably closer to the source of problems if that is identified.

I actually did nothing of that sort because once i figured exactly what action stops my print, e.g. using a certain disc cutter, i simply resorted at not using that and printer at same time, and that was enough for me.
Re: Communication issues
August 23, 2012 03:59PM
>If it would be random, then it would be just that: random, e.g. 5 mins or 5 hours whatever. But imo, phrase of "after 1-2 hours" its not actually >"random".

I know what completely stops it. Its turning on or off a fan near the machine... Drawing from the same outlet, that's not random at all.

What takes 1 to 2 hours is for the communication to slow to a crawl and act erratically. Its kind of like the computer and the Arduino keep waiting for the other to talk, like a delayed cell phone conversation.

-Nick
Re: Communication issues
August 23, 2012 06:07PM
Traumflug Wrote:
-------------------------------------------------------
> i've already added a whole heap of custom mcodes
> to handle things normally used in cnc milling
> machines and lathes
>
> It whould be kind if you'd provide such stuff.
> Even if you don't collect money by doing so.
>
no problems there i've got a few still to add in and correct

> I've got to ask though why weren't optos put on
> the gen7 boards?
>
> Optos have to be mounted on the machine, in the
> proper place? Some people prefer mechanical
> endstops over optical ones? Something like that winking smiley

i should have been a bit clearer, not the end-stop on the machine, i mean on the board, those optical isolation chips

[en.wikipedia.org]

Ideally with these you avoid the whole common ground scenario and all the ground line noise that affects parts of the logic circuit, just about every piece of motion control gear has these, the downside is that it makes the circuit a little more complicated, the logic circuit on the stepper drivers would have to be derived from the motor power supply, in most cases thats 12v and a 7805 will do the job but for those running 24v and high you'd have to do some regulator stacking
all of which adds to the cost of the board,

the one and only trick i haven't tried is to simply remove the v+ connection from the usb port, since the fdti and arduino is already powered it's kind of obsolete, the noise only has the two line D+ and D- lines to travel down and those lines are much more protected from noise than the V+ line, i've had some success with this in the past when Microchip came out with the first of their usb capable PIC
Re: Communication issues
August 23, 2012 07:58PM
Yes its is definitely a good idea to cut the5 V track at the USB connector of the Sanguinololu. Otherwise the output of the 5V regulator is connected to the 5V USB output of the PC which is bad news. It can make the regulator overheat, cause the PC to report a USB fault or even damage the PC.


[www.hydraraptor.blogspot.com]
Re: Communication issues
August 25, 2012 07:18AM
USB does suffer from noise issues, an additional problem is that recovery is not seamless. In order to recover the connection, the user may need to physically disconnect the device and plug it back. There are also issues with device drivers hanging and the application needs to close the port and re-open it.

The problem is sufficiently rare that most users will never see it, and swear that it never happens. OTOH, people in a worst case situtation will see it so often as to conclude that USB is totally unreliable. I have seen it with my printer when a fridge turns on/off. At work I see it all the time, since we work with electric motors.

As with all noise issues, it comes down to careful design and practice of filtering and isolation. Unfortunately there is little we can do about the USB protocol since it is fixed by spec, and changes to the software would require modification to device drivers, which is not practical.

USB is difficult to filter because of the speed, and is also diffcult to isolate because of the electrical spec. It is fair to say that USB was not designed to be robust in noisy or industrial environments, more home/office environments. There are USB isolators which might work. e.g. [www.olimex.com] (cheap but functional). These modules are based on a magnetic isolator chip, you can get ones in a nice box but it's the same chip.

My own work suggests that to fix USB for "industrial" use can be done, but adds a lot of unit cost and development effort. Ethernet is as cheap and almost as easy, and much more robust in noisy or industrial environments.

If you really need USB, try a USB isolator. If that doesn't work, probably best to ditch USB and find something better.
Sorry, only registered users may post in this forum.

Click here to login