ODrive Project: AGV

Sure, I live near Delft, in the the Hague, so not a problem. And beer is always nice.

Also, I’m not sure if it was clear, but you do not need to calibrate every time you startup. If you save your settings after calibrating, it shouldn’t be necessary.

I have a few VESC’s lying around, but for position control the firmware doesn’t support more than 360 degrees/one rotation, which i need in my application.

@alexisdal Nice to hear your experience. My decision to opt for Odrive was purely due to support on the controller. But i would still like to see your project. You can email or have you uploaded it on the internet?

So for the next challenge:

I am currently using Arduino to interface with ODrive by UART. The library on github works fine. As per the library the run command to the motors go sequentially due to which the start time of both axis is different. Axis 0 starts first and after a very small delay axis 1 starts. From my understanding, this is due to communication delay.

So the question is how to start both the axis at the same time?

Indeed. Very same issue myself. Limiting to one turn sucks. On their forum I think I have seen a so called multi-turn fork on GitHub. Did not try it myself though.
I was discussing the very same topic with a friend of mine who claims to have implemented his own “vesc multi-turn firwware” too, precisely for a servo application (ie with gear reduction). Surprisingly his main design decision was because odrive was natively dual channel whereas vesc wasn’t + vesc was more compact. He offered to let me try it but said he had not decided whether or not he would opensource it :frowning:

@p_v I do have some arduino code posted for the agv, but beware it’s really super ugly =>
Besides many things are missing: electronic schematics, hardware mechanical parts cad fiies, bill of material, photos, videos, documentation… with about 1500€ in parts it pulls 230kg trollies at about 0.4m/s (could go much faster but I have pedestrian traffic nearby). I also use a mode where it cruises with about 80kg load on the chassis.

How small is the delay you observe for full calibration?
If I remember right, there are indeed two ascii commands to issue but at least omy odrive machine, visually I did not notice the time difference. Besides, I use it on a corexy design (meaning you really have to sync both motors for nice sharp straight lines), and despite each motor consumes 1 command, i don’t use the trapezoidal planner (therefore bombard the odrive with POS commands using my own planner), and I have nice fast straight lines with significant torque too.
I think you should be just fine for a 2wd autonomous system with odrive (on paper at least).
What are: the mechanical reduction you plan + target cruise speed + motor model => you have selected?

Reading the code I think you can’t as is -> https://github.com/madcowswe/ODrive/blob/master/Firmware/communication/ascii_protocol.cpp
(Check between lines 89 and 105)

Or you would have to implement new commands in the ascii protocol (and therefore maintain your own branch of odrive or offer Oskar a pull request and hope that it gets integrated in the main firmware code)

In my experience the default arduino lib is a nice starting point but you will quickly need to implement your own functions in it. In particular for calibration logic, error checks, reading versions, etc.

@alexisdal I think there was some problem with my tuning. As soon as I rectified my tuning, I got better result. There is a microsecond lag in start of both the motors, but as per the application, it should be okay. I am planning my AGV for a payload of 500kg. With the 300w,2000rpm bldc motor, I have used 15 ratio reduction worm gearbox. My agv specs include 1m/s max speed but most of my targeted applications use 0.5 to 0.7 m/s. My plan is to make it under 1200USD with the LFP battery. So far, things look good.
Since I am not familiar with Web Development and my idea is to run my AGV via a webpage, the web developing cost is a pain for me. I am currently working on the same.
Currently, my master controller is arduino, but soon I would be switching to an industrial grade controller/plc which operates on CAN.
As I see your code, I think you used ESP8266. I tried with this earlier but somehow failed with the board I have. Can you please share some pictures or videos of your project? Or maybe you can make an architecture diagram and share?

I would request Oskar(@madcowswe) to include an ETHERCAT port on Odrive. This would make things easier for me to when I start working on my future projects. Also, to include the 22nf capacitors for illegal_hall_state error.

Need immediate support on why my odrive chip is heating a lot and my usb port is not being formed on my laptop. Also I am not use any I/Os now.
How to check or diagnose the problem.
I am nearing my project completion and got stuck with this issue.

Please advise @madcowswe.

@Riewert i have no plan to drive to the Hague soon, but i doubt i should be able to avoid getting there before the end of year. i’ll let you know through a private message shall the opportunity arise.

@P_V i’ve not been very active on odrive lately. but that should change soon.
I hope you manage to get your heating issues solved. What do you mean exactly with “my usb port is not being formed on my laptop.” ?

In between, I did document stuff there (beware: it’s understandable, but ugly)

Yes I did use an ESP8266 for wifi communication. but unfortunately, it only supports 2.4Ghz (+ the board i use has a very small antenna), and i operate them within a completely saturated 2.4Ghz radio environment. But they do work. You do need 3.3v <-> 5v converter to operate them from arduino though. my tips about how to flash them using Arduino IDE.
I think I will have to go 5Ghz, my tests with the raspberry pi3 feels satisfactory, so maybe i’ll use that. we’ll see.

Your AGV specs feel really nice. Do you plan to pull the 500Kg or carry it on top? It sounds like a pallet usecase. The mechanical chassis must be super nice, given your 1200 USD budget, i’m really curious to see how it looks like.

  • Would you please post/videos photos?
  • where did you source the worm gear box and motors?
1 Like