<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://hades.mech.northwestern.edu//api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BenjaminKolodner</id>
	<title>Mech - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://hades.mech.northwestern.edu//api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BenjaminKolodner"/>
	<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php/Special:Contributions/BenjaminKolodner"/>
	<updated>2026-05-13T17:10:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=ME_333_final_projects&amp;diff=18122</id>
		<title>ME 333 final projects</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=ME_333_final_projects&amp;diff=18122"/>
		<updated>2010-03-19T07:46:15Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Butterfly Rolling Manipulation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;See the &#039;&#039;&#039;[[ME 333 end of course schedule]]&#039;&#039;&#039;.  &lt;br /&gt;
&lt;br /&gt;
Final projects for ME 333 in years 2000-2007 can be found&lt;br /&gt;
&#039;&#039;&#039;[http://lims.mech.northwestern.edu/~design/mechatronics/ here]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ME 333 Final Projects 2010 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== [[Sample Project Title]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Persistence of Vison Display|thumb|150px|Project photo caption.|right]]&lt;br /&gt;
&lt;br /&gt;
You can copy and paste this wiki code to start your wiki page (but don&#039;t erase this code).  Then replace this text with your own.  A few sentences describing what your project does, with a link to a youtube video.  Look at other final project wiki pages for ideas, but see [[ME 333 end of course schedule]] for more information on what should be included on your wiki page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Furuta Pendulum]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Picture 1.png|thumb|150px|Furuta Pendulum|right]]&lt;br /&gt;
&lt;br /&gt;
The Furuta pendulum, so named because it was first developed by Katsuhisa Furuta, is a rotational inverted pendulum.  In other words, the horizontal arm, which rotates in the horizontal plane, drives the movement of the vertical arm, which is free to rotate in the vertical plane.  Out objective was to build a Furuta pendulum that would hold the vertical arm up, as you can see from the [http://www.youtube.com/watch?v=7DtFLKgNUk4 demonstration video].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Music from the Heart -- Music Suit]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Music from the heart overview.jpg|thumb|150px|The &amp;quot;music suit&amp;quot; on James, with heart rate detector on his finger.|right]]&lt;br /&gt;
&lt;br /&gt;
This project attempted to create a natural form of musical expression by connecting sensors to the body. Six tilt switches were attached to the wrist, ankles, and shoulders, each controlling a single pitch from the [http://en.wikipedia.org/wiki/Pentatonic_scale pentatonic scale]. The heart beat was obtained using [http://en.wikipedia.org/wiki/Photoplethysmograph photoplethysmography] on the user&#039;s finger, and this signal was used to strike a drum in sync with the heart beat.&lt;br /&gt;
&lt;br /&gt;
For a video demonstration, click [http://www.youtube.com/watch?v=YyipByy7m6I here].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Conservation of Angular Momentum Locomotion Robot (Fluffbot)]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Isometric view of Fluffbot guts.jpg|thumb|150px|The Fluffbot without Fluff.|right]]&lt;br /&gt;
&lt;br /&gt;
Cute fluffy robot that uses conservation of angular momentum to move forward and backward. The robot&#039;s momentum wheel accelerates in the floor-plane. The robot&#039;s net angular momentum must remain zero-- a steering wheel guides the Fluffbot to accelerate in the opposite direction. This moves the robot forward in a curved path. The momentum wheel and steering wheel then change direction of acceleration. This repeated process moves the Fluffbot forward in a sinusoidal path.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Differential Drive Mobile Robot]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Mobile_Robot_-_Parametric_-_Small.jpg|thumb|150px|Mobile Robot|right]]&lt;br /&gt;
&lt;br /&gt;
The goal of this project was to create a small differential drive mobile robot that would act as a low cost replacement for the popular E-Puck Robot.  The robot uses hybrid stepper motors to allow it to track its position through odometry, has a laser cut acrylic chassis for easy replication and replacement, and a 1500 mAh, 13.2V battery pack for long run time.  The robot also uses the NU32 board for its control logic and a XBee chip for communication.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Ferrofluid Art Display]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Kpmw_Ferrofluid.jpg|thumb|150px|Ferrofluid Art|right]]&lt;br /&gt;
&lt;br /&gt;
The goal of this project was to create an interesting display using Ferrofluid, which forms interesting shapes in the presence of a magnetic field. The display consists of a hexagonal array of 19 solenoids attached to magnets. Depending on the motion of the solenoids, the fluid will either be smooth or show &#039;spikes&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Can Launching Fridge]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:27_Fridge.jpg|thumb|150px|Project photo caption.|right]]&lt;br /&gt;
&lt;br /&gt;
The goal of the can launching fridge was to create a fridge that would, when initiated by either a remote control or a wired push button, automatically load, aim, and fire a can to multiple predetermined locations. The fridge uses a combination of stepper motors, a DC motor, and solenoids to create the ultimate mix of convenience, fun, and refreshment. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[High Speed Motor Control]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:2dofArmSetUp.jpg|thumb|150px|Project photo caption.|right]]&lt;br /&gt;
The project suggested was to design a system for high speed motor control using the PIC 32. To demonstrate the motor control, a two degree of freedom (2-DOF) parallelogram robot arm was designed to follow paths specified in a MATLAB gui.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Variable Frequency Electrosense]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:TR_JP_PP-sensor.jpg|thumb|150px|Variable Frequency Electrosense|right]]&lt;br /&gt;
&lt;br /&gt;
Our objective was to build upon existing research being done at Northwestern utilizing Electrosense technology by testing if information can be derived from varying the emitter frequency. We sought to send sinusoidal waves at discrete frequencies between 100 Hz and 10 kHz and to read in the sensed wave using a PIC 32’s ADC. We then sent the gathered information to a PC for plotting and analysis. By mounting the sensor on a one dimensional linear actuator we are able to gather additional data about objects and perform object detection and identification algorithms. While our initial results have revealed exciting trends, farther research is necessary before any significant conclusions can be made. A [http://www.youtube.com/watch?v=PJY097L2m1M video] of the project is available on YouTube.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Remote Controlled Wiitar]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Wiitar.jpg|thumb|150px|Guitar Controlled by a wiimote: The Wiitar!|right]]&lt;br /&gt;
This project uses an array of solenoids to depress stings on the neck of a guitar.  A motor over the strings of the guitar turns an arm which strums the instrument, playing the chord depressed by the solenoids.  The system is controlled by a Wii Remote.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[6-DOF PPOD]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Jd-cr-Assembly.jpg|thumb|150px|Project photo caption.|right]]&lt;br /&gt;
The PPOD-mini is a miniaturized version of the Programmable Part-feeding Oscillatory Device ([http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm PPOD]) found in the Laboratory for Intelligent Mechanical Systems (LIMS).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Butterfly Rolling Manipulation]] ===&lt;br /&gt;
[[Image:Butterflyteampic.jpg|right|upright=1.3|thumb|Butterfly Manipulator]]&lt;br /&gt;
The Butterfly emulates contact juggling by the stabilization of dynamic rolling.  The apparatus rolls a cylinder by rotating the &amp;quot;hand&amp;quot; using a specific trajectory and is able to move the cylinder from one side to the other without losing contact. Videos of the Butterfly captured in high speed can be found [http://www.youtube.com/watch?v=lgmugtaGoTo here] and [http://www.youtube.com/watch?v=dtYv3qNz_LI here].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Haptic Gaming System]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Haptikos.jpg|thumb|150px|Haptic Robot.|right]]&lt;br /&gt;
&lt;br /&gt;
An interactive gaming system that allows the user to physically feel a virtual world. The player controls the cursor by moving the red joystick. Two games were created to test the feedback system. The first is a side-scroller in which you avoid hitting moving blocks while collecting jewels. The second involves feeling a virtual shape displayed on the screen. This can be made more challenging by turning the display off and attempting to identify the shape.  See our video demonstration on [http://www.youtube.com/watch?v=7j37NCYWHF8 YouTube].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ME 333 Final Projects 2009 ==&lt;br /&gt;
&lt;br /&gt;
=== [[Mozart&#039;s Right Hand]] ===&lt;br /&gt;
[[Image:mrh_box.JPG|thumb|150px|Mozart&#039;s Right Hand|right]]&lt;br /&gt;
Mozart&#039;s Right Hand is a musical instrument capable of playing two full octaves of the [http://en.wikipedia.org/wiki/Diatonic_scale Diatonic Scale.]  The user wears a glove on his right hand and uses motions of the hand and fingers to create different notes that are played with a speaker.  The pitch of the note is controlled by the orientation of the user&#039;s hand as he rotates it ether from the wrist, the elbow, or the shoulder.  The LCD on the front of the box tells the user the pitch that corresponds to his or her current hand orientation.  When the user touches together his thumb and index finger, the speaker plays the tone.  A [http://www.youtube.com/watch?v=vec-W4QeHQU video] of Mozart&#039;s Right Hand in action is available on YouTube.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Chosen the OUTSTANDING PROJECT by the students of ME 333.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Persistence-of-Vision Display]] ===&lt;br /&gt;
[[Image:Persistence of Vison Display|right|thumb|150px]]&lt;br /&gt;
This is a fully customizable display implemented using the concept of Persistence of Vision. User-specified images (and even moving images) were displayed by rotating a column of LEDs at speeds faster than 300rpm. Each individual LED was modeled as a row of pixels. Conversely, the rotational position of the panel of LEDs represented the pixel columns of the display; the time interval and rotational speed determined the width of the pixel columns. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Rock Paper Scissors Machine]] ===&lt;br /&gt;
[[Image:rps whole thing.JPG|thumb|150px|Rock Paper Scissors Machine|right]]&lt;br /&gt;
A machine that will play a fully functioning, intuitive game of [http://en.wikipedia.org/wiki/Rock-paper-scissors Rock/Paper/Scissors] (abbreviated as RPS) with a user. The machine is represented by a human-like hand, capable of seperate and independant wrist, arm, finger and thumb motion. The players&#039; hand goes into a glove equipped with flex sensors, which wirelessly transmits data to the machine based on what the player chose. The machine then reads this data, randomly chooses a throw of its own, and displays what the machine threw, what the human threw, total win/loss/tie info, and winner/loser both on an [http://en.wikipedia.org/wiki/Lcd LCD] screen and in the form of a thumbs up/down/side motion. Video of the machine in action can be found [http://www.youtube.com/watch?v=xbLNBSTTrcE here.]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Three-speaker Chladni Patterns]] ===&lt;br /&gt;
[[Image:chladni_660hz|right|thumb|150px]]&lt;br /&gt;
This project uses three speakers to generate shapes on a circular aluminum plate depending on which frequency the speakers are playing at. Once the speakers hit a resonant frequency of the plate, salt migrates to the nodes (zero amplitude) regions of the plate to form distinct patterns.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Basketball]] ===&lt;br /&gt;
[[Image:Mechatronics2009Bball|right|thumb|150px]]&lt;br /&gt;
This project consists of a throwing arm propelled by a Pittman motor is mounted on a turntable and throws the ball into the &amp;quot;hoop.&amp;quot; The hoop is wrapped in reflective tape and an IR emitter, receiver pair is used to sense where the IR is reflected most (the hoop with highly reflective tape). An ultrasonic sensor then pings the hoop for the distance of the hoop. With this information, the arm is able to &amp;quot;make a basket.&amp;quot; A video can be found [http://www.youtube.com/watch?v=Y466dzP-qiY here].&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Robot Drummer]] ===&lt;br /&gt;
[[Image:Robot_Drummer.jpg|thumb|400pix|right|Robot Drummer]]&lt;br /&gt;
The Robot Drummer is a device that demonstrates high-speed motor control by being able to drum when given commands.  Through an RS232 cable, Matlab sends commands to a &amp;quot;master&amp;quot; PIC.  The master then sends the commands to two &amp;quot;slave&amp;quot; PICs through I2C communication.  The slaves take the commands and implement PID control of the motors.&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Automated Fish Refuge]] ===&lt;br /&gt;
[[Image:Entire Fish Refuge|right|thumb|200px]]&lt;br /&gt;
The automated fish refuge allows for the controlled movement of a fish refuge with the goal of recording specific behavior.  The mechanical design is completely adjustable and allows adjustable degrees of oscillating movement and orientation of the refuge.  The program is primarily in MATLAB for ease of use and the velocity profile can be a sine, square, triangle, or any function that the user inputs. [http://www.youtube.com/watch?v=wGOKujMhN88 Check out the video!]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Marionette]] ===&lt;br /&gt;
[[Image: MarionettePicForIntro.JPG|right|thumb]] The Marionette Project focused on using RC Servos to make a puppet that would do a dance with the press of a button.  There were 5 different dances programmed for the marionette, showcasing different styles of movement.  The movement had 2 degrees of freedom thanks to using 5 bar linkages and 2 RC servos for each arm.  Two more RC Servos were used on the back of the marionette to create the appearance of leg movement.  The movements included a Hula dance, Jumping Jacks, and even some moves right out of Saturday Night Fever.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Monkeybot]] ===&lt;br /&gt;
[[Image:monkeybot_pic|thumb|right|200px|Monkeybot]]&lt;br /&gt;
The monkeybot is a swinging robot capable of moving side to side and climbing.  It consists of a two link, double pendulum system with an electro-magnet on each end.  At the pivot is a DC motor, which provides an input torque and allows the swinging system to gain energy and climb.  Check out the video of the monkeybot climbing [http://www.youtube.com/watch?v=TA2VcH_GDJ0 here] and a later brachiation video [http://www.youtube.com/watch?v=0hfwJEVQyeQ&amp;amp;feature=related here].&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[PPOD-mini:  6-DOF Shaker]] ===&lt;br /&gt;
[[Image:PPOD_mini.JPG|thumb|200x200 px|right|PPOD-mini 6-DOF Shaker]]&lt;br /&gt;
The PPOD-mini is a miniaturized version of the Programmable Part-feeding Oscillatory Device ([http://lims.mech.northwestern.edu/projects/frictioninducedforcefields/index.htm PPOD]) found in the Laboratory for Intelligent Mechanical Systems (LIMS) at Northwestern. The PPOD-mini utilizes six speakers that act like actuators. The speakers are connected to a acrylic plate via flexures of tygon and iron. In its current implementation, the phase of the speakers can be controlled independently, giving the device six degrees of freedom. The movement of objects placed on the acrylic plate can be controlled by changing the phases of the speakers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Automated Xylophone]] ===&lt;br /&gt;
[[Image:AutomatedXylophonePicture1.jpg|thumb|200x200 px|right|Automated Xylophone]]&lt;br /&gt;
The Automated Xylophone controls several solenoids which hit various pitches on an actual xylophone based on the note selected.  The device has two main modes: using the keypad, a user can choose to either play notes in real time or store songs to be played back later.  A video of the Automated Xylophone playing in real time mode can be found [http://www.youtube.com/watch?v=_ubpAEyq9kg here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Vision-based Cannon]] ===&lt;br /&gt;
[[Image:SM_Gun_Camera_PIC_Setup.JPG|thumb|200x200 px|right|Vision-based Cannon]]&lt;br /&gt;
This project uses a webcam and Matlab to analyze an image and direct a modified USB Missile Launcher to fire at targets found in the image.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ME 333 Final Projects 2008 ==&lt;br /&gt;
&lt;br /&gt;
=== [[IR Tracker]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:IR_Tracker_Main.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
The IR Tracker (aka &amp;quot;Spot&amp;quot;) is a device that follows a moving infrared light. It continuously detects the position of an infrared emitter in two axes, and then tracks the emitter with a laser. [[Media:MT_MS_AZ_TrackerVideo.mp4|See Spot Run.]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Chosen the OUTSTANDING PROJECT by the students of ME 333.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Robot Snake]] ===&lt;br /&gt;
[[Image:HLSSnakeMain.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
This remote control robotic snake uses servo motors with a traveling sine wave motion profile to mimic serpentine motion.  The robotic snake is capable of moving forward, left, right and in reverse.   &lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=r_GOOFLnI6w Video of the robot snake]&lt;br /&gt;
&lt;br /&gt;
Featured on [http://blog.makezine.com/archive/2009/03/well_documented_robotic_snake.html Makezine.com].&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Programmable Stiffness Joint]] === &lt;br /&gt;
&lt;br /&gt;
[[Image:SteelToePic2.jpg|thumb|200px|The &#039;Steel Toe&#039; programmable stiffness joint|right]]&lt;br /&gt;
&lt;br /&gt;
The Programmable Stiffness Joint varies rotational stiffness as desired by the user.  It is the first step in modeling the mechanical impedance of the human ankle joint (both stiffness and damping) for the purpose of determining the respective breakdown of the two properties over the gait cycle.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== [[Magnetic based sample purification]] ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== [[Continuously Variable Transmission]] ===&lt;br /&gt;
&lt;br /&gt;
[[image:CVT_system.JPG|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
This prototype is a proof of concept model of a variable ratio transmission to be implemented in the 2008-2009 Formula SAE competition vehicle.  The gear ratio is determined by the distances between the pulley halves which are controllable electronically.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Granular Flow Rotating Sphere]] ===&lt;br /&gt;
[[Image:Team-21-main-picture.JPG|right|thumb|200px]]&lt;br /&gt;
This device will be used to study the granular flow of particles within a rotating sphere. The sphere is filled with grains of varying size and then rotated about two different axes according to a series of position and angular velocity inputs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Vibratory Clock]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Vibratory_Clock.jpg|right|thumb|Vibratory Clock|200px]]&lt;br /&gt;
&lt;br /&gt;
The Vibratory Clock allows a small object to act as an hour &amp;quot;hand&amp;quot; on a horizontal circular platform that is actuated from underneath by three speakers.  The object slides around the circular platform, impelled by friction forces due to the vibration.  [http://www.youtube.com/watch?v=KhgTNCfdwZw Check it out!]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[WiiMouse]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:HPIM1027.jpg|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
The WiiMouse is a handheld remote that can be used to move a cursor on a windows-based PC, via accelerometer input captured through device movement.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Intelligent Oscillation Controller]] ===&lt;br /&gt;
&lt;br /&gt;
[[image:ME333_learning_oscillator.jpg|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
This device &amp;quot;learns&amp;quot; a forcing function that is applied to a spring and mass system to match an arbitrary, periodic acceleration profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Baseball]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Baseball_Playfield.jpg|Sweet Baseball Game|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
An interactive baseball game inspired by pinball, featuring pitching, batting, light up bases and a scoreboard to keep track of the game.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Ball Balancing Challenge]] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Ballbalancechallenge.JPG|right|thumb|200px]]&lt;br /&gt;
&lt;br /&gt;
An interactive game involving ball balancing on a touchscreen with touchscreen feedback and joystick action. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18121</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18121"/>
		<updated>2010-03-19T07:43:21Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Start-Up Procedure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Butterflyteampic.jpg|thumb|500px|Rolling Manipulator|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
[[Image:Butterfly_Exploded_View.jpg|400px|thumb|Exploded CAD model of the butterfly system.|right]]&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 9 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24 x 24 x .236&amp;quot; Acrylic Sheet || 1 || McMaster #8560K224&lt;br /&gt;
|-&lt;br /&gt;
| 1 x 1 x 11.25&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
After the shape was determined, a set of &amp;lt;x,y,z&amp;gt; points was imported directly into Solidworks and a curve through points (Insert--&amp;gt;Curve--&amp;gt;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.&lt;br /&gt;
&lt;br /&gt;
[[Image:Butterfly_shape.jpg|500px|thumb|The resulting butterfly|center]]&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
The butterfly is secured to the motor via a sandwich of:&lt;br /&gt;
&lt;br /&gt;
* A Butterfly&lt;br /&gt;
* Spacer Block with 5-32 Set Screw&lt;br /&gt;
* Another Butterfly&lt;br /&gt;
* Spacer Block with Relief to Dodge Bolt Pattern of Motor&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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&amp;quot; walls, and had nearly zero electrical resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*100k ohm resistor (1)&lt;br /&gt;
*2.21k ohm resistor (1)&lt;br /&gt;
*1k ohm resistor (1)&lt;br /&gt;
*330 ohm resistor (1)&lt;br /&gt;
*100 ohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (4)&lt;br /&gt;
*L298N H-bridge with heat sink&lt;br /&gt;
*1N4003 diodes (4)&lt;br /&gt;
*LS7083 decoder chip&lt;br /&gt;
*QVB11134 Optical Sensor &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Breadboard&lt;br /&gt;
*Solder board&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Start-Up Procedure==&lt;br /&gt;
&lt;br /&gt;
* Turn on PIC32&lt;br /&gt;
* Turn on Power Supply to 24 V &lt;br /&gt;
* Wait for butterfly to trigger optical trigger, then go to horizontal home position&lt;br /&gt;
* Place disc on butterfly on stable equilibrium in center&lt;br /&gt;
* Wait around 5 seconds&lt;br /&gt;
* Enjoy the show!&lt;br /&gt;
* If Processing and RS232 are hooked up, it is possible to read the previous desired vs actual position data, or even reset the trick.&lt;br /&gt;
&lt;br /&gt;
Note:  The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
As seen by this [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related youtube video], we were able to perform the trick.  However, there are a few failure modes, namely:&lt;br /&gt;
&lt;br /&gt;
1)  Sliding off the side due to loss of traction.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m37s here] &amp;lt;br&amp;gt;&lt;br /&gt;
2)  Losing contact with the surface of the butterfly.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m49s here]. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
Rolling of a disc or ball around a butterfly-like shape has never been done in full gravity.  The reliability of the manipulation is around 75% after many hours of tuning.  This is very impressive given the time frame of three to four weeks to complete the project.&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper foil tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18120</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18120"/>
		<updated>2010-03-19T07:43:04Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Start-Up Procedure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Butterflyteampic.jpg|thumb|500px|Rolling Manipulator|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
[[Image:Butterfly_Exploded_View.jpg|400px|thumb|Exploded CAD model of the butterfly system.|right]]&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 9 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24 x 24 x .236&amp;quot; Acrylic Sheet || 1 || McMaster #8560K224&lt;br /&gt;
|-&lt;br /&gt;
| 1 x 1 x 11.25&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
After the shape was determined, a set of &amp;lt;x,y,z&amp;gt; points was imported directly into Solidworks and a curve through points (Insert--&amp;gt;Curve--&amp;gt;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.&lt;br /&gt;
&lt;br /&gt;
[[Image:Butterfly_shape.jpg|500px|thumb|The resulting butterfly|center]]&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
The butterfly is secured to the motor via a sandwich of:&lt;br /&gt;
&lt;br /&gt;
* A Butterfly&lt;br /&gt;
* Spacer Block with 5-32 Set Screw&lt;br /&gt;
* Another Butterfly&lt;br /&gt;
* Spacer Block with Relief to Dodge Bolt Pattern of Motor&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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&amp;quot; walls, and had nearly zero electrical resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*100k ohm resistor (1)&lt;br /&gt;
*2.21k ohm resistor (1)&lt;br /&gt;
*1k ohm resistor (1)&lt;br /&gt;
*330 ohm resistor (1)&lt;br /&gt;
*100 ohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (4)&lt;br /&gt;
*L298N H-bridge with heat sink&lt;br /&gt;
*1N4003 diodes (4)&lt;br /&gt;
*LS7083 decoder chip&lt;br /&gt;
*QVB11134 Optical Sensor &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Breadboard&lt;br /&gt;
*Solder board&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Start-Up Procedure==&lt;br /&gt;
&lt;br /&gt;
* Turn on PIC32&lt;br /&gt;
* Turn on Power Supply to 24 V &lt;br /&gt;
* Wait for butterfly to trigger optical trigger, then go to horizontal home position&lt;br /&gt;
* Place disc on butterfly on stable equilibrium in center&lt;br /&gt;
* Wait around 5 seconds&lt;br /&gt;
* Enjoy the show!&lt;br /&gt;
* If Processing and RS232 are hooked up, it is possible to read the previous desired vs encoder data, or even reset the trick.&lt;br /&gt;
&lt;br /&gt;
Note:  The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
As seen by this [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related youtube video], we were able to perform the trick.  However, there are a few failure modes, namely:&lt;br /&gt;
&lt;br /&gt;
1)  Sliding off the side due to loss of traction.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m37s here] &amp;lt;br&amp;gt;&lt;br /&gt;
2)  Losing contact with the surface of the butterfly.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m49s here]. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
Rolling of a disc or ball around a butterfly-like shape has never been done in full gravity.  The reliability of the manipulation is around 75% after many hours of tuning.  This is very impressive given the time frame of three to four weeks to complete the project.&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper foil tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18117</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18117"/>
		<updated>2010-03-19T07:41:29Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Disc */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Butterflyteampic.jpg|thumb|500px|Rolling Manipulator|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
[[Image:Butterfly_Exploded_View.jpg|400px|thumb|Exploded CAD model of the butterfly system.|right]]&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 9 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24 x 24 x .236&amp;quot; Acrylic Sheet || 1 || McMaster #8560K224&lt;br /&gt;
|-&lt;br /&gt;
| 1 x 1 x 11.25&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
After the shape was determined, a set of &amp;lt;x,y,z&amp;gt; points was imported directly into Solidworks and a curve through points (Insert--&amp;gt;Curve--&amp;gt;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.&lt;br /&gt;
&lt;br /&gt;
[[Image:Butterfly_shape.jpg|500px|thumb|The resulting butterfly|center]]&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
The butterfly is secured to the motor via a sandwich of:&lt;br /&gt;
&lt;br /&gt;
* A Butterfly&lt;br /&gt;
* Spacer Block with 5-32 Set Screw&lt;br /&gt;
* Another Butterfly&lt;br /&gt;
* Spacer Block with Relief to Dodge Bolt Pattern of Motor&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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&amp;quot; walls, and had nearly zero electrical resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*100k ohm resistor (1)&lt;br /&gt;
*2.21k ohm resistor (1)&lt;br /&gt;
*1k ohm resistor (1)&lt;br /&gt;
*330 ohm resistor (1)&lt;br /&gt;
*100 ohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (4)&lt;br /&gt;
*L298N H-bridge with heat sink&lt;br /&gt;
*1N4003 diodes (4)&lt;br /&gt;
*LS7083 decoder chip&lt;br /&gt;
*QVB11134 Optical Sensor &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Breadboard&lt;br /&gt;
*Solder board&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Start-Up Procedure==&lt;br /&gt;
&lt;br /&gt;
* Turn on PIC32&lt;br /&gt;
* Turn on Power Supply to 24 V &lt;br /&gt;
* Wait for butterfly to trigger optical trigger, then go to horizontal home position&lt;br /&gt;
* Place disc on butterfly on stable equilibrium in center&lt;br /&gt;
* Wait around 5 seconds&lt;br /&gt;
* Enjoy the show!&lt;br /&gt;
&lt;br /&gt;
Note:  The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
As seen by this [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related youtube video], we were able to perform the trick.  However, there are a few failure modes, namely:&lt;br /&gt;
&lt;br /&gt;
1)  Sliding off the side due to loss of traction.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m37s here] &amp;lt;br&amp;gt;&lt;br /&gt;
2)  Losing contact with the surface of the butterfly.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m49s here]. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
Rolling of a disc or ball around a butterfly-like shape has never been done in full gravity.  The reliability of the manipulation is around 75% after many hours of tuning.  This is very impressive given the time frame of three to four weeks to complete the project.&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper foil tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18112</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18112"/>
		<updated>2010-03-19T07:38:08Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Circuit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Butterflyteampic.jpg|thumb|500px|Rolling Manipulator|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
[[Image:Butterfly_Exploded_View.jpg|400px|thumb|Exploded CAD model of the butterfly system.|right]]&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 9 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24 x 24 x .236&amp;quot; Acrylic Sheet || 1 || McMaster #8560K224&lt;br /&gt;
|-&lt;br /&gt;
| 1 x 1 x 11.25&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
After the shape was determined, a set of &amp;lt;x,y,z&amp;gt; points was imported directly into Solidworks and a curve through points (Insert--&amp;gt;Curve--&amp;gt;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.&lt;br /&gt;
&lt;br /&gt;
[[Image:Butterfly_shape.jpg|500px|thumb|The resulting butterfly|center]]&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
The butterfly is secured to the motor via a sandwich of:&lt;br /&gt;
&lt;br /&gt;
* A Butterfly&lt;br /&gt;
* Spacer Block with 5-32 Set Screw&lt;br /&gt;
* Another Butterfly&lt;br /&gt;
* Spacer Block with Relief to Dodge Bolt Pattern of Motor&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero electrical resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*100k ohm resistor (1)&lt;br /&gt;
*2.21k ohm resistor (1)&lt;br /&gt;
*1k ohm resistor (1)&lt;br /&gt;
*330 ohm resistor (1)&lt;br /&gt;
*100 ohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (4)&lt;br /&gt;
*L298N H-bridge with heat sink&lt;br /&gt;
*1N4003 diodes (4)&lt;br /&gt;
*LS7083 decoder chip&lt;br /&gt;
*QVB11134 Optical Sensor &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Breadboard&lt;br /&gt;
*Solder board&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==Start-Up Procedure==&lt;br /&gt;
&lt;br /&gt;
* Turn on PIC32&lt;br /&gt;
* Turn on Power Supply to 24 V &lt;br /&gt;
* Wait for butterfly to trigger optical trigger, then go to horizontal home position&lt;br /&gt;
* Place disc on butterfly on stable equilibrium in center&lt;br /&gt;
* Wait around 5 seconds&lt;br /&gt;
* Enjoy the show!&lt;br /&gt;
&lt;br /&gt;
Note:  The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
As seen by this [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related youtube video], we were able to perform the trick.  However, there are a few failure modes, namely:&lt;br /&gt;
&lt;br /&gt;
1)  Sliding off the side due to loss of traction.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m37s here] &amp;lt;br&amp;gt;&lt;br /&gt;
2)  Losing contact with the surface of the butterfly.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m49s here]. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
Rolling of a disc or ball around a butterfly-like shape has never been done in full gravity.  The reliability of the manipulation is around 75% after many hours of tuning.  This is very impressive given the time frame of three to four weeks to complete the project.&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper foil tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18106</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18106"/>
		<updated>2010-03-19T07:31:45Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Next Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Butterflyteampic.jpg|thumb|500px|Rolling Manipulator|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
[[Image:Butterfly_Exploded_View.jpg|400px|thumb|Exploded CAD model of the butterfly system.|right]]&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 9 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24 x 24 x .236&amp;quot; Acrylic Sheet || 1 || McMaster #8560K224&lt;br /&gt;
|-&lt;br /&gt;
| 1 x 1 x 11.25&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
After the shape was determined, a set of &amp;lt;x,y,z&amp;gt; points was imported directly into Solidworks and a curve through points (Insert--&amp;gt;Curve--&amp;gt;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.&lt;br /&gt;
&lt;br /&gt;
[[Image:Butterfly_shape.jpg|500px|thumb|The resulting butterfly|center]]&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
The butterfly is secured to the motor via a sandwich of:&lt;br /&gt;
&lt;br /&gt;
* A Butterfly&lt;br /&gt;
* Spacer Block with 5-32 Set Screw&lt;br /&gt;
* Another Butterfly&lt;br /&gt;
* Spacer Block with Relief to Dodge Bolt Pattern of Motor&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero electrical resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*100k ohm resistor (1)&lt;br /&gt;
*2.21k ohm resistor (1)&lt;br /&gt;
*1k ohm resistor (1)&lt;br /&gt;
*330 ohm resistor (1)&lt;br /&gt;
*100 ohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (4)&lt;br /&gt;
*L298N H-bridge with heat sink&lt;br /&gt;
*1N4003 diodes (4)&lt;br /&gt;
*LS7083 decoder chip&lt;br /&gt;
*QVB11134 Optical Sensor &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Breadboard&lt;br /&gt;
*Solder board&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
As seen by this [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related youtube video], we were able to perform the trick.  However, there are a few failure modes, namely:&lt;br /&gt;
&lt;br /&gt;
1)  Sliding off the side due to loss of traction.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m37s here] &amp;lt;br&amp;gt;&lt;br /&gt;
2)  Losing contact with the surface of the butterfly.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m49s here]. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
Rolling of a disc or ball around a butterfly-like shape has never been done in full gravity.  The reliability of the manipulation is around 75% after many hours of tuning.  This is very impressive given the time frame of three to four weeks to complete the project.&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper foil tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18105</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18105"/>
		<updated>2010-03-19T07:31:28Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Butterflyteampic.jpg|thumb|500px|Rolling Manipulator|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
[[Image:Butterfly_Exploded_View.jpg|400px|thumb|Exploded CAD model of the butterfly system.|right]]&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 9 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24 x 24 x .236&amp;quot; Acrylic Sheet || 1 || McMaster #8560K224&lt;br /&gt;
|-&lt;br /&gt;
| 1 x 1 x 11.25&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
After the shape was determined, a set of &amp;lt;x,y,z&amp;gt; points was imported directly into Solidworks and a curve through points (Insert--&amp;gt;Curve--&amp;gt;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.&lt;br /&gt;
&lt;br /&gt;
[[Image:Butterfly_shape.jpg|500px|thumb|The resulting butterfly|center]]&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
The butterfly is secured to the motor via a sandwich of:&lt;br /&gt;
&lt;br /&gt;
* A Butterfly&lt;br /&gt;
* Spacer Block with 5-32 Set Screw&lt;br /&gt;
* Another Butterfly&lt;br /&gt;
* Spacer Block with Relief to Dodge Bolt Pattern of Motor&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero electrical resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*100k ohm resistor (1)&lt;br /&gt;
*2.21k ohm resistor (1)&lt;br /&gt;
*1k ohm resistor (1)&lt;br /&gt;
*330 ohm resistor (1)&lt;br /&gt;
*100 ohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (4)&lt;br /&gt;
*L298N H-bridge with heat sink&lt;br /&gt;
*1N4003 diodes (4)&lt;br /&gt;
*LS7083 decoder chip&lt;br /&gt;
*QVB11134 Optical Sensor &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Breadboard&lt;br /&gt;
*Solder board&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
As seen by this [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related youtube video], we were able to perform the trick.  However, there are a few failure modes, namely:&lt;br /&gt;
&lt;br /&gt;
1)  Sliding off the side due to loss of traction.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m37s here] &amp;lt;br&amp;gt;&lt;br /&gt;
2)  Losing contact with the surface of the butterfly.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m49s here]. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
Rolling of a disc or ball around a butterfly-like shape has never been done in full gravity.  The reliability of the manipulation is around 75% after many hours of tuning.  This is very impressive given the time frame of three to four weeks to complete the project.&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18104</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18104"/>
		<updated>2010-03-19T07:30:18Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Bill of Materials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Butterflyteampic.jpg|thumb|500px|Rolling Manipulator|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
[[Image:Butterfly_Exploded_View.jpg|400px|thumb|Exploded CAD model of the butterfly system.|right]]&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 9 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24 x 24 x .236&amp;quot; Acrylic Sheet || 1 || McMaster #8560K224&lt;br /&gt;
|-&lt;br /&gt;
| 1 x 1 x 11.25&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
After the shape was determined, a set of &amp;lt;x,y,z&amp;gt; points was imported directly into Solidworks and a curve through points (Insert--&amp;gt;Curve--&amp;gt;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.&lt;br /&gt;
&lt;br /&gt;
[[Image:Butterfly_shape.jpg|500px|thumb|The resulting butterfly|center]]&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
The butterfly is secured to the motor via a sandwich of:&lt;br /&gt;
&lt;br /&gt;
* A Butterfly&lt;br /&gt;
* Spacer Block with 5-32 Set Screw&lt;br /&gt;
* Another Butterfly&lt;br /&gt;
* Spacer Block with Relief to Dodge Bolt Pattern of Motor&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero electrical resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*100k ohm resistor (1)&lt;br /&gt;
*2.21k ohm resistor (1)&lt;br /&gt;
*1k ohm resistor (1)&lt;br /&gt;
*330 ohm resistor (1)&lt;br /&gt;
*100 ohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (4)&lt;br /&gt;
*L298N H-bridge with heat sink&lt;br /&gt;
*1N4003 diodes (4)&lt;br /&gt;
*LS7083 decoder chip&lt;br /&gt;
*QVB11134 Optical Sensor &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Breadboard&lt;br /&gt;
*Solder board&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
As seen by this [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related youtube video], we were able to perform the trick.  However, there are a few failure modes, namely:&lt;br /&gt;
&lt;br /&gt;
1)  Sliding off the side due to loss of traction.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m37s here] &amp;lt;br&amp;gt;&lt;br /&gt;
2)  Loosing contact with the surface of the butterfly.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m49s here]. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
Rolling of a disc or ball around a butterfly-like shape has never been done in full gravity.  The reliability of the manipulation is around 75% after many hours of tuning.  This is very impressive given the time frame of three to four weeks to complete the project.&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18073</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18073"/>
		<updated>2010-03-19T07:00:25Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Disc */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Butterflyteampic.jpg|thumb|500px|Rolling Manipulator|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
[[Image:Butterfly_Exploded_View.jpg|400px|thumb|Exploded CAD model of the butterfly system.|right]]&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 9 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24 x 24 x .236&amp;quot; Acrylic Sheet || 1 || McMaster #8560K224&lt;br /&gt;
|-&lt;br /&gt;
| 1 x 1 x 11.25&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
After the shape was determined, a set of &amp;lt;x,y,z&amp;gt; points was imported directly into Solidworks and a curve through points (Insert--&amp;gt;Curve--&amp;gt;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.&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
The butterfly is secured to the motor via a sandwich of:&lt;br /&gt;
&lt;br /&gt;
* A Butterfly&lt;br /&gt;
* Spacer Block with 5-32 Set Screw&lt;br /&gt;
* Another Butterfly&lt;br /&gt;
* Spacer Block with Relief to Dodge Bolt Pattern of Motor&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero electrical resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*Optical Interrupter &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
As seen by this [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related youtube video], we were able to perform the trick.  However, there are a few failure modes, namely:&lt;br /&gt;
&lt;br /&gt;
1)  Sliding off the side due to loss of traction.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m37s here] &amp;lt;br&amp;gt;&lt;br /&gt;
2)  Loosing contact with the surface of the butterfly.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m49s here]. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
Rolling of a disc or ball around a butterfly-like shape has never been done in full gravity.  The reliability of the manipulation is around 75% after many hours of tuning.  This is very impressive given the time frame of three to four weeks to complete the project.&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18072</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18072"/>
		<updated>2010-03-19T06:58:39Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Mount */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Butterflyteampic.jpg|thumb|500px|Rolling Manipulator|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
[[Image:Butterfly_Exploded_View.jpg|400px|thumb|Exploded CAD model of the butterfly system.|right]]&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 9 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24 x 24 x .236&amp;quot; Acrylic Sheet || 1 || McMaster #8560K224&lt;br /&gt;
|-&lt;br /&gt;
| 1 x 1 x 11.25&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
After the shape was determined, a set of &amp;lt;x,y,z&amp;gt; points was imported directly into Solidworks and a curve through points (Insert--&amp;gt;Curve--&amp;gt;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.&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
The butterfly is secured to the motor via a sandwich of:&lt;br /&gt;
&lt;br /&gt;
* A Butterfly&lt;br /&gt;
* Spacer Block with 5-32 Set Screw&lt;br /&gt;
* Another Butterfly&lt;br /&gt;
* Spacer Block with Relief to Dodge Bolt Pattern of Motor&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*Optical Interrupter &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
As seen by this [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related youtube video], we were able to perform the trick.  However, there are a few failure modes, namely:&lt;br /&gt;
&lt;br /&gt;
1)  Sliding off the side due to loss of traction.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m37s here] &amp;lt;br&amp;gt;&lt;br /&gt;
2)  Loosing contact with the surface of the butterfly.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m49s here]. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
Rolling of a disc or ball around a butterfly-like shape has never been done in full gravity.  The reliability of the manipulation is around 75% after many hours of tuning.  This is very impressive given the time frame of three to four weeks to complete the project.&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18071</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18071"/>
		<updated>2010-03-19T06:57:56Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Mount */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Butterflyteampic.jpg|thumb|500px|Rolling Manipulator|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
[[Image:Butterfly_Exploded_View.jpg|400px|thumb|Exploded CAD model of the butterfly system.|right]]&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 9 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24 x 24 x .236&amp;quot; Acrylic Sheet || 1 || McMaster #8560K224&lt;br /&gt;
|-&lt;br /&gt;
| 1 x 1 x 11.25&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
After the shape was determined, a set of &amp;lt;x,y,z&amp;gt; points was imported directly into Solidworks and a curve through points (Insert--&amp;gt;Curve--&amp;gt;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.&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
The butterfly is secured to the motor via a sandwich of:&lt;br /&gt;
&lt;br /&gt;
* A Butterfly&lt;br /&gt;
* Spacer Block&lt;br /&gt;
* Another Butterfly&lt;br /&gt;
* Spacer Block with 5-32 Set Screw&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*Optical Interrupter &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
As seen by this [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related youtube video], we were able to perform the trick.  However, there are a few failure modes, namely:&lt;br /&gt;
&lt;br /&gt;
1)  Sliding off the side due to loss of traction.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m37s here] &amp;lt;br&amp;gt;&lt;br /&gt;
2)  Loosing contact with the surface of the butterfly.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m49s here]. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
Rolling of a disc or ball around a butterfly-like shape has never been done in full gravity.  The reliability of the manipulation is around 75% after many hours of tuning.  This is very impressive given the time frame of three to four weeks to complete the project.&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18065</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18065"/>
		<updated>2010-03-19T06:49:48Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Mount */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Butterflyteampic.jpg|thumb|500px|Rolling Manipulator|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
[[Image:Butterfly_Exploded_View.jpg|400px|thumb|Exploded CAD model of the butterfly system.|right]]&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 9 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24 x 24 x .236&amp;quot; Acrylic Sheet || 1 || McMaster #8560K224&lt;br /&gt;
|-&lt;br /&gt;
| 1 x 1 x 11.25&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
The shape was determined using a matlab code from Fabio, A PH.D student in the LIMS lab at Northwestern University.  The code manipulates a set of parametric equations to give a continuous curvature set of points.  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 we chose had values around: X X X X and is shown to look like:  IMG&lt;br /&gt;
&lt;br /&gt;
After the shape was decided, we output the set of &amp;lt;x,y,z&amp;gt; points to Solidworks design software and created a curve through points (Insert--&amp;gt;Curve--&amp;gt;Through XYZ Points).  From there, we light weighted the part and placed four holes for mounting and a through hole for the motor shaft.  Two of these butterflies were made using the laser cutter in the shop.   Since the laser cutter and the MATLAB code produced some jagged edges on the part, we carefully sanded the edge of the butterfly to decrease any hills and valleys present on the shape.  Microbumps can cause discontinuities in sensing and in actuation of the motor.&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*Optical Interrupter &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
As seen by this [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related youtube video], we were able to perform the trick.  However, there are a few failure modes, namely:&lt;br /&gt;
&lt;br /&gt;
1)  Sliding off the side due to loss of traction.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m37s here] &amp;lt;br&amp;gt;&lt;br /&gt;
2)  Loosing contact with the surface of the butterfly.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m49s here]. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
Rolling of a disc or ball around a butterfly-like shape has never been done in full gravity.  The reliability of the manipulation is around 75% after many hours of tuning.  This is very impressive given the time frame of three to four weeks to complete the project.&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18064</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18064"/>
		<updated>2010-03-19T06:44:05Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Mount */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Butterflyteampic.jpg|thumb|500px|Rolling Manipulator|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
[[Image:Butterfly_Exploded_View.jpg|400px|thumb|Exploded CAD model of the butterfly system.|right]]&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 9 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24 x 24 x .236&amp;quot; Acrylic Sheet || 1 || McMaster #8560K224&lt;br /&gt;
|-&lt;br /&gt;
| 1 x 1 x 11.25&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
The shape was determined using a matlab code from Fabio, A PH.D student in the LIMS lab at Northwestern University.  The code manipulates a set of parametric equations to give a continuous curvature set of points.  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 we chose had values around: X X X X and is shown to look like:  IMG&lt;br /&gt;
&lt;br /&gt;
After the shape was decided, we output the set of &amp;lt;x,y,z&amp;gt; points to Solidworks design software and created a curve through points (Insert--&amp;gt;Curve--&amp;gt;Through XYZ Points).  From there, we light weighted the part and placed four holes for mounting and a through hole for the motor shaft.  Two of these butterflies were made using the laser cutter in the shop.   Since the laser cutter and the MATLAB code produced some jagged edges on the part, we carefully sanded the edge of the butterfly to decrease any hills and valleys present on the shape.  Microbumps can cause discontinuities in sensing and in actuation of the motor.&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*Optical Interrupter &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
As seen by this [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related youtube video], we were able to perform the trick.  However, there are a few failure modes, namely:&lt;br /&gt;
&lt;br /&gt;
1)  Sliding off the side due to loss of traction.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m37s here] &amp;lt;br&amp;gt;&lt;br /&gt;
2)  Loosing contact with the surface of the butterfly.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m49s here]. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
Rolling of a disc or ball around a butterfly-like shape has never been done in full gravity.  The reliability of the manipulation is around 75% after many hours of tuning.  This is very impressive given the time frame of three to four weeks to complete the project.&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18063</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18063"/>
		<updated>2010-03-19T06:42:07Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Butterflyteampic.jpg|thumb|500px|Rolling Manipulator|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
[[Image:Butterfly_Exploded_View.jpg|400px|thumb|Exploded CAD model of the butterfly system.|right]]&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 9 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24 x 24 x .236&amp;quot; Acrylic Sheet || 1 || McMaster #8560K224&lt;br /&gt;
|-&lt;br /&gt;
| 1 x 1 x 11.25&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
The shape was determined using a matlab code from Fabio, A PH.D student in the LIMS lab at Northwestern University.  The code manipulates a set of parametric equations to give a continuous curvature set of points.  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 we chose had values around: X X X X and is shown to look like:  IMG&lt;br /&gt;
&lt;br /&gt;
After the shape was decided, we output the set of &amp;lt;x,y,z&amp;gt; points to Solidworks design software and created a curve through points (Insert--&amp;gt;Curve--&amp;gt;Through XYZ Points).  From there, we light weighted the part and placed four holes for mounting and a through hole for the motor shaft.  Two of these butterflies were made using the laser cutter in the shop.   Since the laser cutter and the MATLAB code produced some jagged edges on the part, we carefully sanded the edge of the butterfly to decrease any hills and valleys present on the shape.  Microbumps can cause discontinuities in sensing and in actuation of the motor.&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*Optical Interrupter &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
As seen by this [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related youtube video], we were able to perform the trick.  However, there are a few failure modes, namely:&lt;br /&gt;
&lt;br /&gt;
1)  Sliding off the side due to loss of traction.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m37s here] &amp;lt;br&amp;gt;&lt;br /&gt;
2)  Loosing contact with the surface of the butterfly.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m49s here]. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
Rolling of a disc or ball around a butterfly-like shape has never been done in full gravity.  The reliability of the manipulation is around 75% after many hours of tuning.  This is very impressive given the time frame of three to four weeks to complete the project.&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18062</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18062"/>
		<updated>2010-03-19T06:38:02Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Hand: Butterfly Shape */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Butterflyteampic.jpg|thumb|500px|At the Mechatronics Fair|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
[[Image:Butterfly_Exploded_View.jpg|400px|thumb|Exploded CAD model of the butterfly system.|right]]&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 9 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24 x 24 x .236&amp;quot; Acrylic Sheet || 1 || McMaster #8560K224&lt;br /&gt;
|-&lt;br /&gt;
| 1 x 1 x 11.25&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
The shape was determined using a matlab code from Fabio, A PH.D student in the LIMS lab at Northwestern University.  The code manipulates a set of parametric equations to give a continuous curvature set of points.  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 we chose had values around: X X X X and is shown to look like:  IMG&lt;br /&gt;
&lt;br /&gt;
After the shape was decided, we output the set of &amp;lt;x,y,z&amp;gt; points to Solidworks design software and created a curve through points (Insert--&amp;gt;Curve--&amp;gt;Through XYZ Points).  From there, we light weighted the part and placed four holes for mounting and a through hole for the motor shaft.  Two of these butterflies were made using the laser cutter in the shop.   Since the laser cutter and the MATLAB code produced some jagged edges on the part, we carefully sanded the edge of the butterfly to decrease any hills and valleys present on the shape.  Microbumps can cause discontinuities in sensing and in actuation of the motor.&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*Optical Interrupter &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
As seen by this [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related youtube video], we were able to perform the trick.  However, there are a few failure modes, namely:&lt;br /&gt;
&lt;br /&gt;
1)  Sliding off the side due to loss of traction.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m37s here] &amp;lt;br&amp;gt;&lt;br /&gt;
2)  Loosing contact with the surface of the butterfly.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m49s here]. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
Rolling of a disc or ball around a butterfly-like shape has never been done in full gravity.  The reliability of the manipulation is around 75% after many hours of tuning.  This is very impressive given the time frame of three to four weeks to complete the project.&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18059</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18059"/>
		<updated>2010-03-19T06:34:56Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Butterflyteampic.jpg|thumb|500px|At the Mechatronics Fair|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
[[Image:Butterfly_Exploded_View.jpg|400px|thumb|Exploded CAD model of the butterfly system.|right]]&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 10 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24 x 24 x .236&amp;quot; Acrylic Sheet || 1 || McMaster #8560K224&lt;br /&gt;
|-&lt;br /&gt;
| 1 x 1 x 10&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 1/4&amp;quot; x .0035&amp;quot; x 6 yards  &amp;lt;br&amp;gt; Copper Foil Tape || 1 || McMaster #76555A711&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
The shape was determined using a matlab code from Fabio, A PH.D student in the LIMS lab at Northwestern University.  The code manipulates a set of parametric equations to give a continuous curvature set of points.  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 we chose had values around: X X X X and is shown to look like:  IMG&lt;br /&gt;
&lt;br /&gt;
After the shape was decided, we output the set of &amp;lt;x,y,z&amp;gt; points to Solidworks design software and created a curve through points (Insert--&amp;gt;Curve--&amp;gt;Through XYZ Points).  From there, we light weighted the part and placed four holes for mounting and a through hole for the motor shaft.  Two of these butterflies were made using the laser cutter in the shop.   Since the laser cutter and the MATLAB code produced some jagged edges on the part, we then carefully sanded the edge of the butterfly to decrease any hills and valleys present on the shape.  Microbumps can cause discontinuities in sensing and in actuation of the motor.&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*Optical Interrupter &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
As seen by this [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related youtube video], we were able to perform the trick.  However, there are a few failure modes, namely:&lt;br /&gt;
&lt;br /&gt;
1)  Sliding off the side due to loss of traction.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m37s here] &amp;lt;br&amp;gt;&lt;br /&gt;
2)  Loosing contact with the surface of the butterfly.  This can be seen [http://www.youtube.com/watch?v=lgmugtaGoTo&amp;amp;feature=related#t=00m49s here]. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
Rolling of a disc or ball around a butterfly-like shape has never been done in full gravity.  The reliability of the manipulation is around 75% after many hours of tuning.  This is very impressive given the time frame of three to four weeks to complete the project.&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18049</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18049"/>
		<updated>2010-03-19T06:13:15Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Disc */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Butterflyteampic.jpg|thumb|500px|At the Mechatronics Fair|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 behavior for the purposes of nonprehensile manipulation. Prior research on the subject of contact juggling, including a &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
The CAD of the entire system can be found HERE:&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 10 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24 x 24 x .236&amp;quot; Acrylic Sheet || 1 || McMaster #8560K224&lt;br /&gt;
|-&lt;br /&gt;
| 1 x 1 x 10&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 1/4&amp;quot; x .0035&amp;quot; x 6 yards  &amp;lt;br&amp;gt; Copper Foil Tape || 1 || McMaster #76555A711&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
The shape was determined using a matlab code from Fabio, A PH.D student in the LIMS lab at Northwestern University.  The code manipulates a set of parametric equations to give a continuous curvature set of points.  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 we chose had values around: X X X X and is shown to look like:  IMG&lt;br /&gt;
&lt;br /&gt;
After the shape was decided, we output the set of &amp;lt;x,y,z&amp;gt; points to Solidworks design software and created a curve through points (Insert--&amp;gt;Curve--&amp;gt;Through XYZ Points).  From there, we light weighted the part and placed four holes for mounting and a through hole for the motor shaft.  Two of these butterflies were made using the laser cutter in the shop.   Since the laser cutter and the MATLAB code produced some jagged edges on the part, we then carefully sanded the edge of the butterfly to decrease any hills and valleys present on the shape.  Microbumps can cause discontinuities in sensing and in actuation of the motor.&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*Optical Interrupter &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18043</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18043"/>
		<updated>2010-03-19T06:09:58Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Bill of Materials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:group_with_butterfly.jpg|thumb|500px|At the Mechatronics Fair|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 behavior for the purposes of nonprehensile manipulation. Prior research on the subject of contact juggling, including a &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
The CAD of the entire system can be found HERE:&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 10 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24 x 24 x .236&amp;quot; Acrylic Sheet || 1 || McMaster #8560K224&lt;br /&gt;
|-&lt;br /&gt;
| 1 x 1 x 10&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 1/4&amp;quot; x .0035&amp;quot; x 6 yards  &amp;lt;br&amp;gt; Copper Foil Tape || 1 || McMaster #76555A711&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
The shape was determined using a matlab code from Fabio, A PH.D student in the LIMS lab at Northwestern University.  The code manipulates a set of parametric equations to give a continuous curvature set of points.  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 we chose had values around: X X X X and is shown to look like:  IMG&lt;br /&gt;
&lt;br /&gt;
After the shape was decided, we output the set of &amp;lt;x,y,z&amp;gt; points to Solidworks design software and created a curve through points (Insert--&amp;gt;Curve--&amp;gt;Through XYZ Points).  From there, we light weighted the part and placed four holes for mounting and a through hole for the motor shaft.  Two of these butterflies were made using the laser cutter in the shop.   Since the laser cutter and the MATLAB code produced some jagged edges on the part, we then carefully sanded the edge of the butterfly to decrease any hills and valleys present on the shape.  Microbumps can cause discontinuities in sensing and in actuation of the motor.&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*Optical Interrupter &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18034</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=18034"/>
		<updated>2010-03-19T06:06:02Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Bill of Materials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:group_with_butterfly.jpg|thumb|500px|At the Mechatronics Fair|right]]&lt;br /&gt;
=Overview=&lt;br /&gt;
The goal of the rolling manipulation project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; 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 behavior for the purposes of nonprehensile manipulation. Prior research on the subject of contact juggling, including a &lt;br /&gt;
[[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. &lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
The CAD of the entire system can be found HERE:&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 4-40 Thread  || 10 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Socket Head Screw -- 6-32 Thread || 20 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 6-32 Thread || 8 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Nut -- 4-40 Thread || 6 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| Set screw -- 5-40 Thread || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
| 24x24x.236&amp;quot; Acrylic Sheet || 1 || McMaster&lt;br /&gt;
|-&lt;br /&gt;
| 1x1x10&amp;quot; 6061 Al || 1 || Shop&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
The shape was determined using a matlab code from Fabio, A PH.D student in the LIMS lab at Northwestern University.  The code manipulates a set of parametric equations to give a continuous curvature set of points.  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 we chose had values around: X X X X and is shown to look like:  IMG&lt;br /&gt;
&lt;br /&gt;
After the shape was decided, we output the set of &amp;lt;x,y,z&amp;gt; points to Solidworks design software and created a curve through points (Insert--&amp;gt;Curve--&amp;gt;Through XYZ Points).  From there, we light weighted the part and placed four holes for mounting and a through hole for the motor shaft.  Two of these butterflies were made using the laser cutter in the shop.   Since the laser cutter and the MATLAB code produced some jagged edges on the part, we then carefully sanded the edge of the butterfly to decrease any hills and valleys present on the shape.  Microbumps can cause discontinuities in sensing and in actuation of the motor.&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*Optical Interrupter &lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17971</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17971"/>
		<updated>2010-03-19T05:21:11Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Bill of Materials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
The CAD of the entire system can be found HERE:&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot; | Item&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Number&lt;br /&gt;
!! style=&amp;quot;background:#efefef;&amp;quot; | Supplier&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || Brake&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || Forward&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || Reverse&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || Brake&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
The shape was determined using a matlab code from Fabio, A PH.D student in the LIMS lab at Northwestern University.  The code manipulates a set of parametric equations to give a continuous curvature set of points.  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 we chose had values around: X X X X and is shown to look like:  IMG&lt;br /&gt;
&lt;br /&gt;
After the shape was decided, we output the set of &amp;lt;x,y,z&amp;gt; points to Solidworks design software and created a curve through points (Insert--&amp;gt;Curve--&amp;gt;Through XYZ Points).  From there, we light weighted the part and placed four holes for mounting and a through hole for the motor shaft.  Two of these butterflies were made using the laser cutter in the shop.   Since the laser cutter and the MATLAB code produced some jagged edges on the part, we then carefully sanded the edge of the butterfly to decrease any hills and valleys present on the shape.  Microbumps can cause discontinuities in sensing and in actuation of the motor.&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17960</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17960"/>
		<updated>2010-03-19T04:47:51Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
The CAD of the entire system can be found HERE:&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
The shape was determined using a matlab code from Fabio, A PH.D student in the LIMS lab at Northwestern University.  The code manipulates a set of parametric equations to give a continuous curvature set of points.  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 we chose had values around: X X X X and is shown to look like:  IMG&lt;br /&gt;
&lt;br /&gt;
After the shape was decided, we output the set of &amp;lt;x,y,z&amp;gt; points to Solidworks design software and created a curve through points (Insert--&amp;gt;Curve--&amp;gt;Through XYZ Points).  From there, we light weighted the part and placed four holes for mounting and a through hole for the motor shaft.  Two of these butterflies were made using the laser cutter in the shop.   Since the laser cutter and the MATLAB code produced some jagged edges on the part, we then carefully sanded the edge of the butterfly to decrease any hills and valleys present on the shape.  Microbumps can cause discontinuities in sensing and in actuation of the motor.&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 and inertia of the system mass, but the actual position was very close to the reference trajectory a majority of the time.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17954</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17954"/>
		<updated>2010-03-19T04:37:08Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Mechanical Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
The CAD of the entire system can be found HERE:&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
The shape was determined using a matlab code from Fabio, A PH.D student in the LIMS lab at Northwestern University.  The code manipulates a set of parametric equations to give a continuous curvature set of points.  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 we chose had values around: X X X X and is shown to look like:  IMG&lt;br /&gt;
&lt;br /&gt;
After the shape was decided, we output the set of &amp;lt;x,y,z&amp;gt; points to Solidworks design software and created a curve through points (Insert--&amp;gt;Curve--&amp;gt;Through XYZ Points).  From there, we light weighted the part and placed four holes for mounting and a through hole for the motor shaft.  Two of these butterflies were made using the laser cutter in the shop.   Since the laser cutter and the MATLAB code produced some jagged edges on the part, we then carefully sanded the edge of the butterfly to decrease any hills and valleys present on the shape.  Microbumps can cause discontinuities in sensing and in actuation of the motor.&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17952</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17952"/>
		<updated>2010-03-19T04:36:44Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Hand: Butterfly Shape */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
The shape was determined using a matlab code from Fabio, A PH.D student in the LIMS lab at Northwestern University.  The code manipulates a set of parametric equations to give a continuous curvature set of points.  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 we chose had values around: X X X X and is shown to look like:  IMG&lt;br /&gt;
&lt;br /&gt;
After the shape was decided, we output the set of &amp;lt;x,y,z&amp;gt; points to Solidworks design software and created a curve through points (Insert--&amp;gt;Curve--&amp;gt;Through XYZ Points).  From there, we light weighted the part and placed four holes for mounting and a through hole for the motor shaft.  Two of these butterflies were made using the laser cutter in the shop.   Since the laser cutter and the MATLAB code produced some jagged edges on the part, we then carefully sanded the edge of the butterfly to decrease any hills and valleys present on the shape.  Microbumps can cause discontinuities in sensing and in actuation of the motor.&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17947</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17947"/>
		<updated>2010-03-19T04:26:47Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Hand:Butterfly Shape */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand: Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
The shape was determined using a matlab code from Fabio, A PH.D student in the LIMS lab at Northwestern University.  The code manipulates a set of parametric equations to give a continuous curvature set of points.  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 we chose had values around: X X X X and is shown to look like:  IMG&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17941</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17941"/>
		<updated>2010-03-19T04:12:25Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Roller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Disc==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17925</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17925"/>
		<updated>2010-03-19T03:25:46Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Circuit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Roller==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main electrical components are a motor, optical interrupter, h-bridge, and LCD.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17924</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17924"/>
		<updated>2010-03-19T03:24:22Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* H-bridge disclaimer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Roller==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main components are a motor, optical interrupter, and h-bridge.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
The H-Bridges used in our project burned out at random times, especially if the PIC was turned on and the supply power was also on.  This may be due to pins on the PIC initializing incorrectly.  Therefore, it is best to start up the PIC, wait a few seconds, then turn on the power supply.&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17923</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17923"/>
		<updated>2010-03-19T03:21:50Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Circuit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Roller==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
The circuit is fairly simple in nature.  The main components are a motor, optical interrupter, and h-bridge.&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8224 24V motor was chosen for the apparatus.  Information for the motor can be found [[Actuators Available in the Mechatronics Lab|here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17903</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17903"/>
		<updated>2010-03-19T02:06:37Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Roller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Roller==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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.  We made three discs for three with three different weights and wall sizes.  In the end, the disc weighs only 22 grams, has 1/32&amp;quot; walls, and has nearly zero resistance.  &lt;br /&gt;
&lt;br /&gt;
The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD free machining brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around a 2&amp;quot; length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD brass in Hardinge Toolroom Lathe using oversized collet and closer, with around 1.5&amp;quot; exposed&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8724S017 24V motor was chosen for the apparatus.  Information for the motor can be found [[http://www.electromate.com/db_support/downloads/GM8724S017.pdf here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=File:M333_2010_Butterflydisc.jpg&amp;diff=17898</id>
		<title>File:M333 2010 Butterflydisc.jpg</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=File:M333_2010_Butterflydisc.jpg&amp;diff=17898"/>
		<updated>2010-03-19T01:58:58Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: uploaded a new version of &amp;quot;Image:M333 2010 Butterflydisc.jpg&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17897</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17897"/>
		<updated>2010-03-19T01:57:38Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Next Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Roller==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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 disc that would not only hold up to the riggors of testing, but also conduct electricity for future sensing applications of the disc.  The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD Free Machining Brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around 2.5&amp;quot; of Length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD Brass in Hardinge Toolroom Lathe using oversized collet&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into Compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish Diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; wall can be quite tricky.  If you need advice to make another various disc, please speak to Ben.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8724S017 24V motor was chosen for the apparatus.  Information for the motor can be found [[http://www.electromate.com/db_support/downloads/GM8724S017.pdf here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;br /&gt;
&lt;br /&gt;
- Optically isolate circuit from noise&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17895</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17895"/>
		<updated>2010-03-19T01:56:43Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Roller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Roller==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1.5|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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 disc that would not only hold up to the riggors of testing, but also conduct electricity for future sensing applications of the disc.  The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD Free Machining Brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around 2.5&amp;quot; of Length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD Brass in Hardinge Toolroom Lathe using oversized collet&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into Compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish Diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; wall can be quite tricky.  If you need advice to make another various disc, please speak to Ben.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8724S017 24V motor was chosen for the apparatus.  Information for the motor can be found [[http://www.electromate.com/db_support/downloads/GM8724S017.pdf here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17894</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17894"/>
		<updated>2010-03-19T01:54:58Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Roller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Roller==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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 disc that would not only hold up to the riggors of testing, but also conduct electricity for future sensing applications of the disc.  The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf|here]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD Free Machining Brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around 2.5&amp;quot; of Length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD Brass in Hardinge Toolroom Lathe using oversized collet&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into Compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish Diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; wall can be quite tricky.  If you need advice to make another various disc, please speak to Ben.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8724S017 24V motor was chosen for the apparatus.  Information for the motor can be found [[http://www.electromate.com/db_support/downloads/GM8724S017.pdf here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17893</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17893"/>
		<updated>2010-03-19T01:54:27Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Roller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Roller==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1|thumb|Isometric View of Rolling Disc]]&lt;br /&gt;
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 disc that would not only hold up to the riggors of testing, but also conduct electricity for future sensing applications of the disc.  The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD Free Machining Brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around 2.5&amp;quot; of Length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD Brass in Hardinge Toolroom Lathe using oversized collet&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into Compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish Diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; wall can be quite tricky.  If you need advice to make another various disc, please speak to Ben.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8724S017 24V motor was chosen for the apparatus.  Information for the motor can be found [[http://www.electromate.com/db_support/downloads/GM8724S017.pdf here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=File:ME333_2010_DiscDrawing.pdf&amp;diff=17892</id>
		<title>File:ME333 2010 DiscDrawing.pdf</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=File:ME333_2010_DiscDrawing.pdf&amp;diff=17892"/>
		<updated>2010-03-19T01:53:26Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: Butterfly Rolling Manipulation Disc V3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Butterfly Rolling Manipulation Disc V3&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17891</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17891"/>
		<updated>2010-03-19T01:52:46Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Roller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Roller==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1|thumb|Butterfly Circuit.]]&lt;br /&gt;
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 disc that would not only hold up to the riggors of testing, but also conduct electricity for future sensing applications of the disc.  The solidworks drawing of the disc can be found [[Media:ME333_2010_DiscDrawing.pdf]]&lt;br /&gt;
&lt;br /&gt;
The disc was made via the following steps:&lt;br /&gt;
&lt;br /&gt;
1)  Locate at least 1.75&amp;quot; OD Free Machining Brass&amp;lt;br&amp;gt;&lt;br /&gt;
2)  Rough cut around 2.5&amp;quot; of Length of brass&amp;lt;br&amp;gt;&lt;br /&gt;
3)  Debur rough edges using belt sander&amp;lt;br&amp;gt;&lt;br /&gt;
4)  Locate 1 3/4&amp;quot; and 1 11/16&amp;quot; oversized collets&amp;lt;br&amp;gt;&lt;br /&gt;
5)  Place 1.75&amp;quot; OD Brass in Hardinge Toolroom Lathe using oversized collet&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Insert turning tool into Compound&amp;lt;br&amp;gt;&lt;br /&gt;
6)  Machine OD to finish Diameter for full length of open area&amp;lt;br&amp;gt;&lt;br /&gt;
7)  Remove turning tool, insert groover&amp;lt;br&amp;gt;&lt;br /&gt;
8)  Being careful to reset zeros on the lathe, slowly machine the wide-set groove in the disc&amp;lt;br&amp;gt;&lt;br /&gt;
9)  Remove grooving tool&amp;lt;br&amp;gt;&lt;br /&gt;
10)  Center drill, then drill 3/8&amp;quot; through hole&amp;lt;br&amp;gt;&lt;br /&gt;
11)  Insert boring bar&amp;lt;br&amp;gt;&lt;br /&gt;
12)  Take successive passes to finish inner diamater as far as possible&amp;lt;br&amp;gt;&lt;br /&gt;
13)  Remove disc from collet, replace collet with 1 11/16&amp;quot; collet&amp;lt;br&amp;gt;&lt;br /&gt;
14)  Put Disc in backwards with machined side in collet, remove excess material&amp;lt;br&amp;gt;&lt;br /&gt;
15)  Use boring bar to finish lip on other side&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:  1/32&amp;quot; wall can be quite tricky.  If you need advice to make another various disc, please speak to Ben.&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8724S017 24V motor was chosen for the apparatus.  Information for the motor can be found [[http://www.electromate.com/db_support/downloads/GM8724S017.pdf here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17885</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17885"/>
		<updated>2010-03-19T01:41:46Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Mechanical Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Roller==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=1|thumb|Butterfly Circuit.]]]&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8724S017 24V motor was chosen for the apparatus.  Information for the motor can be found [[http://www.electromate.com/db_support/downloads/GM8724S017.pdf here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17884</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17884"/>
		<updated>2010-03-19T01:41:37Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Roller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Roller==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=3|thumb|Butterfly Circuit.]]]&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8724S017 24V motor was chosen for the apparatus.  Information for the motor can be found [[http://www.electromate.com/db_support/downloads/GM8724S017.pdf here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=File:M333_2010_Butterflydisc.jpg&amp;diff=17883</id>
		<title>File:M333 2010 Butterflydisc.jpg</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=File:M333_2010_Butterflydisc.jpg&amp;diff=17883"/>
		<updated>2010-03-19T01:40:46Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17882</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17882"/>
		<updated>2010-03-19T01:40:32Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Roller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Roller==&lt;br /&gt;
&lt;br /&gt;
[[Image:M333_2010_Butterflydisc.jpg|upright=2|thumb|Butterfly Circuit.]]]&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8724S017 24V motor was chosen for the apparatus.  Information for the motor can be found [[http://www.electromate.com/db_support/downloads/GM8724S017.pdf here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17881</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17881"/>
		<updated>2010-03-19T01:40:03Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* The Roller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Roller==&lt;br /&gt;
&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]]&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*[[Actuators Available in the Mechatronics Lab|Pittman GM8224 motor]]&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8724S017 24V motor was chosen for the apparatus.  Information for the motor can be found [[http://www.electromate.com/db_support/downloads/GM8724S017.pdf here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=File:ME333_2010_ButterflyDisc_v2.jpg&amp;diff=17879</id>
		<title>File:ME333 2010 ButterflyDisc v2.jpg</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=File:ME333_2010_ButterflyDisc_v2.jpg&amp;diff=17879"/>
		<updated>2010-03-19T01:39:26Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17852</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17852"/>
		<updated>2010-03-19T00:35:32Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Mechanical Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
In order to achieve the butterfly motion, a well designed, non-moving base and setup must be fabricated.  Listed below shows the Bill of Materials, How we chose the shape of the butterfly, how it was mounted, and finally the design and iterations of the disc system.&lt;br /&gt;
&lt;br /&gt;
==Bill of Materials==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Roller==&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*Pittman GM8724S017 24V motor&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8724S017 24V motor was chosen for the apparatus.  Information for the motor can be found [[http://www.electromate.com/db_support/downloads/GM8724S017.pdf here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17823</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17823"/>
		<updated>2010-03-18T22:11:20Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
Our project was to perform a contact juggling move called the &amp;quot;butterfly&amp;quot; on a circular disc.  Papers have been submitted on the shape of the butterfly apparatus, along with the general motion in order to perform the move.  Implementing these papers for the first time in full gravity, we were able to design the circuitry, build the system, and test it in a matter of four weeks.  The below wiki will explain our process step by step.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Roller==&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*Pittman GM8724S017 24V motor&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8724S017 24V motor was chosen for the apparatus.  Information for the motor can be found [[http://www.electromate.com/db_support/downloads/GM8724S017.pdf here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17822</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17822"/>
		<updated>2010-03-18T22:01:36Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Next Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Roller==&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*Pittman GM8724S017 24V motor&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8724S017 24V motor was chosen for the apparatus.  Information for the motor can be found [[http://www.electromate.com/db_support/downloads/GM8724S017.pdf here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17820</id>
		<title>Butterfly Rolling Manipulation</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=Butterfly_Rolling_Manipulation&amp;diff=17820"/>
		<updated>2010-03-18T22:01:21Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Next Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
[[Image:TeamButterflyPhoto.jpg|thumb|From Left: Eric, Ben, Will.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eric Bell (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
William Fan (Mechanical Engineer, 2011)&lt;br /&gt;
&lt;br /&gt;
Ben Kolodner (Mechanical Engineer, 2010)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mechanical Design=&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
&lt;br /&gt;
==The Hand:Butterfly Shape==&lt;br /&gt;
&lt;br /&gt;
==The Mount==&lt;br /&gt;
&lt;br /&gt;
==The Roller==&lt;br /&gt;
&lt;br /&gt;
=Circuit=&lt;br /&gt;
&lt;br /&gt;
==Parts List==&lt;br /&gt;
[[Image:Butterfly Circuit.jpg|upright=2|thumb|Butterfly Circuit.]]&lt;br /&gt;
*[[Introduction to the PIC32|PIC32 NU32 Board]] + PIC USB cable&lt;br /&gt;
*[[PIC RS232| RS232 cable]]&lt;br /&gt;
*[[PIC32MX: Parallel LCD|HD44780 LCD]]&lt;br /&gt;
*5k potentiometer (1)&lt;br /&gt;
*100 ohm resistor (3)&lt;br /&gt;
*2.2 kohm resistor (1)&lt;br /&gt;
*3.3 kohm resistor (1)&lt;br /&gt;
*0.1uF capacitor (5)&lt;br /&gt;
*L298N H-bridge&lt;br /&gt;
*14N002 diodes (4)&lt;br /&gt;
*LS7083 decoder&lt;br /&gt;
*Pittman GM8724S017 24V motor&lt;br /&gt;
*Protoboard/breadboard&lt;br /&gt;
&lt;br /&gt;
==Circuit Diagram==&lt;br /&gt;
[[Image:ButterflyCircuitDiagram.jpg|upright=5|thumb|center|Butterfly Circuit Diagram.]]&lt;br /&gt;
&lt;br /&gt;
==Motor==&lt;br /&gt;
A Pittman GM8724S017 24V motor was chosen for the apparatus.  Information for the motor can be found [[http://www.electromate.com/db_support/downloads/GM8724S017.pdf here]].  Originally, our motor did not use a gear-head in order to reduce backlash.  However, this continuously burned out our H-Bridges, so a motor with a 19.5:1 gear-head ratio was selected to provide additional torque.&lt;br /&gt;
&lt;br /&gt;
==H-bridge disclaimer==&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&lt;br /&gt;
=Processing=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert graph&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
=Next Steps=&lt;br /&gt;
&lt;br /&gt;
- Eliminate backlash via gearless motor&lt;br /&gt;
- Sense position of the disc using copper tape and resistive wire&lt;br /&gt;
- Implement PID control on motor position, along with control of PID using sensing of disc&lt;br /&gt;
- Test other butterfly shapes with lower or higher curvature&lt;br /&gt;
- Test other disc shapes with different center of masses and weights&lt;br /&gt;
- Replace H-Bridges with nicer ones that can take higher amperage&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=PIC32MX:_Interfacing_to_a_Secure_Digital_(SD)_Flash_Card&amp;diff=16064</id>
		<title>PIC32MX: Interfacing to a Secure Digital (SD) Flash Card</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=PIC32MX:_Interfacing_to_a_Secure_Digital_(SD)_Flash_Card&amp;diff=16064"/>
		<updated>2010-02-16T02:16:53Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Original Assignment ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not erase this section!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Your assignment is to create code that will allow the PIC32 to read and write data to a FAT32 SD card. The SD card should be able to be read by a PC after data has been written on it by the PIC32.&lt;br /&gt;
&lt;br /&gt;
Create functions so that it is easy to read, write and initialize the SD card.&lt;br /&gt;
&lt;br /&gt;
Use the example projects in the &amp;quot;Microchip Solutions/USB Device - Mass Storage - SD card data logger&amp;quot; and &amp;quot;Microchip Solutions/USB Device - Mass Storage - SD card reader&amp;quot; folders as a guide.&lt;br /&gt;
&lt;br /&gt;
Use your code to create a folder on the PIC32 and write 1000 bytes of data to a text file in that folder. How long does it take? Make sure the PC can read the file.&lt;br /&gt;
&lt;br /&gt;
Create a folder on the SD card with the PC and place a text file in the folder with 1000 bytes of data. Read the file with the PIC32. How long does it take?&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:  Code contains errors.  Use at your own risk.  Hardware on circuit diagram and breadboard have been checked for accuracy.&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Secure digital cards, or SD cards, are inexpensive and common mass storage devices that can be interfaced with our PIC to provide a larger nonvolatile data storage space.  In this lab, we will interface our PIC32MX460F512L to communicate with a 2GB FAT32 SD card to allow reading and writing of data.&lt;br /&gt;
&lt;br /&gt;
The original program stems from tutorials from the book &#039;&#039;Programming 32-bit Microcontrollers in C: Exploring the PIC32&#039;&#039; by Lucio Di Jasio.  We used the tutorials from Day 14 and 15 to generate our code for SD card reading and writing via SPI communications. The main problem with this tutorial is it is made for the PIC32MX360F512L on the Explorer16 board, so many changes were required in order to run even small sections of the code.  Also, the code from the book contains obvious bugs that were not found before publication.&lt;br /&gt;
&lt;br /&gt;
In terms of hardware, please obtain the following:&lt;br /&gt;
   1)  PIC32MX460F512L in NU32 Configuration&lt;br /&gt;
   2)  Breakout board for SD Card - [http://www.sparkfun.com/commerce/product_info.php?products_id=204 BOB-00204]&lt;br /&gt;
   3)  Header Pins for Breakout board&lt;br /&gt;
   3)  SD Card&lt;br /&gt;
   4)  Four 10K ohm and two 1K ohm resistors&lt;br /&gt;
   5)  2 or more LEDs for debugging&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
&lt;br /&gt;
The SD card holder has 11 pins with only 6 being directly used for communication with our PIC. The SD card will be powered off 3.3V from our PIC, which will come our mini-usb connection.  10K and 1K resistors are added to allow for a voltage drop for each connection.  LEDs are added for the Write Protect (WP) and Card Detect (CD) to see if the card is being read properly externally from the PIC.  The LEDs turning on signifies that the card is detected and write protect is off.  We did not use a resistor for the clock line. The IRQ and P9 pins on the SD card holder were not needed for SPI communication, so they were not connected to the PIC.  However, they need to be powered for the SD card holder to operate properly. &lt;br /&gt;
[[Image:EB_WF_BK_Circuit diagram.png|thumb|center|upright=3|alt=Circuit diagram for communicating between a PIC 32MX460F512L to communicate with a 2GB FAT32 SD card.|Circuit diagram for communicating between a PIC 32MX460F512L to communicate with a 2GB FAT32 SD card]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  PIN Label&lt;br /&gt;
!  Function&lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RC1 SDCS&#039;&#039;&#039;&lt;br /&gt;
|  Digital output for SD card select&lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RG8 SDO2&#039;&#039;&#039;&lt;br /&gt;
|  Module 2 SPI output from the PIC to the SD card &lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RG6 SCK2&#039;&#039;&#039;&lt;br /&gt;
|  Serial Clock module 2  &lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RG7 SDI2&#039;&#039;&#039;&lt;br /&gt;
|  Module 2 SPI input from the SD card to the PIC&lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RC2 SDCD&#039;&#039;&#039;&lt;br /&gt;
|  Digital input from SD card for card detect&lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RC3 SDWP&#039;&#039;&#039;&lt;br /&gt;
|  Digital input from SD card for write protect &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We soldered square pin headers onto the SD card holder to allow easy connection to our breadboard.  Please see our circuit below for more detail.&lt;br /&gt;
&lt;br /&gt;
[[Image:EB_WF_BK_HardwarePic.png|thumb|center|upright=2|Hardware and wiring setup for PIC32MX460F512L in NU32 board configuration]]&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
The code used for this project was based upon the companion code to the recommended text &#039;&#039;Programming 32-bit Microcontrollers in C: Exploring the PIC32&#039;&#039; by Lucio di Jasio. The complete text in PDF form can be accessed [http://www.scribd.com/doc/16601628/Programming-32bit-Microcontrollers-in-C here]. The relevant sections for our project were Day 14: Mass Storage and Day 15: File I/O, which can be found on pages 403 and 427 of the text, respectively. &lt;br /&gt;
&lt;br /&gt;
All the necessary companion files for Days 14 and 15 can be downloaded [[Media:LAB5-SD Card Reader.zip|here]]. This code has been modified slightly for the purposes of our project. One major modification was the exclusion of the LCD screen and accompanying code, which was left out for the sake of simplicity. Our group focused on the Day 14 code, which can be found in the &amp;quot;14 SDMMC&amp;quot; folder. Upon opening the MPLAB Project &amp;quot;SDMMC,&amp;quot; the user should see three .c files in the Source Files folder. These include Explore.c, RWTest.c, and SDMMC.c. Under the Header Files folder, should be HardwareProfile.h, HardwareProfileNU32.h, and SDMMC.h. Finally, procdefs.ld should be included under Other Files. &lt;br /&gt;
&lt;br /&gt;
The complete code for RWTest.c is shown below. The rest of the files can be downloaded from the provided link. &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/*&lt;br /&gt;
**	RWTest.c&lt;br /&gt;
**&lt;br /&gt;
*/&lt;br /&gt;
// configuration bit settings, Fcy=72MHz, Fpb=36MHz&lt;br /&gt;
#pragma config POSCMOD=XT, FNOSC=PRIPLL &lt;br /&gt;
#pragma config FPLLIDIV=DIV_2, FPLLMUL=MUL_18, FPLLODIV=DIV_1&lt;br /&gt;
#pragma config FPBDIV=DIV_2, FWDTEN=OFF, CP=OFF, BWP=OFF&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;HardwareProfile.h&amp;gt;&lt;br /&gt;
#include &amp;lt;explore.h&amp;gt;&lt;br /&gt;
#include &amp;lt;SDMMC.h&amp;gt;&lt;br /&gt;
#include &amp;lt;plib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;fileio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define START_ADDRESS       10000   // start block address&lt;br /&gt;
#define N_BLOCKS            10      // number of blocks&lt;br /&gt;
#define B_SIZE              512     // sector/data block size&lt;br /&gt;
&lt;br /&gt;
char    data[ B_SIZE];&lt;br /&gt;
char  buffer[ B_SIZE];&lt;br /&gt;
&lt;br /&gt;
main( void)&lt;br /&gt;
{&lt;br /&gt;
    SYSTEMConfigPerformance(SYS_FREQ);&lt;br /&gt;
    mInitAllLEDs();&lt;br /&gt;
    TRISCbits.TRISC1 = 0;&lt;br /&gt;
&lt;br /&gt;
    LBA addr;&lt;br /&gt;
    int i, j, r;&lt;br /&gt;
&lt;br /&gt;
    // 1. initializations&lt;br /&gt;
    initSD();		        // init SD/MMC module&lt;br /&gt;
&lt;br /&gt;
    // 2. fill the buffer with pattern&lt;br /&gt;
    for( i=0; i&amp;lt;B_SIZE; i++)&lt;br /&gt;
        data[i]= i;&lt;br /&gt;
&lt;br /&gt;
    // 3. wait for the card to be inserted&lt;br /&gt;
    while( !getCD());       // check CD switch&lt;br /&gt;
    Delayms( 100);          // wait contacts de-bounce&lt;br /&gt;
    if ( initMedia())       // init card&lt;br /&gt;
    {  // if error code returned&lt;br /&gt;
        goto End;&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
    // 4. fill 16 groups of N_BLOCK sectors with data &lt;br /&gt;
    addr = START_ADDRESS;&lt;br /&gt;
    for( j=0; j&amp;lt;16; j++)&lt;br /&gt;
    {&lt;br /&gt;
        for( i=0; i&amp;lt;N_BLOCKS; i++)&lt;br /&gt;
        {&lt;br /&gt;
            if (!writeSECTOR( addr+i*j, data))&lt;br /&gt;
            {  // writing failed&lt;br /&gt;
                goto End;&lt;br /&gt;
            }&lt;br /&gt;
        } // i&lt;br /&gt;
    } // j&lt;br /&gt;
    &lt;br /&gt;
    // 5. verify the contents of each sector written  &lt;br /&gt;
    addr = START_ADDRESS;&lt;br /&gt;
    for( j=0; j&amp;lt;16; j++)&lt;br /&gt;
    {&lt;br /&gt;
        for( i=0; i&amp;lt;N_BLOCKS; i++)&lt;br /&gt;
        {   // read back one block at a time&lt;br /&gt;
            if (!readSECTOR( addr+i*j, buffer))&lt;br /&gt;
            {   // reading failed&lt;br /&gt;
                goto End;&lt;br /&gt;
            }&lt;br /&gt;
		while(1){&lt;br /&gt;
			mLED_3_On();&lt;br /&gt;
		}&lt;br /&gt;
            // verify each block content&lt;br /&gt;
            if ( memcmp( data, buffer, B_SIZE))&lt;br /&gt;
            {   // mismatch&lt;br /&gt;
                goto End;&lt;br /&gt;
            }&lt;br /&gt;
        } // i&lt;br /&gt;
    } // j&lt;br /&gt;
&lt;br /&gt;
    // 6. indicate successful execution&lt;br /&gt;
&lt;br /&gt;
End:&lt;br /&gt;
    // main loop&lt;br /&gt;
    while( 1);&lt;br /&gt;
&lt;br /&gt;
} // main&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code first includes a section for initializations including initializations for the SD card. The function initSD initializes Card Select as an output as well as setting the clock speed. The LED initialization is included only for the purposes of debugging and can be excluded if desired.&lt;br /&gt;
&lt;br /&gt;
The code then waits for the SD card to be inserted before initializing the media. This function includes enabling and resetting the SD card. &lt;br /&gt;
&lt;br /&gt;
Finally, the program writes blocks of data to the SD card. If successful, it will read the data back again. It is at this point that our code fails. Specifically, in the function writeSECTOR, the data is sent and then the code checks to see if the data was accepted. The data accept check is currently returning 0. This seems to suggest that the SD card is not successfully storing the data.&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=PIC32MX:_Interfacing_to_a_Secure_Digital_(SD)_Flash_Card&amp;diff=16063</id>
		<title>PIC32MX: Interfacing to a Secure Digital (SD) Flash Card</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=PIC32MX:_Interfacing_to_a_Secure_Digital_(SD)_Flash_Card&amp;diff=16063"/>
		<updated>2010-02-16T02:15:20Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Circuit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Original Assignment ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not erase this section!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Your assignment is to create code that will allow the PIC32 to read and write data to a FAT32 SD card. The SD card should be able to be read by a PC after data has been written on it by the PIC32.&lt;br /&gt;
&lt;br /&gt;
Create functions so that it is easy to read, write and initialize the SD card.&lt;br /&gt;
&lt;br /&gt;
Use the example projects in the &amp;quot;Microchip Solutions/USB Device - Mass Storage - SD card data logger&amp;quot; and &amp;quot;Microchip Solutions/USB Device - Mass Storage - SD card reader&amp;quot; folders as a guide.&lt;br /&gt;
&lt;br /&gt;
Use your code to create a folder on the PIC32 and write 1000 bytes of data to a text file in that folder. How long does it take? Make sure the PC can read the file.&lt;br /&gt;
&lt;br /&gt;
Create a folder on the SD card with the PC and place a text file in the folder with 1000 bytes of data. Read the file with the PIC32. How long does it take?&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:  Code contains errors.  Use at your own risk.  Hardware on circuit diagram and breadboard have been checked for accuracy.&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Secure digital cards, or SD cards, are inexpensive and common mass storage devices that can be interfaced with our PIC to provide a larger nonvolatile data storage space.  In this lab, we will interface our PIC32MX460F512L to communicate with a 2GB FAT32 SD card to allow reading and writing of data.&lt;br /&gt;
&lt;br /&gt;
The original program stems from tutorials from the book &#039;&#039;Programming 32bit Microcontrollers in C -- Exploring the PIC32&#039;&#039; by Lucio Di Jasio.  We used the tutorials from Day 14 and 15 to generate our code for SD card reading and writing via SPI communications. The main problem with this tutorial is it is made for the PIC32MX360F512L on the Explorer16 board, so many changes were required in order to run even small sections of the code.  Also, the code from the book contains obvious bugs that were not found before publication.&lt;br /&gt;
&lt;br /&gt;
In terms of hardware, please obtain the following:&lt;br /&gt;
   1)  PIC32MX460F512L&lt;br /&gt;
   2)  Breakout board for SD Card - [http://www.sparkfun.com/commerce/product_info.php?products_id=204 BOB-00204]&lt;br /&gt;
   3)  Header Pins for Breakout board&lt;br /&gt;
   3)  SD Card&lt;br /&gt;
   4)  Four 10K ohm and two 1K ohm resistors&lt;br /&gt;
   5)  2 or more LEDs for debugging&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
&lt;br /&gt;
The SD card holder has 11 pins with only 6 being directly used for communication with our PIC. The SD card will be powered off 3.3V from our PIC, which will come our mini-usb connection.  10K and 1K resistors are added to allow for a voltage drop for each connection.  LEDs are added for the Write Protect (WP) and Card Detect (CD) to see if the card is being read properly externally from the PIC.  The LEDs turning on signifies that the card is detected and write protect is off.  We did not use a resistor for the clock line. The IRQ and P9 pins on the SD card holder were not needed for SPI communication, so they were not connected to the PIC.  However, they need to be powered for the SD card holder to operate properly. &lt;br /&gt;
[[Image:EB_WF_BK_Circuit diagram.png|thumb|center|upright=3|alt=Circuit diagram for communicating between a PIC 32MX460F512L to communicate with a 2GB FAT32 SD card.|Circuit diagram for communicating between a PIC 32MX460F512L to communicate with a 2GB FAT32 SD card]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  PIN Label&lt;br /&gt;
!  Function&lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RC1 SDCS&#039;&#039;&#039;&lt;br /&gt;
|  Digital output for SD card select&lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RG8 SDO2&#039;&#039;&#039;&lt;br /&gt;
|  Module 2 SPI output from the PIC to the SD card &lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RG6 SCK2&#039;&#039;&#039;&lt;br /&gt;
|  Serial Clock module 2  &lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RG7 SDI2&#039;&#039;&#039;&lt;br /&gt;
|  Module 2 SPI input from the SD card to the PIC&lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RC2 SDCD&#039;&#039;&#039;&lt;br /&gt;
|  Digital input from SD card for card detect&lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RC3 SDWP&#039;&#039;&#039;&lt;br /&gt;
|  Digital input from SD card for write protect &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We soldered square pin headers onto the SD card holder to allow easy connection to our breadboard.  Please see our circuit below for more detail.&lt;br /&gt;
&lt;br /&gt;
[[Image:EB_WF_BK_HardwarePic.png|thumb|center|upright=2|Hardware and wiring setup for PIC32MX460F512L in NU32 board configuration]]&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
The code used for this project was based upon the companion code to the recommended text &#039;&#039;Programming 32-bit Microcontrollers in C: Exploring the PIC32&#039;&#039; by Lucio di Jasio. The complete text in PDF form can be accessed [http://www.scribd.com/doc/16601628/Programming-32bit-Microcontrollers-in-C here]. The relevant sections for our project were Day 14: Mass Storage and Day 15: File I/O, which can be found on pages 403 and 427 of the text, respectively. &lt;br /&gt;
&lt;br /&gt;
All the necessary companion files for Days 14 and 15 can be downloaded [[Media:LAB5-SD Card Reader.zip|here]]. This code has been modified slightly for the purposes of our project. One major modification was the exclusion of the LCD screen and accompanying code, which was left out for the sake of simplicity. Our group focused on the Day 14 code, which can be found in the &amp;quot;14 SDMMC&amp;quot; folder. Upon opening the MPLAB Project &amp;quot;SDMMC,&amp;quot; the user should see three .c files in the Source Files folder. These include Explore.c, RWTest.c, and SDMMC.c. Under the Header Files folder, should be HardwareProfile.h, HardwareProfileNU32.h, and SDMMC.h. Finally, procdefs.ld should be included under Other Files. &lt;br /&gt;
&lt;br /&gt;
The complete code for RWTest.c is shown below. The rest of the files can be downloaded from the provided link. &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/*&lt;br /&gt;
**	RWTest.c&lt;br /&gt;
**&lt;br /&gt;
*/&lt;br /&gt;
// configuration bit settings, Fcy=72MHz, Fpb=36MHz&lt;br /&gt;
#pragma config POSCMOD=XT, FNOSC=PRIPLL &lt;br /&gt;
#pragma config FPLLIDIV=DIV_2, FPLLMUL=MUL_18, FPLLODIV=DIV_1&lt;br /&gt;
#pragma config FPBDIV=DIV_2, FWDTEN=OFF, CP=OFF, BWP=OFF&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;HardwareProfile.h&amp;gt;&lt;br /&gt;
#include &amp;lt;explore.h&amp;gt;&lt;br /&gt;
#include &amp;lt;SDMMC.h&amp;gt;&lt;br /&gt;
#include &amp;lt;plib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;fileio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define START_ADDRESS       10000   // start block address&lt;br /&gt;
#define N_BLOCKS            10      // number of blocks&lt;br /&gt;
#define B_SIZE              512     // sector/data block size&lt;br /&gt;
&lt;br /&gt;
char    data[ B_SIZE];&lt;br /&gt;
char  buffer[ B_SIZE];&lt;br /&gt;
&lt;br /&gt;
main( void)&lt;br /&gt;
{&lt;br /&gt;
    SYSTEMConfigPerformance(SYS_FREQ);&lt;br /&gt;
    mInitAllLEDs();&lt;br /&gt;
    TRISCbits.TRISC1 = 0;&lt;br /&gt;
&lt;br /&gt;
    LBA addr;&lt;br /&gt;
    int i, j, r;&lt;br /&gt;
&lt;br /&gt;
    // 1. initializations&lt;br /&gt;
    initSD();		        // init SD/MMC module&lt;br /&gt;
&lt;br /&gt;
    // 2. fill the buffer with pattern&lt;br /&gt;
    for( i=0; i&amp;lt;B_SIZE; i++)&lt;br /&gt;
        data[i]= i;&lt;br /&gt;
&lt;br /&gt;
    // 3. wait for the card to be inserted&lt;br /&gt;
    while( !getCD());       // check CD switch&lt;br /&gt;
    Delayms( 100);          // wait contacts de-bounce&lt;br /&gt;
    if ( initMedia())       // init card&lt;br /&gt;
    {  // if error code returned&lt;br /&gt;
        goto End;&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
    // 4. fill 16 groups of N_BLOCK sectors with data &lt;br /&gt;
    addr = START_ADDRESS;&lt;br /&gt;
    for( j=0; j&amp;lt;16; j++)&lt;br /&gt;
    {&lt;br /&gt;
        for( i=0; i&amp;lt;N_BLOCKS; i++)&lt;br /&gt;
        {&lt;br /&gt;
            if (!writeSECTOR( addr+i*j, data))&lt;br /&gt;
            {  // writing failed&lt;br /&gt;
                goto End;&lt;br /&gt;
            }&lt;br /&gt;
        } // i&lt;br /&gt;
    } // j&lt;br /&gt;
    &lt;br /&gt;
    // 5. verify the contents of each sector written  &lt;br /&gt;
    addr = START_ADDRESS;&lt;br /&gt;
    for( j=0; j&amp;lt;16; j++)&lt;br /&gt;
    {&lt;br /&gt;
        for( i=0; i&amp;lt;N_BLOCKS; i++)&lt;br /&gt;
        {   // read back one block at a time&lt;br /&gt;
            if (!readSECTOR( addr+i*j, buffer))&lt;br /&gt;
            {   // reading failed&lt;br /&gt;
                goto End;&lt;br /&gt;
            }&lt;br /&gt;
		while(1){&lt;br /&gt;
			mLED_3_On();&lt;br /&gt;
		}&lt;br /&gt;
            // verify each block content&lt;br /&gt;
            if ( memcmp( data, buffer, B_SIZE))&lt;br /&gt;
            {   // mismatch&lt;br /&gt;
                goto End;&lt;br /&gt;
            }&lt;br /&gt;
        } // i&lt;br /&gt;
    } // j&lt;br /&gt;
&lt;br /&gt;
    // 6. indicate successful execution&lt;br /&gt;
&lt;br /&gt;
End:&lt;br /&gt;
    // main loop&lt;br /&gt;
    while( 1);&lt;br /&gt;
&lt;br /&gt;
} // main&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code first includes a section for initializations including initializations for the SD card. The function initSD initializes Card Select as an output as well as setting the clock speed. The LED initialization is included only for the purposes of debugging and can be excluded if desired.&lt;br /&gt;
&lt;br /&gt;
The code then waits for the SD card to be inserted before initializing the media. This function includes enabling and resetting the SD card. &lt;br /&gt;
&lt;br /&gt;
Finally, the program writes blocks of data to the SD card. If successful, it will read the data back again. It is at this point that our code fails. Specifically, in the function writeSECTOR, the data is sent and then the code checks to see if the data was accepted. The data accept check is currently returning 0. This seems to suggest that the SD card is not successfully storing the data.&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=PIC32MX:_Interfacing_to_a_Secure_Digital_(SD)_Flash_Card&amp;diff=16062</id>
		<title>PIC32MX: Interfacing to a Secure Digital (SD) Flash Card</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=PIC32MX:_Interfacing_to_a_Secure_Digital_(SD)_Flash_Card&amp;diff=16062"/>
		<updated>2010-02-16T02:14:37Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Original Assignment ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not erase this section!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Your assignment is to create code that will allow the PIC32 to read and write data to a FAT32 SD card. The SD card should be able to be read by a PC after data has been written on it by the PIC32.&lt;br /&gt;
&lt;br /&gt;
Create functions so that it is easy to read, write and initialize the SD card.&lt;br /&gt;
&lt;br /&gt;
Use the example projects in the &amp;quot;Microchip Solutions/USB Device - Mass Storage - SD card data logger&amp;quot; and &amp;quot;Microchip Solutions/USB Device - Mass Storage - SD card reader&amp;quot; folders as a guide.&lt;br /&gt;
&lt;br /&gt;
Use your code to create a folder on the PIC32 and write 1000 bytes of data to a text file in that folder. How long does it take? Make sure the PC can read the file.&lt;br /&gt;
&lt;br /&gt;
Create a folder on the SD card with the PC and place a text file in the folder with 1000 bytes of data. Read the file with the PIC32. How long does it take?&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:  Code contains errors.  Use at your own risk.  Hardware on circuit diagram and breadboard have been checked for accuracy.&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Secure digital cards, or SD cards, are inexpensive and common mass storage devices that can be interfaced with our PIC to provide a larger nonvolatile data storage space.  In this lab, we will interface our PIC32MX460F512L to communicate with a 2GB FAT32 SD card to allow reading and writing of data.&lt;br /&gt;
&lt;br /&gt;
The original program stems from tutorials from the book &#039;&#039;Programming 32bit Microcontrollers in C -- Exploring the PIC32&#039;&#039; by Lucio Di Jasio.  We used the tutorials from Day 14 and 15 to generate our code for SD card reading and writing via SPI communications. The main problem with this tutorial is it is made for the PIC32MX360F512L on the Explorer16 board, so many changes were required in order to run even small sections of the code.  Also, the code from the book contains obvious bugs that were not found before publication.&lt;br /&gt;
&lt;br /&gt;
In terms of hardware, please obtain the following:&lt;br /&gt;
   1)  PIC32MX460F512L&lt;br /&gt;
   2)  Breakout board for SD Card - [http://www.sparkfun.com/commerce/product_info.php?products_id=204 BOB-00204]&lt;br /&gt;
   3)  Header Pins for Breakout board&lt;br /&gt;
   3)  SD Card&lt;br /&gt;
   4)  Four 10K ohm and two 1K ohm resistors&lt;br /&gt;
   5)  2 or more LEDs for debugging&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
&lt;br /&gt;
The SD card holder has 11 pins with only 6 being directly used for communication with our PIC. The SD card will be powered off 3.3V from our PIC, which will come our mini-usb connection.  10K and 1K resistors are added to allow for a voltage drop for each connection.  LEDs are added for the Write Protect (WP) and Card Detect (CD) to see if the card is being read properly externally from the PIC.  The LEDs turning on signifies that the card is detected and write protect is off.  We did not use a resistor for the clock line. The IRQ and P9 pins on the SD card holder were not needed for SPI communication, so they were not connected to the PIC.  However, they need to be powered for the SD card holder to operate properly. &lt;br /&gt;
[[Image:EB_WF_BK_Circuit diagram.png|thumb|center|upright=3|alt=Circuit diagram for communicating between a PIC 32MX460F512L to communicate with a 2GB FAT32 SD card.|Circuit diagram for communicating between a PIC 32MX460F512L to communicate with a 2GB FAT32 SD card]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  PIN Label&lt;br /&gt;
!  Function&lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RC1 SDCS&#039;&#039;&#039;&lt;br /&gt;
|  Digital output for SD card select&lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RG8 SDO2&#039;&#039;&#039;&lt;br /&gt;
|  Module 2 SPI output from the PIC to the SD card &lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RG6 SCK2&#039;&#039;&#039;&lt;br /&gt;
|  Serial Clock module 2  &lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RG7 SDI2&#039;&#039;&#039;&lt;br /&gt;
|  Module 2 SPI input from the SD card to the PIC&lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RC2 SDCD&#039;&#039;&#039;&lt;br /&gt;
|  Digital input from SD card for card detect&lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RC3 SDWP&#039;&#039;&#039;&lt;br /&gt;
|  Digital input from SD card for write protect &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We soldered square pin headers onto the SD card holder to allow easy connection to our breadboard.  Please see our circuit below for more detail.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:EB_WF_BK_HardwarePic.png|thumb|center|upright=2|Hardware and wiring setup for PIC32MX460F512L in NU32 board configuration]]&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
The code used for this project was based upon the companion code to the recommended text &#039;&#039;Programming 32-bit Microcontrollers in C: Exploring the PIC32&#039;&#039; by Lucio di Jasio. The complete text in PDF form can be accessed [http://www.scribd.com/doc/16601628/Programming-32bit-Microcontrollers-in-C here]. The relevant sections for our project were Day 14: Mass Storage and Day 15: File I/O, which can be found on pages 403 and 427 of the text, respectively. &lt;br /&gt;
&lt;br /&gt;
All the necessary companion files for Days 14 and 15 can be downloaded [[Media:LAB5-SD Card Reader.zip|here]]. This code has been modified slightly for the purposes of our project. One major modification was the exclusion of the LCD screen and accompanying code, which was left out for the sake of simplicity. Our group focused on the Day 14 code, which can be found in the &amp;quot;14 SDMMC&amp;quot; folder. Upon opening the MPLAB Project &amp;quot;SDMMC,&amp;quot; the user should see three .c files in the Source Files folder. These include Explore.c, RWTest.c, and SDMMC.c. Under the Header Files folder, should be HardwareProfile.h, HardwareProfileNU32.h, and SDMMC.h. Finally, procdefs.ld should be included under Other Files. &lt;br /&gt;
&lt;br /&gt;
The complete code for RWTest.c is shown below. The rest of the files can be downloaded from the provided link. &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/*&lt;br /&gt;
**	RWTest.c&lt;br /&gt;
**&lt;br /&gt;
*/&lt;br /&gt;
// configuration bit settings, Fcy=72MHz, Fpb=36MHz&lt;br /&gt;
#pragma config POSCMOD=XT, FNOSC=PRIPLL &lt;br /&gt;
#pragma config FPLLIDIV=DIV_2, FPLLMUL=MUL_18, FPLLODIV=DIV_1&lt;br /&gt;
#pragma config FPBDIV=DIV_2, FWDTEN=OFF, CP=OFF, BWP=OFF&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;HardwareProfile.h&amp;gt;&lt;br /&gt;
#include &amp;lt;explore.h&amp;gt;&lt;br /&gt;
#include &amp;lt;SDMMC.h&amp;gt;&lt;br /&gt;
#include &amp;lt;plib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;fileio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define START_ADDRESS       10000   // start block address&lt;br /&gt;
#define N_BLOCKS            10      // number of blocks&lt;br /&gt;
#define B_SIZE              512     // sector/data block size&lt;br /&gt;
&lt;br /&gt;
char    data[ B_SIZE];&lt;br /&gt;
char  buffer[ B_SIZE];&lt;br /&gt;
&lt;br /&gt;
main( void)&lt;br /&gt;
{&lt;br /&gt;
    SYSTEMConfigPerformance(SYS_FREQ);&lt;br /&gt;
    mInitAllLEDs();&lt;br /&gt;
    TRISCbits.TRISC1 = 0;&lt;br /&gt;
&lt;br /&gt;
    LBA addr;&lt;br /&gt;
    int i, j, r;&lt;br /&gt;
&lt;br /&gt;
    // 1. initializations&lt;br /&gt;
    initSD();		        // init SD/MMC module&lt;br /&gt;
&lt;br /&gt;
    // 2. fill the buffer with pattern&lt;br /&gt;
    for( i=0; i&amp;lt;B_SIZE; i++)&lt;br /&gt;
        data[i]= i;&lt;br /&gt;
&lt;br /&gt;
    // 3. wait for the card to be inserted&lt;br /&gt;
    while( !getCD());       // check CD switch&lt;br /&gt;
    Delayms( 100);          // wait contacts de-bounce&lt;br /&gt;
    if ( initMedia())       // init card&lt;br /&gt;
    {  // if error code returned&lt;br /&gt;
        goto End;&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
    // 4. fill 16 groups of N_BLOCK sectors with data &lt;br /&gt;
    addr = START_ADDRESS;&lt;br /&gt;
    for( j=0; j&amp;lt;16; j++)&lt;br /&gt;
    {&lt;br /&gt;
        for( i=0; i&amp;lt;N_BLOCKS; i++)&lt;br /&gt;
        {&lt;br /&gt;
            if (!writeSECTOR( addr+i*j, data))&lt;br /&gt;
            {  // writing failed&lt;br /&gt;
                goto End;&lt;br /&gt;
            }&lt;br /&gt;
        } // i&lt;br /&gt;
    } // j&lt;br /&gt;
    &lt;br /&gt;
    // 5. verify the contents of each sector written  &lt;br /&gt;
    addr = START_ADDRESS;&lt;br /&gt;
    for( j=0; j&amp;lt;16; j++)&lt;br /&gt;
    {&lt;br /&gt;
        for( i=0; i&amp;lt;N_BLOCKS; i++)&lt;br /&gt;
        {   // read back one block at a time&lt;br /&gt;
            if (!readSECTOR( addr+i*j, buffer))&lt;br /&gt;
            {   // reading failed&lt;br /&gt;
                goto End;&lt;br /&gt;
            }&lt;br /&gt;
		while(1){&lt;br /&gt;
			mLED_3_On();&lt;br /&gt;
		}&lt;br /&gt;
            // verify each block content&lt;br /&gt;
            if ( memcmp( data, buffer, B_SIZE))&lt;br /&gt;
            {   // mismatch&lt;br /&gt;
                goto End;&lt;br /&gt;
            }&lt;br /&gt;
        } // i&lt;br /&gt;
    } // j&lt;br /&gt;
&lt;br /&gt;
    // 6. indicate successful execution&lt;br /&gt;
&lt;br /&gt;
End:&lt;br /&gt;
    // main loop&lt;br /&gt;
    while( 1);&lt;br /&gt;
&lt;br /&gt;
} // main&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code first includes a section for initializations including initializations for the SD card. The function initSD initializes Card Select as an output as well as setting the clock speed. The LED initialization is included only for the purposes of debugging and can be excluded if desired.&lt;br /&gt;
&lt;br /&gt;
The code then waits for the SD card to be inserted before initializing the media. This function includes enabling and resetting the SD card. &lt;br /&gt;
&lt;br /&gt;
Finally, the program writes blocks of data to the SD card. If successful, it will read the data back again. It is at this point that our code fails. Specifically, in the function writeSECTOR, the data is sent and then the code checks to see if the data was accepted. The data accept check is currently returning 0. This seems to suggest that the SD card is not successfully storing the data.&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=PIC32MX:_Interfacing_to_a_Secure_Digital_(SD)_Flash_Card&amp;diff=16061</id>
		<title>PIC32MX: Interfacing to a Secure Digital (SD) Flash Card</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=PIC32MX:_Interfacing_to_a_Secure_Digital_(SD)_Flash_Card&amp;diff=16061"/>
		<updated>2010-02-16T02:13:54Z</updated>

		<summary type="html">&lt;p&gt;BenjaminKolodner: /* Circuit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Original Assignment ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not erase this section!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Your assignment is to create code that will allow the PIC32 to read and write data to a FAT32 SD card. The SD card should be able to be read by a PC after data has been written on it by the PIC32.&lt;br /&gt;
&lt;br /&gt;
Create functions so that it is easy to read, write and initialize the SD card.&lt;br /&gt;
&lt;br /&gt;
Use the example projects in the &amp;quot;Microchip Solutions/USB Device - Mass Storage - SD card data logger&amp;quot; and &amp;quot;Microchip Solutions/USB Device - Mass Storage - SD card reader&amp;quot; folders as a guide.&lt;br /&gt;
&lt;br /&gt;
Use your code to create a folder on the PIC32 and write 1000 bytes of data to a text file in that folder. How long does it take? Make sure the PC can read the file.&lt;br /&gt;
&lt;br /&gt;
Create a folder on the SD card with the PC and place a text file in the folder with 1000 bytes of data. Read the file with the PIC32. How long does it take?&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:  Code contains errors.  Use at your own risk.  Hardware on circuit diagram and breadboard have been checked for accuracy.&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Secure digital cards, or SD cards, are inexpensive and common mass storage devices that can be interfaced with our PIC to provide a larger nonvolatile data storage space.  In this lab, we will interface our PIC32MX460F512L to communicate with a 2GB FAT32 SD card to allow reading and writing of data.&lt;br /&gt;
&lt;br /&gt;
The original program stems from tutorials from the book &#039;&#039;Programming 32bit Microcontrollers in C -- Exploring the PIC32&#039;&#039; by Lucio Di Jasio.  We used the tutorials from Day 14 and 15 to generate our code for SD card reading and writing via SPI communications. The main problem with this tutorial is it is made for the PIC32MX360F512L on the Explorer16 board, so many changes were required in order to run even small sections of the code.  Also, the code from the book contains obvious bugs that were not found before publication.&lt;br /&gt;
&lt;br /&gt;
In terms of hardware, please obtain the following:&lt;br /&gt;
   1)  PIC32MX460F512L&lt;br /&gt;
   2)  Breakout board for SD Card - [http://www.sparkfun.com/commerce/product_info.php?products_id=204 BOB-00204]&lt;br /&gt;
   3)  Header Pins for Breakout board&lt;br /&gt;
   3)  SD Card&lt;br /&gt;
   4)  Four 10K ohm and two 1K ohm resistors&lt;br /&gt;
   5)  2 or more LEDs for debugging&lt;br /&gt;
&lt;br /&gt;
== Circuit ==&lt;br /&gt;
&lt;br /&gt;
The SD card holder has 11 pins with only 6 being directly used for communication with our PIC. The SD card will be powered off 3.3V from our PIC, which will come our mini-usb connection.  10K and 1K resistors are added to allow for a voltage drop for each connection.  LEDs are added for the Write Protect (WP) and Card Detect (CD) to see if the card is being read properly externally from the PIC.  The LEDs turning on signifies that the card is detected and write protect is off.  We did not use a resistor for the clock line. The IRQ and P9 pins on the SD card holder were not needed for SPI communication, so they were not connected to the PIC.  However, they need to be powered for the SD card holder to operate properly. &lt;br /&gt;
[[Image:EB_WF_BK_Circuit diagram.png|thumb|center|upright=3|alt=Circuit diagram for communicating between a PIC 32MX460F512L to communicate with a 2GB FAT32 SD card.|Circuit diagram for communicating between a PIC 32MX460F512L to communicate with a 2GB FAT32 SD card]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  PIN Label&lt;br /&gt;
!  Function&lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RC1 SDCS&#039;&#039;&#039;&lt;br /&gt;
|  Digital output for SD card select&lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RG8 SDO2&#039;&#039;&#039;&lt;br /&gt;
|  Module 2 SPI output from the PIC to the SD card &lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RG6 SCK2&#039;&#039;&#039;&lt;br /&gt;
|  Serial Clock module 2  &lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RG7 SDI2&#039;&#039;&#039;&lt;br /&gt;
|  Module 2 SPI input from the SD card to the PIC&lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RC2 SDCD&#039;&#039;&#039;&lt;br /&gt;
|  Digital input from SD card for card detect&lt;br /&gt;
|-&lt;br /&gt;
|  &#039;&#039;&#039;RC3 SDWP&#039;&#039;&#039;&lt;br /&gt;
|  Digital input from SD card for write protect &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We soldered square pin headers onto the SD card holder to allow easy connection to our breadboard.  Please see our circuit below for more detail.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:EB_WF_BK_HardwarePic.png|thumb|center|upright=2|Hardware and wiring setup for PIC32MX460F512L in NU32 board configuration]]&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
The code used for this project was based upon the companion code to the recommended text &#039;&#039;Programming 32-bit Microcontrollers in C: Exploring the PIC32&#039;&#039; by Lucio di Jasio. The complete text in PDF form can be accessed [http://www.scribd.com/doc/16601628/Programming-32bit-Microcontrollers-in-C here]. The relevant sections for our project were Day 14: Mass Storage and Day 15: File I/O, which can be found on pages 403 and 427 of the text, respectively. &lt;br /&gt;
&lt;br /&gt;
All the necessary companion files for Days 14 and 15 can be downloaded [[Media:LAB5-SD Card Reader.zip|here]]. This code has been modified slightly for the purposes of our project. One major modification was the exclusion of the LCD screen and accompanying code, which was left out for the sake of simplicity. Our group focused on the Day 14 code, which can be found in the &amp;quot;14 SDMMC&amp;quot; folder. Upon opening the MPLAB Project &amp;quot;SDMMC,&amp;quot; the user should see three .c files in the Source Files folder. These include Explore.c, RWTest.c, and SDMMC.c. Under the Header Files folder, should be HardwareProfile.h, HardwareProfileNU32.h, and SDMMC.h. Finally, procdefs.ld should be included under Other Files. &lt;br /&gt;
&lt;br /&gt;
The complete code for RWTest.c is shown below. The rest of the files can be downloaded from the provided link. &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/*&lt;br /&gt;
**	RWTest.c&lt;br /&gt;
**&lt;br /&gt;
*/&lt;br /&gt;
// configuration bit settings, Fcy=72MHz, Fpb=36MHz&lt;br /&gt;
#pragma config POSCMOD=XT, FNOSC=PRIPLL &lt;br /&gt;
#pragma config FPLLIDIV=DIV_2, FPLLMUL=MUL_18, FPLLODIV=DIV_1&lt;br /&gt;
#pragma config FPBDIV=DIV_2, FWDTEN=OFF, CP=OFF, BWP=OFF&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;HardwareProfile.h&amp;gt;&lt;br /&gt;
#include &amp;lt;explore.h&amp;gt;&lt;br /&gt;
#include &amp;lt;SDMMC.h&amp;gt;&lt;br /&gt;
#include &amp;lt;plib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;fileio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define START_ADDRESS       10000   // start block address&lt;br /&gt;
#define N_BLOCKS            10      // number of blocks&lt;br /&gt;
#define B_SIZE              512     // sector/data block size&lt;br /&gt;
&lt;br /&gt;
char    data[ B_SIZE];&lt;br /&gt;
char  buffer[ B_SIZE];&lt;br /&gt;
&lt;br /&gt;
main( void)&lt;br /&gt;
{&lt;br /&gt;
    SYSTEMConfigPerformance(SYS_FREQ);&lt;br /&gt;
    mInitAllLEDs();&lt;br /&gt;
    TRISCbits.TRISC1 = 0;&lt;br /&gt;
&lt;br /&gt;
    LBA addr;&lt;br /&gt;
    int i, j, r;&lt;br /&gt;
&lt;br /&gt;
    // 1. initializations&lt;br /&gt;
    initSD();		        // init SD/MMC module&lt;br /&gt;
&lt;br /&gt;
    // 2. fill the buffer with pattern&lt;br /&gt;
    for( i=0; i&amp;lt;B_SIZE; i++)&lt;br /&gt;
        data[i]= i;&lt;br /&gt;
&lt;br /&gt;
    // 3. wait for the card to be inserted&lt;br /&gt;
    while( !getCD());       // check CD switch&lt;br /&gt;
    Delayms( 100);          // wait contacts de-bounce&lt;br /&gt;
    if ( initMedia())       // init card&lt;br /&gt;
    {  // if error code returned&lt;br /&gt;
        goto End;&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
    // 4. fill 16 groups of N_BLOCK sectors with data &lt;br /&gt;
    addr = START_ADDRESS;&lt;br /&gt;
    for( j=0; j&amp;lt;16; j++)&lt;br /&gt;
    {&lt;br /&gt;
        for( i=0; i&amp;lt;N_BLOCKS; i++)&lt;br /&gt;
        {&lt;br /&gt;
            if (!writeSECTOR( addr+i*j, data))&lt;br /&gt;
            {  // writing failed&lt;br /&gt;
                goto End;&lt;br /&gt;
            }&lt;br /&gt;
        } // i&lt;br /&gt;
    } // j&lt;br /&gt;
    &lt;br /&gt;
    // 5. verify the contents of each sector written  &lt;br /&gt;
    addr = START_ADDRESS;&lt;br /&gt;
    for( j=0; j&amp;lt;16; j++)&lt;br /&gt;
    {&lt;br /&gt;
        for( i=0; i&amp;lt;N_BLOCKS; i++)&lt;br /&gt;
        {   // read back one block at a time&lt;br /&gt;
            if (!readSECTOR( addr+i*j, buffer))&lt;br /&gt;
            {   // reading failed&lt;br /&gt;
                goto End;&lt;br /&gt;
            }&lt;br /&gt;
		while(1){&lt;br /&gt;
			mLED_3_On();&lt;br /&gt;
		}&lt;br /&gt;
            // verify each block content&lt;br /&gt;
            if ( memcmp( data, buffer, B_SIZE))&lt;br /&gt;
            {   // mismatch&lt;br /&gt;
                goto End;&lt;br /&gt;
            }&lt;br /&gt;
        } // i&lt;br /&gt;
    } // j&lt;br /&gt;
&lt;br /&gt;
    // 7. indicate successful execution&lt;br /&gt;
&lt;br /&gt;
End:&lt;br /&gt;
    // main loop&lt;br /&gt;
    while( 1);&lt;br /&gt;
&lt;br /&gt;
} // main&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code first includes a section for initializations including initializations for the SD card. The function initSD initializes Card Select as an output as well as setting the clock speed. The LED initialization is included only for the purposes of debugging and can be excluded if desired.&lt;br /&gt;
&lt;br /&gt;
The code then waits for the SD card to be inserted before initializing the media. This function includes enabling and resetting the SD card. &lt;br /&gt;
&lt;br /&gt;
Finally, the program writes blocks of data to the SD card. If successful, it will read the data back again. It is at this point that our code fails. Specifically, in the function writeSECTOR, the data is sent and then the code checks to see if the data was accepted. The data accept check is currently returning 0. This seems to suggest that the SD card is not successfully storing the data.&lt;/div&gt;</summary>
		<author><name>BenjaminKolodner</name></author>
	</entry>
</feed>