Difference between revisions of "Butterfly Rolling Manipulation"
WilliamFan (talk | contribs) |
|||
(106 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
[[Image:Butterflyteampic.jpg|thumb|500px|Rolling Manipulator|right]] |
|||
=Overview= |
=Overview= |
||
The goal of the rolling manipulation project was to perform a contact juggling move called the "butterfly" on a sphere or circular disk. There are many examples of human jugglers performing the butterfly, including [http://www.youtube.com/watch?v=FX7xruR12YA this] video of Michael Moschen. The purpose of the mechanical butterfly is to simulate this juggling action for the purposes of nonprehensile manipulation. Prior research on the subject of contact juggling, including a |
|||
[[Media:Lynch_Butterfly_Example.pdf|paper]] by Professor Kevin Lynch, formed the basis for this project. The shape of the apparatus and the general butterfly motion, were obtained from the Lynch paper. Within the scope of four weeks, the circuitry and mechanical systems required to implement this motion were designed and constructed. The following sections will document our step by step process. |
|||
==Team Members== |
==Team Members== |
||
[[Image:TeamButterflyPhoto.jpg|thumb |
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]] |
||
Line 14: | Line 17: | ||
=Mechanical Design= |
=Mechanical Design= |
||
[[Image:Butterfly_Exploded_View.jpg|400px|thumb|Exploded CAD model of the butterfly system.|right]] |
|||
In order to achieve the butterfly motion, a well designed and robust apparatus is needed. The following sections detail the mechanical design of the butterfly apparatus, including the bill of materials and information regarding the choice of butterfly shape. |
|||
==Parts List== |
==Parts List== |
||
{| border="1" |
|||
==The Hand:Butterfly Shape== |
|||
! style="background:#efefef;" | Item |
|||
!! style="background:#efefef;" | Number |
|||
!! style="background:#efefef;" | Supplier |
|||
|- |
|||
| Socket Head Screw -- 4-40 Thread || 9 || Shop |
|||
|- |
|||
| Socket Head Screw -- 6-32 Thread || 20 || Shop |
|||
|- |
|||
| Nut -- 6-32 Thread || 8 || Shop |
|||
|- |
|||
| Nut -- 4-40 Thread || 6 || Shop |
|||
|- |
|||
| Set screw -- 5-40 Thread || 1 || Shop |
|||
|- |
|||
| 24 x 24 x .236" Acrylic Sheet || 1 || McMaster #8560K224 |
|||
|- |
|||
| 1 x 1 x 11.25" 6061 Al || 1 || Shop |
|||
|- |
|||
|} |
|||
==The Hand: Butterfly Shape== |
|||
The shape of the actual butterfly was determined in part from the Lynch paper with help from Matlab code developed by Fabio Ruggiero, a PhD student in LIMS. The code manipulates a set of parametric equations to give a two-dimensional shape with continuous curvature. The code can be downloaded [[Media:Butterfly_Matlab_code.zip|here]]. The user can chose four parameters in order to change the shape of the butterfly. However, it is possible to obtain a shape completely outside the realm of possibility for rolling manipulation with intersections of the spline and extremely sharp corners. The shape used in this project had values around: a0 = 8.6, a1 = -12, a2 = -18, a3 = 36. |
|||
After the shape was determined, a set of <x,y,z> points was imported directly into Solidworks and a curve through points (Insert-->Curve-->Through XYZ Points) was created. From there, excess material was removed from the shape to cut down on angular inertia, and holes were created for mounting. Two such butterflies were made on the laser cutter, and the edges were sanded to decrease any imperfections. |
|||
[[Image:Butterfly_shape.jpg|500px|thumb|The resulting butterfly|center]] |
|||
==The Mount== |
==The Mount== |
||
The mounting system is an incredibly important aspect of the rolling manipulator. It needs to be secure in design, along with allowing easy access to all the parts. |
|||
==The Roller== |
|||
We will start from the base and work our way upwards. The base is made of a large platform of acrylic in order that the manipulator does not shift or tilt during operation. Attached directly to this floor plate are four aluminum blocks with 6-32 socket head screws. The main support structure for the motor and other parts of the device are directly attached to these aluminum blocks via more 6-32 socket head screws. These acrylic plates have enough flexibility that an additional aluminum block was added in the upper region to increase rigidity of the system. From here, the motor is mounted via a simple bolt pattern and extra support in the rear via more 6-32 socket head screws. |
|||
The butterfly is secured to the motor via a sandwich of: |
|||
* A Butterfly |
|||
* Spacer Block with 5-32 Set Screw |
|||
* Another Butterfly |
|||
* Spacer Block with Relief to Dodge Bolt Pattern of Motor |
|||
The parts are held together with long 4-40 socket head screws with nuts on the other end. The through holes on all four parts need to match closely and are clearance for a 4-40 screw to assure assembly. |
|||
==The Disc== |
|||
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]] |
|||
The shape and size of the roller disc is one of the most important parts of the entire design. We decided to create a lightweight, brass rolling disc that would not only hold up to the riggors of testing, but also conduct electricity for future sensing applications of the disc. Also, the disc has a lip in order to keep the disc from falling off side-to-side as easily due to imperfections in leveling or in the butterfly. Through testing of the system, we made three discs with three different weights and wall sizes. In the end, the disc weighed only 22 grams, had 1/32" walls, and had nearly zero electrical resistance. |
|||
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]] |
|||
The disc was made via the following steps: |
|||
1) Locate at least 1.75" OD free machining brass<br> |
|||
2) Rough cut around a 2" length of brass<br> |
|||
3) Debur rough edges using belt sander<br> |
|||
4) Locate 1 3/4" and 1 11/16" oversized collets<br> |
|||
5) Place 1.75" OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5" exposed<br> |
|||
6) Insert turning tool into compound<br> |
|||
6) Machine OD to finish diameter for full length of open area<br> |
|||
7) Remove turning tool, insert groover<br> |
|||
8) Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc<br> |
|||
9) Remove grooving tool<br> |
|||
10) Center drill, then drill 3/8" through hole<br> |
|||
11) Insert boring bar<br> |
|||
12) Take successive passes to finish inner diamater as far as possible<br> |
|||
13) Remove disc from collet, replace collet with 1 11/16" collet<br> |
|||
14) Put Disc in backwards with machined side in collet, remove excess material<br> |
|||
15) Use boring bar to finish lip on other side<br> |
|||
Note: 1/32" wall can be quite tricky. Take it slow. It takes around 3 hours to make one disc since high precision is needed. If you need advice to make another various disc, please speak to Ben or Steve Jacobson. |
|||
=Circuit= |
=Circuit= |
||
The circuitry involved in this project is fairly simple. The main electrical components include a brushed DC motor with encoder, optical sensor, h-bridge, decoder chip, and LCD screen for debugging purposes. |
|||
==Parts List== |
==Parts List== |
||
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]] |
|||
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable |
|||
*[[PIC RS232| RS232 cable]] |
|||
*[[PIC32MX: Parallel LCD|HD44780 LCD]] |
|||
*100k ohm resistor (1) |
|||
*2.21k ohm resistor (1) |
|||
*1k ohm resistor (1) |
|||
*330 ohm resistor (1) |
|||
*100 ohm resistor (1) |
|||
*0.1uF capacitor (4) |
|||
*L298N H-bridge with heat sink |
|||
*1N4003 diodes (4) |
|||
*LS7083 decoder chip |
|||
*QVB11134 Optical Sensor |
|||
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]] |
|||
*Breadboard |
|||
*Solder board |
|||
==Circuit Diagram== |
==Circuit Diagram== |
||
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]] |
|||
==Motor== |
==Motor== |
||
A Pittman GM8224 24V motor was chosen for the apparatus. Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]]. The original design called for the Pittman 9236 motor with no gearhead. This decision founded on a desire for zero backlash. However, due to current limitations as well as inadequate H-bridges, the decision was made to switch to the 8224 with a 19.5:1 gearhead for increased torque at lower current. |
|||
== |
==Start-Up Procedure== |
||
* Turn on PIC32 |
|||
* Turn on Power Supply to 24 V |
|||
* Wait for butterfly to trigger optical sensor, then go to horizontal home position |
|||
* Place disc on butterfly on stable equilibrium in center |
|||
* 5 second countdown |
|||
* If Processing and RS232 are hooked up, it is possible to read the previous desired v. actual position data and reset the system. |
|||
Note: Turning on the power to the motor before turning on or resetting the PIC can often cause the butterfly to spin rapidly as the PIC is initializing. This will commonly result in a burnt out H-bridge. Therefore, ALWAYS MAKE SURE THAT THE POWER TO THE MOTOR IS OFF BEFORE TURNING ON OR RESETTING THE PIC. |
|||
=Code= |
=Code= |
||
==C Code== |
|||
The complete C code for this project can be downloaded [[Media:ButterflyFinalCode.zip|here]]. |
|||
In essence, the code is very simple. Initially, the motor turns at minimum speed until the optical sensor is triggered. At this point, it stops and executes a small correction in order to reach an approximate horizontal position. It then begins a 5 second countdown. |
|||
Once the countdown is complete, the code uses a 1ms interrupt to control the motion of the butterfly. The desired trajectory of the butterfly is hardcoded into the program using a large matrix of encoder positions. Every 1ms, the program compares the current position of the motor v. the desired position and calculates the resulting error. Proportional or PD control is then used to govern the motion of the butterfly. Although the code is set up to use PID control, P or PD control is perfectly sufficient for these purposes. |
|||
=Processing= |
|||
The purpose of the processing code is to plot the actual movement of the motor against the reference trajectory. The code produces a reference trajectory based on the given equation, a constant time interval, and a k-value and produces 2000 reference points for the motor to follow. Because processing plots one data point per pixel, only every other reference point is saved into an array in the pic. At every reference point, the encoder reads the position and also records this actual position at every other reference point into a separate array. These arrays are fed from the pic into a computer using an RS232 cable when the “read data” button is pushed in the processing GUI. Processing then plots these arrays. |
|||
There is also a second interrupt which is used to interface with Processing. Processing can be used to plot and save the reference and actual trajectories as well as reset the motion. |
|||
Processing is also used to reset the hand. By pushing the reset button in the processing GUI, processing activates an interrupt which tells the hand to reset using the light sensor and run the main code again. |
|||
==Processing== |
|||
<insert graph> |
|||
The purpose of the processing code is to plot the actual movement of the motor against the reference trajectory. The code produces a reference trajectory based on the given equation, a constant time interval, and a k-value and produces reference points for the motor to follow. At every reference point, the encoder reads the position and also records the actual position into a separate array. These arrays are fed from the PIC into a computer using an RS232 cable when the “collect” button is pushed in the processing GUI. Processing then plots these arrays. |
|||
Processing is also used to reset the hand. By pushing the "reset" button in the processing GUI, processing activates an interrupt which tells the hand to reset using the light sensor and run the main code again. |
|||
Based on the graphs created in processing, the PD control was very effective in controlling the motor. Minor offsets occurred consistently at the beginning and end of each run due to backlash from the motor, but the actual position was very close to the reference trajectory a majority of the time. |
|||
[[Image:Processing_Screenshot.jpg|800px|thumb|A screen shot of the Processing window|center]] |
|||
Based on the graphs created in processing, the PD control was effective in controlling the motor. Minor discrepancies occurred consistently at the beginning of each run, and small oscillations can be observed at the end, but the actual position was very close to the reference trajectory throughout most of the motion. |
|||
Below is a plot of the planned motion of the butterfly manipulator. |
|||
[[Image:Butterfly_Trajectory.jpg|800px|thumb|The planned motion of the butterfly manipulator.|center]] |
|||
=Results= |
=Results= |
||
As seen by this [http://www.youtube.com/watch?v=lgmugtaGoTo&feature=related youtube video], the butterfly motion was successfully executed. However, a few failure modes exist. Namely: |
|||
1) Sliding off the side due to loss of traction. This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&feature=related#t=00m37s here] <br> |
|||
2) Losing contact with the surface of the butterfly. This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&feature=related#t=00m49s here]. <br> |
|||
These might be lowered in frequency with finer tuning of the gains or adjustment of the coefficient of friction on either the disc and/or the acrylic butterfly. The future addition of sensing of the disc location could also help counteract many problems causing failure modes. |
|||
=Next Steps= |
=Next Steps= |
||
- Eliminate backlash via gearless motor |
|||
- Get more robust H-bridges - The L298N is a less than ideal H-bridge for the Pittman 8224 motor, however it was the closest thing available. In order to increase the amount of current that the H-bridge was capable of supplying to the motor, two H-bridges were connected in series as shown in the circuit diagram. |
|||
- Sense position of the disc using copper foil tape and resistive wire |
|||
- Implement more sophisticated controller including feedback from the disk |
|||
- Test other butterfly shapes with lower or higher curvature |
|||
- Test other disc shapes with different center of masses and weights |
Latest revision as of 16:04, 19 June 2010
Overview
The goal of the rolling manipulation project was to perform a contact juggling move called the "butterfly" on a sphere or circular disk. There are many examples of human jugglers performing the butterfly, including this video of Michael Moschen. The purpose of the mechanical butterfly is to simulate this juggling action for the purposes of nonprehensile manipulation. Prior research on the subject of contact juggling, including a paper by Professor Kevin Lynch, formed the basis for this project. The shape of the apparatus and the general butterfly motion, were obtained from the Lynch paper. Within the scope of four weeks, the circuitry and mechanical systems required to implement this motion were designed and constructed. The following sections will document our step by step process.
Team Members
Eric Bell (Mechanical Engineer, 2010)
William Fan (Mechanical Engineer, 2011)
Ben Kolodner (Mechanical Engineer, 2010)
Mechanical Design
In order to achieve the butterfly motion, a well designed and robust apparatus is needed. The following sections detail the mechanical design of the butterfly apparatus, including the bill of materials and information regarding the choice of butterfly shape.
Parts List
Item | Number | Supplier |
---|---|---|
Socket Head Screw -- 4-40 Thread | 9 | Shop |
Socket Head Screw -- 6-32 Thread | 20 | Shop |
Nut -- 6-32 Thread | 8 | Shop |
Nut -- 4-40 Thread | 6 | Shop |
Set screw -- 5-40 Thread | 1 | Shop |
24 x 24 x .236" Acrylic Sheet | 1 | McMaster #8560K224 |
1 x 1 x 11.25" 6061 Al | 1 | Shop |
The Hand: Butterfly Shape
The shape of the actual butterfly was determined in part from the Lynch paper with help from Matlab code developed by Fabio Ruggiero, a PhD student in LIMS. The code manipulates a set of parametric equations to give a two-dimensional shape with continuous curvature. The code can be downloaded here. The user can chose four parameters in order to change the shape of the butterfly. However, it is possible to obtain a shape completely outside the realm of possibility for rolling manipulation with intersections of the spline and extremely sharp corners. The shape used in this project had values around: a0 = 8.6, a1 = -12, a2 = -18, a3 = 36.
After the shape was determined, a set of <x,y,z> points was imported directly into Solidworks and a curve through points (Insert-->Curve-->Through XYZ Points) was created. From there, excess material was removed from the shape to cut down on angular inertia, and holes were created for mounting. Two such butterflies were made on the laser cutter, and the edges were sanded to decrease any imperfections.
The Mount
The mounting system is an incredibly important aspect of the rolling manipulator. It needs to be secure in design, along with allowing easy access to all the parts.
We will start from the base and work our way upwards. The base is made of a large platform of acrylic in order that the manipulator does not shift or tilt during operation. Attached directly to this floor plate are four aluminum blocks with 6-32 socket head screws. The main support structure for the motor and other parts of the device are directly attached to these aluminum blocks via more 6-32 socket head screws. These acrylic plates have enough flexibility that an additional aluminum block was added in the upper region to increase rigidity of the system. From here, the motor is mounted via a simple bolt pattern and extra support in the rear via more 6-32 socket head screws.
The butterfly is secured to the motor via a sandwich of:
- A Butterfly
- Spacer Block with 5-32 Set Screw
- Another Butterfly
- Spacer Block with Relief to Dodge Bolt Pattern of Motor
The parts are held together with long 4-40 socket head screws with nuts on the other end. The through holes on all four parts need to match closely and are clearance for a 4-40 screw to assure assembly.
The Disc
The shape and size of the roller disc is one of the most important parts of the entire design. We decided to create a lightweight, brass rolling disc that would not only hold up to the riggors of testing, but also conduct electricity for future sensing applications of the disc. Also, the disc has a lip in order to keep the disc from falling off side-to-side as easily due to imperfections in leveling or in the butterfly. Through testing of the system, we made three discs with three different weights and wall sizes. In the end, the disc weighed only 22 grams, had 1/32" walls, and had nearly zero electrical resistance.
The solidworks drawing of the disc can be found here
The disc was made via the following steps:
1) Locate at least 1.75" OD free machining brass
2) Rough cut around a 2" length of brass
3) Debur rough edges using belt sander
4) Locate 1 3/4" and 1 11/16" oversized collets
5) Place 1.75" OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5" exposed
6) Insert turning tool into compound
6) Machine OD to finish diameter for full length of open area
7) Remove turning tool, insert groover
8) Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc
9) Remove grooving tool
10) Center drill, then drill 3/8" through hole
11) Insert boring bar
12) Take successive passes to finish inner diamater as far as possible
13) Remove disc from collet, replace collet with 1 11/16" collet
14) Put Disc in backwards with machined side in collet, remove excess material
15) Use boring bar to finish lip on other side
Note: 1/32" wall can be quite tricky. Take it slow. It takes around 3 hours to make one disc since high precision is needed. If you need advice to make another various disc, please speak to Ben or Steve Jacobson.
Circuit
The circuitry involved in this project is fairly simple. The main electrical components include a brushed DC motor with encoder, optical sensor, h-bridge, decoder chip, and LCD screen for debugging purposes.
Parts List
- PIC32 NU32 Board + PIC USB cable
- RS232 cable
- HD44780 LCD
- 100k ohm resistor (1)
- 2.21k ohm resistor (1)
- 1k ohm resistor (1)
- 330 ohm resistor (1)
- 100 ohm resistor (1)
- 0.1uF capacitor (4)
- L298N H-bridge with heat sink
- 1N4003 diodes (4)
- LS7083 decoder chip
- QVB11134 Optical Sensor
- Pittman GM8224 motor
- Breadboard
- Solder board
Circuit Diagram
Motor
A Pittman GM8224 24V motor was chosen for the apparatus. Information for the motor can be found here. The original design called for the Pittman 9236 motor with no gearhead. This decision founded on a desire for zero backlash. However, due to current limitations as well as inadequate H-bridges, the decision was made to switch to the 8224 with a 19.5:1 gearhead for increased torque at lower current.
Start-Up Procedure
- Turn on PIC32
- Turn on Power Supply to 24 V
- Wait for butterfly to trigger optical sensor, then go to horizontal home position
- Place disc on butterfly on stable equilibrium in center
- 5 second countdown
- If Processing and RS232 are hooked up, it is possible to read the previous desired v. actual position data and reset the system.
Note: Turning on the power to the motor before turning on or resetting the PIC can often cause the butterfly to spin rapidly as the PIC is initializing. This will commonly result in a burnt out H-bridge. Therefore, ALWAYS MAKE SURE THAT THE POWER TO THE MOTOR IS OFF BEFORE TURNING ON OR RESETTING THE PIC.
Code
C Code
The complete C code for this project can be downloaded here. In essence, the code is very simple. Initially, the motor turns at minimum speed until the optical sensor is triggered. At this point, it stops and executes a small correction in order to reach an approximate horizontal position. It then begins a 5 second countdown.
Once the countdown is complete, the code uses a 1ms interrupt to control the motion of the butterfly. The desired trajectory of the butterfly is hardcoded into the program using a large matrix of encoder positions. Every 1ms, the program compares the current position of the motor v. the desired position and calculates the resulting error. Proportional or PD control is then used to govern the motion of the butterfly. Although the code is set up to use PID control, P or PD control is perfectly sufficient for these purposes.
There is also a second interrupt which is used to interface with Processing. Processing can be used to plot and save the reference and actual trajectories as well as reset the motion.
Processing
The purpose of the processing code is to plot the actual movement of the motor against the reference trajectory. The code produces a reference trajectory based on the given equation, a constant time interval, and a k-value and produces reference points for the motor to follow. At every reference point, the encoder reads the position and also records the actual position into a separate array. These arrays are fed from the PIC into a computer using an RS232 cable when the “collect” button is pushed in the processing GUI. Processing then plots these arrays.
Processing is also used to reset the hand. By pushing the "reset" button in the processing GUI, processing activates an interrupt which tells the hand to reset using the light sensor and run the main code again.
Based on the graphs created in processing, the PD control was effective in controlling the motor. Minor discrepancies occurred consistently at the beginning of each run, and small oscillations can be observed at the end, but the actual position was very close to the reference trajectory throughout most of the motion.
Below is a plot of the planned motion of the butterfly manipulator.
Results
As seen by this youtube video, the butterfly motion was successfully executed. However, a few failure modes exist. Namely:
1) Sliding off the side due to loss of traction. This can be seen here
2) Losing contact with the surface of the butterfly. This can be seen here.
These might be lowered in frequency with finer tuning of the gains or adjustment of the coefficient of friction on either the disc and/or the acrylic butterfly. The future addition of sensing of the disc location could also help counteract many problems causing failure modes.
Next Steps
- Eliminate backlash via gearless motor
- Get more robust H-bridges - The L298N is a less than ideal H-bridge for the Pittman 8224 motor, however it was the closest thing available. In order to increase the amount of current that the H-bridge was capable of supplying to the motor, two H-bridges were connected in series as shown in the circuit diagram.
- Sense position of the disc using copper foil tape and resistive wire
- Implement more sophisticated controller including feedback from the disk
- Test other butterfly shapes with lower or higher curvature
- Test other disc shapes with different center of masses and weights