DIY Caffeine-Free Cherry Cola

I’m fairly sensitive to caffeine and I love Cherry cola. Being that for some reason soda companies don’t make caffeine-free cherry cola, I decided to make my own. It is very simple and only takes two ingredients.

  1. One can of Caffeine-free soda
  2. About 1/2 teaspoon of Rose-Grenadine cherry syrup. You might need to tweak the measurements to taste. I think this amount tastes exactly like Wild Cherry Pepsi.

You may be tempted to to use the cap of the cherry syrup to measure, and I’ll go ahead and tell that’s a terrible idea. The syrup will dry and make it impossible top open next time. I hope you enjoy!

Capture

 

 

CNC Bottle Opener

bottleOpener6bottle-Open4A good friend of mine celebrated his birthday recently, and I  wanted to make him somethingon a CNC machine as a gift.  My friend brews beer and is an avid cyclist. In fact, his beer is on tap at the local bike shop.  I Figured the best gift would be a customized bottle opener with a few symbols of his interest engraved into the handle.

First, I ordered the Bottle Opener kit from Inventables.com.  I had seen the project online and assumed this kit included the raw parts I could CNC, but instead, the parts were already milled out.  I just had to engrave them and apply a finish to the wood before screwing the wooden parts onto the steel plate.

My wife is great at graphics so I asked if she would draw up something nice for me.  I wanted each wooden piece of the handle to have an image on both sides so my friend would be able to choose what he wanted the handles to display.  My wife gave me 4 good designs to use: one of just my friends name, the other with the word “Brewmaster”  a third with a bicycle with my friend’s initials embedded in the wheels, and finally a logo of the beer my friend brews for the bike shop.  You can see some of those original images below.

bikeLogoSouthMainIPA

I would need to mill a pocket in some scrap wood exactly the size of the wooden blanks of the bottle opener, stick the blanks into the pocket, and then mill out the designs.  This was much tougher than I realized.

 

The DXF file template from inventables of a the original bottle opener was not the same size as the actual wood blanks, so I had to break out the calipers and scale everything up. Secondly, nothing about the wooden blanks was standard.  Each one was a slightly different size and the holes for the screws were in different places.

The process is fairly simple. Take the SVG files of the designs, then import them in some CAM software which will also ask for the size of the endmill (drill bit thingy) and plan a path in XYZ coordinates to mill out the design in the SVG file.  There’s lots of different software out there. A good (but slightly pricy) one is Vcarve. There are others out there as well including some free and open source tools. A good free one is Makercam.  You can actually download makercam to your computer and use it like a regular program, even though it runs in your browser.  Another very simple CAM software is Easel which is made by the people over at inventables. They have lots of projects you can download directly to Easel as well with full settings.  I recommend you doublecheck feedrates, bit size and all that before actually using the designs though.

When I made the toolpaths for this design I used a 1/64th inch endmill to mill pockets for everything, including the text.   I chose this bit because it was small enough to fit into all of the detailed parts of the designs.  I used a pass depth of 0.1 inches, stepover of 0.0061 (which is about 39%).  For my spindle speed, I set it to 12,000rpm with a feedrate and plunge rate both set at 1 inch/minute.  

I placed a wooden blank in the pocket I had previously milled in the scrap board on the machine and began milling the “Brewmaster” design.  It is important to note here that since milling the pocket in the scrap board, I never turned off the CNC machine. This allowed me to keep the same Zero position for my X and Y coordinates between each milling.  If I changed this, then none of the designs would line up correctly with the wooden blanks.    After the first design was milled I realized the design template from inventables was really wrong about where the holes for the screws had been drilled.  So I scaled the design down and tried again.  Luckily I bought 2 of the bottle opener kits, so I had extra parts to use in case of a disaster like this.

bottle-Open2

After about 5 hours of milling, everything was finished. I had to go in and manually clean up the edges of the cuts a little with a razor knife and sand paper. Then I rubbed on a few coats of linseed oil to protect the wood.  Any food-safe finish can be used such as Mineral oil or Olive oil, but I happened to have linseed oil in the garage.  I forgot to take pictures of the final product, but you can see what one of the blanks looks like. I did both sides of each wood blank, each with a different design so he could flip them around.      

NAND to Tetris Free Online Class at Coursera

If you are interested in electronics and haven’t heard of this class, where have you been?  This class is a great introduction to how digital electronics works and for the first time (as far as I know) they’ve opened it up to the public online. It is free to audit the course and they just started March 14th, so it is still Week 1! Here’s the introduction video for the class which gives a great overview of it.

So why is this class so great? Well it starts off with a single piece of electronic digital logic, think of it as a 2×1 lego piece.  Then you use connect some of these together to build other more functional lego bricks, like a 2×2 brick, then a 2×4 brick, etc. Eventually you end up building your own Central Processing Unit (CPU), then you learn to code it in Assembly language (the lowest human-readable programming language),  then you build up to eventually a full blown computer with keyboard and monitor connections that you can write video games like pong, tetris and slightly more complicated things. That’s about as close to starting from scratch as you can get.  The real name of it is “the Elements Of Computer Systems” but everyone called it “From NAND to Tetris in 12 easy steps”.  NAND is the type of digital logic gate that you start with.

I know it  sounds super hard, but it isn’t!

This class is so well laid out that you can do it in your spare time.

The first half of the book is on their website for free, but you can buy the book for about $30. That’s one of the cheapest textbooks I know of, and it is a really good book to have for reference. The Massively Open Online Course (MOOC) is free to audit, but if you want an official Coursera certificate showing you took it, it’s only $50 or so. Some workplaces let you use that for Professional Development credit. This is some of the most fun PD credit I know of. If you aren’t familiar with MOOCs or Coursera, imagine hundreds or even thousands of people all around the world watching videos that are released about once a week with a lecture and homework assignment. Everyone can communicate in an online forum to help each other out. You can even get your work graded (in some classes). Many courses are free, some you have to pay for. Coursera is one of many places offering these kinds of classes. Heck, MIT and other universities have been posting their courses online for free for years now. MIT will let you earn a fancy certificate too (for a cost).

My tips:  I used Logisim to build circuit and simulate the logic gates, but you don’t have to. All the software you need is available for free on the class webpage. If you are familiar with FPGA devices, you can build this computer for reals on a cheap FPGA development board like this guy. Either a Xilinx board with Vivado to build and simulate or Altera boards (<– warning, I’ve never used this one before) using Quartas software to design and simulate it should work. This little CPU isn’t super complicated. I warn that actually building it on one of these boards is no easy task, you’ll have to design stuff that is not covered in the class to get it to work with your particular board.

Join the class now before they get too far ahead!

Playing with Google Apps Scripts

OCRcoverGoogle Apps Scripts (GAS) is an interesting tool that you can use to automate tasks using functions built into Google’s powerful APIs.  Personally, I couldn’t find a ton of info on the syntax and what-not for the language, but it seems to be javascript with some caveats. (It doesn’t like linebreaks in the code, you use only a single quote for Strings, and it will ignore newline characters in strings “\n”).  Oddly though you can’t use the javascript examples from Google’s developer API examples directly (or at least I didn’t have any luck).

As an example project, something I’m working on required me to read the text out of an image then highlight keywords. I broke this down into three steps.

  1. Acquire an image
  2. Use Optical Character Recognition (OCR) to read text
  3. Search and highlight keywords

Background:

I’ll start with giving you access to the finished project code. To run it,  you will have to “File–>Make A Copy” of the project. Then follow the steps on this webpage word-for-word to Activate the DriveAPI and developers console and you’ll be fine.  Sometimes the developers console site doesn’t want to load, just keep trying it until it works. When you want to run the code, you click on “Publish–>Deploy as web app”. The first time you’ll have to set who you will allow to have access to the app. They will also have access to your google drive if you allow them to execute as your account so be careful. Once you’ve set this, click “Deploy”.  Then you’ll get the link to the web app.  The first time you run it you will have to give it access rights to your google drive.

The Guts and Explanation:

OcrTestForm

Luckily while searching, I stumbled across the blog of Amit Agarwal which if full of great example code.  For step one, the simplest solution I could find was his code example that uses a custom HTML form upload an image to your google drive account.   This might seem like overkill. Why didn’t I just use the fileID of something already in my google Drive?   Well, in this particular application, the user might be uploading multiple files from a camera on a mobile device. This form setup seemed to be a simple web-based uploader which gives me complete access to the guts of what’s going on.  This will help me get the fileIDs easily for different files.

For the second step, the OCR, I had attempted multiple times and methods for getting an Android native OCR library to work. Every tutorial I found was highly dependant on the version of Android SDK or Eclipse I had, or I would just hit a dead end when I tried to compile. Plus, those would only work on Android, not every device. I really wanted a web app. That’s actually how I stumbled upon Google Apps Scripts again.  I had played with it a bit in the past, but this time, after finding some great example OCR code from Amit’s website, I found GAS much more accessible. I added this code to the HTML form example from Step 1 above and tweaked it a bit.

In the original OCR code snippet the script reads an image, then creates a Google Doc with the image followed by the text that it recognized. This file is saved this into the root folder of google drive.  Since the uploader code (from Step 1) saved its picture into a subfolder, I made the OCR code save into that same folder.  The way to do this is to add a “parents” ID tag to the properties of the OCR file.  Since I already had the folderID from the uploader code, that was pretty easy to sort out. This was not super easy to figure out. As I said, I couldn’t find a lot of info on GAS language and this was one of the things that took me a while to find. By looking at how Google’s other services save a file into a subfolder, I was able to do the same thing in GAS.  You can see the results below.

OceTestDriveFolder

I tweaked the form code to print out the URL of the newly created Doc file with the searchable text.  I couldn’t figure out how to get logging to work in GAS at all.  Every time I tried to run something that should print to the console, a console would briefly appear, but disappear before I could read anything. So I just stuck with having the form print the URLs. Then I could copy and paste them into the address bar to visit the document.

The third step was searching for keywords within the text.  Again, someone else had done the hard work for me.  I simply tweaked the code and pasted it as a function into my script.

To test the code I printed a page of public domain POE-etry and took a picture of the page with my cellphone to simulate how a user might do.  To make sure that I’d get a lot of hits on my text search, I hardcoded the keywords for the search to be the rhyming sounds in the poem.  In this case –oor and –ore.  Then I uploaded the image to my Google Drive using the HTML form. After a couple of seconds (it takes a couple of seconds to upload) all I needed to do was open the newly created OCR DOC file and see how well the OCR worked.

As I said before, the Google Drive’s OCR process pasts the image into the file, then translates the image to text. Even in normal room lighting at night time it was really good at translating the text and easily searchedand highlighted the keywords I hardcoded. Here’s the resulting file.

Audible and My Reading Life

I started last year out strong by reading 5 books just in January.  That is where my documentation ended, so I had to resort to the virtual trail left behind on my Kindle and in Audible for my yearly stats.

I read 15 books on my kindle. I read at least two books in print. I’m sure this number is higher, but I didn’t put any effort in determining what other books I may have read. I listened to 6 books through Audible.

This puts my last year total at 23+ books. I don’t have a numerical goal for this year. I simply want to get into a more regular habit of reading and documenting my reading progress.

Jessica-of-SheekGeek

P.S. My reading stats would have been 6 books less without Audible. It is a happy part of my work/home commute. (It feels so productive to “read” while you drive.) If you are interested, you can try Audible out for free; or dive right into a Gold membership (which is what I have).