Elegoo Mars & Saturn
Control Printer via UART - Printable Version

+- Elegoo Mars & Saturn (https://www.elegoomars.com/forum)
+-- Forum: Elegoo Mars 3D Printer (https://www.elegoomars.com/forum/forumdisplay.php?fid=1)
+--- Forum: Printer Mods / Add-Ons (https://www.elegoomars.com/forum/forumdisplay.php?fid=4)
+--- Thread: Control Printer via UART (/showthread.php?tid=150)

Pages: 1 2 3


Control Printer via UART - fips - 09-30-2019

Hello, has anyone tried to steer him through UART yet?

I am currently using the Ethernet Enabled firmware. Works well with chitubox. But you still don't really have control over the printer.  I'm playing a bit with the UART right now and had to find out that it's easy to access via GCodes.

Any of you guys know any sources for usable gcode lists?

I post here a PDF with the G-Codes I found so far.

https://herbri.ch/pic/gcode_list.pdf


RE: Control Printer via UART - admin - 09-30-2019

The photonsters have a Universal Network Controller to be able to control the printer, ie... Start, Stop, Pause, Upload Files, Delete Files...

https://github.com/Photonsters/Universal-Photon-Network-Controller/releases


RE: Control Printer via UART - fips - 10-01-2019

cool. Thanks.


RE: Control Printer via UART - upright_animal - 12-04-2019

(10-01-2019, 12:23 AM)fips Wrote: cool. Thanks.

I bought the Mars thinking that a) I wouldn't miss Octoprint that much, and b) if I did, I'd just figure out how to use the onboard NIC to get access. Oops. Mine is a later version with no interface on the board.  
Forgive me if it's obvious, but can you explain a bit about how you are interfacing via UART?


RE: Control Printer via UART - fips - 01-06-2020

Hello,

i also didn't want to give up my octoprint surface, so there is a small PI Zero hanging in my Mars.

The UART of the PI hangs directly on the UART of the printer. 
The Pi also hangs as "Flash memory" on the mainboard. At the USB cable I have cut the positive line for safety reasons.  

The Pi is powered by a buck converter from the 12V of the printer. Next I want to control the main power supply of the printer with the PI.


[Image: IMG_1.webp]

The printer communicates with 3.3V and 115200 Baud via the Uart.

[Image: IMG_2.webp]

My TODO`s:

- control Mainpower
- a heating element controlled by the PI
- Maybe I will try to adapt to Octoprint at some point.


RE: Control Printer via UART - revnull - 02-15-2020

Very cool thread so far. I just picked up a Mars Pro and would love to help getting it to work with octoprint.

Here is the visible side of the controller:
[attachment=120]

Header "J3" seem to be the location to attach RPi Zero UART to.
[attachment=121]

Is there a more comprehensive list of available g-codes? Setting up Octoprint with a chitu board plugin and Pi Zero USB drive emulation "gadget" would be a great combo. I'm still new to all of this resin stuff, but at a high level, we would just need the ability to move/home the z-axis, start, stop, and pause prints. In order to start prints, I assume we would need a way to list the files on the "USB" drive/partition and instruct the printer to print that file. Out side of that, we could disable the temperature tab and maybe limit the controls tab to simple actions.
I know nothing of how to get this to actually work from the octoprint side, but I'm learning python and may give it an extremely poor attempt. Smile


RE: Control Printer via UART - fips - 02-18-2020

Hello,

most of what you have in mind I've already done. The printer can be controlled. The UI is customized. I'm finishing up the actual printing process right now. The transfer from chitubox directly to octoprint is also working.

My code structure is a little messed up. I'm still trying out what works and what doesn't.

For example i wanted to try to transfer the data via uart to the printer.  Unfortunately this does not work. At the moment the only possibility seems to be to supply the printer with data, which emulates the usb flash memory.

The disadvantage is that Octoprint is not supposed to run as root, but you have to execute commands under sudo for this function.
So it will be necessary to login with ssh and execute a script to provide the flash memory function.

If you are interested and maybe want to help, the repo is: 

https://github.com/Fips11/Octoprint-SLA-Plugin


Have you actually checked if your firmware uses the uart?


RE: Control Printer via UART - revnull - 02-23-2020

Wow, great start to your plugin, I would love to help were I can. PM'd with additional info.

Front of Pro Controller:
[attachment=129]

Back of Pro Controller:
[attachment=130]

Attached to Pi ZeroW over UART:
[attachment=131]

Installed buck converter to supply the Pi:
[attachment=132]

Dupont connector has tight tolerances under the side bar of the printer frame:
[attachment=133]

Cables routed out of the back of the printer for now.
[attachment=134]


RE: Control Printer via UART - fips - 03-01-2020

You connect the V++ on the Pi with the 5v of the printer. I don't think this is a good idea. If the two voltages are different, a current flows there and stresses the power supplies and components. I try to avoid to connect both via USB or directly the two voltages.


RE: Control Printer via UART - revnull - 03-03-2020

I can see the confusion. I one of the pictures, I'm powering the CBD from the 5V ping on the Pi. In practice, the Pi is powered from the buck converter and only TX|RX|GND are connected to the CBD. The CBD id being power as usual via the DC PSU.