So, it seems like the 'bots problem balancing has a few possible factors ...
Height: First problem might be the 'bots height. Finally broke down and did a goog search to see how others do this. Most are short stumpy things. Perhaps my robots height is making things harder. I can move the components to a shorter chunk of wood pretty easily, but first want to try other things.
Weight: Large chunk of wood means lot's of inertia and momentum. Perhaps that is keeping the bot from moving things early enough, and keeping them moving when motors reverse direction. Again, want to try other things before going small. I think that a swarm of tall bots is much cooler than a swarm of pygmies.
Speed: Even with the RM2's the motors only go about 120 RPM. Seems like a lot do 200-400 RPM. I've got faster motors, but will need to rebuild a lot of stuff to use them. So let's try something else first.
Tuning: The PID loop is tuned poorly at best. I'm still struggling to get it set up right.
More bits: And lastly, seems like the resolution of the IDG300 might be a problem ... IDG300 will do 300 degrees per second. When we start falling, we get maybe a few degrees per second. Rate is reported at .002v/degree/second. Atmega has a 10 bit A2D with a reference voltage of 5 volts. Or .005 volts per unit. So, falling 3 degrees per second shows up as a one unit change in A2D value. 5 degrees per second shows up as 2 units. At best I'm getting 4-6 units of change ...
That's a good hypothesis ... but there is a contrary data point. Botka. A balancing bot using the IDG300. Perhaps it's PID loop is tuned better. Or maybe it's something else. Or maybe it's that it's shorter. Or it's body or motors. Or ... But no matter, there's no way to know. There's not enough details about how Botka works, so I gotta go on my own ...
I figure the next thing to try is a higher resolution A2D. Have discovered the MCP3301, a 13bit A2D. With it I get at least 8 times the resolution. As it also has full differential inputs and a reference voltage. I should be able to set the high and low voltage to .1v above 0 degree per second and .1V below 0 degree per second. That will let me measure up to 50 degrees per second either way with 13 bits precision. 100 degrees/8000 units means lots 'o resolution!!!!!
Off to wire it up
...
And ... Gak, breadboarded the thing up for just basic testing. Vref at +5, V- at 0. Tried V+ at both 0 and +5. Wildly weird values for both. Every step is a pain in the ... Ummm, make that every step is a chance to learn more.
Done for tonight. Try again later tomorrow or the next day ...
No comments:
Post a Comment