Friday, September 30, 2011

Sand Gloves

I started looking at the hand support options today.  I originally was considering using silicon coated modeling clay, but I don't think it will be quite stiff enough.  This morning, I grabbed a couple of latex medical type gloves and filled them with some wet sand.  Obviously, the laytex gloves are a temporary solution to play with.  The first one had way too much water in it and is too squishy.  On the second one, I went very sparingly on the water and it turned out much better.  It makes for a moldable blob that is very firm that should serve as a hand support.  Eventually, the buttons and trackball will be attached via velcro around the front and side portions.  This would allow the end user to rearrange the trackball and buttons in any order they want and custom fit the support to their hand.  It should allow maximum flexiblity and comfort. 

As you can see on the breadboard, I have three wires arranged as touch sensors (one with a quarter attached) for left, middle and right clicks.  I also got the scroll wheel functioning with the rotary encoder there on the board.  Lastly, there is a button and associated tri-color LED that is used to swap between the four user selectable resolution modes inside the optical sensor.  This essentially controls how much movement the pointer makes relative to the amount of movement you put into the trackball, allowing for either lightning fast moves or very slow accurate moving.  It operates somewhat like what happens when you change the gears on your bicycle.

Tuesday, September 27, 2011

Feeling a bit touchy

I've spent the last few days playing with mouse capacitive touch pads.  I have successfully setup a touch sensor that is operating as my first mouse button.  The operation is dependent on measuring the time it takes to charge the internal pull-up resistor and a small external capacitor (470pF).  There is also a 100K resistor to ground.  If someone is touching the sensor pad, it takes longer to charge.  That time differential is used to register capacitive touch events.  I did notice that this only works on the PWM equipped ports on the Teensy 2.0 board.

Here is a copy of the subroutine that reads the time it takes to charge:

int getButtonStat(int b){
  digitalWrite(b,HIGH);
  int i;
  for(i=0; i<16; i++){
    if(digitalRead(b) == HIGH){
      break;
      }
    }
  digitalWrite(b,LOW);
  delay(1);  //needed to fully discharge the circuit
  return(i);
  }

This was inspired by the work done here, which uses the same proceedure essentially.

This part of the project is driven by the need to make this trackball silent.  My wife and I really don't like the constant clicking for three hours while I'm raiding on my druid!  My computer sits in the living room, so the constant clicking is teadious for everyone.

Sunday, September 25, 2011

First prototype working

I spent most of the day building up the first prototype PCB with the related parts.  I choose to cook the board on the stove top in a pan to reflow the SMD components.  After three rounds of cooking, they were all finally flowed successfully.  After that, I manually soldered in the optical sensor (16 pin DIP package) and added the eight control wires that currently link back into my bread board where my Teensy is controlling the show.  Final testing showed I had just one bad via that needed to be reworked.  I guess it lost its wire during the cooking process.  It was a simple matter to fix, then the board tested out great.  I fired it up and to my surprise, it worked perfectly!  My first PCB milled and first time reflowing SMD components.  I was very happy. 

I then spent a little while connecting the board to the underside of the ball support socket.  After all that, I spent a few hours polishing up the code.  I now have full mouse control from my newly created trackball.  It works!!!


Saturday, September 24, 2011

First PCB Milled

The SMD parts arrived today from Mouser.  That got me into gear to think about milling my first PCB. I gotta say, it took me about three hours total and I learned a bunch.  I had challenges at about every turn, but I was able to adapt and move forward to get the job done.  Pictures are below.  It isn't all that pretty, but I think it can be considered a success.  The big DIP chip (the optical sensor chip) in the middle fits perfectly and the cut-out down the middle allows the lense to fit up under the optical sensor properly.  I used a larger bit than the program called for (0.03125" instead of 0.025"), but it is what I had on hand and was close enough.  That is why the pads look a little thin.

Here are the steps I followed:

1 Manually modify drill file code for x0 & x1 (0.125") to be -0.31" deep (z-axis) (0.25" + 0.06")
2 Tape edges of PCB material to spoiler board
3 Zero X0 & Y0 where Left Pin Hole will be after drilling
4 Run Drill File, using 0.03125 end mill for all but 0.125 holes
4.5 Run height mapping python script with top etch file.
5 Run top etch file using 45deg taper PCB bit
6 Flip board in X axis
7 Using 0.125 alignment pins, line up holes in PCB material with holes in spoiler board
8 Tape PCB material to spoiler board
9 Remove 0.125 alignment pins
10 Jog to x1, re-zero x axis at x1
10.5 run height mapping python script with bottom etch file.
11 Run bottom etch file
12 Run bottom Mill/cut-out file using 0.03125 end mill.

Lessons learned:
Broken off carbide end mills make great allignment pins.  They are exactly 0.125" inches around and fit the alignment holes tightly, when you drilled the holes with a 1/8th" bit that is.  The only thing is, they are really way too long and stick up.  I tried to cut one down shorter earlier today with Dremel tool cut-off disk.  The carbide end mill shank just laughed at me and thanked me for giving it a nice shiny polish in that part.  Needless to say, I didn't get them cut.  That is why I use them to line-up the board to the spoiler board below, but remove them after I have secured the PCB material with tape.  The trace isolation program does in fact stop at each hole and mill them out, so if you had a pin there near the height of the board, it would break the bit I'm sure.  I later read that you would need to cut carbide steel like this with a diamond blade.

EMC2 doesn't want  you to insert a tool that is a different length than the one you started with.  So, when it prompts to change tools and you put in that really long end mill that needs to be re-touched-off for height, you gotta manually stop the program, get the z-axis re-zero'd.  Once that is done, you gotta scroll down your program, right click the next line that needs to be executed, and tell EMC to "execute from here".  This bypasses the first part of the file and keeps you going.  My component hole drill bit overall length was much shorter than my hole alignment bit, causing this issue.

Before running the height-mapping software, be sure to properly attach your probe and ground the top plane of the PCB material to get the probe to work.  I forgot to do this part...always time to do it again if you don't do it the first time :p

The height-mapping script maps the whole area, including the place where you have already drilled holes.  It actually starts at x0y0 and trys to jog down inside the hole sitting there.  I had to trick the probe by using a jumper wire to prematurely short the probe and cause a reading, even though the bit didn't actually touch the surface (since it was sitting over the top of a hole).  I'll need to figure out what to do about this to make it right and not trick it to get a fake reading.  I'm sure this affects the output of the program by giving a non-exact reading in this area of the board. 

Be sure your spoiler board is big enought to provide support after you flip the board over.  In my case, part of the board was hanging off the spoiler after the flip.  This caused  a shallow milling on the back-side of the board due to lack of support.  I think it will barely be OK, but it doesn't look quite right. 

Views of the board from front and back.  Diameter is 1.25 inches



Board layout view from Eagle:

Thursday, September 22, 2011

New Spindle Mounted

The new Wolfgang Engineering TB-650 is now mounted up to my Zenbot Mini.  I got tired of waiting for Zenbot to make and send me the right mounting plate, so I took things into my own hands.  I just removed the existing Z-axis plate, and drilled the 1" x 1" hole pattern into the front that matchs up with the aluminum mounting plate that came with the new spindle.  The whole thing is about 0.5" out further than is needs to be since I have both mounting plates screwed together, but for now, it's on there and looks pretty good.  If at some point I need that extra 0.5" back on my X-axis travel, I can look into something better later. 

I ordered the SMD electronics from Mouser, so those should be here in a few days.

I have been continuing to wrap my brain around how to mill a double sided PCB still.  The whole side-to-side registration operation is probably more simple than it seems, but I think I have a strategy worked out.  I just won't know until I try. 


New spindle mounted:

Monday, September 19, 2011

Wolfgang Engineering Spindle Arrived!

The Wolfgang Engineering TB-650 spindle and it's associated variable speed power supply arrived today.  The spindle and mounting hardware looks great.  A fine piece of precision machined goodness.  to be fair though, I can tell that the collet is indeed hand-made.  I can see a slight mis-alignment in one of the slots, but it should still work fine. 

The variable speed power supply is another story.  What I received was a standard 12V power supply, commonly available on Ebay, a "servo consistancy master" module and a tiny little electronic speed control module.  This was all contained within a generic plastic electronics box.  Unfortunately, none of the components were secured inside the box, so they were all banging around inside.  As far as I can tell, the servo module is used to generate a pulse width modulated signal that is fed into the electronic speed control that ultimately drives the motor.  By the way, the motor is the same type of motor that you use on a remote controlled car.  He must be an RC hobbiest to provide two components commonly used in that hobby.  So, if I had to do it over again, I'd look elsewhere for the electronics portion of this.  I suspect it is tested and works though, so we'll push forward!

I'm going to take the contents of the power supply box and just mount those to a piece of ply-wood and screw that to the wall.  This will also allow the power supply to get access to air for cooling purposes.  It had no chance to stay cool inside that electronics box with no circulation fan at least.

Unfortunately, the mounting plate for my Zenbot has not arrived yet, despite being ordered over a week ago.  I checked status with Shaun late last week and he told me that all his machines had been tied up and he didn't have a chance to get it done just yet.  He committed to get it done either last Friday or over the weekend.  I've yet to hear that it was done and shipped yet though.  I may end up having to make my own mounting plate if this gets delayed much more.  I prefer to have the official mounting that Zenbot supports if I can, but, we'll see.


Picture of the Wolfgang Engineering TB-650 that I received:


My home-made variable power supply arrangement.  The electronics all came from Wolfgang Engineering, but needed a better setup.  I mounted them to this board:

Sunday, September 18, 2011

Battle of the CAD/CAM Sofware

Today, I spent some time getting familiar with Target 3001 as a test drive.  It seems very functional and able to do board design.  I did like the part search feature that narrows down the search based upon component package and size.  My biggest concern is the fact that most of the aspects of the program are geared for european countries, including the package library.  While this isn't the end of the world, it does pretty well ensure that I'm going to be forced to design every part.  Of course, I'm already well versed in designing parts in Eagle. 

I also put the finishing touches on my EMC2 controller installation.  Once it all looked good, I dragged it downstairs into the workshop and hooked it up where the Mach3 machine used to be.  I put EMC2 through its paces and everything worked perfectly.  I had added two features to the base installation which is the PCB height mapping python script and the Z-axis auto touch off plate with the probe.  Both worked perfectly as well.  I had my little Zenbot tapping away on top of a blank copper clad board as it mapped out the surface for any high/low spots. 

So, with the pros and cons of both approaches, I think I'm going to go the route of simply replacing my Mach3 software with EMC2 and continue down this path to get PCBs milled.  I still need to actually run a real job with the new EMC2 control computer and software to be sure it can do everything my Mach3 installation was doing with as much quality.  So far so good though.

Saturday, September 17, 2011

"Mechanical Etching"

I've been beefing up on my CNC PCB milling (AKA "mechanical etching") knowledge over the past few days as I await the arrival of the new spindle.  It seems that one of the greatest challenges in using a CNC machine to mill copper clad board into a PCB is the fact that we need to skim off about 0.005" worth of copper from the board and the boards are not uniform in thickness.  Poul-Henning Kamp came up with a brilliant solution to solve this issue and has created the framework for height probing.  In essence, his idea is to have the machine map the surface of the copper clad board and find the high/low points.  This data is then melded into the CNC code to adjust the milling process to the uneven surface.  His innovative thought was the beginning that started a few other people to create code based upon his idea that works with various CNC controllers and PCB creation software.  I found a few combinations of software sets, but no pre-canned path among the software I'm using which is:

Eagle>PCBGcode>Mach3

Here are a few of the combinations:

Eagle>PCBGcode>Python height mapping>EMC2
Target 3001>Visual Basic height mapping>Mach3
Eagle>Target 3001>Visual Basic height mapping>Mach3
Eagle>PCBGcode>Arduino height mapping>Arduino CNC control

I have been in contact with the guy who made the height mapping software for Mach3 and I'm looking at Target 3001 for evaluation. 

I'm also hedging my bet and learning EMC2 cnc control to see if I can make that work.  I pulled up one of the kids' old computers from the basement last night and loaded Ubuntu 10.04 Lucid Lynx and the relative EMC2 software components per the instructions on their website.  In one evening, I seem to have a fairly well working copy of EMC2 that looks promising.  Since it is open source and available at no cost, only time is my investment at this point.  It looks like it will work and play well with my existing Xylotex CNC control board.

Wednesday, September 14, 2011

First PCB CNC simulation

I've been playing with Eagle in the past few days to get used to its auto-router and board layout.  I used PCB-gcode to make some output for my CNC and it looks good so far.  I don't have my new PCB milling spindle here yet, but at least I am able to do some simulations.  Here is a screen shot of what it looks like in Cutviewer Mill:



Not too shabby.  This board is about 1" by 1.25" (inches) roughly.  Those are 0805 and 0603 SMD pad mounts.  They look large, but this board is pretty small.  Very excited :-)

Saturday, September 10, 2011

Balls arrived - Ball support v2

The new 1.5" balls from McMaster-Carr arrived.  The stainless steel ball is probably too heavy to really be a good option and with it being so smooth, it doesn't grip your finger too well.  The Delrin ball seems like a nice balance of weight and slip.  Its surface is smooth but isn't a mirror finish, but it does feel like it will get the job done.  The phenolic ball was not round at all, with a molding seam around it and a strange round shape punched into the side of it.  It obviously won't work for what I'm needing, unless it was just a fluke.  It does have a mirror smooth finish though.

I created a second prototype ball support, incorporating four supporting pins this time.  Instead of having nubbins that are left by the milling process, I used a #43 drill bit and taped four screw holes through the model.  It seems to have a nice feel for a solid support and the ball rolls better against the steel screws.  The viewport at the bottom is too far away this time, once the screws are in to interface with the ball.  It measures about 3.5mm from the ball to the underside of the support socket instead of the ~2.5mm that is needed by the optical chip.  Better luck next time.

Here is a screenshot from MeshCAM showing the latest design. 

More Board Design & CNC Touch-Off Plate

Today I worked more on the schematic design and some sample board layout designs to see just what will fit within the room I have to work with.  It looks like I'll need two circuit boards to fit all the goodies I'm wanting. 

This evening, I added a touch-off plate to my CNC router.  This is needed to very accurately measure exactly where the top of the stock is and zero the z-axis to that location before I start cutting.  With the prospect of cutting my own circuit boards, this got me off my butt to get it done.  I've been wanting to do this for a few years and now a good enough reason came along.  The step-by-step directions on how to set this up in Mach3 are here.  Essentially, I can now hit a button inside Mach3 that will lower the Z-axis down until the tip of the endmill makes contact a sensor pad, then it stops automatically and sets that point as the zero+thickness of the sensor pad.

Wednesday, September 7, 2011

Schematic & Boot loading

Not a lot of new news.  I did a little more work on the schematic.  I think it is almost complete.

I found this article that looks to have promise in allowing me to continue using Teensyduino and uploading to the standard equipped "naked" Amtel AVR chips.  It appears that the chip comes loaded with the DFU bootloader.  This guy figured out how to integrate that into the Arduino/Teensyduino programming environment, negating the need for the halfkay bootloader.  I'll have to try this...

Monday, September 5, 2011

Microprocessor Spaghetti

Today, I spent a considerable amount of time getting familiar with the Amtel line of microprocessors.  I needed to find the best fit for my project among the vast many processors that they manufacture.  I settled on the ATMEGA32U4.  Its strong points relative to my project are:

  • USB controller
  • 32K memory
  • 44 pin package instead of 64 pin
  • SPI interface
  • QTouch channels

I've started adding this one to my schematic, but still have lots to go until that is complete.  Working with Eagle PCB design software is slow and very frustrating for me.  I seem to have to design over half my own parts before I can place them in my design.  I rarely am able to locate a part in either the standard or on-line libraries.  I end up spending about an hour or two or so on each part that I have to design.  Perhaps speed will pick-up with more practice.  It is slow and steady going with the schematic creating.

From my previous post, a friend of mine, Jeff, pointed out that the LUFA TeensyHID Bootloader is no longer available for a variety of reasons that are outlined here.  So, I'm coming to the realization that I may not be able to maintain an Arduino bootloader that acts as a Human Interface Device ("HID") on my project that is going to work via USB.  I'm thinking that it might be best to integrate an In System Programmer ("ISP") port into my design so that compiled binary firmware can be directly flashed to the processor via an external programmer with something like AVRDude.  While not the most convienient way to get code into the board, it may be what I'm left with.  I'll keep picking at this portion of the project for a better solution. 

Jeff also pointed out a piece of work that he has released that seems like a nice middle ground in the battle of the bootloaders.  His Arduino Wrapper looks like a fine piece of work for all us non-AVR programmers who love our easy mode Arduino coding and could be moving into the LUFA environment.

Sunday, September 4, 2011

PCB Design Work

Much of last night and some this morning was spent going through the on-line tutorials of CadSoft's Eagle PCB design software.  They have a freeware version that looks like it will meet my needs.  I played with it a few years ago, so much of this was a good refresher and review.  After getting through the tutorials, I started my schematic design and noticed that the Avago ADNS-7550 was not on the standard library, so I had to make it.  After a few tedious hours, I managed to get my own parts library created with the part I needed in there.  I did my best to design the chip from the datasheet showing the measurements.  I won't know for sure if I did it right until the board is milled/drilled and I try to slip the chip in the holes, but it looks good at least.

Most of today has been spent making up a shopping list to convert my working breadboard design into a much smaller form of surface mount components on a custom milled PCB.  With the new CNC spindle on the way, I wanted to get the PCB design work going so I would have something for it to create.  It looks like most of the components (almost all capacitors) are available either an 0805 (0.08" × 0.05" -AKA- 2.0 mm × 1.3 mm) or 0603 (0.063" × 0.031" -AKA- 1.6 mm × 0.79 mm) package.  Those are tiny for sure.

I'm still working on what I will do for a microprocessor at this point.  It appears that I can take a bare Amtel AVR chip and flash it with the Arduino or LUFA TeensyHID bootloader and make it work and compatible with Arduino / Teensyduino for future play and revisions, even after the product is fully developed.  I like the idea that I or someone else can reprogram the code to their liking at a later date to make that LED blink faster or change the default resolution that makes them happy.  My biggest issue is finding a reference design and shopping list to make an AVR chip reside happily on a PCB of my own.  I'm just not sure what capacitors, resistors, ocillators and so on it needs outboard to make it run. 

Saturday, September 3, 2011

Track Ball Support - First Prototype

First thing this morning, I ordered my Wofgang Engineering TB-650 package kit to replace the current Dremel 300 in my CNC router.  Richard said he would be out this weekend and get starting building it when he gets back.  He expects to have it completed by the end of next week.  I also paid a fair bit extra for him to also build a variable speed DC power supply / controller for it.  I need this new spindle to get ready to route out my own prototype circuit boards.  It should also be able to handle all that the Dremel was doing with much more accuracy. 

I spent several hours working in Alibre Design to refine the first prototype for a ball support socket.  My trusty Logitech Trackman was kind enough to donate its ball for the purpose since my sample balls have not arrived from McMaster-Carr yet.  Its ball is only 1.34 inches around, so I had to scale the model back a bit from the 1.5" balls that are in the mail.

The support socket features three nubbins that actually interface to the ball and a viewport at the bottom where the laser optical sensor will eventually interface with the ball to track movement. 

After the design was done, it was time for the Zenbot Mini to earn its keep.  I routed the prototype out of a piece of 0.375" polycarbonate using a 0.125" (1/8th inch) round nose end-mill.

Lessons Learned:
The optical laser sensor wants about 0.1" (2.5mm) from the base to the ball to measure acurately.  The way the sensor works is much like a camera with no focus capability.  It has to be exactly the right distance from the ball to take good clear pictures and track the features it can see.  This prototype yielded a distance of only 0.03" (0.73mm).  It is a small adjustment to make that larger that is easily done in Alibre for the prototype next run.

The ball doesn't roll terribly smooth on these three nubbins.  I think I'll incorporate threaded holes as an alternative so I can use machine screws to dial-in the ball-to-sensor distance better.  Using metal screws will probably slip better against the ball surface as well. 

Some pictures:



Friday, September 2, 2011

Physical Design

This morning, I ordered a variety of 1.5 inch balls to play with from McMaster-Carr.  I got a single stainless steel one (almost $15 by itself!), and some plastic ones: White Acetal Resin (Delrin) and one made from Phenolic.  I want to see how each does.  I figure the stainless steel ball will be nice for flipping the ball across the screen and be silky smooth.  The plastic balls should also be nice and give me some materials to experiment with

This afternoon, I spent a little while exploring what the actual trackball support base might look like.  I used Alibre Design to create the initial design.  Since I bought this CAD system, I've not used it for much, so it makes me happy to be able to use it for something. 

To see how this would look in MeshCAM (CAM program), I exported the drawing from Alibre Design to an .STL file and pulled it up into MeshCAM, then promply sliced it into 0.375 inch layers.  This would allow me to mill this out of some 0.375 inch Polycarbonate that I already have here that I use for other projects.  That's how you make something that is 0.75 inches tall from 0.375 inch material!

Alibre Design:


MeshCAM


MeshCAM Slice 1


MeshCAM Slice 2



Bread Board Working

I spent the last few days playing with getting a functioning set of electronics.  In the picture on this post, you can see two chips.  On the left is the Avago ADNS-7550 optical mouse sensor.  On the right is a Teensy 2.0 microprocessor development board.  I coded a firmware set for the Teensy using the Arduino development environment.  The two chips communicate via Serial Peripheral Interface ("SPI") and seem to get along pretty well at this point.

The ADNS-7550 optical sensor is more of a prototyping stand-in at this point.  Eventually, I plan to upgrade the sensor to the best optics I can get.  I asked Philips to send me a few Twin-Eye PLN-2032 sensor samples to work with, but once my contact there heard I wasn't part of a major manufacturer and planning a huge roll-out, I never heard back from him.  Since they don't offer their chips through normal distributors (like Mouser and DigiKey to name a few), I cannot buy them.  Oh well.  Avago also makes a nice ADNS-9500 that is about as good, maybe even better than the one Philips has.  Unfortuantely, I can't buy that ADNS-9500 in anything less than 1,000 piece lots.  Since I can buy the ADNS-7550 one at a time it will stand-in while I develop the proto-type and work through the bugs.  It works much the same as the big brother.  Once the bugs are out and things are working well I can look at what it will take to get a better resolution chip under the hood and possibly some extra funding...

The Teensy board I bought a couple of weeks ago has undergone minor surgery to convert it from 5 volt to 3.3 volt.  This is required so that the SPI signals are at the right voltage levels. 


Project Description

This is a new project with the goal of developing a gaming grade trackball.  After pouring over the Internet and abusing the search engines to no end, I came to the realization that if I want a gaming trackball my way, I was going to have to build it myself.  I plan to use this site to keep track of my progress.