DC Bus Over Voltage

Can Anyone help me out with a bus over voltage problem?

I believe I wired everything up correctly. This is essentially first power up. I was able to calibrate M0 once but then I have been getting this over voltage problem. Looked at the brake resistor wiring and settings but nothing seems to change it from 34 volts.

Is this a hardware problem?

What is the voltage supposed to be?

(The set screws are not in on the chain drive so the motors are spinning freely)

System Specs:
Power: 5S Battery(21 volts)
Motors: Turnigy Aerodrive SK3 - 4250-350KV
Encoders: AMT102-V
Brake Resistor: One that shipped with the Odrive(0.5Ohms)



The brake resistor only affects the bus voltage when motors are moving. If there’s no motors moving (braking, specifically), then the bus voltage is just whatever the battery is supplying.

So either your battery is supplying a voltage that’s too high, or there’s something wrong with the bus voltage measurement.

If you just type odrv0 you’ll get some values for hw_version, can you post those here?

Measured voltage on VIN at the time of this export - 19.72 volts

Reconnected to ODrive 205032814D4B as odrv0
In [52]: odrv0
Out[52]:
vbus_voltage = 34.090065002441406 (float)
serial_number = 205032814D4B (int)
hw_version_major = 3 (int)
hw_version_minor = 6 (int)
hw_version_variant = 24 (int)
fw_version_major = 0 (int)
fw_version_minor = 4 (int)
fw_version_revision = 10 (int)
fw_version_unreleased = 0 (int)
user_config_loaded = True (bool)
brake_resistor_armed = True (bool)
system_stats:
uptime = 27399 (int)
min_heap_space = 4216 (int)
min_stack_space_axis0 = 7868 (int)
min_stack_space_axis1 = 7868 (int)
min_stack_space_comms = 12956 (int)
min_stack_space_usb = 3292 (int)
min_stack_space_uart = 3932 (int)
min_stack_space_usb_irq = 1784 (int)
min_stack_space_startup = 612 (int)
usb: …
i2c: …
config:
brake_resistance = 0.4699999988079071 (float)
enable_uart = True (bool)
enable_i2c_instead_of_can = False (bool)
enable_ascii_protocol_on_usb = True (bool)
dc_bus_undervoltage_trip_level = 8.0 (float)
dc_bus_overvoltage_trip_level = 25.68000030517578 (float)
gpio1_pwm_mapping: …
gpio2_pwm_mapping: …
gpio3_pwm_mapping: …
gpio4_pwm_mapping: …
gpio3_analog_mapping: …
gpio4_analog_mapping: …

@Wetmelon I figured the brake resistor only arrested the voltage spikes of deceleration but I guess that was a mistake of being new to this.

Let me shoot some options that may be the cause:

  1. Voltage divider resistors wrong value?
  2. ADC is damaged?
  3. Firmware calculations for ADC is wrong?

I flashed the latest firmware downloaded pre-compiled from github for board version 3.6 before having this issue. My board was never in a perfect working state.

Is there anywhere I should be probing to trace the issue?

This is an image of the back of the board. I am not sure how to read the capacitor code.
It was suggested on discord that maybe the wrong components were installed on the 24 volt pcb.

Have you checked the values of the resistors in the voltage divider? You should be looking for R6 (10kOhm) and R7 (1kOhm). From the schematic, net VBUS_S goes into PA6 on the STM32 which is pin 22. I think you should be reading roughly 1.7 volts between that pin and ground if your battery voltage is 19 volts and the voltage divider is working as expected. I’m not completely certain though because a 1 and 10 kOhm voltage divider is not compatible with a 3.6V maximum input voltage at 48V which is what the v3.5 Odrive is supposed to be able to support, so I am a bit confused at the moment.

@jalbob I measured r7 @477 ohms so i will replace that and give it a shot.

Nevermind, it all makes sense. Different resistors are used for the different boards. It is the 24V board that should have R6 as 10kOhm and R7 as 1kOhm.

If you measure the voltage across R7 and it is closer to 1V then you likely have the 48V resistors installed onto your 24V board. That can be fixed in firmware by changing the value of the VBUS_S_DIVIDER_RATIO macro to whatever the voltage divider is dividing the voltage by.

Ill power the board up and let you know what voltage i measure on r7

I would need help changing the value in the firmware

It’s a pretty trivial change. The macro is defined under Board->Inc->main.h somewhere near line 178. You would just need to measure the values of R6 and R7 and then calculate the ratio of voltage drops given the measured values. Look up voltage divider on wikipedia and it’ll give you the equation for finding the scaling factor given the two resistances.

Okay ill try that first if it is easy enough to change and complie. Otherwise ill just change the resistor so i dont have to do that everytime i update firmware not that i plan to do that too often

1 Like

I also have this error now. Was following the ODrive start guide for the first time and the motor never made the beep sound. I have the 56 V ODrive. From the odrivetool:

In [1]: odrv0.vbus_voltage
Out[1]: 27.64152717590332
In [2]: dump_errors(odrv0)
axis0
axis: Error(s):
AXIS_ERROR_DC_BUS_OVER_VOLTAGE
motor: no error
fet_thermistor: no error
motor_thermistor: no error
encoder: no error
controller: no error

The power supply unit is giving 48 V, which is less than the 56 Vcapacity of the board. What is wrong here? Should I change voltage divider resistors on the ODrive board? Change a value in the firmware? If so, where do I find this firmware file?

I also tried to flash the firmware as described in this thread, but now the ODrive did not even want to connect to the odrivetool. Tried another ODrive that I bought and exactly the same thing. Both were new

It looks to me like your 56V odrive got flashed as a 24V. Grab the 56V software here: https://github.com/madcowswe/ODrive/releases/tag/fw-v0.5.1

And then flash it according to https://docs.odriverobotics.com/odrivetool.html#device-firmware-update and “how to flash a custom firmware”

I did what you said, but got an error, and now the odrivetool can not find the odrive. This is from the terminal:

sindre@MacBook-Pro-2 ~ % odrivetool dfu /Users/sindre/ODriveFirmware_v3.6-56V.hex 
ODrive control utility v0.5.1.post0
Waiting for ODrive...
Found ODrive 205F39994D4D (v3.6-56V) with firmware v0.5.1-dev

Warning: you are about to flash firmware [unknown version] which is older than the firmware on the 
device (v0.5.1-dev).
Do you want to flash this firmware anyway? [y/N] y
Putting device 205F39994D4D into DFU mode...
Erasing... done            
Flashing... (sector 0/6)  
Traceback (most recent call last):
File "/usr/local/bin/odrivetool", line 143, in <module>
odrive.dfu.launch_dfu(args, logger, app_shutdown_token)
File "/usr/local/lib/python3.9/site-packages/odrive/dfu.py", line 465, in launch_dfu
update_device(device, firmware, logger, cancellation_token)
File "/usr/local/lib/python3.9/site-packages/odrive/dfu.py", line 393, in update_device
dfudev.write_sector(sector, data)
File "/usr/local/lib/python3.9/site-packages/odrive/dfuse/DfuDevice.py", line 192, in write_sector
transfer_size = fractions.gcd(sector['len'], MAX_TRANSFER_SIZE)
AttributeError: module 'fractions' has no attribute 'gcd'

Seems like the python DFU did not work. I reflashed with the ARM dev tool and I now have the correct voltage and no errors!

1 Like