1
$\begingroup$

If this is a silly question I apologize but I am trying to establish a serial connection between a 3D printer (Ender 3) and an Arduino Nano over the USB port.

I am able to connect the 3D printer to a serial monitor on my PC and send G-code to it and control the printer. I am also able to connect my Arduino to the serial monitor and also send and receive strings.

When I connect the Arduino directly to the 3D printer using a USB cable and separately powering the Arduino the 3D printer does not seem to respond to the G-code being sent over serial.

What am I missing?

$\endgroup$
3
  • $\begingroup$ Welcome to 3dPrinting.SE! Are you sure your communications settings are correct going from the Arduino to the printer? You might want to double check to make sure. $\endgroup$ – Pᴀᴜʟsᴛᴇʀ2 Mar 11 '19 at 12:32
  • $\begingroup$ I'm not sure if I understand this correctly: You want to print by sending all commands via computer->ardunio->3dprinter? If yes: Bad idea, because if the computer gets a problem (e.g. a little hickup, auto turn off, and so many more) the print will fail. And have a hickup while a eg. 10h print is way too easy. $\endgroup$ – Horitsu Mar 12 '19 at 5:41
  • $\begingroup$ Do you try to do Something Like Octoprint? $\endgroup$ – Trish Mar 12 '19 at 10:25
1
$\begingroup$

This isn't really a 3D-printing issue as much as it is about Arduino, USB, and how serial connections over USB differ from a generic UART serial connection.

For a UART-based serial connection, there are only two devices, and both devices are peers - either can send data to the other with no real restrictions as long as the speeds are set correctly.

USB allows multiple devices to be connected, and is much more complicated. One device must be a "host", which manages everything. The other devices can be much simpler as they don't need to be a host. Typically, your PC is the host, and your keyboard, mouse, memory stick, Arduino, printer, etc. are all just attached devices.

If you've managed to connect your Arduino's USB port to your printer's USB port, the problem is most likely that neither device has hardware or software to be a host, so the USB connection won't work.

There was a "USB Host Shield" for Arduino, but is is no longer in production. Perhaps you can still find one somewhere, or somebody else makes an equivalent.

There is also an Arduino "USBHost" library, which is compatible with the Arduino Due only.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.