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 StatesPosts: 3150 |
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 StatesPosts: 118 |
Very cool! |
||||
DrifterNL Regular Member Joined: 27/09/2018 Location: NetherlandsPosts: 58 |
Thanks! Sometimes the simplest solutions are the best. and a parts bin full of "junk". Thank you! It did take a lot of tuning but was fun seeing the characteristics change as I got it dialed in. 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 KingdomPosts: 3801 |
The video is great - and wasn't too dark for me. John |
||||
okwatts Regular Member Joined: 27/09/2022 Location: CanadaPosts: 59 |
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: NetherlandsPosts: 58 |
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 KingdomPosts: 857 |
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 KingdomPosts: 6786 |
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 KingdomPosts: 857 |
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: NetherlandsPosts: 58 |
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 KingdomPosts: 857 |
Are you running the PID on a fixed sample rate and what is the rate? |
||||
DrifterNL Regular Member Joined: 27/09/2018 Location: NetherlandsPosts: 58 |
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 KingdomPosts: 857 |
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 KingdomPosts: 857 |
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: NetherlandsPosts: 58 |
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 KingdomPosts: 857 |
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 |