Wiring the adapter
Just a few connections are needed between the QT Py RP2040 and the mouse connector.
Watch out here, because the DIN wire colors do not correspond to classical wire coloring for VCC and GND! And if you didn't buy the exact same connector, check your connector's datasheet to find the correct wire colors. (pin numbers should be consistent for all Mini-DIN jacks as they are part of the standard)
The original voltage specification of the mouse is 5V, but my sample worked reliably with just 3.3V, which means no voltage level shifters are required.
The mini-DIN connector has pre-stripped, pre-tinned wires. Just insert them into the QT Py RP2040 from the top side and solder as follows:
Wire the DIN connector to the QT py as follows:
- Brown (VCC) to QT Py 3V
- White (XA) to QT Py A0
- Black (XB) to QT Py A1
- Blue (YA) to QT Py A2
- Green (YB) to QT Py A3
- Yellow (RMB) to QT Py SDA
- Orange (LMB) to QT Py SCL
- Red (GND) to QT Py GND
At this point, you you can test the software and hardware to make sure everything works. Try moving and clicking the mouse. If it's not working, verify that you've correctly copied the code and re-check the wiring. If problems persist, open the Serial REPL to check for any messages that may help you diagnose the problem. Once it's working, continue on with preparing an enclosure.
Printing the enclosure
I've prepared a 3D-printable enclosure for this project. To print, flip each part so that the large flat face is on the 3D printer bed. Use standard slicer settings, no support needed.
The zip file below contains all you need: STL and Step files for the top and bottom of the case, and the FreeCAD design file in case you want to make any modifications. (FreeCAD is a free and open source CAD package for Linux, Mac and Windows available at freecadweb.org)
Use "rotate" or "lay flat" in your slicer to flip the lid so that its large flat face is on the 3D printer bed.
To install the converter in the enclosure, place the side of the QT Py with the Stemma connector against the two PCB clips, then gently but firmly press down on the USB connector until the board clicks into place.
Use 2 M2.5x6 screw to secure the Mini-DIN connector to the enclosure.
Carefully route the wires out of the way and then snap on the enclosure lid.
If you need to, you can remove the QT Py by gently levering up on the USB connector while flexing that side of the box outwards.
Here's how the completed adapter should look on each end, with the connectors secure and accessible.
Plug the USB cable and the NeXT mouse cable into the adapter, then plug the USB cable into your computer or laptop and everything's ready to go:
Text editor powered by tinymce.