BristleBots – Easy DIY STEM/STEAM Robots

This slideshow requires JavaScript.

If you don’t know who EMSL are, you’re missing out.  Evil Mad Scientist Laboratories is a small family owned DIY electronics business in the California Bay Area with a deep enduring commitment and support for open source software, open source hardware, educators, and Makers.

And they are genuinely good people.  Their blog is an incredible resource for anyone from beginners in crafts and electronics to grizzled veteran engineers.  There are free tutorials, resources, and tons of kits for every level.  I’ve purchased several of their kits and cannot recommend their products highly enough for the material quality, comprehensive (and occasionally playful) instructional materials, and support – including a robust community and forum.1

Since our family is home an awful lot these days, we’re always looking ways to keep our kids curious, engaged, and occupied.  Our next project is the EMSL “BristleBot.”2

Their write up and video tutorial will provide you with all the information you need to help build a very tiny zippy robot from things you probably have around the house. 3  There’s a lot to talk about with your kids here – from basic electrical connections, off-center motors, springiness of the bristles, to how the directions of bristles affect the robot’s travel.

A box of parts to make enough for a whole classroom might be about $50 (or less) if you could buy parts in bulk.  But, if you only need a handful of BristleBots for your household, you could taking things apart for motors, old toothbrushes for bristles, common coin cell batteries for free/nearly free, maybe adding some matchbox car or marble run tracks for BristleBot trails or a cardboard box for a battle arena.

  1. Most notably their Egg-Bot []
  2. Time capsule:  This post was published in July of 2020 []
  3. You can get these from old cell phones, cheap dollar store electric toothbrushes, or lots of places online []

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 []

Rocklin Mini Maker Faire 2018

15 Second Drawings
15 Second Drawings

My daughter, TinkerGirl, and I are going to be demonstrating our 15 second drawings at the Rocklin Mini Maker Faire this Saturday.  We’re pretty stoked about this since it will be our first time as Makers at this Mini Maker Faire.  We’ll be the ones wandering around with a DIY dry erase board.

If you’re wondering what the heck “15 second drawings” even means… it’s just what it sounds like.  Both of us will each draw whatever you want in 15 seconds.  Whatever you want, no matter how complicated or absurd, drawing before your eyes in just 15 seconds.

Or, we can teach you how to draw anything in 15 seconds.  Or compete against us or perhaps challenge a friend (or enemy?!) to a 15 second drawing.

You want to learn more?!

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 []

How to Back Up Files from Google Drive with a Supervised User

Google, why have you failed me?

Google, why have you failed me?

Google suddenly discontinued/crippled their Google Supervised User program in January of 2018.  This was a fantastic program which allowed parents to set up a Google account for a child on a Chromebook and monitor and control access to the internet.  Unfortunately, the “manage user page” redirects you a page “Supervised Users can’t be created or edited.”  Sure, there’s Google Family Link – but that only works for Android and mobile devices.

This means the Chromebook we bought for our daughter and which she’s been using for about a year now, is borderline useless.  How useless?

Imagine using a modern computer (or even a phone or tablet!) without the ability to copy, cut and paste.  No being able to visit any new sites, since I can’t edit her access to whitelist the website.  You can’t copy, move, or drag-and-drop the files from Google Drive to the internal microSD card or a flash drive.

And, as I discovered today, no being able to download files out of the Supervised User’s Google Drive account, since Google’s ability to zip the files is crippled.1  Since my daughter’s account had hundreds of files, it was beginning to look like my only option was to download each file individually, one after the other.

If you find yourself in a similar predicament, here’s how you can back up your Supervised User’s account out of Google Drive:

  1. Create a new empty folder with a catchy name like “20180528 Backup”
  2. Select all other files in their Google Drive
  3. Tap the trackpad with two fingers2 and select “Move”
  4. Move all the files into your newly created folder
  5. Select the newly created folder
  6. Tap the trackpad with two fingers3 and select “Share”
  7. Share that folder from the Supervised User with yourself (probably by typing in your email)4
  8. Open up Google Drive in your web browser on a completely different, non-Chromebook device
  9. Click on the icon that looks like two people and is labeled, “Shared with me”
  10. You should see the previously named folder under the documents recently shared with you
  11. Right click on the folder and click on “Download.”  It will take some time as Google zips the folder and all the documents in all the sub-folders into a file
  12. When prompted, save the file to your computer

I got through this with the usual trial and error.  I really hope it’s helpful to someone else some day.

  1. You can download a single file at a time – but not more than one at a time []
  2. This is the Chromebook version of a “right click” []
  3. Again, the Chromebook “right click” []
  4. You may get a warning that you won’t receive a confirmation email – don’t worry about it []

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.

Hacked Tap Light Enclosure

Just seeing a post and pile of code about a project isn’t always that interesting.  The nifty thing about this project is also one of the problems.  They’re cosmetically identical – so you can only tell which one you’ve got by activating it.  :)

I couldn’t be more pleased with the way this project came out.  I basically took my daughter’s setup based off an Adafruit Circuit Playground, built a more specialized (and louder!) version into a breadboard using an Adafruit Trinket, and then ported the entire design into an ATTiny85.  The only thing I would change about it would be to add a socket for the ATTiny to make it easier to modify down the line.

Default Series Title

Cheapest Easiest Easy Button Hack EVER

But... could it be even EASIER?!

But… could it be even EASIER?!

I’ve always liked the idea of the Staples Easy Button.  Not so much a button that says “That was easy,” but the idea of having an enormous button on my desktop that would do… anything at all.  Official “Staples Easy Buttons” used to sell for about $20 and are now only about $7.  But, this is still a lot to pay for a big button that I’d want to gut anyhow.  Recently I figured out a way to build a big useful button, very inexpensively.

This slideshow requires JavaScript.

The secret sauce is … a tap light!  You can buy a pack of 4 big (10cm diameter) tap lights for under $4 and they’ll ship free as a “Prime add-on.”  For less than $1 each, you get a three AA battery holder, toggle on/off switch, a bright LED, all neatly organized into a big plastic button.  This button also has another “feature” which is missing from many other pricier options.  The dome over the light is white – which means you can put any color LED or, as I did, an Adafruit Neopixel inside and the dome will change color accordingly!

This slideshow requires JavaScript.

Here are some pictures of the disassembled tap light so you can see if it would work for you.  I had originally bought these so that I could put a light right next to my newest 3D printer.123

This slideshow requires JavaScript.

There’s actually quite a bit of room inside the tap light for a small project.  I was able to pack a Neopixel, a small buzzer, an ATTiny85, and a rat’s nest of wires.  I expect this project to take a lot of abuse at Maker Faire, so I applied a liberal amount of hot glue inside to hold the wires down and out of the path of the springs, switch, case, and the likely path of the button dome.

Once reassembled, there really isn’t any way to tell the button was hacked.  It looks identical to three other tap lights.  I just love that I was able to make use of the battery holder and existing switch inside the project.  The 4.5V supplied by the batteries is perfect for powering my ATTiny85 and lone Neopixel.  If you’ve got a junk drawer, you could probably build something very similar for about $2-3.4 As it is, I “splurged” by using $1 worth of Neopixel because I was being lazy and didn’t want to either wire up three sets of LED’s or track down three resistors to go with an RGB LED.  Even so, this is an incredibly cost-effective project enclosure.

15 Second Timer-Buzzer

15 Second Timer-Buzzer

In case it’s of interest to you, this project is the newest iteration of our 15 Second Timer-Buzzer from my daughter’s 15 Second Drawings project for Maker Faire Bay Area 2017.  The prior version used an Adafruit Circuit Playground, a 100mm Red Button, and a LiPo battery and probably cost around $40 or so. 5

All of the code is on Github. Basically, the buzzer flashes amber three times with a very short tone in between flashes, then turns green for 14 seconds, amber for one more second, and then turns red and buzzes angrily to let you know time is up.  I had written most of the code to work on an ATTiny45… until the code ballooned to a whopping 4560 bytes and I had to switch to an ATTiny85.6 If I had to build this over again, I’d solder in an 8-pin DIP socket for the ATTiny rather than mutilating the chip and hot gluing it directly to the inside.  ;)

Default Series Title

  1. I have a power strip next to it, but it’s fully utilized, I only need a little bit of light sometimes, and I was getting tired of holding a flashlight on it at night []
  2. In my tradition of naming my 3D printers after characters from Futurama, my Monoprice Mini Delta is named “Roberto.” []
  3. My prior 3D printers are Bender the MakerBot Cupcake CNC, Flexo the MakerBot Thing-O-Matic, and HedonismBot the Replicator 1 Dual []
  4. I figure about $1 for an ATTiny85 and $1 for the button.  Most people can find a way to scrounge an RGB LED or a few different LED’s, an old buzzer or piezoelectric disc, and some bits of wire []
  5. Not counting the gelato we ate, of course []
  6. What a waste!!! []

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… []