-
Prior Art
11/25/2021 at 17:46 • 0 commentsApparently someone had the same idea as me, but also had the skill and energy to pull it off: https://github.com/vlukash/corne-trackpad
I think I'm going to steal from that project.
Looking at it, I see that I made a huge fundamental mistake, assuming a 2.8V device will work just fine with 3.3V. Turns out those optic sensors are very particular about their voltages, so time to invest in level shifters.
-
Another Failure
08/22/2021 at 19:26 • 0 commentsI finally had the time to try my new breakout. I was putting it off because deep inside I felt there is no chance it can work with the horribly inconsistent schematic and pinout I based this on. And sure enough, it doesn't. I wrote a very simple program to test it:
import board import digitalio import time rst = digitalio.DigitalInOut(board.A4) rst.switch_to_output(value=False) cs = digitalio.DigitalInOut(board.A5) cs.switch_to_output(value=False) spi = board.SPI() spi.try_lock() buffer = bytearray(1) while True: spi.write(b"\x00") spi.readinto(buffer) print(buffer) time.sleep(1)
This should, in theory, print a string of \x0d on the screen. But of course all it prints are \x00. I tried some combinations of pulling down or up various pins that were ambiguous in the schematic that was posted, but I didn't manage to make it return anything else than \x00 or \xff.
I might try some more experimenting with it still, but for now it's a huge disappointment.
-
Second PCB
07/18/2021 at 22:12 • 0 commentsThe PCB breakout for the 8350 sensor arrived from @oshpark and as always it looks great:
Unfortunately I miscalculated the distance between the socket and the slot, not taking into consideration the thickness of the PCB, so I had to use a file to make the slot a bit bigger:
That is fine, because this breakout is just for experimenting — the final one will have correct dimensions and only the pins that are needed.
I have everything soldered up and prepared, but I didn't yet have time to actually try this sensor yet — hopefully I can do it tomorrow.
-
Another Breakout
06/24/2021 at 15:47 • 0 commentsI spent a little bit of time today to design another breakout PCB, this time for the Blackberry 8350 button:
I took the labels from that pinout published it the Arduino forum, but comparing it with the schematic also published there, it seems to be a bit fishy... For example, a pin marked as "gnd" on the pinout is pulled-down to gnd with a 200k
This is also an experiment with physical layout of the board — there is a cutout in the PCB where the flex cable is going through, and a pad where the button will be, so that I can put a drop of solder there, to provide the necessary raised bump for the tact switch on the back.
I'm also not sure whether I should add a voltage regulator and some voltage dividers — the forum post says 2.85V, but I don't actually know if it will work with 3.3V as well. The mouse sensors, which are supposed to be similar, run on 3.3V.
-
A New Plan
06/24/2021 at 09:21 • 0 commentsI tried to fix the connection between the flex PCB and the PCB, but it looks hopeless. I ended up ripping the pad off of one of the sensors. I think I need to re-think this.
At this point, the easiest way forward seems to be to find the correct mezzanine connector for the Blackberry 8520 sensor — after all I even have a ready pinout for it! After some searching, it seems that something called DF30FB-20DS-0.4V should fit. I have ordered it, and we will see.
In the mean time, I can prepare the footprint for it. The datasheet gives me a recommended pattern:
Replicating this in Inkscape just takes a few moments:
Now I just need to quickly design a PCB, and hopefully the connector and the PCB will both arrive at about the same time.
-
Power On
06/23/2021 at 20:41 • 0 commentsI was right about motivation from the updating of the project logs — right after I finished the last log, I decided to continue the exploration. So I took a piece of paper and I figured out which pin is connected to which pad:
Then I connected the power to the VCC and GND pins, and measured the voltages against GND and against VCC on all pins, hoping that maybe this will give me some insights. The results are a little bit weird, so I decided to also try and measure the resistance between all pins and VCC and GND — of course with the power disconnected.
The results were even stranger, so I repeated the same procedure with the second module, and got completely different results.
My suspicion so far is that it's indeed very hard to get those pads soldered properly without shorts and breaks, and that I did a poor job with it.
-
Breakout
06/23/2021 at 19:33 • 0 commentsI quickly designed a very simple PCB breakout for the sensor — just the 12 pads that are connected to something, in random order. I made the pads slightly smaller than the ones on the flex PCB, to give myself some wiggle room. Then I ordered it from my go-to place for small boards: @oshpark.
A few weeks later the boards arrived, and I soldered the sensors up. Turns out that soldering the flex PCB to a regular PCB is not so easy either — not as easy as drag-soldering displays, anyways. But I managed somehow:
It even fits nicely on the mini-breadboard's flat part, so I can press the button! Next up is connecting all the wires and figuring out which is which. But here, my laziness backfired on me.
You notice I didn't add any labels to the pins, and that they are broken out in a rather random order — whatever was easiest to route. I didn't have much energy back then, and I wanted to order those PCBs fast, so they would arrive earlier. I was hoping I will have more energy when the PCBs arrived, and can work around all the corners I cut.
That didn't happen. I still need to glue a piece of paper to this board, label the pins, and try connecting them. Motivation is a fickle beast, and when I'm facing the prospect of a boring chore, such as trying out all possible pin combinations in the hope that one of them will finally work, my energy levels drop dramatically. I should have foreseen that, but the future always looks so good from back there.
I decided to document this project and write those logs in the hope that it will motivate me to continue this. Will it? Well, we will see shortly, I suppose.
-
My Way
06/23/2021 at 19:21 • 0 commentsI decided that the sensor from a Blackberry 8520 has too fancy a connector, which would be difficult to source and to solder (with a 0.4mm pitch), so I looked at other similar sensors, and picked one from a Blackberry 9300. Originally it no doubt uses even fancier connector, but the sensor-side is just a piece of flex PCB with a bunch of pads on it — something that should be easy enough to solder directly to a PCB.
So I got a pair of those, and got to work on them. The initial probing yielded me this:
GND was easy to find, because it is connected with the ground fill on the flex PCB. The VCC was easy too, because it's the only track that is thicker than all the others. And finally pin 10 is not connected, which was easy to figure out by visual inspection — there are no traces going to it!
Next, I got out an ohmmeter and found that pins 12 and 13 are connected to the tact switch on the bottom of the sensor. That is 6 out of 13 pins out of the way, 7 more left to go.
Those remaining pins should be, if this sensor is similar to the other one, CS, SCK, MISO, MOSI, RESET, SHUTDOWN, and INTERRUPT (aka MOVEMENT). There are lots of possible combinations here, but if you look carefully at the traces, you will note that they are in fact bundled in two distinct groups. My bet is that one of those groups is going to be all the SPI pins, and the other — the rest.
Well, we won't know until we try. So the next step was soldering some wires to those pads, to connect them to a microcontroller and try sending some signals. Unfortunately, it turns out that the pads are way to small to do that, and soldering to a flex PCB is way too hard. After a few failed attempts, I decided to make a custom PCB with a footprint matching those pads. That delays the project a little bit.
-
Prior Art
06/22/2021 at 17:46 • 0 commentsThere is one other attempt at using this kind of sensors that I know of. It's an old post on the Arduino forum, together with a YouTube video with the demonstration, and a few missing images: https://forum.arduino.cc/t/blackberry-joystick-navigation-key-hack/61454/12
In this case a button from Blackberry 8520 was used, which has a very fancy connector, similar to those used sometimes for displays. The sensor itself seems to use SPI protocol and registers very similar to mouse sensors — which makes a lot of sense, since it is basically the same sensor as in an optical mouse, only with different optics and physical shape.