Skip to main content
Share Your Experience: Take the 2024 Developer Survey
18 votes
Accepted

Can the Arduino interface with USB devices without the USB host shield?

First things first you need to learn the basics of how USB works. In USB there are two main "things": Hosts and Devices. You have one Host (usually your computer) and many Devices (such as Arduinos, ...
Majenko's user avatar
  • 105k
15 votes

If the USB gives 5v, how can the Arduino supply 5v to the 5v pin? (And another question)

Actually, Arduino is powered at 5V (the 5V pin and the ATmega328p are connected to the +5V rail in the board). The point here is where do those 5V come from. Basically, from 2 possible sources: USB. ...
Enric Blanco's user avatar
  • 2,114
8 votes

Arduino Nano not visible in Serial Ports (Mac OS)

Is it an original Nano or a clone? The original Nano uses FTDI's FT232 ship, whereas clones use the CG340 USB-to-TTL chip. The former works fine straight away Mac OS Sierra, whereas the latter needs ...
Enric Blanco's user avatar
  • 2,114
8 votes
Accepted

CH340 max serial speed

CHG340 supports common baud rates: 50, 75, 100, 110, 134.5, 150, 300, 600, 900, 1200, 1800, 2400, 3600, 4800, 9600, 14400, 19200, 28800, 33600, 38400, 56000, 57600, 76800, 115200, 128000, 153600, ...
MatsK's user avatar
  • 1,356
7 votes
Accepted

External 5V Power and USB Serial

Having used counterless Arduinos and clones, I can tell you that you can connect both without worrying about any danger. Unless you have a very faulty board, your pc won't be damaged, almost surely ...
sassoPera's user avatar
  • 303
6 votes

First time set up- permission denied to usb port- ubuntu 14.04

All you need to do is add yourself to the dialout group as described in the answer by Ignacio Vazquez-Abrams. This is done in the terminal by typing: sudo usermod -a -G dialout $USER You do not need ...
Luke Newmeyer's user avatar
6 votes

My Digispark board won't show up in Ports tab in Arduino IDE (OSX)

I don't think it is supposed to. The Digispark briefly connects in "bootloader" mode, which you spotted as "Vendor-Specific Device:". Then after 5 seconds it runs the loaded sketch. If your sketch ...
Nick Gammon's user avatar
  • 38.3k
6 votes

Arduino Leonardo as keyboard for an iPad

If indeed the descriptor is the problem then yes you can change it. In the core file USBCore.h is the line: #define D_CONFIG(_totalLength,_interfaces) \ { 9, 2, _totalLength,_interfaces, 1, 0, ...
Majenko's user avatar
  • 105k
6 votes
Accepted

How can I detect which baudrate a virtual COM port is set to?

From looking at the source it appears that on 32u4 based boards Serial includes extra methods to access the settings from the USB host: see: https://github.com/arduino/ArduinoCore-avr/blob/...
Craig's user avatar
  • 2,120
6 votes

Is it possible to upload an arduino sketch through the serial port (RX) instead of USB

No need to have a specific bootloader. The basic bootloader can do that (in Arduino that's the case so I hope this answer will apply in your case. But if not, the principle is certainly the same). ...
Peter's user avatar
  • 365
5 votes

Protecting your computer from stupid (arduino) mistakes

Both the arduino and a USB port do have some protection against wrong connections and such. The arduino has a diode to prevent wrong polarity to reach your power supply, it also have a resetable fuse (...
Hans Neve's user avatar
  • 466
5 votes

Why is there already text in the serial monitor before the Arduino initializes?

It's because the Arduino has started running the sketch and placed data into the USB chip's buffer. You then open the serial monitor which then opens the serial port thus resetting the Arduino. So the ...
Majenko's user avatar
  • 105k
5 votes
Accepted

Which Arduinos have a true serial port?

There seems to be quite a few Arduinos without a 32U4, like: Uno (you mentioned it already) Mega (same) Lilypad Snap MKR1000 Pro Pro Mini Zero Due Ethernet Mini Nano MKR Zero See the list at ...
Michel Keijzers's user avatar
5 votes

How to convert USB to PS/2?

Many USB keyboards (certainly older ones, though almost certainly not wireless ones) are also PS/2 keyboards. The wiring of the cable is all that differs, and the chip in the keyboard changes its ...
Majenko's user avatar
  • 105k
5 votes
Accepted

My ESP32-S3 DevkitC-1 has two USB micro ports labeled 'USB' and 'UART'. What are they for?

The USB port connects directly to the D+/D- pins of the ESP32, which allows it to act as a USB host. CircuitPython, for instance, uses this functionality to look like a USB flash drive. You could also ...
romkey's user avatar
  • 1,554
4 votes

Can the Arduino interface with USB devices without the USB host shield?

No. USB strictly distinguishes between host and device roles. A few chips have functional blocks capable of performing either role, but the 8u2/16u2 are not examples of this. Typical USB serial ...
Chris Stratton's user avatar
4 votes

100khz square wave with 50% duty cycle

The problem with your program is that it does not loop fast enough. Each call to delayMicroseconds() should take roughly the requested time to execute, but the CPU also needs time to execute the rest ...
Edgar Bonet's user avatar
  • 43.3k
4 votes
Accepted

How to send Serial.Print only If Serial Connection is open?

The Arduino Mega's "serial" connection comes from an external chip implementing USB-serial conversion. While this chip knows if a session is open with a host, the standard design has no way to share ...
Chris Stratton's user avatar
4 votes

Using ATTiny85 as a USB HID Mouse

Due to the lack of USB-Support of the ATtiny85 you will be forced to use something like V-USB as the tutorial does. This might have implications when you are targeting a commercial product. ...
Kwasmich's user avatar
  • 1,513
4 votes

How to add extra USB port to Arduino Nano?

USB is deceptively simple. The underlying protocol is very complex. So a complete answer to your question requires some USB background. USB is divided into 2 types. USB Hosts and USB Devices. We ...
st2000's user avatar
  • 7,338
4 votes

Why do I get avrdude: stk500v2_ReceiveMessage(): timeout error when uploading to Arduino Mega?

The error message basically means that the programmer is unable to contact the boot-loader on the device. The code you're trying to upload has no bearing on the problem. There could be one of the ...
abhiarora's user avatar
  • 141
4 votes

5V usb surge protection for circuit board?

A polyfuse will limit current not voltage. There are transient protection diodes which switch on if voltage exceeds a given level, which are often used in conjunction with a polyfuse. The diodes ...
Milliways's user avatar
  • 1,645
4 votes
Accepted

Substitute for FTDI board?

All prices in USD w/ free shipping. FT232RL breakout board: Aliexpress: $1.55 eBay: $1.81 They are probably counterfeit. A Windows driver update (AKA "FTDIgate") at one point "bricked" them but I'm ...
per1234's user avatar
  • 4,178
4 votes
Accepted

Can Arduino Leonardo use USB port and RX TX serial pins at the same time?

32u4 is multi-serial uC. USB connection works on default serial communication which can be used via Serial.print("somevalue"). On the other hand if you want to use RX/TX on pins 0, 1 which are ...
Sener's user avatar
  • 394
4 votes

Suggest me Arduino device with USB for Mass storage

60 samples per minute, 60 minutes per hour, 24 hours per day, 30 days - that's 2592000 samples. At 10 bytes per sample (a very generous allocation) that's less than 30MB of data. You could fit that ...
Majenko's user avatar
  • 105k
4 votes
Accepted

Typing into ESP8266 with a USB keyboard

My 2002-era Mac keyboard doesn't work, That doesn't surprise me - modern Macs have never needed PS/2 support. none of my 5 wireless keyboards work, That's because they're not keyboards, they're ...
Majenko's user avatar
  • 105k
4 votes
Accepted

Can't identify + or - in the 5v USB wall adapter, does it matter?

Power (which comes from your wall outlet), is AC, which means alternating current. It changes 50 or 60 times per second from direction, so this is the reason it does not matter if you plug it reversed ...
Michel Keijzers's user avatar
4 votes

USB reset fails on arduino due because of 5v on digital pins

You're over-stressing the MCU and causing all sorts of horrible things to happen with the power rails. Of course nasty things are going to happen. The only way to fix it is to change the circuitry. ...
Majenko's user avatar
  • 105k
4 votes
Accepted

wire up usb to pins rather than on board usb socket

You will have to (optionally) desolder the existing USB socket and solder the wires to the pins where that socket was on the board. It connects directly to the pins of the CH340G surface mount chip (...
Majenko's user avatar
  • 105k
4 votes
Accepted

Arduino Uno won't connect when using USB-C to USB adapter

Maybe it is not original, and it uses different usb-serial chip than the original one. Popular converters for Arduino Uno clones are CH340 and CP2104. You may try to install the driver for these 2 ...
fabianoriccardi's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible