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.
I started a new small project. I am calling it bbps (Bread Board Power Supply). I realize there are quite a few of these out there already. They are all missing one thing that would be a REALLY nice feature. USB data line pass-through. Maybe it is because I am mostly interested in making PC peripherals but I am somewhat surprised that there is nothing out there already that has the feature set I am looking for. A good potion of this design is straight from my loststone project.
Features I am looking for in a breadboard power supply…
- Independently selectable 3.3V and 5V for two power bars.
- Optional shutdown a single power bar.
- Provide power from both a wall wart or a USB connection.
- ESD protection. (I think I went a bit over board on this front)
- USB data line pass-through
- Stable. Don’t want it flopping around.
I have place the OSHPark order and will be placing the Mouser order shortly
Two years of blood sweet and tears and it has finally come together! A fully opensource trackball from circuit board to software.
Check out the project page for more details.
Took some time off. Been quite busy. That and I was having some issues and needed to step back.
Tonight I messed with the CPI values a bit and removed the multiplier. The multiplier works well on the desktop but in games it makes movement… strange. But the big win was replacing the 100 pF capacitor on the MC14490(debouncer) to a 1000 pF capacitor. This slowed the oscillator allowing for more time between register shifts in turn allowing for a longer debounce period. This change fixed all my bounce issues! I still want an oscilloscope to actually see the bounce and how the different debounce methods affect it. I am just guessing, which I don’t like doing.
So i have been using a 1.5″ x 3.5′” PVC reducer as the housing for the motion sensor as well as the stand for the billiard ball. I really could not ask for anything better. The one problem i always had was the distance between the motion sensor lens and the billiard ball According the ADNS-9500 technical manual it should be at a distance of 2.4 mm with a tolerance of +-0.22. Really? 0.22 mm tolerance. I realize in the grand scheme of things a tolerance of four tenths of a millimeter is really not all that precise. However its not really possible to eyeball that. I was having trouble getting a good measurement so I created a cutout. I have always really like cutaway models. So after creating the cutaway I was able to get some accurate measurements. It turns out I need to cut the upper PVC ring so it has a height of exactly 8 mm.
I really put some time into fleshing out the PCB design. I am quite pleased with this first revision. This was my first attempt at designing anything like this so allot of time was spent learning what I needed to do and then how to do it. It was a bit overwhelming when I first create the PCB from the schematic (Image 2). Cluster-fuck is a good way to describe the “ratlines”. However once I got the hang of the interface I found it rather fun to lay the components out and run the traces, almost like a puzzle. I had to redo a few parts but overall it went fairly smoothly, it just took some time.
There are no design rule or net connectivity errors, which in programming terms means “it compiles so it must be correct” 😀 I will be taking a break for a week or two. Then come back and go through each component and each trace in both the schematic and layout files (again). The less then fun part. Then on to OSH Park
I have been meaning to get a DC power supply for my work bench. In the passed I have used computer power supplies in a pinch. I figured with a little tweaking it would make a pretty good general DC power supply. I attached a switch i had lying around to pins 15 and 16 (pin-outs) and then attached pins 1, 2, 4, 6, 10, 11, 17 and 18 to a dual row terminal strip. The terminal strip I had has 8 positions so I figured I would do 2 of each voltage, 3.3V, 5V, 12V and GND. I didn’t bother with the -12V
So far it is working well. Especially since it cost me $0.
The folks at Dangerous Prototypes have a really nice kit you can get at seedstudio.com. Even though I just through this together I will still probably get one. They put in some resetable fuses which is nice. You also wont need to chop up the cables. And at $14 you cant go wrong.
So 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.
Well after a very long break I finally ordered a custom PCB from OSHPark. I am very pleased with the result, i needed to manually cut the board because had my cutouts on the wrong layer. I am most impressed with the fact that I soldered on a MOSFET with .5mm pad the first try! After putting all the components on the board and rewiring the breadboard it worked. Hell yes. My code was all wonky and its completely unusable but the hardware is functioning.
On to some code clean up.
The LPC 1343 is a nice chip and the dev board works well. Unfortunately this chip is basically ignored by LCP and the community is just not there. I just don’t have time to get a USB stack working with this chip. Because of this i decided to go with the mbed LPC11u24. mbed has an outstanding user community including an awsome cookbook page which includes a USB stack that has wonderful examples. Hell someone even wrote some interface code for the ADNS-9500, which to be honest i was somewhat disappointed at, I was looking foreword to doing that myself(still might).