All posts for the month January, 2013

DSC_0251_smallSo I have been using this as my primary pointing device for about a week now. I have changed the button position and stylish clay palm rest close to 30 times. There still not exactly where I want them but its close enough where I can now start figuring out how I’m going to mount the buttons.

The motion of the call is working better than I ever expected it would. Its as smother than any trackball I have ever used. The Z-axis is still a bit wonky for some apps. Currently when you press the left bottom “button” it changes the CPI from 5040(max) down to zero(min) and uses the X-axis value as the Z-axis value

Originally I had set up a “PinDetect” object for each button to debounce them.  This worked fairly well but no matter what values I changed the frequency and sampling numbers to I could always get either clicks that did not register because i clicked to quickly or clicks that registers more than once because the bounce was to long. Even if i could get it working as i wanted to as a programmer I have never been a fan of polling. Its generally a waist of resources and in some cases lead to unexpected behavior especially when there are going to be 6 or so polling so tightly(~20ms).  I just don’t like breaking the program flow like that. I realize the MCU is complete overkill for a trackball and I have more than enough ticks to spare.

Because of my aversion to polling like that on my last Mouser purchase I added a MC14490PG from ON Semiconductor.  The chip is ludicrously expensive at $4.77, hell the LPC11U24  MCU was only $3.92. However it was easy to wire up and in my opinion a more elegant solution, and so far I have not seen any unwanted behavior.  There where few other debounce solutions I read up on and may test out, but for now the MC14490PG it is.

Though I would still like to get my hands on an oscilloscope. It kills me not being able know what is actually going on when one of the buttons is pressed. If I knew how long, on average these switches bounced for I might have been able to fine tune the “PinDetect” objects better

On another note I came across Dialight, which among other things makes SMD LED‘s and light pipes, lots of them! (What can I say odd things excite me 😀 ), Mouser/Digikey even have them in small quantities. Not even sure if I am going to do anything more than standard 5mm/2.5mm round LED’s but its nice to know the option is there.

Share Button

pen_tips Functional prototype
I could not find any type of bearing or other material that would give the billiard ball a nice smooth motion. After describing what i was doing to a co-worker without success I told them I needed something like a ballpoint pen tip reverse tripod, thing. There was a short pause and then I said well I guess I will go try that, and it worked.

It works shockingly well actually. There are actually quite a few pen tip types. I picked 5 different sizes. I was surprised that the tips can simply be pulled off with a pair of pliers with very little force. To remove the ink I soaked them in acetone. I tried a half dozen different things I had around the house and the acetone worked by far the best. It took a few days changing out the acetone but in the end there is almost no ink left they they are still just as smooth as they where before. From left to right 0.5mm, 0.7mm, 1.0mm, 1.2mm and 1.6mm.

For now I am using the 1.2mm. I really did not notice any different in motion between any of them. I chose the 1.2mm tip because it is by far the shortest in length and the 1.2mm ball gives me enough play that the billiard ball does not hit rim holding the ball in place. My PVC reducer and drilled holes are not exactly precise when your getting down to sub milometer tolerances.

So there it is. A working prof of concept. The next step is to get it all working without using the mbed.

Share Button