Previous post in the sequence:
As I start typing this, WalkyII is recharging his battery. After a long debug session, WalkyII started getting wacky. If I started to command the servos, WalkyII's status LEDs would start flashing erratically and then stall mid step. So it was time to take a break and give WalkyII a little recharge time. Here is some of his recent photos/videos:
So far, I have integrated the R/C receiver and front and rear sensors. WalkyII currently understands the simple commands of Forward and Reverse, with a speed modifier. Senor wise, WalkyII is using his front and rear I/R distance sensors to avoid table edges and obstacles (he will not start walking if something is in the way and he will stop if something gets in his way while working.
Update: Oops the erratic LED flashes turned out to be a glitch in WalkyII object/edge detection logic (not a near dead battery). I needed to hold the object/edge detected flag set until the R/C command went back to idle, otherwise WalkyII kept entering and exiting the walking routine.
Programming and debugging WalkyII takes a little support and a lot of tools. Here are some of the tools that I use to teach WalkyII some of his stuff:
Here WalkyII all connected during a debug session. The 'red' circle shows the AVR ISP MKII programmer that is attached to WalkyII. This allows me to 'burn' new firmware, view/modify EEPROM (holding configuration data) and issue a reset, should things go astray. Below that (in a 'blue' circle) is a old project (IR motion detect/Light switch), that has been re-purposed into a USB to serial bridge. I used the bridge to send and receive serial commands, used to exercise WalkyII's low level commands or to read/modify variables. In the background (green circle) is WalkyII friend, who helps out with all the complex math that helps WalkyII to walk.
I had also fabricated a sling, that allows WalkyII to be suspended while exercising WalkyII's servos without him flopping all over the desk or toddling off the edge (before his sensors were active.
Up next is WalkyII's debug panel.
The debug control panel allows me to interact with WalkyII's program without interfering with the generation of PWM waveforms and interrupt driven pulse measurements. From the panel I can control/view the following:
1) set servo positioning pulses on all channels.
2) read I/R distance readings (live, baseline averages, and limit values for obstacle/edge avoidance).
3) read PWM pulse width from the R/C receiver and the command determined from these values.
4) read and modify WalkyII step parameters (Tilt and Stride)
5) Enable override of WalkyII servo settings (as well as filter rate variables)
6) Write current servo positions to default positions (to EEPROM). This was used to trim out the WalkyII's servo positions.
7) View all data sent/received to/from WalkyII
(Note: Oops!, there is some left over startup commands being sent to Walky, which he ignores. This panel was hacked together from a previous job, or two).
One issue that I am still working on is the fact that WalkyII walks like a drunken sailor (not there is anything wrong with that). I have tried several things to help WalkyII walk the straight and narrow, but so far we are not there yet. there were several recommendations early on, improvements to WalkyII's feet that might help, thanks jw0752 , mcb1 , ntewinkel and balearicdynamics for the ideas. So far, I have tried a couple of different pads on WalkyII's soles, but still he is quite wobbly. Here is WalkyII's latest footwear:
The black pads are textured vinyl. They help a little in preventing him from slipping, but I think that he is getting caught up in the side to side momentum of the tilt phase of his gait and generates a bit of a pivot. I have filtered out some of the fast slew out of the servos, but I think I will need to try a ramp-up, constant velocity and ramp-down servo profile to calm down some of the violent swings to his gait. Also, during testing, WalkyII broke one of his short, lower control rods that drive the stride portion of his gait. The new control rods that I built, don't move quite as smoothly as the old ones (some binding and such). I will need to investigate a new lower control arm set (to bad I could not re-solder the brass control arms, darn lead-free solder would not stick, or maybe I should braze it???).
Time is getting late, as the deadline is approaching. I still need to finish up a few thing and produce the remaining documentation, so a couple of my initial goals (like I2C communication to the battery pack to get battery voltage, get mode setting, and perform remote shutdown on inactivity), might fall to side and be addressed later.
In the meantime, dinner and a cold beer.....
Thanks for following along on this crazy adventure.