So I recently acquired a Logitech G502 mouse, and I have to say I absolutely love it. It's a beautiful mouse, and a worth upgrade to my old G500s mouse. However my one gripe was the new all-metal scroll wheel. While the weight was nice, I missed the rubber ring around my old 500s. This led me to attempt to replace the new 502 scroll wheel with the old one from my busted 500s.
So let's get started shall we?
So as you can see, these are what the mice look like side-by side. While they look drastically different, the ergonomics are actually very similar among the two.
The first step was to take the mouse feet off and unscrew the screws that hold the chassis in place.
So the feet are layered. There's double-sided adhesive foam, with the feet on top. On the back foot, I managed to peel off the feet with the foam. However on the front two feet the foam stayed stuck to the chassis.
The next step was to separate the chassis from the top of the mouse.
So my old Dell L502x died. However most of the components were fine, it's just the motherboard that seemed to be down with a case of water damage. So along with turning the chassis of the laptop into a dock/stand for my new laptop I wanted to turn the laptop's screen into an external monitor.
So the first thing I did was extract the panel from the housing to take a look at the model number and the interface. If you're looking to do this yourself just look up the documentation for your laptop or go to ifixit.com and look it up. Fortunately Dell has excellent documentation and a pretty straightforward teardown process.
So Tuesday went... interestingly. Getting the transmitter transmitting data other than the binary ones and zeros went kinda well. It wasn't quite as hard as I expected, but still took a little while to get sorted.
The goal was to set up the transmitter sending a numerical ID and a value between 0 and 170. The 0-170 value was so that the receiver could forward this onto the servo, which would then the volume knob. This was generated by a potentiometer reading being mapped from 0-1023 to 0-170. Then this number was converted into a string, and prefixed with a number of '0's to ensure the string length was 3 characters. So essentially '139' would remain unchanged, '72' would be prefixed with a '0' to make the string '072', and '8' would be prefixed with two '0's to make '008'. This three character string would be then prefixed by the one character ID. Broadcasting something like 1139, 1072 or 1008.