PCB Design with KiCAD

It is pretty incredible that you can find a written or1 video tutorial on virtually any topic to learn anything.  Today, I’m particularly thankful to Shawn Hymel, Sparkfun, and Digi-Key for putting together their Intro to KiCAD video series on printed circuit board design.

This series took me from knowing nothing at all about PCB layout and design to ordering my very first board through OSHPark.  My first design isn’t anything amazing – it was basically a breakout board for an ATTiny85 to make it easier to build small projects. 

My first ATTiny hacked tap light was a mess.  I soldered wires directly to the microcontroller making it a real pain to update. ((I ask you – is this the work of a sane man?)) I soon realized my mistake and soldered an 8-pin socket in its place so I could reprogram the chip easily.

This is the alternative to a custom PCB – a rat’s nest of wires soldered to a chip

Mercifully, Shawn’s tutorial series got me up and running very quickly.  This post is not meant to be a tutorial for KiCAD, but more like a “lab notebook” for the workflow to create a board.  If you haven’t built a board yet, go check out Shawn’s series and follow along in KiCAD.  If you are a novice like me, you might find these notes helpful:

Eeschema

  • If you launch Eeschema separately from KiCAD, you can save different versions of a schematic.  Keeping old versions of design files is hugely helpful to me and if you launch KiCAD directly, the option to save different file names and versions is not available!
  • The keyboard shortcuts in Eeschema are great.  With just a few, it’s possible to really get around quickly.
    • “Shift-A” and left click to place parts 
    • “M” to move parts
    • “R” to rotate parts
  • It is necessary to add “PWR_FLAG” to both the power and ground lines.
  • Double check your connections work by clicking on the bug icon. 
  • Assign the parts you intend to use to match up with the symbols using the “Assign PCB footprints” icon.
  • Save your work and “Generate netlist” to have something the Pcbnew will be able to work with.

Pcbnew

  • First configure the Design Rules by going to Setup -> Design Rules.  Shawn pulled these KiCAD Design Rules from the OSHPark.com website.  KiCAD has apparently changed a little since the version used on the OSHPark website, but the settings are easy enough to identify and change.
    • Net Classes Editor
      • Clearance: 0.01.  Track Width: 0.01.  Via Dia: 0.03.  Via Drill: 0.015.  uVia Dia: 0.03.  uVia Drill: 0.015.  Diff Pair Width: default.  Diff Pair Gap: default.
      Global Design Rules
      • Minimum track width: 0.006.  Minimum via diameter: 0.027.  Minimum via drill: 0.013Custom Track Widths: Track 1: 0.03
  • Read netlist” to bring your design over from Eeschema.
  • Placing parts and drawing lines gets a lot easier when you fine tune the Grid.  I started with 5.00 mils at first, then smaller figures to place smaller parts and features.
  • Once the parts are arranged in Pcbnew, connect the ground and power lines using 30 mil traces and everything else using 10 mil traces.
  • Create the outline for the board cutout by clicking on “Edge.Cuts” and drawing with the “Add graphic lines” tool.  Starting with my second board, I began cutting the corners off, so that they were a little nicer to hold and 
  • Label things on the “F.SilkS” and “B.SilkS” layers using the “Add text”‘ button.  Since my boards are so small, I wanted the text to be a fair bit smaller than the default settings.  I edited the text settings by going to Setup -> Text and Drawings.  
    • Copper text thickness:  0.007.  Text height:  0.035.  Text width:  0.035.
  • Create a copper pour with Place -> Zone, then choose “F.Cu”2 and “GND”.3 and draw a box around your board.  Then repeat for the “B.Cu” and “GND.”

Again, I’m a total newbie at circuit design.  If I got something wildly wrong, please let me know.  :)

  1. More frequently these days []
  2. Front copper []
  3. Ground, natch []

Regex: Back reference and Self reference in Regular Expressions

This is going to be a very short and niche post.

Sometimes I have to use regular expression or “regex” searches to parse a bunch of text, but I can’t remember how to use the search function to find a particular sequence of character and then reuse those found characters in the text I’m trying to replace it with.  In Notepad++, this would be done as follows:

  • Search string:   (7//*[0-9]*[0-9])\r\n
    • This will find all entries with “7/3” or “7/14” or similar digits with a line return afterwards
  • Replace string:  \1/2018;
    • This will replace those entries with “7/3/2018;” and “7/14/2018;”, respectively

The trick here is that the first set of search information is collected together within a set of parenthesis, which are then referenced back by the “\1”.  If you forget the parenthesis, the “\1” term won’t “know” what it’s supposed to be repeating.

Like I said, very niche.

[SOLVED] Google Pixel stuck in a boot loop after update and full storage

If your Google Pixel is stuck displaying the “G” and forever looping through a boot screen, Google’s support will tell you there is no hope and you’ll either have to do a complete factory reset and data wipe of your phone or send it in so they can do it for you.  However, if you are adventurous or have nothing to lose, there may still be hope.

I’m not saying this will work for you, or that you should even try what worked for me.  But, if you’re as desperate as I was, you would try absolutely anything to get your photos back.1

While out of town on vacation, away from WiFi and cell carrier internet access, I took a lot of photos and a few short videos.  My phone, a lowly Google Pixel with just 32GB2 of storage ran out of space.  It claimed it was at “100%” usage of storage with only a few dozen megabytes of space left.  I leaped into action, right there on the beach, deleting some large documents and ZIP files I had downloaded and then asked the Google Photos app to “Free Up Space.”  Pats on the back!  Job well done!

Except the Pixel had other ideas.  I reached into my pocket later to pull out the phone and take a picture to discover that it was on the white boot screen with the colorful Google “G” logo and a light gray “progress” bar undulating underneath it.  I thought this might be due to the phone overheat and put the phone away.  When I pulled it out later, I found the phone was still showing the same white boot screen.  I don’t know what caused this problem.  I don’t know if it was the Android system update from a few days ago, the storage being mostly full, possibly being too warm from being in my pocket, or what.

I tried everything I could think of and everything I could find to no avail:

  • I was unable to boot the phone into anything resembling active status, not even the last measure of “Safe Mode.”
  • I could boot the phone into “Recovery Mode” which looks like the Google Android robot lying on its back with a front panel open and some text underneath.  However, attempts to “Start”, “Reboot”, and use “Recovery Mode” were all unsuccessful.
  • I tried following the recommendations of the mysterious “Techno Bill” on the Pixel Google Groups to install ADB and Fastboot and then apply a Rescue OTA to the Pixel.
    • If nothing else, this one possibility gave me hope that I could still interact with my phone, somewhat.  I was careful to try out the specific OTA3 for my phone.  As you navigate the various menus in the Recovery screens for Android, you’ll need to take note of the version of Android you’ve got – so you can place the same version over it.
    • As best as I understand this fix, you’re basically overwriting a possibly damaged or corrupted operating system with a shiny new factory fresh version – and that doing so leaves your data intact.
  • The thing that gave me the most hope was this post by Mac_DG on Reddit.  Basically, they said, “If you can get there [the Google recovery screen], and it’s a software problem everything is fixable.”
  • I even spent 43 minutes4 chatting5 with Google’s Pixel support team member, Marlene.  She was sympathetic, but assured me in no uncertain terms that my data was lost forever.  My options were to send my phone to Google or take it to a repair facility for a diagnostic.

Finally, after much searching, I found this thread on Google’s product forum where someone named Jintoku described an identical problem to mine – and someone named Kara Alexander described an identical problem … and a solution suggested by Samuel Cooksey!  If you think you’ve got the same problem – nearly full storage, frozen or looping “G” screen, and unable to enter Safe Mode, it is absolutely worth your time scrolling through this thread to see if this solution may work for you.  It is also worthwhile reading through Jintoku’s conversation with Google’s representatives to see how hard they tried not to do a factory reset on the phone – and just how certain the Google representative was that this was the only possible solution short of outright replacement of the phone.

I will not duplicate the efforts of Techno Bill, Jintoku, Kara Alexander, Samuel Cooksey, and Mac_DG by repeating everything they’ve already said.  Rather, you may use any of the above links from my search to follow along and, hopefully, set you on the correct path.  If you would prefer a condensed guide, with links, I hope this will help:

  1. Follow Techno Bill’s guide on installing ADB and Fastboot.
    1. If you’re on Windows, you either need to follow Techno Bill’s guide on updating your computer’s “Path” or, if you’re a little more comfortable doing so, you can skip steps 1-8 and instead open the command prompt and type
      1. “SET PATH=%PATH%;c:\adb”
      2. The benefit of doing it this way is that you don’t have to permanently add this path to your operating system, it’s a lot faster and easier than Techno Bill’s method, and you don’t have to restart your computer
  2. Download the Developer Beta Preview OTA for your phone6 .
    1. It almost goes without saying that with words like “Developer”, “Beta”, and “Preview” in the title, this version of the Android operating system isn’t for the faint of heart.  If you don’t know what you’re doing or, like me, don’t have anything to lose, you shouldn’t be trying this.
  3. Follow Techno Bill’s guide to “sideload” the Rescue OTA to the Pixel.

If this blog post, that I write as my phone is running the Photos application right now to back up my vacation photos, saves even one person’s data, I will be an incredibly happy person.

  1. After all, what’s the worst damage I could do?  In a worst case scenario, the phone would still be unresponsive or bricked permanently []
  2. !!! []
  3. I believe this refers to an “over the air” operating system update []
  4. I was emailed the chat logs after the session ended []
  5. Since I had no phone, natch []
  6. Pixel, Pixel XL, Pixel 2, Pixel 2 XL []

Loudest 3D Printed Whistle – now with 100% more science

Extremely loud and compact emergency whistle v1
Extremely loud and compact emergency whistle v1

I ordered a decibel meter from Amazon the other day so I could drop some science on the claims from various 3D printed whistles on Thingiverse.  There are several that claim to be the loudest.  Well, today, I began my quest to put these claims to rest.

The closer the decibel meter is to a sound source, the higher it registers.  To eliminate some of these variables, I placed the decibel meter on a counter in front of me and a chair 24 inches in front of that.  For each of the whistles I was testing I stood just behind the chair and gave the whistle three hearty puffs.  The decibel meter, which was set to record and display the “max” reading, would then tell me the loudest reading for that set of three whistle toots.

Without further ado, I declare the “Extremely loud and compact emergency whistle” by Whistleblower on Thingiverse the clear winner at 121.1 decibels.  Both whistles by this designer took the top two scientifically determined spots.

NameThingiverse IDMass (grams)PricePrint Time (minutes)DecibelsSubjective Rank
Extremely loud and compact emergency whistle [v1]29330213.9$0.1222121.11
Extremely loud and compact emergency whistle [v2]29330213.7$0.1118111.53
v29 (Over 118 db!)117916013.9$0.4290110.44
2 chamber whistle (LOUD) [w5]26165128.1$0.2449109.52
Emergency Whistle with Solidworks 2014 source4951721.2$0.047101.85
Whistle Ring Modified [v2]20271151.6$0.05990.86

Just how loud is 121.1 decibels? 1  Well, for starters, it’s just above the pain threshold of 120 decibels.  It’s louder than:

  • Your iPod headphones at maximum volume
  • A baby crying, next to your ear
  • A full symphony orchestra
  • The subway
  • A sporting event
  • A chainsaw
  • A jetski
  • A marching band

It’s on par with:

  • Thunder
  • A shotgun
  • An ambulance siren
  • A rock concert

And, if you didn’t have earplugs, you would exceed the daily safe exposure limit for 121 decibels in 7 seconds.

There may be louder whistle on Thingiverse2 and, if so, please let me know.  I’ll print the model and test against the others in my arsenal.

Loudest 3D Printed Whistle

  1. MOAR WHISTLES
  2. Loudest Whistle on Thingiverse… The Answer Might Surprise You!
  3. Loud 3D Printed Whistle Test, Take 2
  4. Loudest 3D Printed Whistle – now with 100% more science

  1. This page has several charts to help explain. []
  2. Or some other online 3D design repository []

Loudest Whistle on Thingiverse… The Answer Might Surprise You!

You'll need a pair of these earplugs
You’ll need a pair of these

Whistles have been a staple on Thingiverse for years, probably because they’re such a small, simple, and impactful way to demonstrate the usefulness of a 3D printer. 1 I don’t know how many there are, but there are a LOT of whistles on Thingiverse.  I’ve been curious about which whistles on Thingiverse are the loudest and conducted a semi-scientific experiment to figure this out.

Six whistles
Six whistles

I say “semi-scientific” because I don’t have a decibel meter.2 My methodology was to have my family at one end of the house while I went to the other side, closed the door, put in my earplugs, and wailed away on six whistles as hard as I could.  In any case, here’s my findings:

NameThingiverse IDMass (grams)PricePrint Time (minutes)RankDecibels
Extremely loud and compact emergency whistle [v1]29330213.9$0.12221TBD
2 chamber whistle (LOUD) [w5]26165128.1$0.24492TBD
Extremely loud and compact emergency whistle [v2]29330213.7$0.11183TBD
v29 (Over 118 db!)117916013.9$0.42904TBD
Emergency Whistle with Solidworks 2014 source4951721.2$0.0475TBD
Whistle Ring Modified [v2]20271151.6$0.0596TBD

I added a few columns that may (or may not) be of interest to you.  I indicated the weight of each whistle, because sometimes I want to know how many whistles I could produce off a single spool of plastic.3  Sometimes I want to produce the loudest whistle for the time I have to produce a whistle.4  I showed the cost per model5 , because it brings me so much joy to know I can make my daughter’s classroom louder than a jet engine for less than the cost of a pack of gum.

I know there are a number of important variables are are simply not addressed in this test.  Different frequencies sound louder or might be easier to hear through the door.  I tried to blow each whistle the same amount, but some whistles are louder with less forceful or more forceful blows.  Once that decibel meter shows up, I’ll be sure to post another update.

Loudest 3D Printed Whistle

  1. MOAR WHISTLES
  2. Loudest Whistle on Thingiverse… The Answer Might Surprise You!
  3. Loud 3D Printed Whistle Test, Take 2
  4. Loudest 3D Printed Whistle – now with 100% more science

  1. Photo by mosambers []
  2. Yet.  At <$20 on Amazon, you can be sure I’ll be adding actual readings soon []
  3. With careful design, approximately 2,500 whistles per kilogram of plastic []
  4. The v2 of this whistle is the clear winner []
  5. Assuming a spool costs about $30, shipped []

Maker Faire 2018 – 3D Printing for Home Improvement

If you’re here checking out my site after my presentation, you can check out all the slides from my presentation above. If you’d like more information about the individual things in the slides, I posted an update for most of them over on Hackaday. If you’ve still got some questions, feel free to leave a comment below, hit me up on twitter, email me directly.

Organizing

Everyone utilizes their own method of organization, notetaking, and motivation.  Some use “Getting Things Done,” others go with “Inbox Zero,” or the “43 folders,” there’s Jerry Seinfeld’s “Don’t Break the Chain,” and a new one called the “Bullet Journal.”

I’ve tried some of these methods, combinations of these methods, and here’s what I’ve come up with for my own life.

  1. E-Mail
    1. Reply quickly.
      1. As Tony Soprano once said, “more important than the particular decision is that it happen in a timely fashion.”  My number one rule of email management is simply this – reply immediately to anything that deserves a reply.  Any timely response, even a non-optimal one, is better than a polished late response.
      2. If you can’t get a quick response out because some action is required…
    2. Act or Delegate, even to yourself.  If there’s something to be done, do it already.  From now on, you live in a world of “to done’s” not “to do’s.”  If you can’t do it, then figure out what needs to happen first and work on that.  If someone else needs to do it, ask them to take care of it and let you know when they’re done.  If you need to do something else, copy yourself on the email and ask yourself to do it.  Your own email will arrive in your inbox and you’ll need to…
    3. Start a draft.  If the matter really requires more information than you have at your fingertips or isn’t urgent, start a draft.
    4. Turn drafts into emails.  Every day turn drafts into emails and send them out. Since my job has become roughly 80-90% email, this is how I manage it all.
    5. Ignore unimportant emails.  Most of your emails are unimportant.  Ignore them, mark read, move on.
  2. Web Surfing
    1. Tabs.  Tabs are the enemy.  They will rob you of your productivity.  If you open a tab, read it, enjoy it, and close it or decide it is information you want to retain.  If it is truly important and something you’ll need to refer to all the time, bookmark it.  But, remember…
    2. Bookmarks.  Bookmarks are the enemy.  These are kept to an absolute minimum and only for sites you really visit all the time.  Otherwise, that information you wanted to keep will be lost in difficult to search bookmarks forever.
    3. Everything else.  If you find a web page, tweet, or some other information that you want to keep or reference in the future, share it or make a note.
  3. Sharing
    1. If you share information you help a friend and preserve the information in your sent folder, twitter stream, etc.  Otherwise, make a note.  The thing with notes is…
  4. Notes
    1. There are only two kinds of notes in the world.  Information that is of temporary use and information that is of permanent use.
    2. Temporary notes.  Write these on whatever you have lying around.  Discard when done.
    3. Permanent notes.  A permanent note really comes down to how you want to treat information.  I like information either in an electronic searchable format or I want it written down so I can reflect on it or refer to it later.  A permanent electronic note goes into Google Keep or an email to myself, in outine format, listing things in no particular order, with a few keywords in the subject line and body of the email near the link.  When I need to find it again, I just search in Google Keep or for emails from me and specific keywords.  A permanent written note goes in my…
  5. Notebook
    1. The problem with the Bullet Journal method is that it requires setup, discipline, and maintenance.  If you screw those up, the notebook and all the lovely page numbers and organization systems become a burden, a hassle or, worse, useless.1
    2. There are so many great things about keeping a notebook.  It’s a quick and easy way to record interesting and useful information.  While my handwriting is horrible, but I’m pretty decent at drawing and sketching.  A notebook for me is something where I can brainstorm, start drafting an idea I can return to later, or where I can record information for posterity.  I tend to work out ideas on scraps of paper before recording that data in a more permanent format by committing it to my notebook.  Sometimes this means copying information by hand or, my personal favorite, literally cutting and pasting information into the notebook.  The worst thing is probably that it isn’t particularly searchable.
    3. Title and Date.  Every entry in the notebook starts on a fresh page with the date at the top right corner and a helpful title at the top of the page.  The date does more than provide you with context.
    4. Cross Referencing.  The dates at the top of the page function as your page numbers.  When you need to refer to a page in the past, rather than referencing a page number, just reference the date of the prior page.  When you write a cross reference down to a prior page, note the future date on the prior page.
    5. DIY Flags.  I placed several pieces of duct tape inside the front cover of the notebook.  On top of that, I put several small 1/2″ x 1″ pieces of duct tape.  These can be peeled off easily and folded over a page for a sturdy bookmark.  More on this later.

Default Series Title

  1. Well, this is my theory.  I don’t actually know since I haven’t actually tried the Bullet Journal method… []

Art Docent Program – Self Portraits, 4/20/2017

Easy self portraits for kids


Art Docent Program – Square One Art Project, 2/16/2017

Art Docent Program – Tessellations, 10/13/2016

Test