Shop OBEX P1 Docs P2 Docs Learn Events
Self-Balancing Bot w/ 12V Parallax Wheels (attempt) — Parallax Forums

Self-Balancing Bot w/ 12V Parallax Wheels (attempt)

RaymanRayman Posts: 15,373
edited 2025-07-14 21:21 in Robotics

Got the motor mount and wheel kit from Parallax when saw it was half off:
https://www.parallax.com/product/motor-mount-wheel-kit-aluminum/

Also, got a caster to make a 3-wheel bot.
But, then saw a bunch of self-balancing bots and decided to try that first.

Here's the concept (see attached pic).
The construction is 1/2" HDPE and 1/4-20 hardware.

Just CNC'd the main board and it seems pretty solid, even with the giant hole in the middle for the battery.

How high up or how low to mount battery is perhaps the main question. Or, maybe if this battery is too big is another... Been reading that being top heavy is actually an advantage for self-balancing bots. But, think this SLA battery is beyond the pale, so lowering it via the giant hole. May try different amounts of lowering if this doesn't work.

Plan is to use P2 and BNO086 sensor in RVC mode to achieve balancing.
Might be a disaster, we'll see!

«1

Comments

  • Hi,
    "Steiner's theorem" https://en.wikipedia.org/wiki/Parallel_axis_theorem gives that the moment of inertia grows with the height in a quadratic way. As the moment of the weight corresponding to the deviation of a certain angle only grows linearly, it will be much more easy to balance, when you battery is mounted high. It is funny, that the long long rocket is a shape that is far more easy to balance than your shape. So if you succeed, the rocket will be easy-peasy for you next.... B)
    Christof

  • RaymanRayman Posts: 15,373

    @Mickster I remember Hanno's bot from years ago...

    Got the wheels assembled.

    360 x 480 - 48K
  • RaymanRayman Posts: 15,373

    After looking at Arlo, thinking might be better to have motors on top. Mostly because of wiring...

    The allowable rotation angle goes down a hair, but not much.
    Ground clearance also about the same.

    Pretty sure that bot is going to need to balanced to start out with. Need to add weight to the front...

    360 x 480 - 52K
  • MicksterMickster Posts: 2,824

    @Rayman said:

    Pretty sure that bot is going to need to balanced to start out with. Need to add weight to the front...

    That's the sort of thing that can be handled by an offset...added to the PID output. Same applies with vertical axes to compensate for gravity. I wouldn't needlessly increase the inertia...JMO :)

  • RaymanRayman Posts: 15,373

    Think you can do an offset but then the platform wouldn't be level when balanced.
    Funny that nobody seems to mention that anywhere, but pretty sure it's true.

    Also read about needing to fuse in data from the accelerometer because rotation angle can drift over time.
    Not seeing that with BNO086 in RVC mode though...
    Seems rock solid.

    BNO086 also seems to know about its absolute angular position, which is interesting.
    It must be doing some kind of calibration at start up to figure that out.

  • RaymanRayman Posts: 15,373

    Also read that one needs 300 RPM motors and enough torque.
    These motors are rated at 95 RPM.
    Thought that might be a problem for a second, but now thinking that the 300 RPM is for tiny robots.

    This one is very massive and don't think it needs to move that fast.
    Found an example on the web of a similar bot that worked.
    Wasn't quite as massive as this one though, so think it good shape.

  • MicksterMickster Posts: 2,824

    PID is wonderful. It can take care of everything. The offset can be adaptive. :)

  • MicksterMickster Posts: 2,824

    One of the problems that I see with these hobby devices is low resolution feedback. You can't have too much.

    I like those CUI modular encoders and 4096 line are available. This translates to 16384 quad counts/rev and we have Prop horsepower. :+1:

  • MicksterMickster Posts: 2,824

    Oh heck, we are talking about servo motors, right, not steppers?

    I not familiar with the product 😊

  • RaymanRayman Posts: 15,373

    It’s just the parallax dc brushed motors from the Arlo bot

    Going to use with parallax pwm MOSFET hbridge driver board

  • MicksterMickster Posts: 2,824

    @Rayman said:
    It’s just the parallax dc brushed motors from the Arlo bot

    Going to use with parallax pwm MOSFET hbridge driver board

    B) None of that hit-n-hope stepper nonsense :D

  • ErNaErNa Posts: 1,830

    @Rayman said:
    Got the motor mount and wheel kit from Parallax when saw it was half off:
    https://www.parallax.com/product/motor-mount-wheel-kit-aluminum/

    Also, got a caster to make a 3-wheel bot.
    But, then saw a bunch of self-balancing bots and decided to try that first.

    Here's the concept (see attached pic).
    The construction is 1/2" HDPE and 1/4-20 hardware.

    Just CNC'd the main board and it seems pretty solid, even with the giant hole in the middle for the battery.

    How high up or how low to mount battery is perhaps the main question. Or, maybe if this battery is too big is another... Been reading that being top heavy is actually an advantage for self-balancing bots. But, think this SLA battery is beyond the pale, so lowering it via the giant hole. May try different amounts of lowering if this doesn't work.

    Plan is to use P2 and BNO086 sensor in RVC mode to achieve balancing.
    Might be a disaster, we'll see!

    Hi, how did you model this? It would be great, if we could switch to FreeCad for all the mechanical designs. As we now see the version 1.0 https://freecad.org/index.php?lang=en

  • RaymanRayman Posts: 15,373

    @ErNa FreeCad does look nice. Used SolidWorks for this because that's what we use at work...

    That reminds me, I have to come up with an explanation why this is needed at work...

  • RaymanRayman Posts: 15,373

    Main HDPE board was bowing a bit, so added a piece of t-track that was around.
    Seems better now...

    360 x 480 - 46K
  • MicksterMickster Posts: 2,824

    Liking the wheel supports. They certainly didn't cheap-out on this. :+1:

  • RaymanRayman Posts: 15,373

    Found a note and code on using the Parallax Universal motor board with these wheels:
    https://www.parallax.com/arlo-conversion-to-p2-with-the-universal-motor-controller/

    Seems it should be on one of the product pages, but isn't....

  • MicksterMickster Posts: 2,824

    @Rayman said:
    Found a note and code on using the Parallax Universal motor board with these wheels:
    https://www.parallax.com/arlo-conversion-to-p2-with-the-universal-motor-controller/

    Seems it should be on one of the product pages, but isn't....

    Without having given this a fair shake, I shouldn't really critique it BUT "ramp-time". If ever there was a case for s-curve acceleration/deceleration, this is one of them. But the source is there, maybe we could/should give it a go(?).

  • RaymanRayman Posts: 15,373

    It's all wired up. Moment of truth is near...

    480 x 640 - 157K
    640 x 480 - 165K
  • RaymanRayman Posts: 15,373

    Hmm... Motors act a little different than expected...

    They don't turn at all until drive set to 20% Doesn't turn with PWM set to 10%...

    And, they make funny pulsing noises. That may have something to do with not having any load though.
    They sound better with a little load...

  • MicksterMickster Posts: 2,824

    Knee-jerk reaction is aforementioned lack of feedback resolution....but no clue what you have. Also if your PID I-term is >0 then set it to zero.

  • evanhevanh Posts: 16,588
    edited 2025-07-20 01:38

    @Rayman said:
    Hmm... Motors act a little different than expected...

    They don't turn at all until drive set to 20% Doesn't turn with PWM set to 10%...

    And, they make funny pulsing noises. That may have something to do with not having any load though.
    They sound better with a little load...

    Observation is probably right. I'm not clear on the fundamentals around motors at all but I'd guess there is magnetisation losses of some sort that means you don't get torque until a certain amount of current is flowing. EDIT: Another factor can simply be mechanical frictions prevent motion until enough torque is applied. Gearboxes are a known source of this issue.

    Roughness in commutation is also probably unavoidable to a certain degree. After all, the shape of the poles are not continuous. And for brushed DC you've also got the segmented transitions around the commutator.

    PS: Also, be aware that voltage control behaves differently to current control. If you can do current sensing easily then I advise doing so. This is normally performed inside the motor drive circuit, with the demand from the motion controller (Propeller) representing desired current rather than voltage.

  • MicksterMickster Posts: 2,824

    I have small Pittman (brushed) motors on my desktop simulator. They are smooth as silk and hold position absolutely with zero error. For me, the resolution is low @2000 quad counts/rev but even the lowest speed is totally smooth.

  • evanhevanh Posts: 16,588

    I don't think Rayman's motors have any encoders, and maybe no current sense in the drives either. They look like simple brushed DC, presumably with primitive voltage based speed control.

    Looks like he's planning on relying on the BNO086 sensor for all feedback.

  • MicksterMickster Posts: 2,824

    Oh, that would explain it. I'm only familiar with Hanno's Dance Bot. Wish he was still around. I used his Viewport software with P1 and would love to have a P2 version.

  • MicksterMickster Posts: 2,824

    :|

  • MicksterMickster Posts: 2,824

    PID video with no yapping

    I think we're gonna need a lot more resolution and some serious gain.

  • MicksterMickster Posts: 2,824

    I envy you guys that just seem to get things done :D:+1:

    So your update from the sensor is 100Hz? I don't follow Spin too well.

    Can you increase that update rate? I think I read that the sensor is good for 1KHz (?)

  • RaymanRayman Posts: 15,373

    Going to try this dirt simple RVC (robot vacuum cleaner) mode first. It's just a serial output, fixed at 100 Hz.
    Think it's close to working, just need to get rid of oscillations... Hopefully, fine tuning the PID will get there...

Sign In or Register to comment.