Friday, December 23, 2011

Screenshot of Triple Button

Since I have not posted any pictures lately, here is a screenshot from Alibre Design showing the "triple button" that is used for the middle mouse button.  This was milled out using my Zenbot CNC router.  The low areas with holes in them are where I have 22 gauge nickel metal contacts with wires soldered to their backs located.  The holes are there to allow the wire to exit the back.  At this point, the wire is the only thing that holds the metal contact inside the shell, but eventually that will be secured with an adhesive.  For a size reference, the square area in the middle is 11.5 mm wide.  Each smaller touch pad area is 5.5 mm tall.  The dividers between the buttons provide tactile position feedback of your finger and are 1.5 mm tall.

You may also notice that my screenshot is looks different as I have now upgraded to Alibre Design 2012.  They had one of those killer end-of-year upgrade offers I just couldn't pass up :p.

Moving to millisecond polling and added keyboard strokes

In the past few days, I have almost completely re-coded the majority of the capacitive touch buttons detection code.  Instead of counting CPU cycles, it is now based upon timetamps.  Each button's polling rate can now be specified in milliseconds.  This greatly helps manage CPU resources to ensure that each button gets the attention it needs without hogging up resources to do it.  In addition, I added a key-to-pin mapping array that allows the pins to be remapped easily to whatever you want that particular button tied to a pin to be doing.  These changes have added ease of use and increased overall performance to put CPU resources to use where it is most needed and stopped wasting CPU cycles on less important things.

Now, when I say whatever I want that button to do, I also made vast improvements here as well.  Teensyduino allows the Teensy board to interface as a keyboard+mouse composite device to the computer.  That being the case, I can now send both normal mouse clicks and keyboard strokes.  I took extra care to be sure that I can send multiple keyboard keys pressed at the same time too, so now up to six buttons can be sent at the same time.  As a test, I put a new fourth button on the trackball for my pinky finger to use and played WoW for three hours.  I was able to map this to the F4 key and it works perfectly.  I was able to ressurect fallen players while in combat with my pinky!

In addition to these changes, I have stopped development on the scroll wheel.  The scroll wheel with it's opto-interrupters was working perfectly, however it was a bit on the large and bulky size.  In place of where it would be, I simply designed a new middle mouse button that has smaller half-sized touch pads above and below the middle mouse button that allow for scrolling.  Now that I can control the polling rate, I can control the scroll speed up and down the page which is awesome.  A nice, neat and elegant solution to scrolling that has no moving parts and is ultra compact. 

Monday, December 12, 2011

Many small updates and fine tuning

It has been a while since my last update.  In the last few weeks, I have tried an alternative hand support material made from sand and clay that I'm prototyping.  I filled a regular balloon with the material and it is meeting the right requisites of being firm but moldable.  It took me quite a few tries to get to this point with several failed attempts along they way including a cast silicone mat with copper wire running through it and even mini beach balls filled with air.  I even tried using metal wire mesh, but none of those approaches yield an acceptable end product.  The new sand and clay mixture is just right.  The old sand and water prototype was slowly growing mold and needed to be replaced ASAP, especially since the prototype unit is my every day use trackball now.  Even though it isn't complete, it is much more desireable to use verses the 20-year-old Logitech trackman I was using.

I have been working toward the goal of eliminating the outboard breadboard by migrating the components (processor, LED and scroll wheel) to the trackball area to create a self contained unit that only requires the USB cable.  Currently, I have some stretchy Velcro (Velstretch it is called) on order that has promise to allow it to be attached to the hand support that can be molded into any shape.  The Velcro will provide an attachment method for the various peripherials such as buttons, scroll wheel and the ball socket itself. 

I'm also coming to the conclusion that I'll need a Velcro covered base plate that is about the size and shape of a mouse pad to mount all this onto.  The ball socket and scroll wheel are kinda big and will need support from below to be stable.  Currently, the prototype is making heavy use of double stick carpet tape to hold the parts together in place of where Velcro will eventually be. 

In the last week, I also located some nifty nickle silver buttons that allow me to solder wires to.  They make a nice finish on the capacitive touch buttons.  To further dress them up, I milled out some plastic finger guides to go around the buttons to provide some tactile feedback regarding where the buttons are and guide the finger to the center of the buttons. 

Yesterday, I put the finishing touches on a lighted capacitive touch button.  It incorporates a tri-color LED under a nickel silver button.  As you touch the silver button, the light changes, with an indirect reflection of light appearing around the edges of the silver button through some recesses.  The prototype is milled from translucent polycarbonate, so the light is actually shining through the walls of the case, somewhat like a glass brick.  It gives a nice low intensity glow from the LED.  I may look for a translucent casting resin to reproduce this for copies.  It looks really nice.

Also on order are various sizes of surgical tubing to act as conduits to route the wires.  I plan to split them down the side and make a sort of rubberized wire loom out of them. 

Lastly, I'm awaiting a delivery of liquid rubber coating I can use on the hand support and the base plate.  Hopefully this will bring the search for a proper hand support module to a close if I can successfully encase the clay and sand mixture inside this rubber coating.  It boasts the ability to simply dip the item to be covered into the mixture, slowly withdraw it and let it air dry.  We'll see.

Lots of progress on several fronts, but not a lot fully completed.  I'm still working on this about every day from making new CAD designs to milling the smaller detail items and circuit boards.  Tonight was milling out the outter case for the scroll wheel.  Tomorrow will be milling out an updated version of the scroll wheel supports with smaller screw holes and a few cosmetic updates.

Saturday, November 19, 2011

Avago ADNS-9500 Up and Running

I spent most of yesterday designing, milling and building the new circuit board for the Avago ADNS-9500 chip.  It took most of today to work through all the software changes required to make it work.  It certainly has a much higher DPI capability that is pretty insane.  Moving the ball just a little jumps from the edge of one screen all they way over to the edge of the other screen (using two computer monitors).  I'm not sure I'll have much use for that in 5670 DPI mode, but it is there should I find a need for it.

From an electrical design standpoint, the ADNS-9500 is very similar to the ADNS-7550.  Changes included a new physical package layout, grounding one pin to select between 5V and 3.3V and bumping up the size of one of the capacitors.  Other than that, the two chips use exactly the same design.

From a software perspective, I had to make arrangements to download the SROM to the chip every time it boots up.  My attempts at this were pretty bad and just crashed my Teensy board.  After doing some Google searches, I found a sketch pre-made that worked like a champ.  I was able to combine it into my current software to make a working version.  I just updated the firmware software to the current version and all is working well.  There were a few minor additional changes required to make this chip do all that I had ADNS-7550 doing, but the firmware download was the biggest hurdle.  The key ended up being the need to store the SROM image in flash memory on the Teensy instead of the default SRAM since the flash has a much larger capacity. 

In addition, I'm using the taller version of the ball support on this new circuit board with a wider set of metal ball support contacts.  It is nice and silky smooth.  The three metal supports contact the ball just below the equator line.  It seems that the further I spread these out, the better the ball movement feels. 

Tuesday, November 8, 2011

Scroll Wheel Update w/Pics

Posting has been a little slow, but I have been busy every day working on this.  Going into this, I knew that the scroll wheel would be the most mechanically complex portion of this project.  All of the parts need to be made and fit together.  I have the wheel itself and the supports on either side milled out so far.  I'm working on the circuit board at this point and need to mill out the outer case.

The theory of operation is that there will be two photo transistors that will be picking up a reflected light pattern from a rotating code wheel.  I found a nice little component (GP2S60) that incorporates both the phototransistor and emitter in a tiny surface mount package.  It is called a photointerrupter, made by Sharp.  A pair of these will be used to generate a quadrature signal that will indicate how fast the wheel is turning and in what direction.  Being optical, they won't create any drag.  I'm looking for this scroll wheel to be easy to move and have no detents, like all other scroll wheels do. 

Below are some pictures from my CAD system showing the assembly of the scroll wheel:

The photointerrupters are shown in red and yellow.  The circuit board will fit in the recess window on the right.  Those photointerrupters will be surface mounted to it:

The codewheel is highlighted below.  It will be a white piece of paper with a black set of stripes printed on it.  Simply, it will be glued/stuck to the side of the wheel. 

Tuesday, November 1, 2011

Better Optical Chips Arrived from Avago

Ask and you shall receive.  I'd like to extend a big thanks to Avago Technologies for sending me samples via Fed-Ex of their ADNK-9500 kit.  I only asked for the raw chips, but they sent the lenses and a CD too!  Awesome!  I can now start doing some designs based upon this new better chip.

Thursday, October 27, 2011

Better optical sensor, hopefully

I sent an email over to Avago Technologies today to inquire about where to obtain some ADNS-9500 optical sensors.  None of the US distributors were stocking them, so they indicated they may be able to send me some samples.  Hopefully I will be able to begin working with these to see just how good this can get.  I really like the ADNS-7550 version I'm using now, but I'm eager to see their better chip in action.  I'm crossing my fingers that a small package of them shows up.

In the mean time, I've taken a little break.  The PCB cap needed to be redesigned with more internal clearance, but the milling of the new design failed...again.  It is very frustrating having a small CNC router that is just not so good at prototyping these larger parts.  Maybe one of these days I'll get my hands on a little more beefy CNC mill for doing these sorts of things...

Saturday, October 22, 2011

New Socket Milled & Hand Support Update

A day off of work does wonders for making progress on personal projects.  Yesterday, I was able get the silicone hand support filled with sand and the latest version of the ball base socket milled.  Fair progress.

In consulting with my wife regarding the hand support, we came to the decision that using oil instead of water would be best for the long term keep of the sand in the enclosed space of the hand support.  We explored several different kinds of oils and we settled on a type that has a very long shelf life.  I was drawing on her expertise as a soap maker, where oils of many kinds are used.  We have many kinds in stock.  So, the hand support is filled with sand and oil now.  There is some air trapped inside which needs to be removed.  I figure using a hyperdermic needle to suck the air out would be best, however, I don't have any needles handy at the moment, so that will be on the shopping list.  The hand support feels like an oversized beanbag chair for your hand, extending all the way down to the wrist.  It is very comfortable.  Once the air is removed, it will firm up a bit.

The latest version of the ball socket was a long time in the making.  I've had several setbacks that kept it from getting done.  Most of the issues have been related to my CNC router.  This successful version comes after five other failed attempts to create it.  The failures all had a machining error of some sort or another.  It all boils down to the fact that this is a tiny little CNC router with weak stepper motors and I'm asking it to do more than it was designed to do.  After a 3.5 hour marithon session last night, I eventually got it done by running the machine at about 40% of the job speed.  It made for a late night (I didn't get done until about 1:30 AM), but at least it is done.  The piece was milled out of a polycarbonate block measuring 1.75" square and 0.75" tall using a 0.125" ball end-mill.  The stepdown was backed way off to 0.01" per pass, so it took about 75 passes to mill down.  This was a single-sided milling effort this time.  None of my double-sided attempts were successful.  I'll just have to manually locate and drill the eight holes on the underside with a template and drill press, so not so hard and probably the right way to do it anyway.

Ball Base Socket (0.75" tall):

Ball Base Cap.  It covers the circuit board that hugs the bottom of the Ball Base Socket (shown above).  The hole in the bottom is for the eight wires that need to connect back to the microprocessor unit:

All components:

 All Components, combined 

 Hand support shown next to the combined trackball assembly:

Sunday, October 16, 2011

Scroll Wheel - First Draft

I've spent most of today working on the new scroll wheel design.  Now that the trackball, buttons and hand support all have working prototypes, I need to get the scroll wheel into protytype too.  Below is the first draft.  It is 1" in diameter and 0.375 wide.  The slots along the side are spaced to match up with an Avago AEDR-8300 Series Encoder to act as the encoder wheel.  This makes the wheel both functional to receive input from the end-user and increment the encoder.  The goal is to minimize the footprint both in width and height as much as possible.  An axel will be added through the middle and I'll have to mill out a support (think faris wheel), PCB mounting spot and some sort of case for it all to fit into.

Saturday, October 15, 2011

First Rotocast & Dead Spindle

I managed to get my first successful rotocast of silicone rubber in a plaster mold.  I applied 9% silicone thinner to the liquid silicone and two drops of accelerator before pouring it into the two-part plaster mod.  It took about an hour if slowly rolling it around in all directions until the silicone was cured enough to leave it alone.  I should probably use a little more accelerator next time.  Silicone was mixed 90A:9B (measured in grams).  It came out of the mold looking like a child's toy rubber ball, even full of air.  Still, there is a blob of silicone on one side that didn't get evenly distributed.  I suspect that it was the result of the mold sitting on the table while it fully cured out.  More accelerator and a real rotocasting machine should take care of this. 

This evening, I also was successful in milling out the bottom PCB cap for version 4 of the ball support.  Unfortunately, the motor on my spindle failed, so I won't be able to mill the other half of this support until the new motor arrives.  I also bought two more spares for next time.  They are only about $18 on Amazon.  The motor started to fail about half way through the job by running much slower and losing about half its power.  I slowed the job down to about 30% to take it easy and try to finish out the job.  I managed to get down to about two minutes left on the finishing pass (after 1.5 hours) and the spindle came to a full stand-still.  I was able to manually finish the part with some sanding luckily, so all was not lost.

Picture below includes the rotocast silicone ball for the hand support, the version 4 ball support cap that covers the PCB and the latest PCB that hasn't been populated with parts yet (shown inside the newly milled cover). 

Tuesday, October 11, 2011

Successful Test Drive

I took what parts I have and cobbled together a complete functional prototype and played three hours of World of Warcraft with it.  I managed to used this new trackball in place of my Logitech Trackman for the entire time.  It is certainly a learning curve and getting the buttons in just the right spot is important.  Once everything was where it belonged and adjusted, it was awesome.  I really like it.  According to the performance meter, I was top of my class in the game too.

I cut some little single sided copper clad board pieces and soldered wires to them for buttons and taped them to the sand glove.  I pulled the trackball over beside the sand glove for thumb operation. 

Having a successful test and support from the community has really inspired me to keep moving forward.  Thanks!

Monday, October 10, 2011

Double-Sided Milling with MeshCAM

For those interested in my discoveries in how to do two-sided milling with MeshCAM, here are my notes:

Secure material to spoiler board with either double-side carpet tape or masking tape on all sides.  Remember, if you put double-side tape under the model to start with, you'll need to be sure to use it on both sides so that that Z height doesn't change (or re-zero the Z axis after flip if you don't use it on the second side)

Zero x0y0z0 at lower left, top(z0) of model, but leaving room to drill registration holes in -XY areas

Determine best distance from center of material for registration holes.  Best locations are equidistant from the Y centerline, outside the millable area.
Example: Millable Area=1.75" square and 0.75" tall:  First Pin=x-0.25y-0.25 Second Pin= x-0.25y2 (z-1 = 0.25 into spoiler board)

Optionally, add two extra pins at x2y2 and x-0.25y2 to further secure the model so it will not move.

Manually drill registration holes by jogging the machine to the proper coordinates and drilling down through the material and into the spoiler board in one operation.

Install registration pins through holes in top of material, taking care to be sure they sink all they way into the spoiler board holes you just drilled.

Mill Top or Bottom

Flip in Y axis, line-up holes in material with pins to registration holes in spoiler board, secure material.  So, the edge that was on the bottom is now at the top after being flipped.

Mill other side

*Milling notes: 

1) I used registration pins that were shorter than my model (just 0.125" round brass stock, cut into short pieces).  Since they sink into the spoiler board about 0.25", they are below the stock surface.  With the vibrations generated via the actually milling a couple of them started rising up in their hole and sticking out above the material surface.  Obviously, if they have come up more than 0.25", they are no longer helping to keep our material centered.  I ended up stuffing some wadded up masking tape balls into the holes to keep them in place. 

2) Before you start, test the bit/end mill you plan to use to make the registration holes on the drill press.  Even though I tried four different 0.125" bits (end mills and drill bits), only two of them produced a nice, tight registration hole.  The others produced holes that were too large and would allow too much play, causing side-to-side registration issues.  The winners for me were both end mills measuring about 0.124" in diameter (one two-flute ball-nose and the other a four-flute flat-nose).  The surprising last place choice with too much wiggle room was an actual 0.125" drill bit.

Implementation Challenges

Updates on the project are lagging behind some milling issues I'm having.  The latest designs of the ball support socket and PCB bottom cover have proven to be difficult to mill on my small CNC router.  I have tried about six times with some degree of incremental success.  The issues primarily stem from getting into two-sided milling and a more complex design.  While I have the process figured out, my machine is throwing fits and messing up jobs.  I'm having to slow down quite a bit, which makes each piece take 2+ hours per side.  I just about had one side of the PCB cover complete last night, only to have the finishing pass skip a couple steps about half way through and take huge chunks out of the model.  I've added a waterline finish middle step to mitigate this issue and ordered some new deep cut ball end mills that should help.  I'll update with pictures once the new design is done.

I tried my hand at rotocasting some silicone into a plaster mold.  I added too much accelerator to the mix and made what looked like a large snot ball at first.  The second run looked better, but still had some holes and thin spots.  I have some silicone thinner on order to help make this stuff flow more evenly inside the mold.  The plaster mold was made from a 4.5" Christmas ornimate ball I bought at the local store, so the end product will end up being a hollow sphere that gets filled with wet sand. 

Tuesday, October 4, 2011

Capacitive Touch Fine Tuning

I spent most of the last 3 days working through the finer points of the capacitive touch buttons.  While they were working, they would pulse on and off randomly, making it impossible to drag anything while holding down a mouse button.  I now have a very solid, responsive system working with 4 buttons (right, middle, left and resolution).  It took quite a bit of fine tuning to be both reliable and responsive so I can still easily double-click.  I had to formulate an averaging algorithm that samples each button and keeps a rolling average to get the genaral idea if someone is touching the button or not.  It works really well.  Apparently the capacitance draw of a person isn't very stable.  It's so nice to have a totally silent trackball system with just the ball as the moving part.  "Clicking" (or touching in this case) is lighting fast.  I've been using the new one to browse the web more than the other one lately, though it is currently a two hand arrangement with buttons on left hand and trackball on right hand.  It'll be sweet once it is all integrated.

I'm gearing up to finish up on the ball support, version 4.  It will be double tall this time and have a bottom cap mated up to cover up the circuit board.  I had to order some special #2 screws as the local hardware stores don't carry little stuff like that.  They will be in tomorrow.

Silicone is on order for the hand support.  I plan to rotocast that into a thick silicone balloon of sorts, then fill that with semi-wet sand.  That'll be covered partially with velcro to arrange the buttons around. 

The ball support will need double-sided milling, so working through the front-side and back-side registration with MeshCAM.  I think I have it worked out, but we'll see...

The new ball support design and smaller screws means I'll need to re-mill and make the circuit board.  I scored some soldering paste from a relative in the electronics business and I'll be using my toaster oven I bought a few years ago when I first planned to be making circuit boards.  I probably should get a proper thermocouple setup going to be a little more accurate on the of these days...

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){
  int i;
  for(i=0; i<16; i++){
    if(digitalRead(b) == HIGH){
  delay(1);  //needed to fully discharge the circuit

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:


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 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.