Author Topic: High Speed Laser Optical Sensor (Avago ADNS-9800) [$28 shipped - DONE]  (Read 76375 times)

0 Members and 1 Guest are viewing this topic.

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
Yay! I'm not incompetent! Now that I know the structure, the next step is learning the code, and after that is coding what I need it to do.
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline daerid

  • Posts: 4276
  • Location: Denver, CO
    • Rossipedia
If be all over this if it was an optical and not laser sensor

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
Feel free to splain the difference ?
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Feel free to splain the difference ?

He is talking about having an optical or led versus laser or laser diode there is some evidence suggesting laser mice are worse in some respects though I can't currently recall the specifics.

I forgot to buy this when I was at work and still had internet so well see how easy it is to use kickstarter from a phone.

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
I get that laser vs optical IS different... It's the how/why it matters that I was interested in :)
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
There are SOME people that say that laser sensors have a ~1.5% acceleration, but even if they do there is no way you'd be able to notice it and it wouldn't affect you.
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
...

There are MULTIPLE versions of firmware for the ADNS-9800... A4, A5 (89), and A6...

I think I'm gonna use A6 because it is the newest version contained in the folder. It was made 31 days after A4, and thus it probably has any bugs fixed. Though it was still made in 11/21/2011... Maybe the computer was off by exactly a year because I didn't think these were produced in 2011. Or maybe they were, but not commercially released.
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline blueSmoke

  • Posts: 103
  • Location: Oakland, California
  • Life is what happens while you're busy Fixing RSI
Anybody know how to pledge for more than one? Somehow I can't understand how this works. I just ordered one and find there is no way to select more than one. The only option is increasing the pledge amount in the 'manage pledge' screen, but does doubling the pledge amount make it two sensors?

I have 4 hours left. Hopefully somebody know about this... John?

thanks.
Model M, Filco Tenkeyless White, Few others, few more others, Noise-hater (ongoing project), blah-blah (to be fillled later...)

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
As John (the organizer) states somewhere in the KS verbiage, they took a stance of not allowing more than 1 buy-in to a specific reward.  There are work arounds, however John's method is:  If he get's more than $28 from any 1 individual he will "do everything possible to bring the most value to your complete contribution to this project"

So, if you hand over $56 I'm sure he'll either send along 2 sensors, or contact you for arrangements.  He also stated that he would be able to sell on further stock after the KS fulfillment.
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
This has now ended and we are now playing the waiting game.

I will be using a teensy 3.0, and I am currently trying to code for:

Trackball and mouse movement
7 buttons (2 of them for changing the DPI)
Scrollwheel scrolling
LEDs that light up the ring around the trackball when it is moved
Liftoff distance
5-8 DPI levels
(And any others that I end up wanting later on)

I will release my code when it is done. Anyone can use it as is, or add any additional features they want.

I am gonna need 2 small mountable buttons that I can put microswitches in for the 2 DPI buttons. Anyone know where to look?
« Last Edit: Mon, 10 June 2013, 18:07:32 by The_Ed »
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline metalliqaz

  • * Maker
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
What is liftoff distance?

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
What is liftoff distance?

How far away the laser sensor is from the surface it is reading before it halts updating pointer movement. The ADNS-9800 has a cutoff distance from 1mm to 5mm in 0.3mm steps as far as I can tell.
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
What's the point of liftoff distance w/ a trackball?
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
The ball socket is thick on the MTO, so the liftoff distance will likely have to be increased. The default is only 2.4mm if I remember correctly, so it won't work (at least for me) without changing the liftoff distance.
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline MrJohnK

  • Posts: 15
Hey guys, I was out of town last week.  I'm back and had time to test the new revision that includes the 3.3V and 5.0V option today.  It works great at both voltages using a 5V and 3.3V Teensy 2.0.  I've still got a few pre-order spots left over at Tindie.Com until Monday the 17th for these if you want to get in on it.

-John

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
Hey guys, I was out of town last week.  I'm back and had time to test the new revision that includes the 3.3V and 5.0V option today.  It works great at both voltages using a 5V and 3.3V Teensy 2.0.  I've still got a few pre-order spots left over at Tindie.Com until Monday the 17th for these if you want to get in on it.

-John

Hey John, how many millimeter's is the PCB width and height (including the lens)?
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline MrJohnK

  • Posts: 15
Using my desk calipers, I measured 31.55mm diameter and 8.4mm tall from the bottom of the lens to the top of the optical chip.

-John

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
Is Tindie a good way to hop on a 2nd device after having already done the KS thing?  :)
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline MrJohnK

  • Posts: 15
Yes, that is the idea.  I put a limit in it though to make sure I don't get too overwhelmed with orders.  There are about 27 shown in stock there at Tindie.  Overall price should be about the same.  The Kickstarter units included shipping and Tindie adds shipping after you put it in the cart.  These are still pre-orders and will be filled after the Kickstarter rewards go out.  I don't anticipate a long delay between both groups though.  After Monday, I'm closing the gates on all pre-orders until they are filled.  Afterwords, I plan to keep them in stock over at Tindie for the long haul.

-John

Offline Bullveyr

  • Posts: 386
  • Location: Austria
There are MULTIPLE versions of firmware for the ADNS-9800... A4, A5 (89), and A6...
The newest FW should also fix the smoothing/lag issue.

There are SOME people that say that laser sensors have a ~1.5% acceleration, but even if they do there is no way you'd be able to notice it and it wouldn't affect you.
It's more like 5%, easy to test for, A9800 didn't really improve in that regard over the A9500.
Certainly an issue for gaming but outside of that (especially with a trackball) much less problematic.
Ofc, saying "Laser has accel." is simplifying the whole thing.

The various performance parameters of a mouse sensor are a tricky thing.


And we are still pretty much on the same hardware as 10 years ago.


Quote from: ripster;185750
Mechanical switches are mechanical.

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
I think it should be safe to split some 5v off from the VUSB pin on the teensy 3.0, or am I wrong on that? And if it is safe then do I have to make sure that the load drops the 5v to 3.3v or lower before going to the GND pin?
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline MrJohnK

  • Posts: 15
I'm not quite sure what the goal is.  Looks like Teensy 3.0 is a 3.3v system.  The optical sensor has a voltage regulator on it to handle up to 6V and outputs 3.0V to feed the ADNS-9800.  Does that help or did I miss your point?

-John

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
I am trying to get 5v to power other things. Take a look at the teensy 3.0 schematic below. It looks like I should be able to split some 5v off from the VUSB pin. If it is safe to do that then I also wonder if it will harm anything if a load doesn't drop the voltage down to at least 3.3v when going back to the GND pin. I personally think it will work just fine, but I'm just asking first so I don't make a stupid mistake.

Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline MrJohnK

  • Posts: 15
It looks like that VUSB comes right off the 5V rail on the USB port, so that should be a good place draw some 5V power.  In the schematic, it shows that ahead of the 500mA fuse.  You should be able to pull up to about 1 amp or less out of that sort of arrangement.

-John

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
The 4 LEDs (1 DPI indicator, 1 liftoff indicator, 1 ball socket, and 1 ball socket [movement]) and scrolling up/down (which uses IR LEDs and sensors) are what will most likely need 5v to work properly. I don't have a 3.3v meanwell power supply yet (I should order that soon...), which means I can only do tests with my 5v meanwell.
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline SeriouSSpotS

  • Posts: 460
  • Location: South Wales - UK
  • 60% is love, 60% is life
Cool piece of kit.
QFR - MX black   |   Poker X - Panda Clears   |   Poker 2 - MX blue

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
Cool piece of kit.

Yeah well I have to:

Source and order all the parts (some have already been ordered)
Get the 9800 and the rest of the parts to interface to a 3.3v teensy 3.0
Code everything to work both as a trackball and a mouse (trackballs don't need adjustable liftoff distance, but I'm putting it in there for other people)
Hook everything up outside the trackball to make sure it works
Remove a lot of plastic and try to cram everything inside
If everything cant fit inside I will likely have to extend the bottom with a thick piece of rubber with some cavities hollowed into it.
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
I believe I will be the first person to use a ****ing toggle switch to change the DPI and liftoff distance on a mouse. I will be trying to mount it just ahead of the ball on the left side, and it will toggle horizontally as that will make it much easier to use. And ahead of it will be the 2 5mm RGB indicator LEDs. To change the toggle switch from changing the DPI to changing the liftoff distance both the forward and backward buttons will have to be held down simultaneously.

Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Just remember to get a mom-on-mom switch to be easier to use.

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
That specific toggle switch I linked is (on)-on-(on). It's SP3T! I never knew those existed until a few days ago.

(on) = momentary
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
That specific toggle switch I linked is (on)-on-(on). It's SP3T! I never knew those existed until a few days ago.

(on) = momentary
All the SP3T toggle switches I know have the functionality through a customer installed jumper. What switch is it, if I may ask? it looks nice, such switches are usually in the $8-$10 range.

--Edit --
Wow, only $3!
http://www.allelectronics.com/make-a-store/item/MTS-79/DPDT-ON-ON-ON-MOMENTARY-TOGGLE-SWITCH/1.html
and according to the datasheet it does need a jumper for SP3T

I might get one, or several!
« Last Edit: Fri, 05 July 2013, 17:56:18 by dorkvader »

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
Yeah they need a jumper for SP3T mode, and they are only $2.75 apiece.

The info on allelectronics seems to be wrong on at least 1 count. According to C&K the toggle handle should be 0.84" long, not 0.76".
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline wcass

  • Posts: 506
  • Location: Fort Lauderdale, FL, USA
i am coming to this thread late. i want one with the 5v option. it would go well as the sensor for this project:
http://deskthority.net/workshop-f7/custom-trackball-t4773.html

the keyboard uses a teensy with Soarer's code for matrix translation - should be able to combine the code ... right?

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
I will make teensy 3.0 code available when I've completed it. It will work for both trackballs and standard mice. A few values will have to be changed by the end user for their specific application, but there will be notes for those sections.
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
I think a ULN2803 using the VUSB pin as it's 5V power should make the LEDs work with the teensy 3.0. Teensy PWM is 256hz 488.28hz, and I assume that should work just fine with a ULN2803. Can anyone think of a reason that it wont work before I order some ULN2803 ICs?

It's stupid that the teensy 3.0 is 3.3v, that's too low for a lot of things to interface without a logic level converter in-between. Or in the case of LEDs a transister IC like the ULN2803 because of the higher current needs.

I wonder how much the final modded trackball will have cost me once I'm done... And how much taller it'll have to be to accommodate all the parts...
« Last Edit: Tue, 09 July 2013, 23:26:54 by The_Ed »
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
Keith says my epoxy resin trackballs are finally being shipped to him from Belgium. I wonder how much my credit card is going to be charged when he ships them to where I used to live... Just the product price for 3 of them is $39.84, and shipping prices have gone up dramatically...

Almost all of the parts have been decided upon at this point. A LOT of teensy pins are needed... I believe some of those pin pads on the back of the teensy 3.0 will have to be used...

EDIT: $63.43 just showed up on my credit card. So it looks like $23.59 to ship them from Belgium to Keith, and then from Keith to me. I wonder when they'll arrive, he hasn't sent a tracking number yet.

EDIT2: They arrived?!!

« Last Edit: Fri, 12 July 2013, 17:15:56 by The_Ed »
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline MrJohnK

  • Posts: 15
Nice balls Ed. 

While stumbling around Google trying to find out more about what an ADNS-9818 is, I found a link to a PDF that had some information regarding what is required to compile the firmware, such as what compiler it is made for (see below).

http://www.avagotech.com/docs/AV02-3326EN

Anyone know what an ADNS-9818 model is?  My guess is it is the same as the ADNS-9800, but just a specific part number for a manufacturer as it seems to have the same specs as far as I can tell.

I managed to get about a dozen of these sensor boards put together and tested last night.  The PCBs finally showed up a couple of weeks late, but at least they are here and things can start moving forward.  I hope to have the rest of them together this weekend and off to their homes early next week as long nothing unforeseen comes up.

-John


Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
Firstly, where did you get those trackballs? I looked around, and all I could find in 2.125" were some steel ones from iowa. Ideally, I'd be able to get some excellent ceramic or hard polymer or something.

The epoxy resin trackball balls are from Belgium (Keith will hook you up, but only certain sizes are available). The 316 stainless steel and 52100 chrome steel trackball balls are from a guy on ebay (toolsupply). To work as a trackball ball their "grade" has to be 100 or lower (lower is better).

Secondly, what trackball are you modifying again? I'm trying to figure out exactly which of my trackballs I'd modify. I'm leaning towards an old kensington, as it has good ball bearings, but my best trackballs is probably a  penny & giles, though it has no case or buttons, so it'd be more work to fabricate a case for it.

I'm modding my own and my Dad's Microsoft Trackball Opticals.

ON to the meat of my questions, I notice you posted about driving LED's from the teensy 3.0 PWM pin? I'm looking into doing that myself, and I wanted to know if you knew more about it than
I think a ULN2803 using the VUSB pin as it's 5V power should make the LEDs work with the teensy 3.0. Teensy PWM is 256hz 488.28hz, and I assume that should work just fine with a ULN2803. Can anyone think of a reason that it wont work before I order some ULN2803 ICs?

It's stupid that the teensy 3.0 is 3.3v, that's too low for a lot of things to interface without a logic level converter in-between. Or in the case of LEDs a transister IC like the ULN2803 because of the higher current needs.

A teensy pin will send current to open a gate on the ULN2803A darlington transistor IC to let the power sink from an LED (that has its own resistor). I believe I will be using 7 of the 8 gates, but only 1 of those 7 gates will be controlled by a PWM pin. Resistors are a much easier and more reliable method to control the brightness, you only need PWM if you need to vary the brightness. The ring around the trackball ball will get brighter when you move the cursor with the 2 LEDs attached to that PWM controlled gate.

Hmmm... I guess I could use 2 more resistors and the eighth gate instead of PWM... I'll decide later...

So you are driving the LED's from the PWM pin of the teensy. From what I know about transistors this makes sense. I am wanting to power an LED matrix I have with some form of brightness control, so I am wondering if a similar scheme would work. I need to know about the power requirements of the transistors. How do I calculate how much power they waste as heat? I want to do some accounting to ensure I don't go over my limit for a USB device. Would it be better to have a few transistors in parallel acting as one, or having each "group" of LED's driven by a transistor?

All you have to do is make sure that upon startup you are drawing less than 100ma. Then you negotiate for a 500ma load, and after approval you can turn everything on and use up to 500ma without a problem. You don't have to be anal about efficiency, half an amp is already a measly amount. But there's always spec sheets and your trusty fluke if you want to go that route.
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
To make the scroll wheel work it looks like a TX-IR IC and 4MHz ceramic resonator need to be added...

I'm also gonna have to add a 32.768KHz crystal and a 10uf capacitor to the teensy... (I hope 10uf doesn't cause too much inrush current...)

To have enough room for the components my Dad came up with the "cutting board" idea... A 0.75" piece of black HDPE routered to the shape of the mouse and hollowed for the components to fit inside. It'll be stupidly tall, but functional damnit!

I'm just gonna combine my shipping with my dad's (Lunzer) for the ADNS-9800, I'll send that info in a bit.
« Last Edit: Fri, 19 July 2013, 20:42:29 by The_Ed »
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
Anyone know what an ADNS-9818 model is?  My guess is it is the same as the ADNS-9800, but just a specific part number for a manufacturer as it seems to have the same specs as far as I can tell.

I think the "ADNS-9818"/"ADNS-S9818" are just typos that have been perpetuated throughout the internet... That happens quite often as people are too lazy to do research on what they are reporting on or reviewing. They just copy, paste, add some comments, annnd done.

I believe I'm going to have to layer 2 PCBs of components vertically with interconnecting pins, making a "core" for the mouse. Then ribbon cables will attach everything else to that "core". The PCB sandwich will drastically cut down on the cabling clutter that would be needed if the components were free floating.

I still can't believe how many components are needed...
« Last Edit: Sat, 20 July 2013, 03:18:07 by The_Ed »
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
Quote
Ed,
I dropped your package of sensors off in the mail this morning.  I put yours in with your dad's.

-John

Thanks for combining the shipping to my Dad's, they'll be here by the end of the week right?

It looks like I won't need the 32.768KHz crystal, and it wouldn't have worked anyway... You can only get whole seconds with a RTC...

I will be using the new "IntervalTimer" function that has been added to Teensyduino to make the Trackball have 1ms (1000hz) reporting. It uses the 4 PIT timers in the teensy 3.0, and "supposedly" doesn't conflict with Tone() anymore. I don't want anything higher than 1000x as that would just take up unnecessary USB bandwidth.

It seems that I am making the majority of the posts in this thread... Am I really that boring? Or is it just that no-one has any input on the matter?

Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline SpAmRaY

  • NOT a Moderator
  • * Certified Spammer
  • Posts: 14667
  • Location: ¯\(°_o)/¯
  • because reasons.......
We are just taking in all your awesome Ed!! I do look forward to seeing  your result, but your electronic speak is hovering just over my head!! ;)

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
Received my unit today :)

Should we move this thread, start a new thread or migrate parts of this thread to the Making Stuff forum?  :)  Opinions?

Also, in answer to your question, The_Ed... If I'm lucky I'll get somewhere with this before 2014 ends.  Priorities, none of which are directly mine.
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
It is my thread, so I should have the say of what happens to it.

I think once I receive My and my Dad's units I'll make a final post with a link to a new thread in "making stuff together!" for my continued project efforts, and then lock this thread. And then I'll put a link in the new thread to this old thread for posterity. Sound good?

Quite frankly I don't understand how John's code doesn't have errors reading the motion considering he doesn't read the upper 8 bits of X or Y... Maybe there'll only be errors when the ball is moved really fast?...
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
To be honest, I haven't been posting because I don't want to get started on this until I have it in hand, then I can figure out which trackball I can use it with, then I'll do all the case modding and then hopefully I can do the hard part: programming the microcontroller to work.

So I'm sort-of hoping the_ed has working code by the time I start thinking about using said code. I check this topic first whenever there's an update and have been closely following it.

Offline MrJohnK

  • Posts: 15
I've been to the post office every day for a week.  99% of the sensors are on their way to their homes. 

As for the code and upper/lower registers, I only ever receive a constant stream of 1 or -1.  Every so often when I really whail on the ball and move it super fast, it will deliver a 2 or -2, so the upper portion of the readings seems excessive when one byte of data can easily represent 1 or 2.  You can read that upper byte register, but I'm not all that sure what that will get you.  Reading the lower byte seems to be sufficient.

-John

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
My code is FAR from a 1.0 release... (Probably September before anybody will see that...)

I will not be using the motion pin interrupt (which has a maximum of 12khz?), I will be using a 1khz IntervalTimer PIT interrupt to read the motion. At 8200DPI and 150ips that's a maximum of 1230 pixels per cycle (far greater than the 127 you could get with only the lower 8 bits of X and Y). Thus you CAN have errors happen with the way you coded it, but if it works for your purposes it's fine the way it is. I will be gaming with my trackball so I can't afford to turn the opposite direction because I moved the ball too fast.
« Last Edit: Tue, 23 July 2013, 00:19:52 by The_Ed »
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline MrJohnK

  • Posts: 15
That sounds like fun.  I look forward to following your progress on that.  I might actually find a use for the all mighty Teensy 3.0 that I picked up recently.  I've not got it out to play with it yet though.

-John

Offline The_Ed

  • Thread Starter
  • Posts: 1350
  • Location: MN - USA
  • Asperger's... SQUIRREL! I'm Anal Retentive *****!
Fun?... I don't like your definition...

Apparently the baud rate for USB serial is ignored for the teensy according to PJRC, so why does everyone set it? And everyone sets it to different amounts too... I spent all this time trying to figure out how to increase it because the data from the mouse would be more than that... But no, it's a little comment on a PJRC page...

Also, apparently even though the Teensy 3.0 runs at 48mhz, the SPI.setClockDivider() function doesn't divide from 48mhz... It divides from 16mhz "for compatibility with Arduino code"... That was a comment from PaulStoffregen in the PJRC forums...

EVENTUALLY I *may* get some code done that will work with a Teensy 3.0, Arduino 1.0.5, and Teensyduino 1.15... But I keep running into all these obstacles...
Reaper "frelled" me... Twice... Did he "frell" you too?... *brohug*
I'm camping for a week, and moving twice in a month. I'll get back to you when I can (If I don't then just send me another PM).
R.I.P.ster

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
My code is FAR from a 1.0 release... (Probably September before anybody will see that...)

I will not be using the motion pin interrupt (which has a maximum of 12khz?), I will be using a 1khz IntervalTimer PIT interrupt to read the motion. At 8200DPI and 150ips that's a maximum of 1230 pixels per cycle (far greater than the 127 you could get with only the lower 8 bits of X and Y). Thus you CAN have errors happen with the way you coded it, but if it works for your purposes it's fine the way it is. I will be gaming with my trackball so I can't afford to turn the opposite direction because I moved the ball too fast.
Do you mean you will be getting 1230 counts per rotation in your application? If so, that's roughly 5 times the number you'd be getting on most normal quadrature trackballs.

I just bought another one from the tindie store. I feel like I am now committed to making at least one of these. I also swapped out the ball in my ITAC for a denser (and new) one from a penny&giles and it's excellent! I never realized hchanging the ball for a new one would make this much difference. It's got to be at least half the reason I liked the penny&giles so much.

I think I will for sure be modifying one or both of my kensington turbo mouse's. I'm also looking into replacing the bearings with better (ceramic?) ones. Sadly the quotes I've got for 2" and 2.25" Al2O3 and other ceramic balls have been.... expensive, so it looks like I'll be going with polymer or maybe stainless steel on this one.

As for modifying the other trackball, it'd be more of a project, but I'd love to get the penny&giles working. It needs a case, buttons, etc, but I think it'll be worth it.