Power supply Arduino and odrive only


#1

Hi,
i am little bit confused how to powering it correctly when i am not using USB connection there.
I have connected Arduino via UART(GPIO1,2 and GND), i have 48V power supply connected to Odrive,
9V to Arduino Vin(arduino working fine) but no communication there. Is that 48V for motors intended for logic side(5V) of oDrive as well, or do i need sepparate 5V connected to any Vcc pin onboard when USB cable is not connected to oDrive?

thank you


#2

The USB-cable doesn’t give any power, only data. The 48V is responsible for the 5V and 3.3V logic on the Odrive. So it is not needed to supply a 5V voltage to the ODrive logic pins. Just make sure that the GND of the Arduino is connected with a GND pin of the ODrive, it doesn’t matter what GND pin you use.

If you say both your Arduino and ODrive are working, there must be something wrong in the software. Did you setup the odrive correctly?

It would also be helpful if we know what you are trying to do, what you have already tried and the configurations of the different axes, motors, etc … using odrivetool


#3

Hi thank you.
I want to drive two motors just with arduino, without PC. It should be configurated as with USB cable it is working. I downloaded odrive arduino library and start provided example. Than i just use read bus voltage command but it says 0V so there is no communication between arduino and odrive.

// Read bus voltage
if (c == 'b') {
  odrive_serial << "r vbus_voltage\n";
  Serial << "Vbus voltage: " << odrive.readFloat() << '\n';
}

I also do not know if i will need config odrive somehow for UART(GPIO1 and 2) communication.
But documentation says, that UART pins are enabled by default(and they should be 5V tolerated as i am using them with 5V arduino)…


#4

Oh,
i have figured it out.

I was trying software serial on arduino Mega on Pins 8 and 9 but according this:

// Not all pins on the Mega and Mega 2560 support change interrupts,
// so only the following can be used for RX:
// 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69

it can not work with 8 and 9 Pin.
So i have used 10 and 11 and it is OK now, so it is little bit beginers fault:)


#5

On the Mega I recommend you use hardware serial. Works much more reliably. It’s also easy to change the software to support it.