<p>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.</p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

<p>There was a "<a href="https://store.arduino.cc/usa/arduino-usb-host-shield" rel="nofollow noreferrer">USB Host Shield</a>" for Arduino, but is is no longer in production. Perhaps you can still find one somewhere, or somebody else makes an equivalent.</p>

<p>There is also an Arduino "<a href="https://www.arduino.cc/en/Reference/USBHost" rel="nofollow noreferrer">USBHost</a>" library, which is compatible with the Arduino Due only.</p>

CC BY-SA 4.0
2019-03-11T18:39:48.537Z
2019-03-11T18:39:48.537Z
mbmcavoy
<p>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. </p>

<p>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.</p>

<p>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. </p>

<p>What am I missing? </p>

CC BY-SA 4.0
2019-03-11T12:32:06.993Z
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.
Pᴀᴜʟsᴛᴇʀ2
CC BY-SA 4.0
2019-03-12T05:41:23.137Z
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.
Horitsu
CC BY-SA 4.0
2019-03-12T10:25:33.360Z
Do you try to do Something Like Octoprint?
Trish
<arduino><usb><serial-connection>
Controlling a 3D printer with another Arduino device over serial
Sebastian Pelletier
# Controlling a 3D printer with another Arduino device over serial

(Asked by: username_0 on 2019-03-11)

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?

**Tags:** arduino, usb, serial-connection
> **Comments:**
> **username_1**: 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.  
> **username_2**: 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.  
> **username_3**: Do you try to do Something Like Octoprint?  

---

## 1 answers

### Answer by username_4 on 2019-03-11. Score: 2

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](https://store.arduino.cc/usa/arduino-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](https://www.arduino.cc/en/Reference/USBHost)" library, which is compatible with the Arduino Due only.


---

