Supply power and communicate via USB?

Hi all,

I want to control a VESC motor controller (http://vedder.se/2015/01/vesc-open-source-esc/) via an Arduino. The VESC is able to supply regulated 5V (up to 1A) and comes with an UART interface.

I am struggling with the possibilities to physically connect the two boards. The 5V connection has to bypass the Arduino voltage regulator, thus "Vin" and the power supply jack are not an option. I would like to use the USB jack for both, power supply and serial connection. Is that possible? The computer you connect to it does exactly that. But - stupid question - are the two pins used for USB communication "normal" Rx/Tx serial pins like the pins "0" and "1" on the board?

Thanks and best regards
Keith

Stay away from USB, it's beyond your skills. All other interfaces have a +5V line, which can be used to power an Arduino at its 5V pin.

Thank you for the quick answer. What do you mean by "All other interfaces have a +5V line"?

I am using a tft shield in this project (2.8 TFT Touch Shield for Arduino w/Capacitive Touch : ID 1947 : $44.95 : Adafruit Industries, Unique & fun DIY electronics and kits). The only way to directly connect to 5V would be soldering to the board. I would like to avoid that if possible.

Supplying GND and 5V to the corresponding pins of the USB jack will not work at least for the power supply part of the story?

What serial communication do You want to pass via USB? Motor controller or Pc?

What serial communication do You want to pass via USB? Motor controller or Pc?

Both, depending on what I connect to the port.

Meanwhile I have read some more about the USB/serial port on the Arduino. If I understand correctly the board comes with a USB/serial converter. This is connected to the "serial" pins 0 and 1 on the serial side. Meaning I can not use two pins of the USB jack to do serial communication as with the pins 0 and 1. Am I right?

But besides communication - at least power should be suppliable via USB. Or not? Compared to the "solder to the board" solution it has two advantages:

  • power supply via a quite robust plug/jack instead of a touchy solder connection to a bottom pad of the Arduino board
  • you would never have the potentially dangerous situation powering 5V via both, external source and USB to the PC while programming/debugging

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html.

Can you please tell us your electronics, programming, Arduino, hardware experience?

I think you need to chat with the maker of that ESC, Benjamin, the USB is used to communicate with a custom GUI. (Linux by the look of it)
Do you have any data on the structure of the USB data is being sent from the ESC, and what to send to the ESC?

This device is covered with many comms systems, CanBus, I2C and UART.

Tom... :slight_smile:

Hi Tom,

Can you please tell us your electronics, programming, Arduino, hardware experience?

Sure... I am a quite experienced programmer building enterprise web applications for about 20 years. I am quite new to Arduino programming. On the hardware side I have a degree (german Dipl.-Ing.) in Electrical Engineering.

the USB is used to communicate with a custom GUI

That is right. I do not want to connect to the VESCs USB. I want to connect to the UART interface of the motor controller. Should work easily using the Arduino serial interface and existing libraries (example: GitHub - RollingGecko/VescUartControl: Arduino library to interface with the VESC bldc over UART.<). I am currently thinking about how to physically make durable connections between the boards. My project is not an electrified longboard or such, thus I want everything to be pluggable. I can add an additional jack for the connection to the VESC (supplying power and the serial connection) to the case I am designing for the Arduino. It would be even nicer if the existing USB jack would be usable for that purpose...

See the motor controller data sheet, for which communication channels are available. Each of the related connectors has a +5V pin, which can be used to power the Arduino and more.

You may need a proto shield in between the Arduino and the TFT shield, for connecting the motor controller. Or you solder wires to the bottom of the Arduino board.

Or you use a Pro Mini or similar board, with an adapter to Uno shields. Such an adapter board leaves enough space for soldering wires or connectors to other modules.