Limit Switches on CNC Mini-mill

I’ve been slowly converting my mini-mill over to CNC and at this point I’m making parts but still have some fit and finish to go.  There are really two big things remaining.  First, is to install some limit switches and second is to install some DROs.  Truth is, I’m doing both in parallel but I’ll detail my strategy for limit, output lines and VFD lines to control the speed of the mill.

By way of background, I have a Microlux Mini-Mill.  Its the 500-watt R8 mill and I’m pretty satisfied with it so far.  It was a manual mill when I originally ordered it and I decided to convert it to full CNC.  It’s been a bit of a journey as I skipped machine shop in high school (yes, they still taught it back in the day) so I’ve been playing catchup.  I decided to start with 3-axes (X,Y and Z) and I’ll consider a 4th axes (rotary table) in the future.  I acquired a conversion kit from CNCFusion and over all it was worth it.  A little pricy but the parts we’re all top notch and CNC Jedi was helpful with questions and feedback.  Here is a picture of the current setup.

CNC Mill Overview

In this picture you see (from left to right) my DRO for the mill.  Since I have stepper motors I wanted to be able to calibrate the axes as well as see exactly how much movement was completed for when I’m doing manual operations.  Next to the DRO is a controller box that has my Thinkpad on it.  The controller is an aluminum housing that hosts my 48v power support, a Smooth Stepper board that interfaces with the Thinkpad using USB.  The Smooth Stepper interfaces with the Gecko G540 4-axes controller.  The Gecko also sports 4 input ports as well as 2 output ports, more on that in a minute.  The Gecko interfaces with the 3 stepper motors using the cables that are visible in the picture.

As you can see from the picture, I have three aces wired, however, at present I have no limit switches.  This means that if I run a program that would exceed the travel of the table, the Gecko will continue to send movement commands and this could end up causing damage to the motors, connectors, etc.  Not good.

I was faced with a problem.  How do I wire in the limit switches?  I could have used mechanical switches which probably would have provided enough accuracy, however, I wanted to have my machine home operation as accurate as possible so I went with optical switches.  I ended up choosing OPB931W51Z  which has a built in IR emitter which changes the state of the output when something breaks the Ir signal.  With this, I decided to use two of them for each axes.  That way I can detect the end of travel in both directions.  However, the G540 only has 4 input lines to I needed to be a little creative.

I then feed each of the switch pairs into a 4081 Quad-input AND gate which effectively drives a high state when both switches are clear, or, goes to zero when either of the sensors is interrupted.  I then feed that signal into a PN2222A which I use as a switch.  I also wanted to control the speed of my spindle as well as have the ability to use the two output signals from the G540 to turn a coolant pump on and off (which leaves me a spare output).   Here is the basic circuit for the limit switches.

Limit Switch Schematic

Its a pretty basic circuit although I was stoked to get it all working.  I had to brush off my high school electronics shop class.  Basically, there are 4 switch pairs for the axes (X, Y, Z and A).  Here is a shot of the breadboard setup, note that in the first
picture the led in the middle is on (no obstruction) and in the second the LED is off (obstruction on one side or the other).  The AND gate allows me to link the switch pairs together so I only need 3 input lines for now to handle the 3 axes.

BreadboardNoObstruction  BreadboardObstructred

Notice that on the second picture, I’m using a circuit board to interrupt the beam of light and when I do, the LED goes out which is inverting the AND gate and giving me a low when all is good.

CircuitBoardLayout

Circuit board

I used a schematic program called DipTrace (free for up to 300 connections).  DipTrace then allowed me to use a board generation tool which allowed me to position the components.  Notice the two blocks that say Fotek.  These are Solid State Relays which allow me to turn them on and off with only +5 volts and on the switch side they can carry 25A @ 240v.  Way more than I need.  I’m going to use these for my Output lines so when I set them high, it will turn on an outlet wired to these relays and and boom…instant coolant all computer controlled.  The white connectors are used for each axes (X, Y, Z, A).

The power supply I got by breaking open an old D-Link wall adapter which gave me a nice clean 5V for the circuit.

My next step is to place the switches, solder up the board and get cracking on some new parts.

My next post should be with limit switches in place.

Tramming the Mini Mill

I bought a MicroLux Mini Mill from Micromark a while back.  Unfortunately, I didn’t have a bench to put it on so its been sitting idle for a while.  I got that bad boy a new home and spent some time this weekend getting to know it.  The first order of business was to Tram the mill.  Tram, what is that ?

Tramming is the process of setting up a mill.  It means you adjust the mill head, table and other parts of the mill to be as close to zero difference as possible.  For instance, the head of the mill rotates up to 90 degrees from side to side.  Most of the time your cutting with the head in the 0 position (it rotates up to 45 degrees to the right or left.  Its important to make sure the mill is perfectly positioned at 90 degrees to the table top (0 degrees on the head tilt gauge).

The process for me involved pulling the table assembly apart, degreasing, re-greasing and reassembling.  This process took a few hours as I had to spend some time grinding the gibs down as they were not perfectly flat.  Once reassembled I used a dial indicator to see how my side to side alignment was.  To accomplish this I inserted my dial indicator in the head assembly and measured the distance to the table from each side.

X-Axis-LeftSideX-Axis-RightSide

 

 

 

 

 

 

 

 

 

 

 

Notice that there is about 1/1000″ difference between the measurement on the right and left side.  This is pretty close but the measurements are only about 3″ apart.  So, I’m going to retry the measurement when I get some new dial indicators that will allow me to make these and other measurements easier.

I also spent some time to see what the difference is in terms of front to back and found that I’m off by about 0.005 which is too much for my taste.  To fix that problem I need to make some shims and take things apart, adjust, reassemble and remeasure.  Hopefully we’ll get it right on the first try or two.

NOW I know what trig can be used for :)

I’ll get some better pictures of the process as I do some more work.

 

Protecting Your Password – 1Password

Like many folks I’ve had to resort to remembering a password that is hopefully not guessable and strong enough to withstand hacking.  Even when doing that, its hard to remember a large number of unguessable passwords and so I, like many others resorted to using one of the few non-guessable passwords on lots of different accounts.  So, what was hopefully none guessable is the one thing protecting so many different accounts.  Once its compromised, your sunk.  So, how do you protect the many Internet based accounts with passwords that are hard to guess but easy to remember?  I found a great tools that I really like called 1Password from Agile Bits.

Basically 1Password is a program that holds the sites, user names and passwords to all your Internet sites.  You might say, well, I’ve got a Word Document that I keep all that in already.  1Password goes beyond storing the information but it will also allow you to launch the site with a double click and automatically put the user and password in the form for you.  That’s nice, right?  But wait, there’s more.

1Password will also allow you to generate a random password that you can provide some guidance on things like length, special characters, etc. This allows you to create passwords that are random and fairly uncrackable.  In fact, I don’t actually know the passwords to most of the sites I access because they are large random collections of gobbledegook.  See the screen shot for an example of generating a password.1Password Random Password Generator

This allows you to create very safe passwords that are different for all the sites you access and keep those passwords unique so if a site gets hacked, you’ve only lost one very complicated and unique password.  This will significantly limit your exposure to someone else’s security breach.

The next question I asked myself is what if I’m using my iPhone?  No problem, 1Password has a Mac OS X as well as a Windows version of its product that also has an iOS and Android versions as well.  So, you can use 1Password on all your devices and not have to worry.  But how do I sync them?

1Password offers a neat little feature that uses Dropbox to sync all your 1Password programs together.  So, you don’t have to specifically sync everything, that is handled by 1Password in the background.  Sounds great, but is that safe?

The 1Password database is protected by a single master key that you specify.  Of course, you want this key to be non-guessable and secure but its the one password you need to remember.  This makes keeping all of your passwords safe and secure.

1Password Access Screen

One other thing to consider is that 1Password will also allow you to save notes, jot down software license keys or simply act as a repository for other secure information like bank account numbers, social security information for your family, etc.  Items you need access to electronically from time to time but are sensitive and things you don’t want to leave on your harddisk unprotected.

Finally, the one password that is probably the most important to safeguard that you’ll be tempted to also be one you can remember is your e-mail password.  If someone hacks or get’s access to your e-mail there is little hope that your online life will be secure.  If a hacker get’s your e-mail password generally they only have to access a site with your user name and then indicate they forgot their password.  Most sites will send you a reset link or other mechanism to reset your password easily.  This is the most important password you must protect.

If you don’t have a safe mechanism for keeping your passwords, take a look at 1Password.  I found it to make my online life less hectic and I believe more secure.

The Demise of Project Zero – a perspective

I’ve worked at IBM for about 13 years now.  Most of that time has been in a group called Application Integration and Middleware (AIM).  Comments here are my personal opinion and do not reflect an IBM position or perspective.  So, why am I writing this?  Perhaps its more cathartic than anything else but the project was conceived during the Open Source fervor back in 2005 and my perspective on the project was twofold.  As an IBMer as well as a commiter and member of the Apache Software Foundation.  During that time, I wrote about the new project in this blog post.

Several years ago Jerry Cuomo had a vision for a lightweight runtime that was intended to provide an alternative runtime based on Java that more closely mimicked the lightweight features of popular scripting languages.  The project was led by Jason McGee and IBM decided to use the open source eco-system to get people on early and generate some enthusiasm for the project.  The public website is still around and you can see it for a few more weeks at Project Zero.  Its time has come to a close.

  Personally I liked sMash as it had a nice lightweight programming model that was based on an event framework.  It was intended to be used for lightweight transactions and be a very lightweight runtime that could cycle quickly and process a limited number of transactions.  When done processing the limit, the container was merely recycled and a new one was spun up, very quickly.

sMash was also intended to make programming to a REST API simpler by including specific callback methods that would get invoked to service REST requests.  All in all, it was a nice piece of work that I thought would have been more popular than it was.  The question is why?

I believe the failure of sMash in terms of adoption less about the technology and more about the licensing.  Like a lot of software, it was available to developers for free, the project welcomed contributions from people outside of IBM and to experiment with it there was no cost.  The challenged came to deployment.  When using the software for commercial purposes (like doing real things that could generate revenue) a license was needed to pay for the use of the software.  Really, a model not unlike MySQL today.  I don’t know if the use of MySQL in the ecosystem is consistent with its license terms but it did catch on and became extremely popular.

Perhaps the challenges were in that sMash was being introduced to a market that already had a healthy eco-system of PHP, Ruby and others and so the value it brought was not sufficient to entice a lot of developers to switch.  Its impossible to know what the reasons were for its lack of adoption but I’d like to at least acknowledge the hard work of guys like Michael Fraenkel, Steve Ims, Jason McGee and others.  sMash is a good technology that is now being moved into the sunset.

The irony of the closure date is Dec 21, 2012.  Perhaps, the Mayans were right all along and they predicted the demise of Project Zero even before it began :)

Chick-fil-A and Free Speech

I heard about an outcry against Chick-fil-A a few days ago.  I had some time to do some digging and discovered that a demographic of our society is openly angry at Dan Cathy’s comments to the Baptist Press about traditional versus Gay Marriage.  “Guilty as charged,” he said. “We are very much supportive of the family – the biblical definition of the family unit. We are a family-owned business, a family-led business, and we are married to our first wives. We give God thanks for that.” So, the reactions begins…

I don’t think Cathy said he wouldn’t serve gays, or married gays, or anyone else.  He simply gave his opinion and perspective.  Isn’t that what Free Speech is all about.  No discrimination here … an opinion, a set of values, the courage to state his position, but not discrimination.

Many cities have vowed to block Chick-fil-A from opening new stores in their cities because they are “bigoted.”  What I find ironic, is that many of the same people who opposed Cathy’s comments and his freedom of speech would cry out that  a picture of a crucifix submerged in urine is art and protected.  The hypocrisy is unfathomable.

Do Americans even think rationally anymore?  I’m starting to wonder…

A Perspective on Leadership from the keynote speaker at “Government Camp”

My son attended a camp this week at Regent University in Virginia Beach, Virginia.  The camp was called “Government Camp.”  It sounds like an odd camp when most summer camps offer activities for kids to keep them entertained; this one is a little different and I think was really good.  Let me tell you a little about the camp and then about the comments made by the keynote speaker tonight.

The camp started back in 2007 when the faculty at Regent University wanted to provide a “camp”-like opportunity to teach kids about several dimensions of government service.  During the week, they saw Norfolk Naval Base, The Academi (formerly Xe, formerly Black Water), the Langley airfield used by the CIA and did some other activities to educate and have some fun.  All of this was from the Christian perspective of Servant Leadership.

What is probably surprising in today’s world is that Christians, despite all the labels that are levied against them, have at the heart of their faith a duty and desire to serve, not to be served.

Onto the keynote speaker… the person speaking tonight is a member of the Joint Staff (not the joint chiefs of staff) from the Air Force.  His speech was about Servant Leadership and his text for the presentation was Mark 10:45.  ”For even the Son of Man did not come to be served, but to serve, and give his life a ransom for many.”   His main point was about leadership not being about self promotion, but about serving those around you.

He took the text and drew a current interpretation of the preceding verses.  These verses set the context where James and John asked to sit at Jesus’ right and left.  These young guys were full of zeal, lots of ideas and today would basically be asking for a promotion.  Its interesting to note that the other disciples were indignant with the request.  I believe their disdain wasn’t because James and John brought up the subject, I think it was more about the fact that they didn’t think of it first; they were guilty of wanting the position which isn’t bad in and of itself, but they wanted it for the wrong reasons.

Jesus was clear that those in leadership positions should be taking them with a big does of humility and be ready to serve those around themselves, as opposed to having the elevation of stature be their goal.  The Colonel tied this idea of Servant-Leadership into what the kids learned this week at camp.  That, they should be looking to make themselves available to serve and lead but to remember that they are serving a very large group of people and their service is in sacrifice, not selfishnesses.

This is a lesson that I’ve heard many times before.  But hearing it from a person in military service with great responsibility for those in his charge I was reminded again, that I need to remember this in my position at IBM and that those in our other branches of government (Executive, Legislative, Judicial) need to remember that we are leading not for ourselves, but for those we endeavor to work for.

My son liked the camp a lot, and, I think left with a better perspective on what government does and how they can serve those around them.

UPDATE: MacBook Pro 2011 Unibody with Two External Dell U3011 Monitors Using Matrox DualHead2Go DP Edition

Major props to Matrox in solving my problem of the elongated time to sync the monitors.  Problem Solved!

I accessed Matrox’s technical website and submitted my issue (providing all relevant shtuffes like firmware levels, monitor info, cable types, etc.)  Within 24-hours I received an e-mail with some suggestions.  The one that worked was to disable automatic graphics switching.  It’s located under Energy Management so I hadn’t thought to check it.

The trick is to disable the switching mode.  This eliminates what I believe was a race condition.

I’m happy with the DualHead2Go as well as with Matrox.  +1 to them for their quick response and on the money suggestion.

MacBook Pro 2011 Unibody with Two External Dell U3011 Monitors Using Matrox DualHead2Go DP Edition

The title pretty much says it all.  The work I do at IBM and in my free time is mostly centered around using my notebook to get my work done.  Whether its programming, writing or creating presentations almost all of the work is on my work is done on screen.  I have opportunity to work from home as well as in the office and I think my time split is about 85 / 15 (office / home).  In the office I have a setup which includes two external monitors (24″) and I also use my Mac (the 17″ MacBook Pro display is a lifesaver).

My Work Environment

At work, my layout is MacBook Pro – Monitor # 1 – Monitor # 2.  Monitor # 1 is connected through the Thunderbolt Display Port while Monitor # 2 is connected through a Kensington DisplayLink device that basically connects via a USB connection and provides the third display.  The resolution on all displays is 1920 x 1200.  Overall this works pretty well.  The only drag is the Kensington is a little slow due to its use of the USB but I use to to place browsers for e-meetings, reference material and the like so high performance is not a hard requirement.

My Home Environment

At home I have a Dell U3011 display (30″) and its awesome.  Really bright, fast, good contrast, etc.  Highly recommend the monitor if your looking for one.  And, its BIG.  I leave my MacBook Pro in a BookArc and simply cable in network, power and the like and leave the MacBook closed.  I’ve become so accustomed to the monitor setup at work that two monitors made sense at home and so I splurged and bought a second U3011.

How to Hook them Together

After doing some research I decided to go with the Matrox DualHead2Go DP edition.  Since I was only going to use the two monitors (leaving the MacBook in the Arc) I wanted to have the highest performance possible so I discounted the Kensington DisplayLink as an option.  Last night I set up the system and have some good and some bad comments.

The Good

The two U3011 displays are fantastic.  Pretty much covers my peripheral range when sitting side by side and the performance is excellent.  They are also really bright and easy to read (running at 1920×1200 each).  They form a single “physical” display as far as the Mac is concerned.  The MAc ses them as a single 3840×1200 display.

The DualHead2Go comes with some software  PowerDesk, well, I downloaded it from the Matrox Support site.  I tried installing it (I run Lion 10.7.4) and it didn’t work.  The software is supposed to creates an icon in the menu bar.  I then went and downloaded the previous driver which worked fine.  With the driver installed you can set the resolution and tweak a few things like where the dock is located.  The software also provides the ability to set a keyboard shortcut so you can size a window in one display or the other.

The Bad

I’m not quite sure I like that as when pop-ups are displayed they are normally centered in the middle of the screen where the two displays come together.  Below you can see the “About this Mac” dialog displayed in the center of the displays.  Yuck.

Dell U3011's Side by Side

What would be ideal would be to have the option to simply treat the two displays as independent physical displays and arrange them correctly using the Display in System Preferences.  I’ll play with it some more as perhaps I’m just not adjusted to how much better this is.  We’ll see.

The other thing that I’m not happy about is the transition time it takes when the displays sleep.  When waking up it can take a few (sometimes several minutes) for the DUalHead2Go and the Mac to both acknowledge the displays are operational.  The Dell’s cycle between “No Link” and “Entering PowerSaver Mode” several times.  I’d like to click the keyboard and simply have them come up.  there is come kind of strange race condition going on that I do not understand.  This is probably my biggest grievance.  I’m using two connectors that came with the DualHead2Go adapter that connect from Display Port connectors on the device to DVI connectors.  Perhaps DisplayPort to DisplayPort might be better and if I can find the cables I give that a try.

Summary

I’m glad to have the two displays in my arsenal at home and I’ve already experience productivity boosts when programming as I can put editor windows all over the place.  Editing of Video is much easier as well.  If you need more realestate, this is the way to go.  If Matrox fixed a few of these bugs then I’d be even happier.  If I can’t fix the sync problems, I’ll have to buy a different device for the Thunderbolt display.  I’m not sold on this device yet.

If you have comments or suggestions, I’m always interested in what I may have missed or new tips.

Thanks

Clouds, IaaS, PaaS and SaaS … “Oh my!”

IaaS, PaaS, SaaS, ugh!  Reminds me of the “Wizard of Oz” when Dorothy, the Scarecrow and the Tinman were wandering through the woods.  So many trees, and scary options.  The world of Cloud in the IT world is kind of like that.

Having been working on Cloud technologies for the last 5 years I’m finally giving up on the IaaS / PaaS / SaaS layering. It looked good but it ends up confusing folks about the real relationship amongst these concepts. For instance, we normally put IaaS at the bottom, then PaaS on top and then SaaS above that.

The aaS Layering

I’m normalizing that IaaS is foundational for a number of deployments and provides the basic Periodic Table of elements for building solutions.

Periodic Table of Elements

The building blocks for all things that we know and don't know.

So, IaaS == PToE. We can create VMs that are basically atoms. By themselves they are interesting and provide some capability but alone they are not really compelling. I could create a VM (Atom) with a LAMP stack, a database engine, a Tomcat Server, and other stuff but alone its not really useful unless things are combined together. Heck, Sodium and Chlorine are uninteresting, if not dangerous by themselves, but combine them and they form a simple molecule that is not only interesting, its fundamental.

 

 

 

Salt Molecule

Coumpounds, like Salt are more compelling than individual atoms

Salt is a compound that is made up of these two atoms. They are compelling and are necessary for basic survival. I like to think of Salt as being a PaaS. The PaaS basically chose to make up a specific compound out of some atoms (IaaS) and I call this Salt as a Service (SaltaaS). So, using this really simple example, PaaS == Compounds. A PaaS can create any number of compounds. If we take this simple model to the world of IT I can see lots of ways I could make interesting compounds. I might create a PaaS that includes Tomcat atoms and Derby atoms (using the Apache Software Foundation Table of Elements). If I were to create a new compound that was really interesting, would I always have to go to the Periodic Table of Elements to make other interesting things? The answer is most definitely no.

If I had a WateraaS and a SaltaaS then I could make up a SaltWateraaS. Honestly, the PaaS could actually create new atoms, reuse others and even create new compounds. The PaaS can use the IaaS but it does not always need to do so. The PaaS is really a higher-level capability that does exactly that, delivers capability.

My conclusion is that SaaS is really nothing more than a PaaS that is mostly, if not completely, finished. So, IaaS are atoms, PaaS are compounds and SaaS == PaaS.  Its not a layering, its simply capability.

When Dorothy finally figured out that she only needed to click her heels she made it back to a comfortable and safe place as, “There is no place like home.”

Thoughts?

What I did on my Fall vacation – CCCD Jamaica

In October I went to Jamaica to minister to deaf students at the Caribbean Christian Centre for the Deaf (CCCD) near Montego Bay, Jamaica. It was the culmination of a two-year attempt to minister to deaf outside of our home town (Cary, NC). Its easy to think you are going to minister to others but I think most that have done it will agree, you get far more than you give.

How did we end up in Jamaica? We started in 2009 when the class I attend and teach at for the deaf and hard of hearing decided we wanted to band together for a short term mission. Our original plan was to go to the Philippines to help out with some video editing and story telling to the deaf. God closed that door and re-directed us towards Jamaica and we established a relationship with a church near Kingston. We were all ready to head down for that trip but violence broke out in Jamaica in Spring of 2010 so the trip was cancelled. God is faithful and gave us a new opportunity to minister through CCCD to a school for the deaf located near Montego Bay. Of course, most people hear Jamaica and mission trip and figure you couldn’t pick a better spot. I couldn’t agree more, but probably for different reasons.

We arrived in Montego Bay Saturday night (Oct 22) and spend the next week ministering to the kids through teaching (Sunday church and three chapel sessions) along with some crafts and other activities with the kids. We also did some physical work that included painting, pressure washing, making screens, digging a drainage ditch and a variety of other small projects. You can see some commentary on the trip at the Colonial Web Site.

At the end of the week we were totally exhausted. Up at 0630 and in bed by 1000 and busy all the time in between.

Here is a link to the staff at CCCD singing and signing CCCD – I Love You Lord