Misc

I am rather pleased on how this turned out. I did miss one trace. though I blame Diptrace! The two traces where touching in the schismatic but they where not linked. Its easy enough to tell since linked traces have relatively large circles on them. I fixed the schismatic and re-loaded the Gerber files onto OSH Park. You can see the small wire I put in place in front of the middle switch.

Once I added that wire it started working exactly as I wanted it it. And As I was hopping my IBM T42 Thinkpad (best laptop EVER by the way) power cord power the bbps perfectly. Powering it by both the 5V USB or the 16V power cord outputs the same exact voltage. The USB data pass-through also works as expected. I have also created a Project page. You can find links to OSH Park as well as the Mouser parts list page.

Share Button

Fail

DSC_0656small

This did not go as planed. First off I left out a trace and a resistor. Thus the enormous resistor. I did however learn allot.

When soldering SMD parts, your using to much solder. If you think your using the right amount you still using to much! I know its considered blasphemy but I have the best results by putting an ever so small dab of solder on the tip of the soldering iron. Then with flux already on the part just tap one of the pads for a split second.

Not surprisingly I had the most trouble with the QFN crystal that I am using. I used the same technique as mentioned above accept I added the solder directly to the pads without the chip on them. Then I applied more flux. Then after placing the chip touched each corner with the soldering iron to re-heat the solder. That is not what i did to start out. I attempted to remove the crystal and attempt it again. Unfortunately I am an ogre and ripped off one of the tracers. you can see the through hole i attempted to patch in.

Most would consider these soldering techniques absolutely horrible and say to never do it. I however am more interested in the results than the methods.

Finally, Network cables make for HORRIBLE patch cables. At least the cheap shit i have is. Not only is is stiff but the melting temperature of the insulation is way to low for soldering.

Share Button

Progress

I have not been working much on the trackball. I did have a few hours to work on it the other weekend. The leather is a nice touch. It is very comfortable. I had a hell of a time getting the copper wire(10 gaug) in the slot i had made. I think it is coming along nicely. Has an almost steampunk look to it. There is still something a bit off with the motion though.

Share Button

HELL YES!

I have not done much with the trackball as of late. To be honest i have been a bit discouraged with Avago pulling there optical navigation chips after selling there IP’s to Pixart. I had a feeling that Pixart would eventually put there newly acquired IP’s to good use and it looks like there going to do just that. From June 4th to 8th, 2013 at Grand Hyatt Taipei in Taiwan where they will be…

Introducing our range of new products for the Navigation Sensors, like Wireless Gaming, Market’s lowest power sensors for both Laser and LED wireless application

HAPPY DAYS! I just hope that the distributors actually get them and don’t take to long to do so.

Share Button

The HID report descriptor of the USBMouse interface is functional but minimalistic. I spent some time looking into HID descriptors and came up with a new descriptor which adds support for the following.

  1. Horizontal scrolling.
  2. A fourth and fifth mouse buttons (Forward and back by default).
  3. 16bit X and Y values

I don’t think I even like horizontal scrolling, maybe I just have to get used to it. Not sure what i am going to use the extra buttons for but there there if I need them. The 16bit  X and Y values eliminate the need for some nasty logic that broke up X and Y values larger/smaller than 127/-127 into multiple reports. I was planning on redoing that logic, I don’t think it was doing exactly what I wanted it to do. That would have been some nasty code though. By changing it to support 16bit values a single report can hold any number the ADNS-9500 can output( 32767/-32768) I still don’t have the scroll multiplier report. I don’t think I need that if I want the numbers to be larger I can always just bump up the CPI when in scrolling mode.

 

The new HID report Descriptor is as follows.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
//
// Wheel Mouse - simplified version - 5 button, vertical and horizontal wheel
//
// Input report - 6 bytes
//
//     Byte | D7   D6   D5   D4      D3      D2      D1      D0
//    ------+---------------------------------------------------------------------
//      0   |  0    0    0    Forward  Back    Middle  Right   Left (Buttons)
//      1   |                       X High
//      2   |                       X Low
//      3   |                       Y High
//      4   |                       Y Low
//      5   |                   Vertical Wheel
//      6   |               Horizontal (Tilt) Wheel
//
// Feature report - 1 byte
//
//     Byte | D7   D6   D5   D4   |  D3      D2  |   D1      D0
//    ------+---------------------+--------------+----------------
//      0   |  0    0    0    0   |  Horizontal  |    Vertical
//                                    (Resolution multiplier)
//
// Reference
//    Wheel.docx in "Enhanced Wheel Support in Windows Vista" on MS WHDC
//    http://www.microsoft.com/whdc/device/input/wheel.mspx
//
static uint8_t reportDescriptor[] = {
    0x05, 0x01,        // USAGE_PAGE (Generic Desktop)
    0x09, 0x02,        // USAGE (Mouse)
    0xa1, 0x01,        // COLLECTION (Application)
    0x09, 0x02,        //   USAGE (Mouse)
    0xa1, 0x02,        //   COLLECTION (Logical)
    0x09, 0x01,        //     USAGE (Pointer)
    0xa1, 0x00,        //     COLLECTION (Physical)
                       // ------------------------------  Buttons
    0x05, 0x09,        //       USAGE_PAGE (Button)
    0x19, 0x01,        //       USAGE_MINIMUM (Button 1)
    0x29, 0x05,        //       USAGE_MAXIMUM (Button 5)
    0x15, 0x00,        //       LOGICAL_MINIMUM (0)
    0x25, 0x01,        //       LOGICAL_MAXIMUM (1)
    0x75, 0x01,        //       REPORT_SIZE (1)
    0x95, 0x05,        //       REPORT_COUNT (5)
    0x81, 0x02,        //       INPUT (Data,Var,Abs)
                       // ------------------------------  Padding
    0x75, 0x03,        //       REPORT_SIZE (3)
    0x95, 0x01,        //       REPORT_COUNT (1)
    0x81, 0x03,        //       INPUT (Cnst,Var,Abs)
                       // ------------------------------  X,Y position
    0x05, 0x01,        //       USAGE_PAGE (Generic Desktop)
    0x09, 0x30,        //       USAGE (X)
    0x09, 0x31,        //       USAGE (Y)
    0x16, 0x00, 0x81,  //       LOGICAL_MINIMUM (-32768)
    0x26, 0xff, 0x7f,  //       LOGICAL_MAXIMUM (32767)
    0x75, 0x10,        //       REPORT_SIZE (16)
    0x95, 0x02,        //       REPORT_COUNT (2)
    0x81, 0x06,        //       INPUT (Data,Var,Rel)
    0xa1, 0x02,        //       COLLECTION (Logical)
                       // ------------------------------  Vertical wheel res multiplier
    0x09, 0x48,        //         USAGE (Resolution Multiplier)
    0x15, 0x00,        //         LOGICAL_MINIMUM (0)
    0x25, 0x01,        //         LOGICAL_MAXIMUM (1)
    0x35, 0x01,        //         PHYSICAL_MINIMUM (1)
    0x45, 0x04,        //         PHYSICAL_MAXIMUM (4)
    0x75, 0x02,        //         REPORT_SIZE (2)
    0x95, 0x01,        //         REPORT_COUNT (1)
    0xa4,              //         PUSH
    0xb1, 0x02,        //         FEATURE (Data,Var,Abs)
                       // ------------------------------  Vertical wheel
    0x09, 0x38,        //         USAGE (Wheel)
    0x15, 0x81,        //         LOGICAL_MINIMUM (-127)
    0x25, 0x7f,        //         LOGICAL_MAXIMUM (127)
    0x35, 0x00,        //         PHYSICAL_MINIMUM (0)        - reset physical
    0x45, 0x00,        //         PHYSICAL_MAXIMUM (0)
    0x75, 0x08,        //         REPORT_SIZE (8)
    0x81, 0x06,        //         INPUT (Data,Var,Rel)
    0xc0,              //       END_COLLECTION
    0xa1, 0x02,        //       COLLECTION (Logical)
                       // ------------------------------  Horizontal wheel res multiplier
    0x09, 0x48,        //         USAGE (Resolution Multiplier)
    0xb4,              //         POP
    0xb1, 0x02,        //         FEATURE (Data,Var,Abs)
                       // ------------------------------  Padding for Feature report
    0x35, 0x00,        //         PHYSICAL_MINIMUM (0)        - reset physical
    0x45, 0x00,        //         PHYSICAL_MAXIMUM (0)
    0x75, 0x04,        //         REPORT_SIZE (4)
    0xb1, 0x03,        //         FEATURE (Cnst,Var,Abs)
                       // ------------------------------  Horizontal wheel
    0x05, 0x0c,        //         USAGE_PAGE (Consumer Devices)
    0x0a, 0x38, 0x02,  //         USAGE (AC Pan)
    0x15, 0x81,        //         LOGICAL_MINIMUM (-127)
    0x25, 0x7f,        //         LOGICAL_MAXIMUM (127)
    0x75, 0x08,        //         REPORT_SIZE (8)
    0x81, 0x06,        //         INPUT (Data,Var,Rel)
    0xc0,              //       END_COLLECTION
    0xc0,              //     END_COLLECTION
    0xc0,              //   END_COLLECTION
    0xc0               // END_COLLECTION
};

White paper from Microft with a bref description and some examples.
http://www.microsoft.com/whdc/device/input/wheel.mspx

Many usfuall doc’s and the “HID Description tool” its not a very user friendly tool but helps with coming up with the hex codes.
http://www.usb.org/developers/hidpage/

This is a wonderful tutorial on HID descriptors short but nice explanations and examples.
http://www.frank-zhao.com/cache/hid_tutorial_1.php

USB in a nutshell? That’s one big nutshell! Well actually its barley scratching the surface but this is usually my goto when i want to know something.
http://www.beyondlogic.org/usbnutshell/usb1.shtml

Share Button

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

Hi

So I have been meaning to put something together for some time now. There will most likely be nothing hear of interest to anyone. This is mainly for me, but figured I would leave it open in the off change someone finds something useful.

Why don’t I just use Facebook or some other social networking site? Well there are quite a few reasons, and I don’t feel like getting into now.

Share Button