Wednesday, February 22, 2017

Weekly Wednesday Update #8

Goal Update
Swimming is still lacking, biking has slipped a little, but its because it has been 50+ degrees in Mid-Michigan for the past week!!!! I avoided the dreadmill and got to run outside four times over the past week. Absolutely amazing! On my run over the weekend, I set a new watch record for a 10k (41:15), and increased my VO2 max to 58 ml/kg/min. To translate, the Garmin race predictor (which is relatively accurate according to numerous runners) indicates my 5k should be 17:43 and more importantly, my marathon time should be 2:49:43! If nothing else, I will use these as realistic goals and then cruise past them!

Miles Swam: 0 [0]
Miles Run: 32.04 [179.85]
Tacos Ate: 20 [170]
Miles Biked: 16.84 [369.42]

Things I worked on

While I may be avoiding the deep end of the pool, this weekend I took a plunge. First, my OCD overtook my best judgement and I designed and carved a new electronics control box for my CNC machine. In my defense, my first design had a majorly annoying design flaw which made assembling the panel connectors and wiring them a pain in the rear! This new design has removable acrylic panels, which not only look sexy, but make wiring a breeze! I just finished spray painting the final coat on the box, and will start assembly over the next few nights.
Front and back panels

Primed electronics box

Carving side panels

While the electronics re-do was unintended, the bigger plunge that took place was the
destruction dismantling of my X-Carve to build the Z-Carve. I took a time lapse of it (looks pretty cool) and plan to take another time lapse of the building and then do some light video editing before posting on YouTube. Stay tuned; it should be a doozy - I mean really, there is ~⅛” clearance between my table’s supports and the motors!
Before dismantling my X-Carve I did finish a simple item I had put off for way too long - a simple knife holder. Previously, I was acting like the standard bachelor and kept all my knifes scattered in a drawer (okay, they were in a silverware organizer). Now, I have this - based on a design by ZenziWerken. I will be putting these up on Etsy shop as well as writing up the project for the Inventables Project page. If you get the Inventables newsletter, this knife block was featured in this week’s random Instagram photos at the end!
Simple Knife Block

Favorite Podcast of the Week


Great podcast to help me get my act together and start that side hustle. Best way to describe it is from the link above:

“There is a huge gap between working full time and running a successful job-free income business. I’m here to bridge that gap.

Here’s the deal:
I believe busy full time workers who want to build a successful side income business MUST become experts in a lot of areas fast.

You must listen to the right people online, the experts who will show you step by step formulas for growing a side business.

Instead of reading hundreds of books, listening to the podcast carousel of “experts” that are trying to sell you on a product, and trying strategies from gurus who are doing entrepreneurship full time unlike you…

Favorite Quote(s) of the Week

“Try not to become a person of success, but rather a person of value.” - Einstein

"Action always beats inaction." - Robert Kiyosaki

"Nothing will happen unless you take action and create it, and creating it is a process, not a single event." - Kate from EOFire

Random of the Week

Well, I got my first Etsy sale shipped over the weekend and the customer loved it! She has seriously been the greatest customer, not only being very understanding and easy to work with, but has also given me tips on improving my shop and listings. While I am still in the process of updating and improving my shop (a continuous thing), I will share the link to the Milbot Industries etsy shop now. In the near future, I will be putting up several additional items and trying to produce some more attention and sales through social media. If you could help me out and share my shop with family and friends, I will figure out how to set up discounts for you and anyone you send my way. Have them message me through etsy and mention this blog post to get the discount!

First Etsy Sale - Custom Wood Sign 8 x 10 in
While this section may not be as interesting this week as it has in previous weeks, trust me, there is a lot coming over this weekend. Friday, I will be off work, but have obligations from 8:30am to 9pm! Saturday I will be at a beer festival with my best friend to taste some of the world’s best craft beers, and then Sunday I will be babying the hangover (good thing this is a recovery week) and hopefully building the Z-Carve. I promise there is some very exciting stuff coming soon, which I will let you know about next week!

Time to write post: 31 minutes

Wednesday, February 15, 2017

Weekly Wednesday Update #7

Goal Update

Okay. This pool thing isn’t funny anymore. Now I am 33 miles behind schedule; I have received the Total Immersion Book and DVD (haven't consumed them yet) and my excuse now is that I cut my finger pretty good while working on some projects late on Tuesday… What an idiot - I even had gloves on, just wasn't focusing on the task at hand. Anyways, once this heals to the point it is safe to do so, I will cannon ball into the local overly chlorinated (probably a good thing) pool and start swimming back and forth in the pool the 2324 times I need to [in case you are wondering that is 33 miles in a 25 yard pool - of course I did the math].

Miles Swam: 0 [0]
Miles Run: 21.24 [147.81]
Tacos Ate: 21 [150]
Miles Biked: 69.96 [352.58]
Garmin Connect Graph

Things I worked on

This past week I did a much better job of FOCUSing. Instead of having the usual Friday off to attack my home projects, I went into work as they pay the bills; however, I still made a lot of progress on my electronics control box. Let me tell you, there is a shit-ton (technical term) of wiring I have had to do. Good news is the end is in site and I plan to get this all squared away over the weekend! Unfortunately, I do not have a picture of the progress at this time and honestly it looks like a mess.

I also have installed a top to my Z-Carve workbench enclosure and began wiring the LED strips. The long Y-axis rails have been assembled with the aluminum supports I made last week, so the surgery should occur relatively smoothly this weekend.

Z- Carve Enclosure Before Top was installed
One minor hiccup that set me back last weekend was a blessing in disguise. A fantastic customer (and shop owner) on Etsy requested a custom sign for her nephew, requiring me to cobble engineer a functioning Z-Axis mechanism to produce this sign. I am so excited to send this to her over the weekend. She has been giving me tips and helping me really get my Etsy shop up to the standards it should be at. Next week I will share a link to my updated shop; please share with your friends and family!
Custom Sign to show backgrounds, infills and some text options

Favorite Podcast of the Week


Wow. That’s about all I need to say about this one. Peter Is the founder of XPRIZE foundation and is a radical future thinker. Trust me, listen to this one closely.

Favorite Quote(s) of the Week

"Nothing will happen unless you take action and create it, and creating it is a process, not a single event."EoFire

Random of the Week

My mind has been rather scrambled even with my efforts to FOCUS. As soon as I was ready to tear apart my X-Carve and move it, I got a custom order on Etsy, something I have been patiently waiting for for several months. Now that I got that order, I feel the urge to fix up my Etsy shop and make it into something that I would honestly spend money at. While I have done research on copy-writing, advertising, networking, simple photography and other skills to have a successful Etsy business, I never took the time to put that research into practice. This first customer (who has been seriously wonderful - providing tips, feedback and the like) gave me that push to really kick off this side business I have talked about for years. Step one has happened. Now its time to that next level. Not at a later time that will inevitably be pushed down the road to a never occurring date, but now in February of 2017.

With some simple math, I can easily manage a side business with net income of over $1000 a month between the hours of 7pm and 10pm during the week. Seriously, it's not hard. Check out StepCraft’s free E-book - “Start Your Own Business – With a Stepcraft All-In-One Creation System” if you don’t believe me (note: I do not get anything from this and have no affiliation with StepCraft. I randomly happened upon their site through one of many sources and saw this book with the right price so I gave it a shot). I have only read 10 pages of it thus far (while biking today), but it really outlines the process and it is that simple. I plan to document my journey to prove to myself and you just how easy it is, and give everyone a place to learn from my mistakes. To finish off this rant, here is another quote that really hit me this past week:

"Not even average effort is going to get you to true success." - Timothy Sykes

Time to write post: 31 minutes

Wednesday, February 8, 2017

Weekly Wednesday Update #6

Goal Update

Well, I’m back at it feeling stronger than last month (as an engineer, I need some data behind such broad statements, so by my Garmin watch, I set a new PR in the 5k (18:46) and 10k (43:12) during dreadmill training runs this past week). But seriously, I need to get in the pool. 28 miles behind schedule at this point 

Miles Swam: 0 [0]
Miles Run: 29.93 [126.57]
Tacos Ate: 24 [129]
Miles Biked: 70.39 [282.62]
Garmin Connect Graph - Can't get G-docs to make it look this pretty...

Things I worked on

After last weeks realization, I have been trying to FOCUS (follow one course until success - Robert Kiyosaki). Well, to be honest, it's not going that well, but hey with practice comes perfection.

I did make the 8 aluminum supports for my y-axis manually! Cut out a MDF template with my CNC machine, marked the hole locations with a center punch, pilot drilled holes with a 3/32” bit, then used a 7/32” bit to enlargen the holes and give some wiggle room while installing them.
Not my ideal way, but it worked

I have finished half of a surprise gift for a close friend, with plan/goal/statement of finishing it up this Friday.

I have also painted the electronics enclosure and began the soldering and wiring process - wow, this is going to take a while.
Spray painting outside in 25F temps (take inside to bathroom with fan to dry)
One slight problem I have encountered is the fact I did not account for the paint in my tolerancing of the holes… Last night I tried to thread in one of my aviation plugs which will connect to my CNC’s stepper motors and I can’t quite get the nut onto the threads… I have a plan to fix this slight problem, which in my brain has already turned into controller box v2. Before I begin down that rabbit hole, I am going to complete v1 and install it so that v2 will fix all v1 mistakes - FOCUS in action right? Let’s count it ;)

This weekend (while my new Z-axis belt is on it’s way) I will finish up the electronics, the workbench, and upgrade to the Z-Carve. End. Of. Story.

Favorite Podcast of the Week

Great podcast where Jonathan gives some insights on how to handle your life with the good life bucket model. From the podcast notes:

“The idea’s really simple,” says Jonathan. “Think of your life as three buckets. One is called your vitality bucket. That’s about optimizing your state of mind and body. The second is called your connection bucket. That’s about cultivating deep and meaningful relationships. The third is your contribution bucket. That’s about how you bring your strength, your gifts, and your beliefs to the world. It’s about how you contribute to the world around you. And that may be the way you also earn your living, but interestingly it may also not be the primary source of income for you.”

“The good life, then, is when you basically do the work to make all three buckets as full as you can get them and then develop a daily practice of…everyday taking a quick look and saying, ‘Okay, so how full is each one of these three buckets, and what can I do today to fill them?’

Favorite Quote(s) of the Week

The factory of the future will have only two employees, a man and a dog. The man will be there to feed the dog. The dog will be there to keep the man from touching the equipment.” – Warren G. Bennis

Random of the Week

Well its been 6 weeks, time to stop this silly blog. You’re welcome!






Okay, you caught me, I really enjoy doing this to not only help me be accountable for my goals and projects, but I heard from some loving family members (thank you Dad and Grandma!) they really get a hoot out of my rambling. As I mentioned in week 2, I would wait 6 weeks until I made an investment in a better blog/website hosting option due to my OCD and perfectionism (honestly, I spend as much time formatting the posts as I do writing them). I will be going transferring my site to HostGator at some point, but with my current project, exercise, work, sleep, taco and studying load, I am going to postpone this move until I pass that PE exam!

In the mean time to calm my OCD nerves and countless minutes of editing HTML code, I stumbled (okay google ninja searched) across WYSIWYG editors (what you see is what you get). These things allow me to type up my post in google documents, copy them into an editor, format until my eyes go cross, then copy the HTML into blogger and away we go. If you google search “WYSIWYG html editor online” you will come across numerous options (272,000 to be exact); personally I just click on one and try it out. Haven’t found a preferred editor yet, but they all have worked great! Problem solved [for now]!

Thank you for reading. Please leave questions or comments below!


Time to write post: 33 mins

Saturday, February 4, 2017

My CNC Control Box: Use Raspi GPIO Pins to Control CNC

After a year or so of running my X-carve with a laptop on a slide out drawer below my machine, I wondered if it was possible to add simple control buttons to the raspberry pi to control the X-Carve (i.e. feed hold, pause, resume, etc.). After some digging through the forums, blogs and numerous other sources, I couldn’t find anything. One day, while looking through the Chilipeppr interface, I found Frank Graffagnino's Shuttle express controller. Frank connected a Shuttle Xpress USB device to his Raspberry pi controlled Shapeoko to jog his spindle around. After digging into his code, it looked like he had created exactly what I was looking for; raspberry pi buttons to add commands to the Serial port JSON server.

Well, here goes nothing!
Note: I did make a backup of my current raspbian image (using Win32DiskImager) before messing around so I would have a fail safe to go back to.

Build Instructions

(Written for Raspbian, but should work for others)
Ensure openssl dev libraries are installed: (~1 min on Raspi2)
sudo apt-get install libssl-dev build-essential

Install nopoll library (~ 1.5 mins)

Download the nopoll library from here: http://www.aspl.es/nopoll/downloads/ (I'm currently using version 0.2.9.b207).
cd ~
wget http://www.aspl.es/nopoll/downloads/nopoll-0.2.9.b207.tar.gz

Extract and change into the extracted directory
tar -xzvf nopoll-0.2.9.b207.tar.gz
cd nopoll-0.2.9.b207

Configure, make, and install the nopoll library with the usual:
./configure
make
​sudo make install

Install cURL (~10 mins)

Download the cURL library from here: https://curl.haxx.se/download.html
cd ~
wget https://curl.haxx.se/download/curl-7.52.1.tar.gz

Extract, configure, make, and install the cURL library with the usual:
tar -xzvf curl-7.52.1.tar.gz
cd curl-7.52.1
./configure
make
sudo make install

Install WiringPi (~0.5 min)

This step is only necessary if you want to have LEDs or switches hooked up to a raspberry pi.
If you aren't using led's and switches, just edit the Makefile and change the GPIO_SUPPORT to 0 to disable it. You can also remove -lwiringPi from the libs line.

Take a git clone of the wiringPi utility and use their included build script to build and install the library. Instructions are here: http://wiringpi.com/download-and-install/
Change directory back to your home directory or wherever you were working from
cd ~

A quick version of the wiringPi instructions
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build

Install ShuttleCP (~2 mins)

Download ShuttleCP from Github at https://github.com/lordmundi/shuttleCP.

Change directory back to your home directory or wherever you were working from
cd ~
git clone https://github.com/lordmundi/shuttleCP

Change into the shuttleCP directory
cd shuttleCP 

Edit shuttlecp.c and update the following items at the top of the file if you need to. You can likely just leave them alone:
sudo nano shuttlecp.c

#define CNC_HOST "localhost"           // Hostname where SPJS or bCNC is running
#define CNC_PORT "8989"                // Port for SPJS or bCNC. ;Typically 8989 for Chillipeppr and 8080 for bCNC
#define DEVICE_PATH "/dev/ttyUSB0"     // Path for SPJS to connect to GRBL or TinyG. ;Not used for bCNC
#define TINYG "1"                      // set to 1 if you are using a TinyG
#define BCNC "0"                       // set to 1 if you are using bCNC instead of Chilipeppr
#define CYCLE_TIME_MICROSECONDS 100000 // time of each main loop iteration
#define MAX_FEED_RATE 1500.0           // (unit per minute - initially tested with millimeters)
#define OVERSHOOT 1.06                 // amount of overshoot for shuttle wheel

CNC_HOST circled in red, DEVICE_PATH circled in blue

Crtl-x to save, then 'y' to confirm

Build the shuttleCP binary by running make in the shuttleCP directory.
make

I also do the following to install shuttlecp so that it can be run regardless of which folder you are in when you execute the program.
sudo make install

Running

​1. For ChiliPeppr, first, make sure SPJS is already running and ChiliPeppr has already opened a connection to your machine. I run SPJS on the same raspberryPi that I run the ShuttleCP utility on.
For bCNC, make sure that bCNC is running and is connected to the GRBL board.
2. All alarms must be clared and the CNC machine state is reported as "Idle".
3. Start up shuttlecp with an argument that is the device interface for your ShuttleXpress. Mine is /dev/input/by-id/usb-Contour_Design_ShuttleXpress-event-if00
Use sudo so that wiringPi has access to GPIO pins:​
sudo ./shuttlecp /dev/input/by-id/usb-Contour_Design_ShuttleXpress-event-if00
​Or, you can use the "./shuttle" script, which effectively does the same thing.

As I do not currently have the shuttle device, I got the following output when running “./shuttle”:
pi@JSON-CNC-test ~/shuttleCP $ ./shuttle
Starting shuttleCP ...
Attempting connection to JSON-CNC-test:8989
Websocket connected.
/dev/input/by-id/usb-Contour_Design_ShuttleXpress-event-if00: No such file or directory
/dev/input/by-id/usb-Contour_Design_ShuttleXpress-event-if00: No such file or directory
/dev/input/by-id/usb-Contour_Design_ShuttleXpress-event-if00: No such file or directory

Again, I went back to the Github source and looked for why this was happening. In the main loop of the shuttlecp.c file, I found the code loops until the device is connected. Therefore, by changing line 386 in shuttlecp.c from
shuttle_device_connected = 0;
to
shuttle_device_connected = 1;

I was able to bypass this loop and still utilize the code for the Raspi switches and LEDs.

Now to test the switches and LEDs…
Below is a image showing the wiring for the RASPi and WiringPi
From https://github.com/lordmundi/shuttleCP/blob/master/README_pinout.txt   

Using the above chart as a reference, I wired up up some LEDs and buttons and then commented out (my commented shuttleCP verision is located here - note the instructions at the top) a lot more code. Then you must re-make and install shuttleCP

make
sudo make install

 and tried to run it using this command....

sudo ./shuttlecp /dev/input/by-id/usb-Contour_Design_ShuttleXpress-event-if00


which gave this result...
pi@JSON-CNC-test ~/shuttleCP $ sudo ./shuttlecp /dev/input/by-id/usb-Contour_Design_ShuttleXpress-event-if00
Attempting connection to JSON-CNC-test:8989
Websocket connected.
Shuttle device connected.
RESUME detected
Sending websocket cmd: send /dev/ttyUSB0 ~

​​​    + Successfully sent cmd: send /dev/ttyUSB0 ~

Sent 1 commands


Success!!!Now go hook up your Raspberry Pi with some LEDs and buttons so you can control your TinyG from your workbench without a computer!!!!

Set up the Script to Auto Start

If you have read my previous post on making the GPIO server auto start, this follows the same process.

The first step; however, was to remove the need to pass an argument to the shuttlecp program. This was done by commenting out the following lines in the int main function (approximately line 376) from the shuttlecp.c file:

// if (argc != 2) {
  // fprintf(stderr, "usage: shuttlecp <device>\n" );
  // exit(1);
//}

//dev_name = argv[1];

All this is doing is removing the need to pass the device name in with the execution command. WE will then replacing the last line with the following to 'hard code' a fake device name (its not used at this time anyways). Note: this will change if you actually want to control the CNC machine with some sort of controller...

dev_name = /dev/input/event0;

Then edit the start-up script by entering the following command (visit this github for more info and search for 'start-up')

sudo nano /etc/init.d/serial-port-json-server

and add the following line to the case "$1" arguments:

/home/pi/shuttleCP/shuttle

Here is my case "$1" for reference:

case "$1" in
  start)
    log_begin_msg "Starting Serial Port JSON Server service"
# do something
     /home/pi/serial-port-json-server-1.92_linux_arm/serial-port-json-server -regex usb &
     /home/pi/gpio-json-server &
     /home/pi/shuttleCP/shuttle

  log_end_msg $?
  exit 0

To exit, press 'crtl' + 'v', then 'y' to save. Then make the script executable with

sudo chmod +x /etc/init.d/serial-port-json-server

and finally, update it.

sudo update-rc.d serial-port-json-server defaults

Now reboot with

sudo reboot

If all goes well, when you open chilipeppr and hit a button, you should see commands show up in the serial port console on.

~ is the resume command and ! is the feedhold command

Now we just need a way to control x, y, and z motion... 

Wednesday, February 1, 2017

Weekly Wednesday Update #5

Goal Update
The January numbers are in! It was a good start to the year; a little upset I didn’t look at my milage yesterday and run 7 more miles to hit 100 this month! Not sure what to think about eating more tacos than running miles… I’ll let you be the judge. February I am determined to get in the water (even if it's ice/snow outside) - can’t believe I said that either. I just bought the Total Immersion: The Revolutionary Way To Swim Better, Faster, and Easier (affiliate link) and Total Immersion Swimming: Perpetual Motion Freestyle in Ten Lessons DVD (affiliate link) per the recommendation from Tim Ferriss to help with my swimming technique.
Miles Swam: 0 [-22.93]
Miles Run: 93.04 [+8.11]
Tacos Ate: 102 [+17.07]
Miles Biked: 197.08 [+25.77]


Weekly update - Note: this past week was a ‘recovery’ week. I did try to reduce mileage and/or time by 10-20% and slowed down the pace (keep HR <145) quite a bit to let my body recover.
Miles Swam: 0 [0]
Miles Run: 22.8 [96.64]
Tacos Ate: 22 [105]
Miles Biked: 51.12 [212.23]

Things I worked on

I regret to inform you, I am a chronic optimist that believes he can watch paint to make it dry faster and that all plans will proceed without error or failure. Unfortunately, I did not finish my Z-Carve workbench, the electronics case, nor transforming my X-Carve into the 1800mm upgraded Z-Carve. Maybe this weekend? Well, that is the plan. The good news is I am currently covered in paint from finishing the electronics case, have started soldering the components, and have the diagram drawn out on paper (for the most part).
Primed Z-Carve Electronics Case
Over this past weekend I called an audible and designed, built and finished a laundry basket holder to regain some floor space in my room. Made from 1x3’s, stained with ebony stain, and sealed with polyurethane. Not a bad cheap and easy project; just need to add a nice top to it… Any suggestions? Comment below. I am leaning towards a nice burnt wood top.

Laundry Basket Holder
I also tried my hand at milling aluminum. Well, I cut half of a support for the 1800mm length makerslide before I broke the bit. Probably should do some of those highly recommended chip load calculations so I don’t throw out another $15 in 3 minutes.
Milling Aluminum on X-Carve (moments before bit breaks)
Line up remains the same, few things moved around:
  • Aluminum Supports for 1800mm axis
  • Work bench with enclosure
  • Electronics case for Z-Carve
  • Dust Shoe version 2 (version 1 post here)

Favorite Podcast of the Week

The Tim Ferriss Show: Arnold Schwarzenegger Part 2! Bodybuilding, Investing, and Online Battles
This is part 2 where the fans of the Tim Ferriss show submitted and voted for the most popular questions to ask the Terminator - if you haven’t heard part 1, do it, do it now! I knew Arnold was a bad ass, but I didn’t realize to what level until hearing part 1. Part 2 just adds to it! He is a machine. Really.

Favorite Quote(s) of the Week

“Part of being successful is to give something back.” – Arnold Schwarzenegger

Random of the Week

This week I have been very interested in Raspberry Pi projects. Currently, I have two model B’s (one I am pretty sure I blew up), one B+, one version 2 and one version 3. Here is a list of what they are currently in use as:
  • Raspi B - smart garage door opener
  • Raspi B - broken?
  • Raspi B+ - smart bed stand/wake up lights (not in use)
  • Raspi 2 - JSON, GPIO server for X-Carve
  • Raspi 3 - still in box :(

There have been some recent posts (like this and this and this) that have hit my news feed [I use feedly - great app, review for another time] and caused a desire to re-evaluate the uses of my awesome mini-computers. I am currently working on adding buttons for the JSON server for my Z-Carve [all tested, just need to assemble] which I will then add one more awesome feature to so stay tuned! Next, I want to combine the Raspi Echo with my smart bed stand, which will be awesome - think wake up lights controlled by saying ‘Alexa - wake me up an hour before sunrise.’ Then, I need to fix/convert my smart garage door opener so it doesn’t drop wifi each week, or convert it to an ESP8266. And finally, I need to build a photo booth for a few weddings this fall.


After this lovely ramble, seriously people go out and buy a Raspberry Pi 3 Model B Motherboard (affiliate link) for $35, take it out of its box and start making stuff. All the instructions are online (I will add my builds as I finish them), the worst case scenario is you blow it up (which is fun!) and you are only out $35 but learned what not to do for the next time.

Time to write post: 35 minutes