mrjohnk / PMW3360DM-T2QU

https://www.tindie.com/products/jkicklighter/pmw3360dm-t2qu-motion-sensor/
79 stars 23 forks source link

Firmware not uploaded to Teensy++ 2.0 ? #14

Open kabrio opened 6 years ago

kabrio commented 6 years ago

I am trying to use the sensor board form Tindie with a Teensy++ 2.0.

The info I get from serial makes me wonder, it does not correlate with the contents of "proper startup banner.txt" so I wonder if the firmware gets uploaded at all?

Here's how I connected the board to Teensy++ 2.0

VI - 5V MI - B3/23/MISO MO - B2/22/MOSI SC - B1/21/SCLK SS - B0/20/SS MT - D0/0 (I set Motion_Interrupt_Pin in code to 0) GD - GND RS - not connected

Here's what I get in from serial

Uploading firmware...
Optical Chip Initialized
---
Product_ID
0
11111111
FF
---
Inverse_Product_ID
3F
10111101
BD
---
SROM_Version
2A
0
0
---
Motion
2
0
0

Does this mean, that the firmware does not get uploaded?

However, I am able to get some values from the sensor, but the mouse movements are not very satisfying. Might be a problem with how I installed the sensor though, not sure.

Thanks for any help!

mrjohnk commented 6 years ago

Your wiring looks right. I suspect that you need to change the "ncs" variable to 20 since that is where you have the SS pin wired to

On Feb 14, 2018 5:48 AM, "kabrio" notifications@github.com wrote:

I am trying to use the sensor board form Tindie with a Teensy++ 2.0.

The info I get from serial makes me wonder, it does not correlate with the contents of "proper startup banner.txt" so I wonder if the firmware gets uploaded at all?

Here's how I connected the board to Teensy++ 2.0:

VI - 5V MI - B3/23/MISO MO - B2/22/MOSI SC - B1/21/SCLK SS - B0/20/SS MT - D0/0 (I set Motion_Interrupt_Pin in code to 0) GD - GND RS - not connected Here's what I get in from serial: Uploading firmware... Optical Chip Initialized Product_ID 0 11111111 FF Inverse_Product_ID 3F 10111101 BD SROM_Version 2A 0 0

Motion 2 0 0

Does this mean, that the firmware does not get uploaded?

However, I am able to get some values from the sensor, but the mouse movements are not very satisfying. Might be a problem with how I installed the sensor though, not sure.

Thanks for any help!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mrjohnk/PMW3360DM-T2QU/issues/14, or mute the thread https://github.com/notifications/unsubscribe-auth/ABG0-aU1Sw7Gg461EWwFTZFmu5s9Tn2yks5tUsf5gaJpZM4SFMLg .

kabrio commented 6 years ago

Thanks for the answer!

Sorry, I forgot to mention that I set ncs variable to 20.

Is it normal that the firmware upload fails but the sensor still kinda works?

mrjohnk commented 6 years ago

Generally, the sensor either works or not. The lens needs to be attached, the distance to the surface needs to be exactly 2.4mm and the surface itself has to be of the proper quality. Generally, it needs to not be shiny and have enough texture that can be tracked by the sensor.

On Feb 15, 2018 7:38 AM, "kabrio" notifications@github.com wrote:

Thanks for the answer!

Sorry, I forgot to mention that I set ncs variable to 20.

Is it normal that the firmware upload fails but the sensor still kinda works?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mrjohnk/PMW3360DM-T2QU/issues/14#issuecomment-365929621, or mute the thread https://github.com/notifications/unsubscribe-auth/ABG0-Y9v1nyKsjDgH8Wp6qS_WguFnPzOks5tVDNwgaJpZM4SFMLg .

kabrio commented 6 years ago

So i just need to worry about the distance to surface and the right surface even if the output from serial doesn't match the contents of "proper startup banner.txt" ?

mrjohnk commented 6 years ago

The startup banner I posted is just what I get. What is different about the one you get? It may be OK, but it would be a good idea to decode the differences using the datasheet to see if there is a problem or not

On Feb 16, 2018 8:44 AM, "kabrio" notifications@github.com wrote:

So i just need to worry about the distance to surface and the right surface even if the output from serial doesn't match the contents of "proper startup banner.txt" ?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/mrjohnk/PMW3360DM-T2QU/issues/14#issuecomment-366254268, or mute the thread https://github.com/notifications/unsubscribe-auth/ABG0-T9bgASOGna6YqOHkUVcOWQyM5FOks5tVZRmgaJpZM4SFMLg .

kabrio commented 6 years ago

The lens needs to be attached, the distance to the surface needs to be exactly 2.4mm and the surface itself has to be of the proper quality.

Okay, just realized, that I will need something like a base plate to get the right distance. Always thought the lens takes care of proper distance...