Can Octoprint connect to MK2 at 250k baud rate?
 
Benachrichtigungen
Alles löschen

Can Octoprint connect to MK2 at 250k baud rate?  

  RSS
Rutilate
(@rutilate)
Trusted Member
Can Octoprint connect to MK2 at 250k baud rate?

Octoprint is supposed to support printer connections at 250k baud rate. Someone said that the printer was hardware limited to 115.2k. Can anyone confirm?

Veröffentlicht : 15/10/2016 3:54 am
David T.
(@david-t)
Noble Member
Re: Can Octoprint connect to MK2 at 250k baud rate?

This reference should be quite enough: https://github.com/prusa3d/Prusa-Firmware/blob/MK2/Firmware/Configuration.h#L75
😉

Veröffentlicht : 15/10/2016 10:59 am
Omikron
(@omikron)
Estimable Member
Re: Can Octoprint connect to MK2 at 250k baud rate?

I'm not sure if the MiniRambo can keep up if you increase the speed in firmware. I believe that's why it was limited to a lower speed.

Veröffentlicht : 15/10/2016 11:30 am
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Can Octoprint connect to MK2 at 250k baud rate?

With a direct USB connection to Arduino-based controllers, 250000 baud is a better connection rate (more reliable) simply because it is 1/64th the clock rate of the processor, whereas 115200 bares no relation to the clock rate whatsoever.

However, that only applies when that processor is used to directly read the serial port. The RAMBo has an onboard USB to Serial controller which handles the serial comms and that is designed to run at standard serial speeds (ie 115200).

In addition, most PCs would find communicating at 250000 baud quite difficult as they are "tuned" to use the standard serial comms rates.

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Veröffentlicht : 15/10/2016 1:28 pm
Rutilate
(@rutilate)
Trusted Member
Themenstarter answered:
Re: Can Octoprint connect to MK2 at 250k baud rate?

This reference should be quite enough: https://github.com/prusa3d/Prusa-Firmware/blob/MK2/Firmware/Configuration.h#L75
😉

😀
With a direct USB connection to Arduino-based controllers, 250000 baud is a better connection rate (more reliable) simply because it is 1/64th the clock rate of the processor, whereas 115200 bares no relation to the clock rate whatsoever.

However, that only applies when that processor is used to directly read the serial port. The RAMBo has an onboard USB to Serial controller which handles the serial comms and that is designed to run at standard serial speeds (ie 115200).

In addition, most PCs would find communicating at 250000 baud quite difficult as they are "tuned" to use the standard serial comms rates.

Perfect explanation of the hardware limitations. Thank you!

Veröffentlicht : 15/10/2016 5:01 pm
patrizio.b
(@patrizio-b)
Trusted Member
Re: Can Octoprint connect to MK2 at 250k baud rate?

In firmware 3.0.10-alpha i've seen some references to two different serial speeds, 115200 and 1152000. I really don't understand what "SERIAL_LOW" and "SERIAL_HIGH" means, just look here:
https://github.com/prusa3d/Prusa-Firmware/commit/2452e43387b6ffee4131de123272f4df02de8c26

I've also seen that it isn't uncommon for other printers users to use a serial speed of 250000 through Octoprint (instead of 115200); e.g.:
https://github.com/foosel/OctoPrint/wiki/OctoPrint-support-for-250000-baud-rate-on-Raspbian
http://www.geeetech.com/wiki/index.php/Rambo

Maybe it's possible to use higher speeds and the current firmware cap is only there for compatibility reasons; so I've managed to recompile the firmware with #define BAUDRATE 250000 in Configuration.h, and at least it does connect:

This could give another chance to Octoprint and its slow USB connection 🙂

That was just to share; unfortunately I can't test an actual print until next week.

Veröffentlicht : 07/01/2017 2:07 am
patrizio.b
(@patrizio-b)
Trusted Member
Re: Can Octoprint connect to MK2 at 250k baud rate?

Ok, found some time... so far it's working 😛

Veröffentlicht : 07/01/2017 12:45 pm
patrizio.b
(@patrizio-b)
Trusted Member
Re: Can Octoprint connect to MK2 at 250k baud rate?

If i'm not mistaken, the MiniRambo uses the ATmega32U2 for USB/Serial conversion. From the diagram, the oscillator is 16.000 Mhz. Indeed 250k, 0.5M and 1M are better baud rates in terms of jitter minimization. However, I don't know how this relates with the USB/Serial conversion. I don't even think that jitter has any impact, being the actual data buffered.

Veröffentlicht : 07/01/2017 1:19 pm
danbst
(@danbst)
Eminent Member
Re: Can Octoprint connect to MK2 at 250k baud rate?

OK.
Stuff suddenly got very techy.
So What Baud rate is recommended for Octopi again? 😀

Veröffentlicht : 09/01/2017 3:56 pm
patrizio.b
(@patrizio-b)
Trusted Member
Re: Can Octoprint connect to MK2 at 250k baud rate?

i don't have a test mechanism, i can only tell i'm currently using 250000 without problems.

Veröffentlicht : 09/01/2017 6:31 pm
Florian Lang
(@florian-lang)
Eminent Member
Re: Can Octoprint connect to MK2 at 250k baud rate?

I cannot connect with 250k, im just getting some jibberish on Octoprint.
115.2 works just fine and i have no problems so far.

Veröffentlicht : 12/01/2017 5:37 pm
patrizio.b
(@patrizio-b)
Trusted Member
Re: Can Octoprint connect to MK2 at 250k baud rate?

You have to modify a firmware configuration (#define BAUDRATE 250000) and recompile it to reach 250 kbps.

Veröffentlicht : 12/01/2017 7:55 pm
Carsten
(@carsten-2)
Estimable Member
Re: Can Octoprint connect to MK2 at 250k baud rate?

From the octoprint/Octopi side I can say that I did feed TWO printers with 250k baud rate at once from a Raspi 2 with no problems.

Carsten

My Prints: https://www.prusaprinters.org/social/15695-carsten/prints
My Employer: https://make-magazin.de

Veröffentlicht : 14/01/2017 7:52 pm
luma
 luma
(@luma)
Mitglied
Re: Can Octoprint connect to MK2 at 250k baud rate?

I can also confirm success with running from an rPi 3 + OctoPrint @ 250000 running firmware 3.10-Alpha pulled from GitHub on 2017-01-21.

Veröffentlicht : 21/01/2017 10:37 pm
Teilen: