Shop OBEX P1 Docs P2 Docs Learn Events
looking for ideas FC+quadrover — Parallax Forums

looking for ideas FC+quadrover

I am really interested in Parallax's new flight controller... but right now I don't want to jump into everything necessary to use it to fly around.

And just buying it without an end platform doesn't make enough sense to me.

Is there a relatively inexpensive quad-rover type bot that I can use to test the fc and do a little experimenting?

Comments

  • rjo__rjo__ Posts: 2,114
    not "the" quad rover but any quad that has the right stuff.
  • What is "the right stuff"?
    Jim
  • I'd guess that a boe-bot would work fine. The FC has enough I/O on it to drive that, and likely wouldn't have issues powering the servos if you fed it with a 2-cell lipo. https://www.parallax.com/product/28124

    Something like this would work too, but you'd need to add a motor driver: https://www.sparkfun.com/products/12090

    It's actually pretty fun just experimenting with the orientation stuff, and the FC will drive a chain of WS2812 LEDs or a couple servos. If you got a pair of continuous rotation servos and the wheels from the boe-bot kit you could likely put it on just about anything. Be careful if using analog servos - you'll need to change the code to mark them as "slow" pins or you'll fry them because of the default 400hz output rate.
  • rjo__rjo__ Posts: 2,114
    I have no doubt about the fun factor. I'm looking around for some brushless motors that would be compatible. Or are they all compatible?

    I want something large enough to haul a Kinect around... and a stereo-camera... and an fpga board... and gps... and a Windows 10 mini micro computer...etc.

  • As long as you have a motor controller that takes a standard servo connection as input it should work. You probably want a sensored brushless controller and a sensored motor, as they handle low speed better. It'll spin fast and will need gear reduction.

    You initially said "relatively inexpensive quad-rover type platform", but then you said "I want to haul around a Kinect, Win10 microcomputer, etc".. I'm not sure those two statements are compatible. :)
  • rjo,
    Firstly, let me thank you for your BNO055roughdraft coding for the BNO055 IMU module.
    I have had a lot of fun placing the module on a lego gimbal and observing the various module outputs with your code as the basis.
    I have a similar interest to you - I want to experiment with flight controllers, but I do not have the facilities to cope with a big quadcopter flopping around.
    I have discovered one fact for sure, the Parallax flight controller is really good value - I would not even try and build my own!
    Nevertheless, this paper from Dr Owenson indicates that it is quite straightforward to build your own flight controller.
    http://owenson.me/build-your-own-quadcopter-autopilot/
    The only data you really need from the IMU module are the Euler angles and gyro rate of angular change - both easily obtainable from the BNO055 registers.
    For non-flight experimentation I thought of a water quadcopter. Four long legs with BLDC motors and water propellers at the foot of each leg (BLDC motors work quite happily underwater). All the control equipment will be above water. At rest the thing will float with the control equipment exposed.
    Any dirt cheap hobby BLDC motors, ESC's and boat props from ebay should do the trick - only a few dollars!
    I think you would get the same movement from the driving legs as an air-based quadcopter, but much more sluggish and easier to manage.
  • There isn't an IMU module on the Elev8-FC. The propeller chip is doing all of that too, and does output quaternion, matrix, and Euler values if you want them.

    It's worth mentioning that Euler angles only work if you plan to stay within about 90 degrees of upright. If you ever cross that threshold your PID values will go completely crazy. The Elev8-FC avoids this by doing all computation in quaternions, and only outputting angular difference values to the PIDs, which don't suffer from sign flips or gimbal lock.

    If you're only ever going to fly "mostly upright" and never flip it, the Eulers will work fine and the only weirdness you need to deal with is the heading. Eulers are usually in the range of +/- 180, or 0 to 360. Either way, there's a "seam" you have to deal with when you make a full rotation.
  • Jason,
    You have done a fantastic job on the flight controller, and I can see that it is incredible value.
    I understand the limitations of using Euler angles.
    The BNO055 registers also give quarterion values, and in time I would like to understand them better.
    Where can I get some practical explanation and examples of handling quarternions?
    All the articles I have found are so theoretical, it is difficult to see quarterion operations can be practically applied in coding.
  • rjo__rjo__ Posts: 2,114
    macrobeak wrote: »
    Jason,
    You have done a fantastic job on the flight controller, and I can see that it is incredible value.
    I understand the limitations of using Euler angles.
    The BNO055 registers also give quarterion values, and in time I would like to understand them better.
    Where can I get some practical explanation and examples of handling quarternions?
    All the articles I have found are so theoretical, it is difficult to see quarterion operations can be practically applied in coding.

    Exactly correct. Thanks for the link. Will look into it. I think I will get the controller and worry about the other stuff later.

    Thanks Jason.

  • I liked this one:
    http://mathinfo.univ-reims.fr/IMG/pdf/Rotating_Objects_Using_Quaternions.pdf

    This is a little shorter, but a good layman's description:
    http://www.cprogramming.com/tutorial/3d/quaternions.html

    You'll see a lot of people mention the "imaginary" part - try not to get hung up on that. It's not important for a usable understanding, and is probably only relevant if you're interested in the theory of how the math was developed.


    If you grab this file, there's a decent description of the math involved in the IMU:
    https://github.com/parallaxinc/Flight-Controller/blob/master/Helpers/Elev8-FC Documentation.rtf

    Download it and read the section on QuatIMU (starts on the bottom of page 3).


    The simplest explanation is that quaternions are very similar to an axis to rotate around, and an amount to rotate around that axis, but the numbers are scaled to make the math work. A quaternion has two parts - a vector and a scalar. The vector is the axis to be rotated around, and the scalar is the amount to rotate, and the whole thing together is treated as a vector with a length of 1 unit. ONLY unit quaternions represent rotations.

    It's also worth noting that quaternions have "double coverage", as in, the possible space for quaternions represents all possible rotations *twice* - there are two quaternions that can represent any rotation.

    The easiest way to describe why is this: Look at a circular clock, or a watch. The hands rotate clockwise around the face of the clock. If you imagine a vector coming out of the clock face toward you, that's the axis the hands rotate around, and they rotate clockwise around that axis. If you turned the clock to face away from you, you've negated the axis vector. If you then rotate the hands of the clock counter-clockwise, they're moving along the same path as they were when the clock was facing you and they were going clockwise. An opposite vector with an opposite scalar produce the original rotation. So, take any quaternion and negate the entire thing and you have the same rotation, expressed the other way.

    Doing normal math on them, like multiplying them, isn't affected by this, but if you're trying to interpolate between two of them you need to know about it.
  • Jason,
    Thank you for your very complete summary and links.
    Much appreciated.
    Keep up the excellent work on flight control!
  • You're very welcome. I've been using quaternions in video game coding for many years, but it wasn't until writing the flight controller that I actually started to "get" them. They're an interesting beast to wrap your brain around.
  • rjo__rjo__ Posts: 2,114
    Jason,

    I'm constantly amazed by your work... always headed in the right direction and always a couple of steps ahead. I'm also amazed by how much I miss on the forums... even though I try to look around every day.

    I just now just saw your 2013 work on the simple camera gimbal...I had to have seen it, but 2013 was a long time ago... in dog years.

    forums.parallax.com/discussion/147745/quadx-with-dcm-camera-leveling-demo#latest
  • Awww, thanks! :)

    Funny you mention that post - I suggested the simple gimbal as a "user project" for the new flight controller. It's very easy to implement once you have the orientation and the Eulers for pitch and roll. In fact, I think Matt has already done it.
  • I see Pesky Products have a few BNO055 breakout boards;
    https://www.tindie.com/products/onehorse/bno-055-9-axis-motion-sensor-with-hardware-fusion/
    https://www.tindie.com/products/onehorse/wearable-bno055-nano-board/

    They also have a nice justification and comparison of IMU boards, repeated in part below;

    "Why did you make it?
    The new trend in motion sensors is to embed powerful processors with the sensor to allow direct calculation and register read of fused quaternion and AHRS output, obviating the need for users to program their own sensor fusion or to take up valuable microprocessor memory or processing power in crunching the numbers for sensor fusion. The first of these inexpensive embedded sensor fusion motion sensors was the 6-axis MPU6050 by Invensense, and the latest Invensense 9-axis motion sensor the MPU9250 maintains the technology with the Digital Motion Processor or DMP providing 6-axis sensor fusion. The drawback of Invensense's approach is the microprocessor must upload a large (4K) binary file of firmware for the DMP, and the DMP is still limited to 6-axis sensor fusion despite being embedded in a 9-axis motion sensor. The next class of device includes the MAX21100, which also embeds a hardware sensor fusion engine with a 6-axis gyro/accelerometer but can perform true 9-axis sensor fusion by importing compass data from a slave magnetometer. This device requires no binary firmware and the quaternion or heading results of the sensor fusion are read from the MAX21100 registers like any other data. Also in this class is the EM7180, which is a sensor fusion hub that takes data from external sensors and performs sensor fusion in hardware for readout by a master microcontroller. The latest class of integrated motion sensor is embodied in the BNO-055. In this device is Bosch's latest 9-axis motion sensor (the BMX-055) coupled with a Cortex M0 ARM processor to perform the 9-axis sensor fusion. No external magnetometer and no microcontroller processing is required; again the quaternions, linear acceleration, gravity vector, and heading information are directly readable from the BNO-055 registers. This is a compact and powerful motion sensing solution that promises to make absolute orientation and sophisticated motion control available to anyone who can run a blink program on an Arduino."
  • rjo__rjo__ Posts: 2,114
    edited 2016-10-05 22:59
    As far as I can tell there are no free lunches. With the current standard set of sensors, there are real limits to what can be computed reliably. We need more sensors... and an ever expanding logic to glue the data together.

    The beauty of Jason's work is that it is right there... you can touch it. You can imagine the continuous integration of various kinds of sensors. It is fascinating. I wish I weren't so old and had more time:) Every time I think I have something that Jason should look at... something breaks or changes and I am off on another round of pounding on my keyboard.

    Jason looks young enough and is certainly bright enough. I hope he doesn't get tired of thinking about it.

Sign In or Register to comment.