KiCad and TextExpander - How I saved a few hours of BOM making

2016-07-30 21.03.20Folks that follow my various projects have probably noticed that I've recently formed an instrumentation and consulting company. I've had great fun doing several jobs for folks ranging from CAD design of brackets to writing numerical models for projects to designing custom measurement solutions. I've also been very busy designing some exciting new hardware that I hope will be available soon. In this post I wanted to share a time saving trick I used in KiCad while designing my printed circuit boards for one of these projects.

When designing things to be made in any quantity by an assembler or manufacturer (and for financial reasons) you need to keep a really good bill of materials or "BOM". Doing this often involves linked Excel sheets, binders of parts lists, and general gnashing of teeth. When working on the BOM for my circuit boards I found an excellent post by Dan over at Rheingold Heavy on designing for manufacture with KiCad. In this post he outlines a really nice workflow on how to keep track of part numbers and other meta-data  for each component. Ideally this would happen at the beginning of a project. You would assign a part (say a resistor) a manufacturer's part number, distributor's part number, etc. Then, you can copy that component (and it's metadata) as many times as you need by simply hovering over it and hitting "C". Well, I already had my entire schematic and board layout completed. I had a lot of components that were used many times (think 10 k resistors, 0.1uF caps, and jumpers). I didn't want to keep copying and pasting the information over and over from the websites of the manufactures and distributors and I didn't want to delete the components and copy in components with metadata for fear of destroying my completed project, footprint associations, and who knows what else. My solution? TextExpander.

TextExpander is a program that stores snippets of text and lets you type a few trigger keys to place all of that text in a fraction of a second. I've used it for years and it has easily saved me tens of hours on my laptop. I've got snippets for date and time stamps, outlines for our podcast, form replies about common technical issues in our lab, chunks of code that I use a lot, and really just about anything else you can imagine. (I forgot to add LaTeX equations/tables in there, but that alone saves me a lot of time on every paper I write.) The pricing model for TextExpander has changed recently, and I'm not a huge fan of the new scheme, but that's beside the point.

My idea was simple. I made a set of snippets that would expand into web addresses and part numbers. I would copy information in for a certain part, then using TextExpander add that information to add parts of that kind. After that, I'd change the snippets to the next part and repeat. Yes, this took awhile, but nowhere near as long as if I'd done all of the population by "hand". I've made a quick demo video below to show you how it's done. I hope this ends up being useful to others, let me know of any tricks you've come across to speed your DFM process.

Cheerson CX-10 Motor Repair

2016-06-07 19.53.32

If you've been following my drone work through Servo or on social media, you have probably seen me posting pictures of the tiny Cheerson CX-10 quad. You can pick them up for ~$15 on Amazon and have hours of fun. As you can imagine, there is a fair share of crashing at first while getting used to the response of such a small vehicle. After a few run-ins with the wall, I could fly it pretty well though. I picked up a couple more, including a model with a camera. Amazing for the price. A couple of weeks ago there was some random falling out of the sky behavior, followed by the realization that one of the props on two of the three quads was not turning anymore. I checked for any hair/carpet wrapped on the shafts, but they were clean.

I needed to repair the quads as I'm working on a little project modifying their controller for a future Servo article (preview photo below). Sure, they are cheap enough that they are almost disposable, but I figure if nothing else I could swap some parts to get at least one working vehicle out of the two. Time to crack it open!

A teaser of a future project that I'll be writing up in Servo.

A teaser of a future project that I'll be writing up in Servo.

There are four small screws holding the plastic half-shells together. After removing those and placing them in a container for safe-keeping I gently pried open the plastic clips at the end of each motor extension arm. This was easy to do with just my fingernails. The two parts of the case came off and I was staring at the printed circuit board. (Side note: the camera is some module they just tacked on, so I just pushed it out of the way and ignored it.)

Four screws hold the airframe together. A jeweler's screwdriver set was essential!

Four screws hold the airframe together. A jeweler's screwdriver set was essential!

The problem was immediately obvious - the ground wire to the nonfunctional motor had been severed. Looking at a few other wires, it looks like they commonly get pinched in the enclosure during assembly. After repeated run-ins with objects, the wire was eventually sheared.

Note the broken blue wire in the upper right of the photo. Luckily this was an easy fix.

Note the broken blue wire in the upper left of the photo. Luckily this was an easy fix.

Using a little bit of magnet wire and a magnifier I was able to splice in a new section of wire. I was startled when the motor somehow jumped to life as the free end of the magnet wire swept across the PCB during the repair. I insulated it with a bit of electrical tape. The tape prevented me from inserting one of the four screws upon reassembly, but so far that doesn't seem to be a problem. Putting things back together took just a few minutes and I was happily flying again!

2016-04-16 19.42.51 copy

The moral of this story is that if you have one of these little quads and it seems to have died, go ahead and open it up! If the problem comes back, I may buy some extra motors or start a parts pool from other quads. Looking at the construction of the quad was a bit scary though - I think they will live in my LiPo fire safe now.

If you want to know more about how these little quads work, checkout these blog posts by Elecia White in her toy teardown series. Also, if you haven't listened to the podcast Elecia and Chris host "" and you're reading this, you would probably enjoy it!

See you in a couple of weeks with a revisit of a popular myth we tested about a year ago!

Build a Drone!


Things have been a bit slow here at the blog with a lot of things happening at work and the fact that I'm not also very excited to be writing a monthly column about multi-rotors in Servo Magazine! Not to worry though, I've still got some excellent projects queued up for the blog, including one that has currently filled my living room with sawdust.

In this post, I wanted to share with you a video of the drone I scratch built flying around and encourage you to follow along and build it as well! The entire project cost about $350 and produced a really nice and versatile platform that I'm going to be adding instruments to, as well as GPS, telemetry, etc. The May issue of Servo featured the monthly column introduction on the cover! That column talks about FAA rules and how to get registered. The following columns are going to go through building the drone, step by step. We'll start off with the airframe, then move on to adding electronics, setting up the flight controller, and finally flying under manual and computer control. We already have other articles planned that include reviewing commercially available quads, as well as hardware hacking them for new functionality.  If you like the blog, you might like to follow that series of articles as well!

Think Different - Upgrading a "Sad" iMac


During the spring announcements, Apple executive Phil Schiller said that about 600 million people are using computers over five years old and said "This is really sad." The comment made a lot of folks angry, especially those in despair over the ever rising cost of Apple hardware with seemingly less functionality. Along with several of my co-workers (all Apple fans, including myself) there has been chatter of what the company's future holds. Today I'd like to tell the brief story of my Apple computing adventures and recent hardware upgrades I made to a 2007 iMac that have it running like a champ.

I was formerly a PC person, but during my undergraduate I was converted to Mac by the ease of developing code and doing scientific research in a *nix based environment. Macs were less prone to viruses, superior hardware that was designed to be compatible with superior software. I had no problem paying good money for this hardware, it lasted and lasted. I dove in with a white MacBook and 27" iMac in 2007. The MacBook had some cracking issues with the plastic that Apple was swift to repair for free. The iMac was flawless. I could upgrade the RAM easily. The hard drive wasn't so easy, but that's for later.

In 2011 I decided to buy a MacBook Pro laptop as my primary machine along with the beautiful 27" thunderbolt display. This was a very expensive trip to the mall! I still use the monitor daily and love it. The MacBook Pro did the majority of my computing, until late 2013 - wait what? Yes, due to a design flaw, the excessive heat from intense computation had cracked solder joints on the logic board. Others I know were plagued by this as well. It was an ~$800 repair to get back to working, but it could be expected to fail again. I set aside a several thousand dollar machine after not quite 3 years of service. I had just put a hybrid SSD in and more RAM to add insult to injury. Apple did nothing.

By this point in time I had a nice 2012 iMac at work that all of my "serious" computation happened on, so I bought a MacBook Air for my laptop/home machine. It's light and the battery life is unbeatable. I really like it, but in just a few years it has aged poorly. I'd like to get more RAM inside and a larger SSD. That's not possible since in an effort to make it thin, these components have been soldered to the logic board. There are no upgrades possible. Again... what? I can't take advantage of the rapid reduction in storage prices? Ugh.

Now to the point of the story. My wife has been using my 2007 iMac, the first one. It was getting slow and unfriendly to use, so I decided to max out the RAM (4Gb) and put in an SSD. For a couple hundred dollars in parts and an evening's worth of work, the computer runs like a champ. It's certainly not like a new machine, but it will last for several more years and after that would be a great machine for my 3D printer to use full time. It still runs Adobe Illustrator and other graphics programs. It's a perfectly usable machine. That's all because I can upgrade it. Sure, instilling the new hard drive was a PAIN. I had to pull the monitor out and ended up doing it twice because of a contact issue. But it worked and we got more life out of it!

2016-03-12 18.41.37

While in there, I noticed that one of the power supply filter capacitors was bulging and likely bad. Not a problem! This power supply and system was over-engineered. Sure the computer was a bit thicker than my new iMac, but hey - I didn't have to replace the power supply! Weight and size really count when sending things to space, but I'm pretty sure most Apple hardware stays firmly on the ground.

2016-03-12 18.41.32

What's the point of me telling you about my history of Apple purchases? Am I not biased since I am a MacBook Air, iMac, iPhone, iPad, Apple Watch owner? It's to say that I'm worried. I've always treasured Apple products because they just worked, they let me do my job with the least amount of friction. Recently I've spend more time fighting limitations of machines that I can't upgrade, battling bugs in software released to the public that Steve Jobs would have called "beta" at best. Am I ready to jump ship? No. Am I looking around? Yes.

As many of you know, I'm involved in a lot of engineering projects as well as pure geophysical research. A lot of engineering software like SolidWorks is designed to run on Windows. Some programming and hardware CAD/CAM tools I use are Windows only as well. I've generally run a virtual machine on my computers with Parallels. (Which is now a subscription model.) It is quickly becoming the case that I'll spend time in both operating systems everyday. I even bought a Microsoft Surface because the note-taking with a pen experience is so much better than Apple's offerings.

Many CAD tools are also beginning to offer Ubuntu Linux versions as well. I've even found these to be better maintained that the Mac native versions of such applications.

I used to say that I was going to build a desktop with amazing specs and run Ubuntu on it. I'd sure miss some of my Mac Apps though, things like TextExpander, OmniFocus, and OmniOutliner to name a few. I do have them on iOS as well. I'm very curious to see what happens in the next five years as things become increasing platform independent and cloud based. Will the switch between devices become seamless? Microsoft's surprise announcement about the integration of the bash shell into Windows 10 yesterday certainly showed that they are willing to cater to developers that Apple is beginning to limit. The multi-platform OneNote product is also exceeding anything Apple Notes can do.

Right now, I can't say where we'll all be in a few years. The fact that Apple used their most recent event to announce another size of screen and watch bands instead of new Mac hardware has me worried. Power users seem to be a non-priority for Apple since the over-priced and non-upgradable Mac Pro (trashcan version) was released in 2012. I need reliable, strong computers and I'm getting tired of carrying 2 laptops, a tablet, a phone, an iPad, etc. I'm hoping the situation becomes more clear in a few years when it will be time to retire a lot of my current hardware.

A final sidenote - I recent received an 8Tb hard drive for review. In the days of the tower Mac Pro I could have popped it into one of the many equipment bays, maybe added a new video card while I was there. Now I need to buy an external dock and takeup a USB-C port. Maybe I should look into NAS systems... Maybe I should build a tower at my workbench. How have you been thinking about your computing environment recently? I'm wondering if it's time to think different.

How Thick is the Crust?

Earth's Structure (Wikipedia)

Earth's Structure (Wikipedia)

I think the first time I really heard much about the Earth's crust was on the TV show "Bill Nye the Science Guy." (In fact, I was obsessive about not missing an episode as a child and I was ecstatic when I got to see Bill speak at Penn State last year.) He talked about earthquakes and Earth's structure, cut in with funny segments of a family telling their son, "Ritchie, eat your crust."

The crust in an interesting thing - it's what we live on top of and there are lots of interesting places where it's different due to geologic processes that concentrate certain types of materials. The crust is broken up into around a dozen major tectonic plates that move at about 4-6"/year. These plates are either oceanic or continental crust. Oceanic crust is generally relatively thin ~6 km (4 miles) and oceanic crust is much thicker at ~35 km (22 miles). The thin oceanic crust is also more mafic and dense than the felsic continental crust.

These differences create complex interactions when the plates meet each other at plate boundaries. We did a whole show on plate tectonics over at the Don't Panic Geocast recently, so if you'd like to hear about the discovery and arguments over plate tectonics you should check it out.

Today, I'd like to share a tool and Dr. Charles Ammon and I have made to visualize a crust model and allow anyone to explore the crust. All you need is Google Earth! We used a model called Crust 1.0 by Laske et al. that has how thick the crust (broken up into a few divisions) is for  64,800 points on the Earth along with some other crustal properties. That's every one degree of latitude and longitude! They put a lot of work into making this model. Generally we would use a Fortran program to get values out of the model, but Dr. Ammon had an idea to visualize the data in a more intuitive way with Google Earth. Over the Thanksgiving holiday I wrote a Python utility to access the model values and then we wrote a simple script that generates a Google Earth KML file based on the model.

All you have to do is head over to the project's GitHub page and click the "Download ZIP" button. While you're waiting on the download you can scroll down and read all about the development, the model, and find activities to try. Next, open folder you downloaded (most operating systems will automatically unzip it for you now) there will be several files, but the only one you need is the CRUST_1.0.kmz file.

Screenshot 2016-03-12 07.29.51

As long as you have Google Earth installed, double click that file and you'll see the Earth appear covered in red dots. If you zoom out too far, they will disappear though!

Screenshot 2016-03-12 07.31.49

Each red dot is a location where the model has the average crustal properties like how fast P and S seismic waves can travel and the density. All of these are explained in more detail on the project webpage. You should also try some of the projects we have listed there! As a starter, let's look at oceanic and continental crust and verify my assertion about their 3x thickness difference.

Clicking out in the Atlantic Ocean (make sure you are not on the continental shelf) we see about 13 km thick crust (the top of the mantle number). The water depth is also handy to have on-hand sometimes.

Screenshot 2016-03-12 07.35.15

Clicking well onto the North American plate we see about 36 km thick crust. Next you should head over to mountainous regions and basins and see how the structure of the crust is different - why is that? Sorry, no homework answers here!

Screenshot 2016-03-12 07.35.26

This is a really fun way to learn about the crust and a good reference tool as well! There are flyers in the docs folder that you can print to use as teaching aids or handout to students! We had a lot of fun making this 1-day project and hope that you'll explore it and let us know what you think! A big thanks to the folks that did the massive amount of work making the model - we just made it visible in Google Earth! Everything is open-source as always.

Build the PiBooth - Nuts and Volts Cover Story


While getting wedding arrangements ready a few months ago, my wife commented that she would like a Photo Booth at the wedding. I immediately did what I always do, write a Python script. She was thinking more of a table with props and disposable camera approach, but I decided to make it into a project that we could use on any occasion and have some fun with the Raspberry Pi.

I searched online thinking that surely somebody had already done this project and posted their code and instructions. I found a few examples of Pi based photo booth projects, but none that had code attached (mostly they said "my code is awful, so I won't share") and none that did exactly what I wanted. I wanted the booth to count down, take multiple photos of the guests, and store/tweet the photos. I also wanted it to be simple to plug in and turn on with no experience required - same for shutdown.

After a few afternoon coding sessions, I had the basic code and guts of the project working. A little time with some wood tools and I had a pretty decent looking enclosure setup as well!

An initial prototype circuit to test the code for the PiBooth.

An initial prototype circuit to test the code for the PiBooth.

Rough cutting the hole for the photo booth screen in the shop.

Rough cutting the hole for the photo booth screen in the shop.

I wanted to make sure that everything I did was out in the open to be reproduced. I ended up deciding to try writing a magazine article about the build for the electronics hobbyist magazine "Nuts and Volts." The editor sent me some guidelines and after a few hours I had a draft article.  A couple of months passed by while we iterated on figures and ideas, but I was very excited when I was contacted saying that this article was being considered for the cover of the March 2016 issue. As you can see - it was selected! Be sure to grab a copy of Nuts and Volts (check your bookseller/news-stand) and read all of the details. You can grab the code over on the GitHub repository. Thank you to all the wonderful folks at the magazine for making this happen and thank you to my wife for letting me run wild with this project! Let me know if you build one, or a variant. The applications can range from parties/events to making an automated I.D. card station for your company!

Figure 1

Guts of the project.

Guts of the project.

Tracking Earthquakes Across the Globe - Travel Times

A few days ago I had the Epicentral+ app running on my iPad sitting on my desk and saw an event come on the screen. By looking at what stations were measuring ground movement first, second, third, etc. I could make a good guess at the event's location. Did you know that, with the data from a single seismic station, you can begin to guess the epicenter?

Generally earthquake locations are performed using many stations and algorithms that have been tweaked for years as we want to get ever more accurate locations. The USGS does this location for many events every day. It's fun to keep a live feed of the global seismic data up and look at the patterns. This is possible thanks to applications like "Earth Motion Monitor" and "Epicentral+", both products of Prof. Charles Ammon. They are worth installing and having a look. Prof. Ammon has seen the value in being able to watch signals for long periods of time: you begin to pick out patterns and get an intuitive feel for the response seen due to different events. While I don't have nearly the amount of insight possessed by experienced seismologists, I wanted to show you a quick and simple way to figure out about how far an event was from a given station. If you combine that with some geologic knowledge of where plate boundaries are, you can likely narrow down the region and earthquake type before anything comes out online.

The event I saw is a pretty small event, a magnitude 5.8 near the Fiji islands; it'll work for our purposes and not provide too much distraction. I've marked it with a white star on the map below (a Google Earth map with the USGS plate boundary file). This event occurred near the North New Hebrides trench, part of a slightly complex zone where the Australian plate is being pushed under, or subducted, beneath the Pacific plate.

Our earthquake in question marked with a white star near the North New Hebrides trench.

Our earthquake in question marked with a white star near the North New Hebrides trench.

Though the event was not huge, it was detected by many seismometers around the globe. In fact, there is a handy map of the stations with adequate signal automatically generated by IRIS. The contour lines on the map show distance from the event in degrees (more on that later).

Stations and their distance from the earthquake. (Image: IRIS)

Stations and their distance from the earthquake. (Image: IRIS)

I saved an image of assorted global seismic stations about an hour after the event occurred. You can see energy from the earthquake recorded on all stations, with some really nice large packets of surface waves (the largest waves on the plot).


We're actually interested in the first two signals though, the classic P and S waves. Let's take a closer look at the station in Pohakuloa, Hawaii. We can see the first arrival, the P-wave, then a few minutes later the S-wave. The P-wave (a compressional, basically a sound-wave) travels faster than the transverse S-wave, so they arrive at different times. We know the wave speeds with depth in the Earth, so by using the difference in time between these arrivals, we can come up with a rough distance to the event.


A graph of distance vs. arrival times can tell us the whole story. I've made a simple version in which you can find the time we measured (7.25 minutes) on the x-axis, then lookup the distance on the y-axis. If we do this (marked in dashed black lines), we see that the distance should be about 50 degrees.


That's not bad! I calculated the actual distance knowing the earthquake location and station location to be 49.6 degrees. The theoretical difference in travel time based on a simple Earth model is 7.14 minutes. The slight error is due to a complex real Earth, but mostly due to me picking a rough time on an iPad screen without really zooming in on the plot. The goal was to know about how far away the earthquake was from the station though, and we did that with no problem. Just from that information it was easy to tell that the event was in the Fiji region.

Distance is in degrees, which may seem a little strange. Since the Earth is a ball-like blob, defining distances across the surface is a little tricky when distances get large. It turns out to be more convenient to think of this distance as an angle made with the center of the earth. Take a look at the screenshot below. It's from a program called taup and shows the actual paths taken by the P and S waves through a cut-away of the Earth. I've marked the angle I'm talking about with the greek letter ∆. (We would formally say that this is the great circle arc distance in degrees. If you want to learn more about great circle arcs, you should checkout our two part podcast on map projections.)


As scientists, we often look at a travel time plot a little differently. There are many different waves or "phases" that we are interested in, so plotting one line of  S-P wave arrival is rather limiting. Instead we plot a classic "travel time curve" where the arrival time after the event is plotted as a function of distance. I've reproduced one below (table of data plotted from C. Ammon).


We can make a plot like this from data too! Taking many stations, plotting them as a function of distance we get a plot like the one below. You can see curved and straight lines if you stand back and squint a little. Those are arrivals of different phases across the globe! Notice the lower curved line that matches the P-wave travel time above.

Notice the lines and curves made as different phases from the earthquake arrive across the globe. (Image: IRIS)

Notice the lines and curves made as different phases from the earthquake arrive across the globe. (Image: IRIS)

Like I mentioned, there are many different phases we can look at. To give you an idea of things a seismologist would look for, there is a version of the plot with a lot of the more complex phases marked on it below. I know it looks intimidating, but for this event, you'll see we really can't easily discern a lot of the phases. That's because this really isn't a huge event, but it's nice for us because that means the plot is easier to look at.

Arrival plot with phases marked. (Image: IRIS)

Arrival plot with phases marked. (Image: IRIS)

So there you have it, by remembering the rough travel time curves or posting one on your wall, you can quickly determine the approximate region an earthquake occurred in just by glancing at the seismograms!

Magnitude 7.1 Alaska Earthquake Visualizations

This morning there was a magnitude 7.1 earthquake beneath Alaska. Alaska is no stranger to earthquakes, and I'm not going to talk about the tectonics, but I wanted to share the ground motion videos I produced for the event. Also be sure to checkout the ground motion videos over at IRIS as well. At present no major damage or injury was reported. Though CNN did sensationalize the earthquake (as they always do):

Screenshot 2016-01-24 07.20.30

First a video from a nearby station, Homer, AK. About 8 mm maximum ground displacement with some pretty large ground accelerations.

The earthquake recorded in Australia. Not as exciting, but notice the packets of waves towards the end of the video, these are the surface waves that took the longer route around the globe compared to their earlier counter parts. (Called R1/R2 and G1/G2.)

Here's a central US station near where I grew up. Nice surface waves and a good example of what looks like the PcP phase (P-wave reflected off the outer core of the planet.) The PcP phase is at about 604 seconds, around 100 seconds after the P wave. In the figure below the movie, the approximate PcP path is red, the P path is black. Pretty neat!

Screenshot 2016-01-24 13.32.59


Squeezing Rocks with your Bare Hands

Our lab group. Photo: Chris Marone

Our lab demo group. Photo: Chris Marone

As frequent readers of the blog or listeners of the podcast will know, I really like doing outreach activities. It's one thing to do meaningful science, but another entirely to be able to share that science with the people that paid for it (taxpayers generally) and show them why what we do matters. Outreach is also a great way to get young people interested in STEAM (Science, Technology, Engineering, Art, Math). When anyone you are talking to, adult or child, gets a concept that they never understood before, the lightbulb going on is obvious and very rewarding.

Our lab group recently participated in two outreach events. I've shared about the demonstrations we commonly use before when talking about a local science fair. There are a few that probably deserve their own videos or posts, but I wanted to share one in particular that I improved upon greatly this year: Squeezing Rocks.

Awhile back I shared a video that explained how rocks are like springs. The normal demonstration we used was a granite block with strain gauges on it and a strip chart recorder... yes... with paper and pen. I thought showing lab visitors such an old piece of technology was a bit ironic after they had just heard about our lab being one of the most advanced in the world. Indeed when I started the paper feed, a few parents would chuckle at recognizing the equipment from decades ago. For the video I made an on-screen chart recorder with an Arduino. That was better, but I felt there had to be a better way yet. Young children didn't really understand graphs or time series yet. Other than making the line wiggle, they didn't really get the idea that it represented the rock deforming as they stepped on it or squeezed it.

I decided to go semi old-school with a giant analog meter to show how much the rock was deformed. I wanted to avoid a lot of analog electronics as they always get finicky to setup, so I elected to go with the solution on a chip route with a micro-controller and the HX711 load cell amplifier/digitizer. For the giant meter, I didn't think building an actual meter movement was very practical, but a servo and plexiglass setup should work.

A very early test of the meters shows it's 3D printed servo holder inside and the electronics trailing behind.

A very early test of the meters shows it's 3D printed servo holder inside and the electronics trailing behind.

Another thing I wanted to change was the rock we use for the demo. The large granite bar you stepped on was bulky and hard to transport. I also though squeezing with your hands would add to the effect. We had a small cube of granite about 2" on a side cut with a  water jet, then ground smooth. The machine shop milled out a 1/4" deep recess where I could epoxy the strain gauges.

Placing strain gauges under a magnifier with tweezers and epoxy.

Placing strain gauges under a magnifier with tweezers and epoxy.

Going into step-by-step build instructions is something I'm working on over at the project's Hack-a-Day page. I'm also getting the code and drawings together in a GitHub repository (slowly since it is job application time). Currently the instructions are lacking somewhat, but stay tuned. Checkout the video of the final product working below:

The demo was a great success. We debuted it at the AGU Exploration Station event. Penn State even wrote up a nice little article about our group. Parents and kids were amazed that they could deform the rock, and even more amazed when I told them that full scale on the meter was about 0.5µm of deformation. In other words they had compressed the rock about 1/40 the width of a single human hair.

A few lessons came out of this. Shipping an acrylic box is a bad idea. The meter was cracked on the side in return shipping. The damage is reparable, but I'm going to build a smaller (~12-18") unit with a wood frame and back and acrylic for the front panel. I also had a problem with parts breaking off the PCB in shipment. I wanted the electronics exposed for people to see, but maybe a clear case is best instead of open. I may try open one more time with a better case on it for transport. The final lesson was just how hard on equipment young kids can be. We had some enthusiastic rock squeezers, and by the end of the day the insulation on the wires to the rock was starting to crack. I'm still not sure what the best way to deal with this is, but I'm going to try a jacketed cable for starters.

Keep an eye on the project page for updates and if any big changes are made, you'll see them here on the blog as well. I'm still thinking of ways to improve this demo and a few others, but this was a giant step forward. Kids seeing a big "Rock Squeeze O Meter" was a real attention getter.

Hmm... As I'm writing this I'm thinking about a giant LED bar graph. It's easy to transport and kind of like those test your strength games at the fair... I think I better go parts shopping.

Mill Time - Back in the Shop

While home for the holidays, I decided to make a little calibration stand that I need for a tilt meter project I'm working on. Back in the 2006 time frame I had worked to learn basic machining skills on the mill and lathe. I never was amazing at it, but managed to get a basic skill set down. I ended up back over at my mentor's shop this week to make a simple part, but thought you may enjoy seeing some photos of a simple milling setup.

The first step is to have a part design that is exactly what you want to make. Problems always arise when you have a rough sketch and make it up as you go. For some hobby projects that can work, but as our systems become more and more complex, it generally just leads to wasted time, material, and lots of frustration. This particular part is exceedingly simple, but I went ahead and made a full 3D CAD model anyway, just to illustrate the process.

Our goal is to make a flat plate for a tilt meter to set on. We will then elevate one end of the plate a known amount with precision thickness pieces of metal called gauge blocks. Knowing the distance between the ends of the plate and the amount we elevate one end, we can very accurately calculate the angle. That lets me calibrate the readings from the tilt meter to real physical units of degrees or radians. All good designs start with a specification, my specification was I wanted at least 5 different tilts ranging from 0 - 0.5 degrees, the more combinations possible the better. I also wanted a compact and rigid device that wouldn't bend, warp, or otherwise become less accurate when tilted.

Time to fire up a Jupyter notebook and do some calculations! I mainly wanted to be able to play with the tradeoffs of baseline length, height of gauge block (they come in standard sizes), etc. After playing with the numbers some, I came with up a design that used multiple baseline lengths with available gauge blocks. I decided to use ball bearings under the plate to give nice point contacts with the surface of the table as well. This meant I needed a plate about 6" x 12" with hemispherical divots to retain the bearings.

Next, I fired up FreeCAD and made the design by taking a 6" x 6" plate and using 0.5" spheres as the cutting shape to make the divots. The divots are only 1/8" deep, so setting them in 1/4" from the edges is enough. Then I just mirrored that 6" x 6" part to make the full part. This lets me tilt both directions the same amount without turning or moving the instrument under test. The drawing I produced is shown in both bottom and oblique view.

bottom oblique

Next it was time to make the plate. I ended up with a piece of 0.5" thick 6061 Aluminum plate. We first cut it to roughly the size we wanted (slightly oversized) with a bandsaw. Then the plate was clamped down to the milling machine table to take off the extra material with a milling bit and give the sides a nice and clean finish. We ended up re-clamping during the work (almost always a bad idea) and had a slight taper on the width, but that isn't a concern for the usefulness. (By slight taper I mean about 20 thou along the length.)

We then were ready to make the divots. To do this we used a ball end mill that makes nice hemispheres. This is a very simple part, so just finding the edge, setting the readout, and doing the cuts took about 20 minutes. I've included some photos incase you haven't seen a milling setup before. It's really great fun to be able to control these cutters and tools to a thousandth of an inch and sculpt metal into what you need. As I said, this isn't a complex part, but that's good because I was a little rusty!

2015-12-30 10.15.19 2015-12-30 10.51.59

In the end we got a nice plate and I think it will perform its duty very well. I'll most likely write a future post showing it in use and explaining instrument calibration. I've included some pictures of the finished plate and how it will work sitting on the ball bearings.

2015-12-30 15.45.32

2015-12-30 15.46.50

Until next time, have a happy and safe new year!