OpenADR: On Modularity

I realized that in my last blog post I stated how modularity was important to the design of OpenADR, but I never actually defined my vision for what modularity means and what it would entail.  Thus far I’ve identified this project as a robot vacuum.  My ultimate goal, however lofty it may be, is to design a system of robots and extensions rather than just an autonomous vacuum.  There are home robots of all kinds on the market today such as vacuums, mops, and gutter-cleaners.  They’re always complicated and always expensive.  The thing is, I don’t think they need to be.

As an engineer I look at the design of these robots and see unnecessary complexity.  As a programmer I see redundancy and chances to optimize.  As a Maker I see an opportunity for the community to make something better.  Those thoughts were my inspiration, and the reason I decided to create this Open Source project.  I wanted to make something simple and elegant with a low barrier to entry so that anyone can contribute.

To aid in this endeavor I looked at the current domestic robot market and saw the redundancy in the designs.  A robot vacuum, robot mop, as well as other types of robot can really be broken up into two different parts.  There’s the navigation unit (e.g., the localization sensors, drive motors, encoders) and the cleaning system (e.g. vacuum, mop, waxer).  Rather than buying a vacuum for each separate task and effectively paying twice for the navigation hardware I’ve decided to first design a navigation robot and leave a large slot in robot body to allow for various swappable extensions.  The first, proof of concept extension will be the vacuum.  Doing this will reduce the number of duplicated components and cut costs of the overall project.  It will also save time on hardware and software design.

Another benefit of this modular system is additional ease of development.  Large software projects like the Linux kernel having componentized designs, breaking the software into parts based on architecture, use case, abstraction level, etc.  By having these functionally separate components, new contributors don’t need to understand the entire project just to add to a small part.  The barrier of entry to the project is reduced and project members can focus only on the components they’re most comfortable with.

This is my ultimate goal with OpenADR.  I’m most comfortable in the realms of embedded design and firmware development.  I hope that by providing a strong base for the project, people who are much more proficient than I in other areas will join in to help OpenADR move forward.

3D Printers and Their Applications

I’ve had my 3D printer for almost a year and a half now and so I thought it was about time I write a post explaining why I think it’s the most useful tool in my office.  The setup I’m using is as follows:

Setup.jpg

Before I start explaining why I think 3D printing is the bee’s knees I just want to state that this post isn’t intended to be a review of the Printrbot.  This is the first 3D printer I’ve ever owned, so I don’t have any frame of reference to compare it to.  Rather this is an explanation of the uses I’ve found for 3D printing.  One of the biggest barriers I’ve seen to a 3D printer in every home is that most people can’t think of enough applications to justify the cost.  While I can’t definitively state that the money I’ve saved from 3D printing things has balanced out with the cost of the printer, I can at least bring my use cases to the table.

When working on projects I find that the greatest disincentive often comes from the act of physically doing something, be it measuring, drilling, cutting, etc.  While it wouldn’t necessarily be difficult to make custom parts out of wood and poster board, I find the time and effort it takes to plan and assemble the part deters me from even starting.  It also doesn’t help that I have trouble planning ahead and so will often encounter unforeseen problems mid-construction.  3D printers help mitigate this problem for me.

NavUnit

With how ridiculously easy OpenSCAD makes 3D modeling, I can quickly design a project and print it out without ever lifting a drill.  This makes 3D printing both easier and safer for the small things.  3D modeling has also reduced the number of unforeseen errors in my projects.  With the the configurable design right on my screen I no longer have to open my graph paper notebook to get a accurate view of my project.  I can move, change, and combine 3D parts with ease.

Granted, programmatic CAD does have drawbacks since it converts text to 3D images rather than directly manipulating the design.  However I believe that the benefits when it comes to reuse, version control, and parameterization outweigh these downsides.

Another benefit of having objects as a shareable software construct is that it allows you to take from and tweak the designs of others.  Thingiverse, one of the most popular sites for sharing 3D printed designs, even allows you to copy and “remix” other users’ objects for your own purposes.  One useful example I can think of is the idea for an Iron Throne style phone charger that I’ve been mulling over.  I don’t have the patience or CAD skill to design an Iron Throne 3D model from scratch, but there are other people who do.  I can then take their 3D models, with appropriate attribution, and use them as a baseline to design my phone charger.

iss_428x321
International Space Station

As 3D printing and scanning gains in popularity more large organizations will begin sharing important objects with the public.  Both NASA and the Smithsonian are beginning to openly share object models of important artifacts like space probes and fossils.  I truly hope there comes a day when I can have my own miniature 3D printed T-Rex skeleton to decorate my desk.

IMG_20151215_065554141
Command Strip adapter for a magnetic tool holder

Another considerable use I’ve found for the printer is to aid in apartment living.  Since I rent I’m limited in how many nails I can put in the wall before I lose my security deposit.

IMG_20151215_065607226
Command Strip adapter for wire spools

With a combination of Command Strips and custom printed adapters, I can create a way to hang heavy objects on the walls without doing any damage.

Lastly, and probably the most important use I’ve found for 3D printing in the home is for creating one-off objects that don’t have enough utility to be sold as a mass-produced product.

2015-10-24 14.02.40.jpg

The cake topper for my wedding is one such example of this.  Rather than settling for an expensive custom one on Etsy or a generic one from elsewhere, I designed and printed my own.  With the wide variety of filament that’s now available, finding a food-safe, metallic gold PLA wasn’t difficult.

I’m sure as time goes on I’ll continue to find more uses for my 3D printer around the house, but I already believe it’s paid for itself in terms of the productivity it’s afforded me with my hobbies.  There are things I can create now that I never would be able to without it and I feel that’s plenty of justification for my purchase.

Home Maker Server

Being a generally disorganized person who works as a professional engineer, I’ve noticed that the tools I use at work have really helped me stay organized and focused.  After noticing this, I’ve decided to utilize some similar tools for my personal projects to keep me organized and motivated, and also to apply a professional touch to my hobbies.  The most useful tools I’ve used at work are part databases, a version control system, and an issue tracker.  Since the specific tools I use at work are targeted towards large companies and therefore have expensive licenses, I’ll be using open source or free alternatives.  In addition to the tools I mentioned, I’m also going to install a 3D printing server so my Printrbot is no longer tethered to my main PC and prints can be uploaded and controlled from anywhere.  I’ve bought a Raspberry Pi 2 Model B specifically to handle this software and become my official home maker server.  The software that I’ll be installing as well as links to installation instructions are as follows:

PartKeepr

PartKeepr – A part database.  I’m constantly losing, buying multiples, and rediscovering parts so this will help give me a clear snapshot of all of my components, allowing me to better plan out projects and determine part requirements.  I used this blog post for installation instructions, but here are a few quirks I noticed when installing:

  • I had to copy the partkeepr folder to /var/www/html rather than /var/www since that was the default root directory for my apache server
  • I had to be logged in as the super user (sudo su) for the pear part of the installation or it wouldn’t work

GitHub

Github – I don’t anticipate developing closed source code in the foreseeable future so I’ll just be using Github for version control.

Trello

Trello – A simple issue tracker with a convenient web interface.  There’s not a lot of advanced functionality but it should be sufficient for what I want to do.  Originally I was going to use a more sophisticated issue tracker called Trac because it has integration with version control and a built-in wiki, but decided against it.  It would be another service to install and host on my Raspberry Pi and the additional complexity might deter my productivity.  In addition, not having a private wiki could serve as encouragement to keep my projects better documented on this blog.

Octoprint

Octoprint – A 3D printing management server.  It provides network access and a web GUI for uploading prints and viewing printer status.  The installation instructions I used are from their GitHub page.

Desk Fume Extractor

In my ongoing, multi-year effort to clean my office and upgrade it to the ultimate make-station, I decided that I needed a fume extractor since inhaling solder fumes probably isn’t too good for my health.  Of course, being me, I decided a basic fume extractor was too simple and set about building one into the cheap Ikea tables I use as desks.

Right off the bat I knew I needed at least four components: a fan to move the air, a filter to absorb smoke and particulates, a porous tabletop, and a power switch to turn the system on and off.  For the fans I bought a few cheap pc fans.  They’re about 5 inches in diameter, run off 12V, and move a decent amount of air quietly.  The filters are just a few solder fume extractor filter replacements.  The porous tabletop surface was a bit harder to find.  I wanted something with large enough holes to let plenty of air through, but small enough that I wouldn’t constantly be losing pieces into them.  I settled on a one foot by two foot piece of sheet metal with 3/16 inch holes.  The on/off switch was just something I picked up from Radioshack.

For the placement of the fume extractor, the two desks, when placed next to each other on the long axis, take up almost the entire width of the office with nine inches to spare.  I decided to place the fume extractor into that space to save myself the trouble of cutting into the desk.

2015-09-13 14.23.22

The first step in the process of building the fume extractor was to create the structure to hold the fans and filters.  Originally I was going to 3D print elaborate fan and filter holds but decided that cutting into some foam core board I had laying around would be much easier.  Since I had no idea about what kind of airflow is necessary to draw in solder smoke I decided to try and fit as many fans as I could into the fume hood and cut out holes for four of the PC fans I bought.2015-09-13 14.23.33

Once that I was done, I designed and printed out some simple brackets to hold the carbon filters.

2015-09-13 14.58.12

I hot glued them all together to make mounting easier.

2015-09-13 15.09.41

And taped them onto the foam core board.  (Huzzah for Duct Tape!)

2015-09-13 15.22.33

The filters fit in snugly and are easy to pop out and replace.

2015-09-13 21.07.57

Next was mounting the fans.2015-09-13 21.59.26

The fans had holes in the corners so mounting them was a simply a matter of poking holes in the foam core board and mounting them with M3 screws and nuts.

2015-09-13 22.25.20

The fans came with PC fan electrical connectors so I had to cut that off, strip the wires, and solder them together in parallel.
2015-09-13 20.38.50

I printed out 1″ brackets to mount onto the desks.  The foam core board assembly will lay on top of these.2015-09-13 22.25.54

I taped these brackets onto the desk as a proof of concept and because I like to avoid drilling/cutting/sawing if at all possible.  If I’m feeling ambitious at some point in the future, I will probably screw these in to make the assembly more permanent.2015-09-13 22.24.40

After some fidgeting with the placement of the desks, the foam core assembly sits in the gap pretty nicely.  My original intention was to attach the assembly directly onto both of the desks via the brackets, but decided against it for two reasons.  First, with the board sitting gently on top of the brackets, it’s much easier to pull it out.  This will make pulling the assembly out and replacing the filters much easier.  Second, the 3D printer can produce a lot of vibration and usually shakes the entire table.  If the foam core assembly was rigidly attached to both desks the vibrations would shake both tables and the computer monitors on the left desk would vibrate whenever the 3D printer was in use.  With the foam core laying in the gap it will probably get a little more beat up being hit by right desk, but foam core is cheap and it would be easy to replace.

fumehood

This is the basic wiring diagram for the electrical side of things

2015-09-19 08.50.07

For the power I just wired up an old Power Wheels charger I had lying around.  Originally I intended to add another switch and some 10W resistors to be able to select two speeds for the fume hood.  I thought that the four fans would be excessively loud and I’d want to run the fume extractor at half speed most of the time.  Fortunately, running the four fans together turned out to be surprisingly quiet, so I simplified and decided to only wire up an On/Off switch.

2015-09-17 21.11.23

2015-09-17 21.11.15

I mounted the button on the front of the foam core assembly in a 3D printed panel.  Cutting precision circles in foam core board turned out to be pretty difficult, so using a 3D printed front was simpler.

2015-08-27 18.57.57

I was a little unhappy with the metal surface I purchased.  The surface was pretty scratched and stained.  It also had a curvature to it from being rolled up, something which I didn’t anticipate.  I laid it flat and put my two heaviest books on top to flatten it out.

2015-09-19 14.02.18

However, after several days of flattening there was still a slight curvature to the metal so I had to screw it into the desk to keep it flat.

2015-09-19 14.06.18

The edges of the metal surface were also pretty sharp so after fastening the metal into position I taped down the edges with the black Duct Tape i used earlier.  This provided both a nice finish and a way to not cut myself.

2015-09-19 14.06.31

Overall I’m happy with how this turned out.  It looks pretty nice, and while it could do with some polish it’s simple and sturdy.  And best of all it works!

Overly Dramatic Compile Button

As a software engineer I’ve long been unimpressed with the triviality associated with compiling code.  Surely the building of a masterful creation involving hundreds of source files and complex algorithms deserves more than just a small keyboard shortcut.  There should be drama, there should be flair, there should be maniacal laughter!

Featured image

To fill these requirements I’ve created the Build Button!  Using the wonderfully dramatic Adafruit Massive Arcade Button, a mini Arduino Kickstarter reward, and a 3D printed enclosure,  I made a button that communicates serially to a computer through the USB port.  A Python program on the computer monitors the currently active window and tells the button to light up when the active program matches a list of programs with build shortcuts.  When the button tells the computer that it’s been pressed the computer executes the keyboard shortcut associated with the currently active window to compile the code.

The source for this project is on my GitHub.

DIY Smartwatch: Soldering SMD

Going into this project I knew I would have to do a lot of surface mount soldering to save space and money.  I used the smallest SMD hand-solderable packages and still ran out of space!  I’ve never been particularly good at soldering, but knew that I would have to become much better to tackle the types of projects I’m interested in.  In anticipation of this, I splurged and bought a very nice soldering iron from Radioshack.  I cannot express how great this iron is!  I’m used to using cheap, $10 irons that just need to get the job done, but with the fine tip on my new one, SMD wasn’t difficult at all!  Below is a picture of the board with most of the components soldered on.

{INSERT IMAGE}

You’ll notice that I haven’t yet soldered on the accelerometer.  That’s because QFN packages are much smaller than I anticipated, even with a fine tipped iron.  In order to solder this, I’d probably need solder paste and a hot air station, something I’m not quite ready to drop $100 on yet.  Not sure what I’m going to do about that, especially since I’m going to need the accelerometer to minimize power usage.

DIY Smartwatch: Improvements for V2

From the current progress I’ve already made on this project, I can already see a lot of mistakes and things that will need to be improved for the second PCB.  Below is a list of the ones that immediately come to mind.

  • Possibly use the onboard voltage regulator on the Adafruit display
    • The Adafruit display board already has a 3.3V regulator for the screen logic, using this would mean one less part that I need and would give me a tiny bit extra space.
  • Maybe just switch to the E-Ink display to save power
    • I was very dismayed by the enormous amount of power the screen uses.  Even if I get tricky and heavily optimize the screen usage, I’m not sure how long I can get the battery to last.  This is a last ditch solution and would probably involve an entire re-layout of the board.
  • Use through holes for the battery instead of a connector
    • The battery connector is the tallest component on the board aside from the connectors, getting rid of it would mean I can make the uber-thick watch a little bit thinner.  Since I have verified that the battery charging circuit works, I just need to decide which battery will be used I should then be able to solder it in permanently.
  • Use micro USB instead of mini
    • Same thing as above, the mini USB is pretty tall.  A micro USB connector didn’t seem much harder to solder and would give me a little extra space.
  • Get rid of reset button
    • When I’m entirely done programming the watch, I’ll most likely give it a simple case, making the Reset button entirely inaccessible anyway.  It might be better for space to replace the button with a test point.
  • Add real-time clock
    • With the added space from removing components, there might be room for an RTC that could be used to keep better track of time.
  • Enlarge accelerometer pads for easier soldering
    • As previously stated, the accelerometer is very difficult to solder, especially without a hot air station.  If I don’t decide to buy one, another option might be to enlarge the pads for the accelerometer chip connections so it is easier to touch with the soldering iron.
  • Move tall components away from microSD slot on display board
    • In line with the USB and battery connections, I need to plan ahead so that the top boards fits better with the bottom board with less wasted space.
  • Silk screen labels
    • Since I rushed to ship out the board for fab, I didn’t take the time to properly and clearly label all the components on the board.  Doing so would make identifying what needs to go where much easier and would make debugging simpler if I know what vias are attached to what.
  • Test points
    • It would probably help to have some dedicated test points to make sure the circuit is behaving as it should be.