Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 00:28 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite: Big Wheel Balancing Robot

     Page 2 of 2    
Author Message
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 12:12am 15 Mar 2024
Copy link to clipboard 
Print this post

Super job. This is a hard problem.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
EDNEDN
Senior Member

Joined: 18/02/2023
Location: United States
Posts: 118
Posted: 02:33pm 16 Mar 2024
Copy link to clipboard 
Print this post

Very cool!
 
DrifterNL

Regular Member

Joined: 27/09/2018
Location: Netherlands
Posts: 58
Posted: 04:43pm 16 Mar 2024
Copy link to clipboard 
Print this post

  PhenixRising said  Hinges...Brilliant    

Thanks!
Sometimes the simplest solutions are the best.
and a parts bin full of "junk".

  lizby said  Super job. This is a hard problem.

Thank you!
It did take a lot of tuning but was fun seeing the characteristics change as I got it dialed in.

  EDNEDN said  Very cool!

Thanks!

The video is a bit dark, I'll see if I can make a better one in the future.
The bot does tend to sway back and forth a bit.
I think this has to do a lot with the starting voltage of the motors, a bit of slop in the gearboxes and the CMPS14 outputting pitch in ones of degrees instead of tenths of degrees.
This is an on going project and I still have a few ideas / upgrades in mind that I would like to try out.
Edited 2024-03-17 02:45 by DrifterNL
Floating Point Keeps Sinking Me!
Back To Integer So I Don't Get Injured.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3801
Posted: 05:29pm 16 Mar 2024
Copy link to clipboard 
Print this post

The video is great - and wasn't too dark for me.

John
 
okwatts
Regular Member

Joined: 27/09/2022
Location: Canada
Posts: 59
Posted: 05:52pm 16 Mar 2024
Copy link to clipboard 
Print this post

Very nice build. Some years ago I followed Joop Brokking (http://www.brokking.net/yabr_main.html) and built his version using a 3D printed frame. Not as solid or well done as yours though. At the time I also built one of his quadcopters using his code etc. I am a terrible pilot and then government regs came in and made it hard to fly close to home (too near an airport) so it sits on the shelf reminding me of my limitations!
 
DrifterNL

Regular Member

Joined: 27/09/2018
Location: Netherlands
Posts: 58
Posted: 04:34pm 17 Mar 2024
Copy link to clipboard 
Print this post

Hi all,
Uploaded an 2nd video of BWB V4 but this time balancing in grass and moss.
A re-tune of the PID was needed to get this to work.

BWB V4 in grass and moss
Floating Point Keeps Sinking Me!
Back To Integer So I Don't Get Injured.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 09:28pm 17 Mar 2024
Copy link to clipboard 
Print this post

  DrifterNL said  Hi all,
Uploaded an 2nd video of BWB V4 but this time balancing in grass and moss.
A re-tune of the PID was needed to get this to work.

BWB V4 in grass and moss


Was half expecting it to cock a hinge  


Yeah I suspect that you need to reduce loop time. 250Hz would be the low-end for something like this.  
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6786
Posted: 10:47pm 17 Mar 2024
Copy link to clipboard 
Print this post

Johnny Five is alive!  :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 08:24am 18 Mar 2024
Copy link to clipboard 
Print this post

This is exciting stuff. I really can't think of a better project for getting students in to control/feedback systems. The objective is clear - balance and stability (better than staring at waveforms on a scope) and having direct PID adjusters is totally intuitive.

It's mind boggling that most engineers, involved in maintaining industrial CNCs and robots, regard this as some form of black-art. They resort to fumbling around or make a phone-call for outside assistance. "Machine's gone crazy...has a mind of its own"  
 
DrifterNL

Regular Member

Joined: 27/09/2018
Location: Netherlands
Posts: 58
Posted: 08:30pm 28 Mar 2024
Copy link to clipboard 
Print this post

Hi all,
I just uploaded 3 short videos demonstrating the Proportional, Integral and Derivative parts of the my robots PID Control loop.  

Big Wheel Balancer V4: The P in PID Control

Big Wheel Balancer V4: The I in PID Control

Big Wheel Balancer V4: The D in PID Control
Floating Point Keeps Sinking Me!
Back To Integer So I Don't Get Injured.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 09:34pm 28 Mar 2024
Copy link to clipboard 
Print this post

Are you running the PID on a fixed sample rate and what is the rate?
 
DrifterNL

Regular Member

Joined: 27/09/2018
Location: Netherlands
Posts: 58
Posted: 11:21pm 28 Mar 2024
Copy link to clipboard 
Print this post

  PhenixRising said  Are you running the PID on a fixed sample rate and what is the rate?


Right now a loop of the software takes about 4.6ms which is about 217Hz.
I can save about 0.6ms if I delete the pot adjustment for the PID and this would bring it to about 250Hz.
The PicoMite is running at standard speed, no overclocking.
Floating Point Keeps Sinking Me!
Back To Integer So I Don't Get Injured.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 12:27am 29 Mar 2024
Copy link to clipboard 
Print this post

250Hz is the absolute low-end for me and that is for the cruder (is that a word) applications. Can easily get 1KHz with the PicoMite at 420MHz but that's only a single PID. ARMmite H7 is a different story  
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 12:31am 29 Mar 2024
Copy link to clipboard 
Print this post

Just so I understand; to initiate motion, you simply introduce error right?

I do velocity profiling (accel, slew, decel) and that profiler takes-up CPU cycles but I'm sure would make for smoother motion.
 
DrifterNL

Regular Member

Joined: 27/09/2018
Location: Netherlands
Posts: 58
Posted: 10:56am 29 Mar 2024
Copy link to clipboard 
Print this post

  PhenixRising said  Just so I understand; to initiate motion, you simply introduce error right?


Almost.
I'm using 1 PID to control balancing (error between setpoint and pitch) and a simple proportional controller to turn to a heading (error "yaw" between course_heading "wanted heading" and bearing "actual bearing read from CMPS14") to control the motors.
This can be seen in my first video when I tilt up the bot and it starts balancing and turns 90° (to face east).

*updated post / corrected an error in the previous post
Edited 2024-03-29 21:26 by DrifterNL
Floating Point Keeps Sinking Me!
Back To Integer So I Don't Get Injured.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 11:59am 29 Mar 2024
Copy link to clipboard 
Print this post

Yeah so you're between a rock and a hard place; you need loop-gain for the best possible response but that comes back to bite you in the sense that the same loop-gain will result in an abrupt move.

I was just online, spending your money on version-2  

Looking at hub-motor-wheels (14" dia) to eliminate backlash and hi-res encoders  

Unfortunately, I need to get back to work but if I get chance, I'll post the bare essentials of my trajectory generator (in the muck and bullets right now).
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024