Home Creators Posts Import Register Favorites Logout
haven't archived this post yet. have a subscription? use the importer!

Content

I'm starting openDog's electronics cage - there's quite a lot of things to mount including six Odrives, the batteries, and a bunch of Arduinos.

I've decided that I should implement a kind of 'card slot' system on two rails made from 2020 extrusion. It's not going to turn out the most compact solution, but it'll make it easy to explain what does what, and see where the wires go, and upgrade it later.

In openDog #7 I hope to:

-Get all that printed

-Mount the missing 8 leg motors

-Mount 12 encoders

-Mount 12 actuator limit switches

-Fit & wire 6 ODrives & 3 Arduinos

-Build and wire the control panel

-Wire up power distribution and monitoring

-Run all the wires to the legs in conduit (yes I found some that's yellow)

-Hopefully configure all the Odrives

The remote control is already built of course - it was the first thing I did along with some initial code.

------------------------------

The Odrives now ship with firmware on which makes life a little easier, however they've changed all the serial comms since the early R&D I did so now there's a new Arduino library to look at. I also need to set all the motor parameters and configure the calibration settings for the encoder position with reference to the motor stator - for each motor.

In terms of micro controllers I'm going for a pair of Arduino MEGA 2650s which are linked to the actual ODrives. This is purely because they have lots of hardware/UART serial ports and all they need to do is act as 'serial relays' from a master controller. They will also deal with the motion smoothing filter, homing & keeping track of the encoder zero position. They are more than fast enough for that considering that the ODrives deal with the PID controllers and counting the actual encoder positions.

My 'master controller', for now, will also be a MEGA 2650, although it'll probably get upgraded to something better in the future (just pull the card out and drop something else in). That Arduino will calculate the kinematic model using trigonometry etc (as per part 1/2 of the series).

There's space between my rails to mount a Mini-itx board that could run Ubuntu or something and be fairly high powered if needed, so there's no real limit to processing power - and of course we could do camera/image processing remotely too over a wireless network if we needed to. But a MEGA 2650 will do to get the simple motions working!

I don't think I'll get onto any code until part 8, but then it should be all set to do the entire kinematic model and control the robot. That will turn all the joint motions into X, Y, Z coordinates at the feet/hips so I can hopefully make some simple gaits and have it walk in part 9, all being well.

Files

Previews only

Comments

Simon

Why do you throw so many microcontrollers at it? You could just use a single Arduino Due (or if you need even more processing power a beaglebone or i.MX6 board) and CAN bus directly into the odrives. Thats less wiring, less coding, less delay.

XRobots

ODrives don't support CANbus yet - the hardware is there but there's no firmware implementation. So I need six serial ports (don't really want to use too many software serial). Also I need to track my own encoder zero points and deal with my own homing because that's not implemented in the Odrives yet either ( <a href="https://github.com/madcowswe/ODrive/issues/109" rel="nofollow noopener" target="_blank">https://github.com/madcowswe/ODrive/issues/109</a>#issuecomment-413739484 ). So having extra Arduinos keeping track of the zero position will mean I don't have to home 12 actuators every time I modify the code during development and reset the main Arduino.

bruceneely

That is quite a laundry list of things to do in 1 installment, I hope you have the bat-board video ready so you can concentrate on open dog. One of the issues with being an early adopter of a new device is it's not got all the stuff you want on it right away, I'm sure for the price ODrive will get there. will be interesting to see al that coding, I was thinking of using a Pi3+ as a main brain when I get that far along.

XRobots

Yep, BatBoard video is pretty much done, I've started the Dog parts so I should have time. I'm considering an actual mini-itx Linux computer on-board in the future so I can plug in a Kinect sensor etc...