Tuesday, January 19, 2016

Solidworks to gcode for ShapeOko 2 using Autodesk Fusion 360 CAM

I've been searching for a while to find the best (and cheap) way to go from Solidworks 3D CAD files to gcode to run my ShapeOko2. After reading through the forums and trying a couple different options, the software the worked the best for me was Autodesk Fusion 360's built-in CAM package. Fusion 360 is a full featured 3D CAD package- and the best part is that it is free to students / hobbyists. I think that's a great strategy to widen their user base, and it's beyond me why Solidworks doesn't adopt a similar model.

The first parts I wanted to cut were some 1/4" thick 6061 aluminum sections for a home-built adapter to put a Trail-A-Bike on my Yakima roof rack.

I could have modeled the parts in Fusion 360, but since I'm more familiar with Solidwork's interface, I created the .prt files in Solidworks then imported them into Fusion 360. Another option for model creation is Onshape's excellent CAD package- which is very similar to Solidworks, and also free for Home users.

So, the software toolchain I used was:

  1. Model in Solidworks, save .prt file
  2. Import into Fusion 360
  3. Use Fusion 360's CAM module to create the toolpaths
  4. export Gcode
  5. use gcode sender to send to Shapeoko2

Creating a toolpath from a .prt file is much more involved than simply 3D printing a part- with a lot more pitfalls. It took me quite a few tries to get the process to work property. I cut out a complete set of parts from 1/4" plywood before I even tried cutting aluminum- it's a lot cheaper to scrap than aluminum!

I found a good tutorial video on Fusion 360's CAM:
https://www.youtube.com/watch?v=XYoovemQoiM

Initially I had some issues with Fusion 360's generic GRBL post processor (plug in to generate gcode optimized for the Shapeoko's software). After some searching I found and improved one to use:

Discussion:
https://camforum.autodesk.com/index.php?topic=6144.0

Link to post-processor:
https://camforum.autodesk.com/index.php?action=dlattach;topic=6144.0;attach=7615

I did find a couple settings to tweak on the post-processor:
set "retractheight" to 5mm
set output units to "mm" - definitely do not forget this, otherwise you'll have big problems.

Cutting aluminum with the Shapoko was also a trial and error process- lots of experimentation with feeds 'n' speeds and lubricant. I liked CRC True Tap coolant / lubricant I found on Amazon. WD-40 and 3-in-1 oil also seemed to work OK.

The final Trail-A-Bike rack adapter worked great- and kept the Trail-A-Bike safely secured during a 1,500 mile road trip.

I did learn some lessons about the Shapeoko2 cutting aluminum. I really want to do any modifications possible to stiffen the structure- stock it's pretty flexible to try and cut aluminum at anything but a very thin layer / stepdown.

Also, the plywood trial copy didn't exactly work- it was slightly thinner than 1/4", and was a little misleading about actual fit on the Trail-A-Bike. The plywood version fit exactly right, and the aluminum didn't. And, since I finished the aluminum version the night before the big road trip I didn't have time to re-design and re-cut all the parts- so I broke out the dremel and manually ground the parts down to make them fit. They were a bit ugly but still worked.

Cutting trial part from plywood
Completed trial part
Assembled Trial Rack Adapter

Assembled Trial Rack Adapter

Getting Aluminum cut set up

Cutting Aluminum
Completed Aluminum Part
Completed Trail-A-Bike to Yakima Rack Adapter:









Sunday, October 4, 2015

FPV Latency Measurement of GoPro 4 Silver & Quanum Complete FPV bundle

One really critical performance attribute of any FPV system is it's latency- how much time elapses between when the FPV camera on your remote vehicle captures a frame of video and when it appears on your FPV goggles or groundstation monitor. If this latency is too great, it'll be really hard to control your FPV vehicle since you are watching what happened in the past rather than immediate feedback.

There is an easy way to measure latency with your system. Place a stopwatch (or stopwatch app on your phone) in view of your FPV camera. Start the stopwatch. Then, take a picture of both the stopwatch and your FPV display. Subtract the FPV display time from the stopwatch display and you'll have your latency. It can be a little tricky to get everything lined up to get a good photo, especially with the el-cheapo FPV goggles I have.

Human reaction time is ~ 0.1 seconds or 100ms. Hopefully your measured latency is less than that!

I measured the latency of my FPV system:



Test #1: Phone stopwatch on the left, FPV goggles on the right
 Test#1: 26.10 - 26.03 = 0.07 seconds = 70 ms


Test#2

Test #2: 27.03 - 26.96 = 0.06 seconds = 60 ms

I'm pretty happy with the "measured" latency of the system- it seems like a GoPro4 with a real time video output cable, and the Quanum FPV bundle yields a latency of 60-70 ms. 

Tuesday, June 16, 2015

Redneck Canoe Thwart Fix

I have an ancient fiberglass canoe that I am "storing" for my brother. The Thwarts (or cross braces) were getting pretty rotten, and one had basically fallen off. The braces probably were not original equipment- they looked with 1/4's cut to length and screwed in. Since this canoe isn't a show piece and is only used occasionally, I thought I'd try something really cheap and easy for Thwart replacements.

Rotten Thwart! (cross-brace- not a yoke)
All ready for new Thwarts
I decided to try using EMT tubing- or galvanized steel conduit. It's super cheap- 5' long 1/2" diameter EMT tubing was less than $1.50 at the local Home Depot.

Step 1: Measure the stock Thwarts and cut the EMT to length with a hack saw

Step 2: Smash the ends flat- I used a combination of a big bench vise and a hammer. My bench vice has a built-in anvil. Everyone needs an anvil!

Getting ready to smash
Squishing with vice
Finishing the job with a hammer
Nice and flat




Step 3: Drill holes in the end for fastening hardware. I used M5 x 25mm stainless hardware, since I had some available.

Hole Drilled



Step 4: Install and go paddle!

Installed and ready to go!

Obviously these replacement EMT Thwarts are not strong enough to use as a portaging yoke, but they are certainly strong enough to hold the canoe sides in place.

Thursday, June 11, 2015

Stratasys UPrint SE Plus material container

Stratasys's Uprint SE PLUS is a great entry level "pro" 3D FDM printer. One minor annoyance is the printer comes with foil zip-lock bags for storing filament that isn't in use. When you have a team using the printer, and you've got a collection of colors, the foil bags make managing your filament inconvenient.Solutions that might work for hobby-level machines - such as putting the spools together into 5 gallon sealed buckets - won't work for the Stratasys as each spool has a keyed computer chip that must stay with the individual spool.

Sterilite makes a food container that works perfectly to store the filament spools. Sterilite's 03186606 food storage container seems almost custom-made to hold filament spools for the Uprint SE PLUS. The spool fits nice and snug in the container, and it has a rubber sealed top to seal out moisture.

These are sold at many retail outlets, and are also available at Amazon.com: Buy at Amazon here.





Friday, April 10, 2015

Q450 Quadcopter servo gimbal setup, Part 1

Digging back into FPV / Aerial Photography with a new camera gimbal
I was inspired by recent articles in Make magazine about FPV racing and the local Minnesota Autonomous Vehicle meetup to do some more quadcopter flying and building.  My main quadcopter is a Hobbyking Q450- which I originally bolted together a year or two ago with a crude FPV camera mount made from a Home Depot low voltage electrical box bandsawed and bent into something usable.  These days there are many, many better options for mounting FPV cameras- ranging from simple servo stabilized mounts through very sophisticated 3-axis brushless gimbals that yield professional video smoothness.

I was looking for a cheap and simple solution, and I ended up buying the "ActionCam Inline Gimbal GOPRO and FPV" kit from Hobbyking. I'm planning on using it to mount and stabilize both a GoPro and my small FPV camera. It uses two standard servos, and the Hobbyking KK2.0 flight controller I have will be able to control the servos without any software updates or hardware.

Kit Assembly
The kit comes with decent hardware, although it doesn't include the screws that join the upper and lower plates together.
Kit Contents

"Instructions"

I used a larger, standard sized analog servo for the roll axis

I originally tried a smaller Hextronik HXT500 5g servo for the pitch axis, but it was a little too small. 

A Turnigy TG9e 9g servo was a good fit for the pitch axis

Unpacked hardware kit. The camera mount pivot is pretty nice, it seems to have some rotary damping

I originally tried pressing the camera tray on to the servo directly. It wasn't quite the correct width- a tad too narrow.

So, I decided to bolt the camera tray on to a servo horn. I drilled the horn in two placed for 2/56 screws. I accidentally cracked the servo horn when I screwed in the outer screw. I didn't have a 2-56 tap so I drilled the holes to size then tapped the holes with a screw- mostly worked. I have since ordered a set of 2-56 taps off of e-bay- next time I'll use the right tool and avoid cracking the servo horn. 

Servo mounted to the camera tray using 2x 2-56 SHCS + 4x washers. I used washers under both the nut and the screw head to allow for maximum clamping of components. 

Second view of mounted pitch servo

Mounting the roll servo. My first try placed the servo horn on the "inside" of the frame, but there wasn't enough clearance for the mounting screws- they hit the servo. So I moved the servo horn on the "outside" of the frame. 

Roll servo showing 2x 2-56 SHCS, washers and nuts


Upper mounting plate attached to servo. (note this is a photo of the first try with the kit's hardware which I ended up ditching) I decided to use my own 2-56 hardware because it seemed to fit better. I also decided to place the roll servo above the vibration damping plates, then attach the vibration damping plate to my Q450 frame. This arrangement seemed to make the most sense for my purposes. 

Roll servo attached to the upper plate- first try with the kit hardware. The threaded ends of the screws extended too far past the upper plate and interfered with the lower plate. 

. Now with the 2-56 screws attaching the servo to the upper plate. Vibration damping balls (blue) installed

Note the head of the screws securing the roll servo are under the upper plate, double-nutted on the top. 

Bolting the lower plate onto the Q450 quadcopter frame


I had to dremmel the slots on the Q450 quad copter frame slightly wider to allow the lower mounting plate to fit. 

Camera gimbal installed. I used 4x 4-40 x 0.75" SHCS to attach the upper mounting plate (with camera gimbal attached) to the lower mounting plate. I didn't have any 4-40 lock nuts, so I used a few drops of blue locktite threadlocker on the threads to keep the nuts from vibrating off during flight. I only used screws on the outside group of damping balls to save weight. 

Ready for plugging in the servos and setting up the KK2.1 flight controller. 

The setup that worked for me for plugging in the camera gimbal servos was the Roll servo in the KK2.1 output #7, and the Pitch servo in KK2.1 output #8.

KK2.1 Setup- first go to "Camera Stab Settings"

The "Gain" settings adjust how much the servo corrects. the "Offset" setting adjusts the neutral location of the gimbal. To check functioning- first take the props off the motors. Then throttle up slightly so the motors are spinning- only then will the gimbal react to motion of the quadcopter. If the gimbal moves the wrong way, change the gain to negative. The gains shown in the photo above is what I'm starting with that appears OK. 
Next steps:

  • Adjust servo arm position on both servos to try and get the offset to zero. This will get a larger range of motion in one direction in both axis. 
  • run servo cables
  • attach both gopro and FPV camera to gimbal
  • fly!

Sunday, February 15, 2015

Magicshine mount for Giro Edit

I just purchased a new helmet for winter riding- I was tired of getting a brain freeze from riding in 10 degree temps with my regular helmet and Gore balaclava underneath. Way back in the day I would have just duct-taped the helmet vents, but these days there are lots of great winter helmet options. The helmet is great by itself- and it has a nice bonus feature- a built-in GoPro mount. One of the nice things about this new helmet and printed mount is that no additional purchased hardware is needed to attach the light.

I designed a mount for the gopro adhesive mount I attached to my summer helmet, but the angles were not right for the new helmet. So, off to Solidworks to design a new mount. The first try seemed to work well. I might add a feature to clip on the wire, but other than that it's good to go. I might also try moving the light further back towards the helmet.

I placed the Solidworks .prt and .stl files on thingiverse if you want to print your own.

GoPro adapter printed

MagicShine bolted on

Magicshine LED mounted to the Giro EDIT