This is one of the most experimental pieces we put on Cog-Burn our #DARPADRC Finals Robot. The concept is that the foot freely rotates at the top of the foot, the ankle for lack of a better word. This is a simple "lazy susan" like bearing between the tibia and the foot. We then sense the rotation of that bearing to drive wheels on the ground. This implementation specifically uses stepper motors and a softpot, but the idea could be extended in many ways and use different components. An encoder and DC brushless motors could have been used just as well.
The SpectraSymbol Soft Pot that measures the rotation of that "lazy susan" bearing, and we use the recommended pressure pin for that potentiometer.
There are two 115 oz-in stepper motors that are run as a "tank" steering pair of wheels on the foot.
The robot can drive any direction you want by running the two motors differentially until it points in the correct direction, then when the tires are pointing the correct direction drive them at the same speed to move the robot, or other object in the desired direction.
What we like best about this design is the parts are identical, for the swerve steer. In normal swerve steering you have a different mechanism for turning the wheel than the one to drive the tire.
Step 1: Gather the Parts:
The key parts used for the foot of our robot are:
- http://www.vexrobotics.com/versakey-gears.html from VEX Robotics choosing appropriate ratios, and bearings, and axles for the motors. Feel free to design your own. We will add hardware design files soon.
- Motors were purchased from http://www.automationdirect.com/adc/Shopping/Catal... from Automation Direct. They are the strongest NEMA 17 motors you can buy that have the least weight for the most torque.
- Stepper motor controllers are http://www.sainsmart.com/cnc-router-single-1-axis-... from SainSmart.
- The microcontroller is a small footprint Arduino. https://www.sparkfun.com/products/11113
SpectraSymbol softpot. http://www.amazon.com/SPECTRA-SYMBOL-Softpot-Rota... originally available from SparkFun
- Various wires to connect the power to the motor controller, to connect the Arduino to the stepper motor controllers, etc.
- We used the grub-nut plunger from McMaster Carr 8499A46 to press the softpot. This part is a bit pricey at $5.00 but they do not get torn up. The Softpot's get torn up more easily.
There are various nuts and bolts and when we collect an accurate bill of materials we will update this instructable. Most nuts and bolts are SAE but the Stepper motors are NEMA 17 so some metric bolts are needed there.
Step 2: Wire the Arduino to the Stepper Motor Controller
The schematic shows how the stepper motor controllers and the arduino are wired together. It is fairly straightforward except the frequency generation for the stepper motors.
Also pay special attention to the resistor network of the SpectraSymbol softpot. If you directly connect the softpot to the 5V or Raw from the Arduino, and to GND and then you press near the stem it will short the supply across the pot and could damage it. To make sure our parts held up we added a 1K resistor to limit current to 1ma through the softpot. Also a 10K pull up resistor so the A0 line will go to 1023 if the pot is not pressed anywhere.
To control this foot along with all the other components we used I2C. This protocol needs no additional hardware for the Arduino and makes the device addressable on the I2C bus.
- Wire the sensor, add 1K and 10K resistors
- Wire the two motor controllers
- Wire the I2C
Step 3: Flash the Firmware
The code is pretty simple.
We have an RS232 (Serial) interface menu to configure the I2C address, soft limits on the sensor, motor speed and default heading. Most of the firmware is associated with that serial interface menu. Use a USB to RS232 TTL device like a FTDI chip to flash your Arduino Pro Mini, the serial terminal will then show you the menu for configuration.
The real logic is in "swerve", this routine measures the position of the sensor and then run the motors up to twice the speed specified to "catch-up" to the other side.
For I2C we have two subroutines, receiveEvent is called when data arrives for the Arduino on the I2C bus. RequestEvent occurs when an I2C device request data from the Arduino running the SwerveSteerTwoTone.
We use EEPROM to store the settings so the device can remember its settings when it is turned off. You can think of this as a hard-drive for the Arduino. Remember it only has very few bytes.
One clever bit of this code is using the Tone function to create a consistent timer to generate two different frequencies for the two stepper motors. To do this the Tone function output on Pin 2, and since Pin 2 is also Int 0 changes to Int 0 then call the interrupt handler "intHandler" . intHandler checks to see if the pin for the stepper motor needs to be toggled, it does this for two pins.
All this could be more elegant but this is a good way to create encapsulation of the foot movement away from the rest of the code for the robot.
Finally one last note. We are strong believers in "The simplest thing that could possibly work." so it is possible that this code will fail in some case or could be written to be faster or have cleaner more consistent timing. But this is the simplest we thought would work. And it did appear to work as expected.
Step 4: Custom Mechanical Parts: 3D Printing and
We have 4 mechanical parts for the foot.
- Knee Lower Leg Pivot Upper 3D Printed
- Knee Lower Pivot Lower are 3D Printed and used to make the "lazy susan" bearing interface.
- Ankle Bearing Block is 3D printed, and is the separator for the metal side plates.
- A DXF for cutting the metal side plates.
All this is bolted together with SAE size bolts except the 8 bolts that hold on the NEMA 17 motor.
Step 5: Put It All Together and Test:
This subsystem was actually was developed before the new legs. Short Test
You can use the Serial Interface Menu to test all settings that could come through I2C but we also want to test the I2C interface as well.
We use the SimpleI2CController to test the main robot control station.
We will update this instructable when we have some video of a simple floor, pavement, and gravel to share.