15 May 2016

2.77 PUPS 11: Documentation

Thanks a lot, Professor Slocum, for teaching this great class! I've learned a lot and I can't wait to apply my new skills to my future designs. 

Here is a link to my final report: Dropbox Link

Owner's Manual: 

Home configuration:

  • Clamp (Y) axes both fully disengaged, back clamp screw touching the rear top plate. 
  • X axis against wall near its stepper motor
  • Z axis all the way up.

Electronics and turning on your FASBot: 

  • The FASBot uses a 22.2 LiPo battery, which can last it a long time. Place the battery inside the FASBot's electronics compartment on the hook-and-loop fastener patch. The power connectors should be facing AWAY from the wall.
  • To turn the FASBot on, flip the switch on the backside UP. 
  • A digital display shows the battery's voltage. This battery will charge up to 25V and should be disconnected and charged before it reaches 18V.

Software and communicating with your FASBot: 

  • The FASBot uses an Arduino Uno with grbl CNC firmware.  
  • The Arduino Uno is fitted with an XBee wireless communication device on a shield. An identical Xbee attached to a USB dongle is required to communicate with the FASBot. This XBee will show up as a serial port on your computer. In order to allow for reliable wireless communication, a serial baud rate of 19200 must be used. 
  • The FASBot can be controlled using GCode from the CNC GCode Interpreter. 
  • For its intended purpose in aircraft manufacturing, a Python program was written in order to allow the FASBot to be integrated with the Triple Scissor Extender and allow the pair to work together autonomously. The FASBot must be turned ON before running the Python program. 
FASBotTest.py
 """  
 FASBot control software  
 by Daniel J. Gonzalez - dgonz@mit.edu  
 Spring 2016  
 """  
 import serial  
 import time  
 # Open grbl serial port  
 s = serial.Serial('COM13',19200)  
 def setupFASBot():  
   # Wake up grbl  
   s.write("\r\n\r\n")  
   time.sleep(2)  # Wait for grbl to initialize  
   s.flushInput() # Flush startup text in serial input  
   sendG('G20')  
 def sendG(msg):  
   print 'Sending: ' + msg  
   s.write(msg+'\n')  
   grbl_out = s.readline()  
   print ' : ' + grbl_out.strip()  
 def exitFASBot():  
   # Close file and serial port  
   s.close()  
 def sendFasten():  
   #Drive Spindle  
   sendG('S100 M3')  
   #Move Spindle Down  
   sendG('G90 G0 Z-1.25')  
   #Turn OFf Spindle  
   sendG('M5')  
   #Move Spindle Back up  
   sendG('G90 G0 Z-0.5')  
 def test():  
   setupFASBot()  
   """  
   for i in range(0,25):  
     sendG('G90 G0 X3')  
     sendG('G90 G0 X4')  
     raw_input(" Press <Enter> to Move to rest location.")  
   """  
   #raw_input(" Press <Enter> to Start up FASBot.")  
   #Move Spindle To Side  
   sendG('G90 G0 X4.5 Z-0.5') #(1.783/2) #(1*(1.75))  
   #raw_input(" Press <Enter> to Close Clamp.")  
   #Close Clamp  
   sendG('G90 G0 Y1.6')  
   #raw_input(" Press <Enter> to Start Fastening Job.")  
   for i in range(0,6):  
     sendG('G90 G0 X'+str(i*1.75))  
     sendFasten()  
   #raw_input(" Press <Enter> to Move to pickup position.")  
   #Move Spindle Home  
   sendG('G90 G0 X4.5 Z0')  
   #raw_input(" Press <Enter> to Open Clamp.")  
   #Open Clamp  
   sendG('G90 G0 Y0')  
   #raw_input(" Press <Enter> after FASBot is removed from TSE.")  
   #Move Spindle To Side  
   sendG('G90 G0 X0') #(1.783/2) #(1*(1.75))  
   exitFASBot()  
 test()  

This test program requires the user to press ENTER in order for the FASBot to perform the next move. By putting this code into the code running the Triple Scissor Extender, they can both be used together autonomously. For the demonstration, two computers were used, each running its own program that required the user to press Enter

Once the Python program exits, the FASBot may be turned off.

Aaaaaaaaaaaand that's a wrap! 

Seek and Geek 11: Ultimaker 3D Printer

The Ultimaker is a great 3D printer that is known in the desktop 3D printing community for printing quickly and reliably. It can use both ABS and PLA filament, and the original is made from a lasercut plywood construction and assembled using slotted "t-nuts" (The community calls these bolted joints t-nuts even though these aren't real T-Nuts, which you can use to clamp parts to a mill bed, among other things).

This sounds similar to my FASBot! Here I will look into the similarities and differences between the two.

To start, the material, while also wood, is plywood, as opposed to MDF. According to some online sources (http://www.diffen.com/difference/MDF_vs_Plywood), plywood is stiffer than MDF an is less sensitive to moisture. 

How much stiffer is plywood than MDF? According to Matweb, the Young's Modulus of plywood is 9.8 GPa. According to MakeItFrom, the Young's Modulus of MDF is only 4GPa. Plywood is over twice as stiff! 

This is probably bcause MDF is compressed bits of wood fibers while plywood has long grains. It's the difference between baking a cake of carbon fiber shavings and epoxy versus making a tube from longer strands of carbon fiber epoxied together. The latter will be stronger. 

The main structure forms a cube that is held together with slots and tabs for alignment, and "T-nuts" to keep everything together. 

The printer uses belt drive for the X-Y axes, and a hefty leadscrew for the Z axis. Here are the main guides that transmit force to the printer head. A single, long bushing is pressed through each, that looks about 3X as long as the diameter of the shaft. Saint Venant strikes again! The belts are tensioned using those little clamps sticking out the sides. 

Each axis has a pair of these guides, spaced far apart. Each slides along a shaft that also transmits motor torque. The axis shafts are held at each end with a radial bearing that are held in place with a pair of plates (shown above disassembled). 


Like my FASBot clamp axes, the Ultimaker transmits motor force to one direct leader slide and one follower slide through a belt transmission. Using this construction, force can be applied to both sides at once, preventing jamming. Each pair of slides pushes another shaft sideways, causing the printer head to move. The printer can still slide along this shaft, but is constrained by an orthogonal shaft coupled to another pair of slides. 

The build platform is the carriage of the Z axis. It has two beefy sides to allow it to be cantilevered without much deflection, and a pair linear bearings allow it to move only up and down.

The bearings are held in place with stacked parts. Note that the length of this bearing is about 3X the diameter of the guide shaft. Saint Venant! 

The leadscrew is constrained at the bottom using a rigid shaft coupling that attaches a stepper motor located underneath the printer bottom plate. A bearing supports the shaft coupling, and thus the leadscrew, axially. The leadsrew is not constrained at all from the top, which would allow it to. This is acceptable, because the printer process is only sensitive while the bed is moving downward, and this occurs in tiny steps of 0.001" (~ 20 microns) at a time. The only forces the leadscrew will see are downward gravitational forces. 

13 May 2016

2.77 PUPDate! (PUPS 10 Part 2)

What a ride this class has been! Almost done!

In the last PUPDate, it's made obvious that everything works to some extent.
But how well does it work? What didn't exactly work? What would I change in a second iteration? 

I tested the axis positioning repeatability and backlash to validate the module's design. Because both the clamp and nut driver axes are based on the same design, and because most axes are hard to reach or to instrument (instrumentate?), I decided to test only the X- axis. 



Here, the FASBot consistently moved slightly under the 0.005" it was commanded to move, implying a systematic error. This is possibly due to rounding errors in the conversion from mm to inches in the grbl firmware, which add up after a few hundred steps. 

After moving left, I attempted to switch directions and move right in order to measure the axis backlash. I kept track of how many jog commands it took before it began to move again. The backlash is 0.025", just under 1/32". This is probably due to the exact locations of the tooth engagement and the series spring compression. I can probably use a stiffer spring with a longer stroke, or disassemble the axis and find the right combination of nut rotation that allows for the most spring compression and the least backash. 

The repeatability test had the FASBot continually moving its X-axis between 4 and 3 inches in order to move past the backlash hysteresis. The dial indicator was zeroed for the first data point reaching 4 inches. I measured each data point when the carriage stopped at 4 inches and manually entered it into MATLAB. 


3 Test Trials were conducted, with the FASBot being homed after each one. 


Tests 1 and 2 exhibit similar behavior, with the machine always reaching farther and farther away from the original position. Test 2 was the worst, with the FASBot moving further and further away from the zero'd position after each move. The maximum deviation was 0.035 inches, more than the axis backlash! I imagine this behavior can be attributed to the stepper motor skipping steps every time it moves, perhaps because it must overcome static frictional torque. If my axes are overconstrained, I can add a flexure to or machine the sides of one of my axis bushings in order to eliminate this overconstraint. 

Microstepping may have also been useful to prevent skipping steps due to motor vibration. I conducted these tests with full stepping, in order to maximize motor torque, but the sharp vibrations in the stepper motor during acceleration/deceleration could have been enough to cause it to skip steps. I could switch to half- or quarter-stepping and see if I can achieve smoother motion with no continuous deviation. All of the error can be eliminated using feedback control. 


The best repeatability was achieved in Test 3, with a maximum deviation of 0.0055 inches. Perhaps after all of the previous trials, the bearings had smoothed out and the static friction was decreased, or maybe I just got lucky with the motor vibrations.