Form and Function

I finally completed the initial design of the new bot. Yes, it took a while! I opted to design all of the parts to my own specifications myself, rather than utilizing any existing models or plans, so there was somewhat of a learning curve to overcome. On top of that, with my new “treaded” design, I wanted to design the interlocking tank treads myself, so they could be printed and simply snapped together. No easy task!

The completed design of the “Tank Bot” without treads attached.

The final design consists of only 12 parts that require printing, and most are of a flat and simple enough design that they are easily accessible to beginners. The primary parts are:

  • Turret
  • Turret motor
  • Main body
  • Left and right drive motors
  • Chassis
  • Drive wheels (6x)
  • Tread links (32x)

By far the most tedious part is printing out all 32 tread links and locking them together to form two 16-link chains, but the rest is fairly straightforward.

Detail of interlocking treads with a drive wheel in the background (for scale)

There is ample room in the main body for all of the components that I wanted to use:

  • Edison board
    • Wifi
    • Bluetooth
    • HDMI out
  • 720p digital camera
  • Lithium ion battery pack
  • 3 motors
  • GPIO board

With all of the “guts” inside there should be room for expansion if so desired. Additionally, I created two openings in the back of the bot for an HDMI and a Micro-USB receiver. This allows the maker to fully assemble the bot and still be able to charge and connect a monitor to it for programming (Bluetooth keyboard can be added wirelessly).

Blown apart view showing internal motor structure and interior separators.

The next step is the printing!

Of Babies and Bathwater

It’s been a bit since I posted about my work on the Xpider. The main reason for this is that I’ve decided to abandon the original design in lieu of my own. While the downloadable plans for the Xpider are neat, they just aren’t terribly practical. Basically, I felt like there were too many moving parts, and that the design was too complicated overall.

So I started designing my own in TinkerCAD (name forthcoming, but thus far codenamed “Epic Gogo”). The design view is posted below, and I realize it’s not much to look at right now, but it actually represents a considerable amount of tedious work. The main body is squared off (since most of the electronics are square in shape) and the motor mounts (three of them) are designed and placed. The motor mounts were particularly complex because they had to exactly fit the motors I already have on hand.

The advantage of this design is that while still compact, it makes better use of the space for added “gadgetry”, like the speaker, GPS, and a larger battery pack. It also won’t be a “walker” like the Xpider, but rather have two independent tracks (like tank treads) which will give it 360 degrees of motion. The tedium really comes down to efficiently designing the tank tread links, which I’m working to create so they simply snap together with no tools or pins.

So, while this may be a bit of a delay, I’m still pretty excited because this bot will be 100% original and created by me (and my daughters). I guess we’ll try to give it a better name this weekend.

Initial design of the new bot showing the motor mounts, Edison platform, and support struts.

Intermediate 3D: Designing Models

If you’ve been reading my Xpider posts, you may have noticed that the Xpider “Fatty” doesn’t come with a nice 3D printed “head”; most of the electronics are completely exposed. This is fine in most cases, particularly during building and development, but I’ve always been a “finishing touches” kind of person, so I decided to try my hand and designing some sort of cover for my finished product.

Model designed in TinkerCAD

Not wanting to spring hundreds of dollars for a design suite that I may or may not like, I tested out a few online applications, and finally found one I fell in love with. It’s called TinkerCAD, and it’s so easy to use I was able to show my kids how to design basic shapes. I took a little time and some measurements from the hexagonal shape that makes up the frame of the Xpider, and extrapolated it out into a shell that looks very much like the head of R2-D2 (unintentionally).

The tabs are there so I can attach it to the frame with screws. I could have been fancy and put pilot holes in, but I figured I’d just drill them out. Once you finish your design, you can download the STL file, open it in Cura, and do everything else you need to do, like generate your GCode, or setup supports or brims.

Model rendered in Cura

So while I may not be ready yet to design my own full scale model, this is at least a good start, and fun to use.

Giving Xpider a Brain

As part of the development of the Xpider (now affectionately named G.A.J.E.T. by my 11-year-old daughter, which stands for “Gadgetized Analytic Just-so-cute Exploratory Technology) I wanted to give it the semblance of a “personality”. Years ago I had written a sample Markov chain algorithm first in C++ and then ported to Javascript. It was just a fun experiment to see how well a Markov chain could generate human-like text from some training data.

After learning that the Edison board that powers GAJET would run Node.js, I decided to work on some social aspects of the little robot. I ported what I had from my earlier algorithm into Node.js, and found 2 sources of training data; the complete text of “The Hitchhiker’s Guide to the Galaxy” and the script from “Monty Python and the Holy Grail“. Using these texts, I “trained” the application to format the Markov chains and to properly normalize the responses. Not finished, I created a Twitter account for the robot called @MontyHitchhiker, and leveraged the Twitter API to have the application post tweets every 10-60 minutes (randomly). Additionally, I leveraged the API to fetch the top trends for the United States, so GAJET will tag a post with a random trending topic.

It all turned out pretty comedic, and while the little guy still has some work to do regarding refining the chains, I’m fairly happy with it overall.

The next step is to incorporate a speaker into the system, and utilize a text-to-speech service (probably MaryTTS) to have the ‘bot actually “speak” its “mind”.

If you’re interested in seeing the workings of the Node.js app, I’ve attached the current working application to this post, so feel free to download and use it. You’ll want to sign up for a Twitter account and create an application in order to get the requisite keys, but everything else should be there.

Click the link to download the MontyHitchhiker source code.

Building the Xpider

I’ve decided to embark on a 3D printing and engineering project with my two daughters. They’ve come to love the stuff made here at my work with the Lulzbot Taz 6 3D printer, so I searched around and found what appears to be a fun and relatively straightforward project – the Xpider Fatty.

Billed as the “smallest programmable spider robot in the world” at 85mm tall and just 150 grams, this robot is fully programmable thanks to the Intel Edison board it carries. Additionally, we’ll be fitting it with a tiny UVC driverless camera so it can do some facial recognition and object avoidance.

I was able to cobble together the parts list using Amazon and DFRobot for a little over $100 USD, not including delivery (though most of the parts were available on Prime thankfully).

I’ll be posting periodic updates on our progress with pictures, but you can check out the specs and see the little gizmo in action here.

Understanding Elasticsearch QueryDSL for Analytics

This month I spoke at Big Data Jax on the topic of Elasticsearch and QueryDSL as it pertains to data science. Matt Berseth from NLP Logix was good enough to arrange speakers for my Drink and Think event, so I’m returning the favor.

My presentation covered the following general topics:

  • Brief history of Elasticsearch
  • Download and installation of Elasticsearch 5.2
  • Nomenclature and cluster overview
  • Indexing data
    • Inverted indexes
    • Mappings
    • Analyzers
  • QueryDSL
    • Common query types
    • Aggregates
    • Statistical aggregates
  • Usage

You can download the full PDF of my presentation here: Elasticsearch Presentation

For more events, please check out Big Data Jax on Meetup.

First 3D Prints With Lulzbot Taz 6

I’m very excited about my new working environment. When I started, I noticed that we had a separate office set up with a 3D printer. I figured that after a week here that I really wanted to learn how to use the thing. I’ve always been excited and fascinated by 3D printing, but until now I’ve never had access to one, especially a very good one. I learned that the 3D printer in question is a Lulzbot Taz 6. With some help from Google, I found two online 3D modeling websites that were simple enough to use that even a beginner like me was able to start creating models in under an hour. For those interested, I’m using both 3D Slash (https://www.3dslash.net) and Tinkercad (https://www.tinkercad.com/). I save the .STL files generated from the online applications, then use Cura to create the “sliced” version and “GCode” (the code read by the 3D printer). You can download Cura from their main site (https://www.lulzbot.com/cura) or you can get a forked version if you’re using Lulzbot here. One of the things I liked about #d Slash it that it has a simple interface that allows you to “chisel” away a block (reminded me of Minecraft). You can also load a flat 2D image and print that (which is what I started with).

Once the design is saved, it just needs to be loaded onto the printer. We’re using a FOSS application called OctoPrint, and it’s being hosted from a Raspberry Pi connected to our network. OctoPrint is a really cool application that can monitor your printing remotely in real time, tell you the printing status and remaining time, temperature, and lots more information. It also manages a print queue, so when you submit your design it will handle jobs accordingly. You can find out more or download the project from http://octoprint.org.

One of the neat features of Lulzbot (and I don’t know if this is specific to them, or if all 3D printers are like this, remember, I’m new to all of this) is that is comes with an SD card fully loaded with the designs of all of the plastic parts that make up the printer. So, if any part is wearing out or breaks, you simply load the part into the print queue, and print out a replacement. I thought that was very cool; it’s almost self-healing!

If you’re not interested in developing your own designs, there is an absolutely fantastic community at Thingiverse (http://www.thingiverse.com) that will allow you to review, download, and rate a number of incredibly well made designs from the community, for free. Be sure to check them out.

Setting a New Healthcare Paradigm with Elasticsearch

The healthcare industry needs to be able to make real-time decisions — lives are literally on the line — and traditional methods of information capture and transfer are no longer sufficient. Forcura is a document workflow and healthcare solutions provider for the home health and hospice industry that uses Elasticsearch to quickly index and search access patient or physician data. Having access to the correct data and secure it to comply with HIPAA regulations is critically important to their business, setting a new paradigm for the way work gets done in the healthcare industry.

Thank you to everyone at Elastic for setting this up, editing the video, and publishing it!

Elasticsearch on a Raspberry Pi

I’m posting this as a step-by-step on installing Elastic Search on a Raspberry Pi. While I don’t honestly think having a cluster of Raspberry Pi computers running Elastic Search is a true enterprise solution, I think there could be something to this in the future. As cheap as hardware keeps getting, it’s entirely reasonable to believe that a myriad ARM-based Systems-on-a-Chip (SOC) could be a completely feasible cluster solution. Today you can pay $40 for a single little Raspberry Pi. If you forked out $4000, you could have 100 of these tiny machines all running Elastic Search in memory. What does one VM slice cost an enterprise right now? Just sayin’…

  • Format your SD card (I used a 32GB, a 64GB card would be nice) using this formatter.
  • Download NOOBS for Raspberry Pi here.
  • Copy the files to the card, insert into the Raspberry Pi, and boot.
  • When prompted, choose to install Raspbian.
  • After install is complete, reboot to command line (bash shell)
  • Install Oracle Java (7, at the time of this posting), using “sudo apt-get update && sudo apt-get install oracle-java7-jdk”
  • Create a directory to store Elastic Search using “sudo mkdir /usr/share/elasticsearch”.
  • Change to the directory using “cd /usr/share/elasticsearch/elasticsearch-0.90.7”.
  • Download Elastic Search (v0.90.7 at the time of this posting), using “http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.7.tar.gz”. Please note you may have to change the file name if the version has increased since this article.
  • Extract the zipped file: “sudo tar -zxvf elasticsearch-0.90.7.tar.gz”
  • Delete the archive: “sudo rm elasticsearch-0.90.7.tar.gz”.
  • Run Elastic Search! “sudo bin/elasticsearch”
  • Verify the install: “curl -XGET http://localhost:9200/”
  • Install the _head plugin: “sudo bin/plugin -install mobz/elasticsearch-head”.
  • Get your local IP address: “sudo ifconfig”. Look for “inet addr”. Copy your IP address.
  • From any browser on the network, navigate to “http://[your Raspberry Pi IP]:9200/_plugin/head/”.
  • Start searching!

Hope it helps!