I designed a trackball: https://github.com/ak66666/ThumbsUp-Trackball-v3
I sell the PCBs on Etsy: https://www.etsy.com/ca/listing/4367668734/thumbsup-trackball-v3-pcbs-for-dyi
In this post I show the process of building the board.
Bill of Materials
To assemble you will need to obtain the following parts:
1x PMW3610 sensor and lens (https://www.aliexpress.com/item/1005007118767775.html)
1x Nice!nano v2 (or clone) (https://www.aliexpress.com/item/1005006074191337.html)
This will give you a Bluetooth-connected device. You may add another nice!nano to make a USB dongle.
1x 34mm ball (https://www.aliexpress.com/item/1005007857787050.html)
1x 3.7V 110mAh 301230 Lithium Polymer Li-Po Battery (https://www.aliexpress.com/item/1005003662352305.html)
6x Kailh Choc hot-swap sockets (https://www.aliexpress.com/item/1005003873653184.html) Optional, you may solder the switches into the board.
2x Pin Headers and 2x Sockets, Low profile, 12pin (https://www.aliexpress.com/item/1005006248653180.html) for Nice!nano.
7x 4pin Sockets and pin headers for them (https://www.aliexpress.com/item/1005003610333849.html) for the board stands.
1-3x Slide Switches (https://www.mouser.ca/ProductDetail/655-1825232-1) One is needed for the power control, and two more for hand/orientation setup, could be left unpopulated.
4x 5x5mm Tactile Switches (see pictures, something like these: https://www.mouser.ca/ProductDetail/506-MSLPT5252BL2MTR)
Sensor module comes partially pre-assembled, it contains all components except the actual sensor and its lens.
Process Overview
- Install bearings in the lower and middle decks (leave the top one for later)
- Put pin headers and sockets between the lower and middle decks.
- Install power switch on the middle deck
- Install MCU (controller) socket on the middle deck pin headers on MCU
- Install switches and buttons on the middle deck
- Put sensor and lens into the sensor module
- Install sensor on the middle deck
- Put pin headers and sockets between the middle and the top decks
- Install switch sockets
- (optionally) Install the bearings into the top deck
- Clean the boards
- Install battery connector, attach the battery, install MCU
- Install switches
- Flash the firmware
- Adjust the sensor position
Below are pictures for each of these steps with more details.
WARNINGS
- Do not chamfer or fillet the PCB edges around the bearing holes, at least until the bearings are soldered in. The copper layer around those holes is needed for the solder to hold on, and with even part of it removed it is harder to form shape necessary to keep the bearings in place.
- Do not push hard the freshly soldered bearings with the ball - that may damage the ball surface.
- If the bearing(s) in top layers are sticking out too much - that means the bottom and/or middle deck bearings are set to high, re-do them first.
- If the bearing is not getting into its hole because of the solder in there, do not try to push the bearing in. Instead clean the solder out completely with a pump and wick, then try afresh.
Install bearings in the lower and middle decks (leave the top one for later)
In both boards the bearings should be flush with the bottom or the plate, sticking out upwards.
Start with the lower deck.
Notice that the back side of this board is the one with the soldering pads for switches.
I put a tape from the bottom of that board to prevent the ball from falling through, you can just push the board to the soldering mat, or a piece of cardboard.
Generously apply solder to form a nice crescent around the ball:
Then cover the opening with solder from the bottom. Try not to overheat it so the ball does not fall out.
Next to the middle deck.
In those boards there may be a thin copper strip covering the inside of the hole, in some boards it may be removed/lost during the fabrication, but luckily in this copy it remained.
I used it as a support for the bearing ball, slightly twisting it in with tweezers.
Cover the ball from top and the bottom with solder, trying to align it with bottom side of the PCB. If the copper strip mentioned above is still there, leave it for now, will remove it later.
Put pin headers and sockets between the lower and middle decks.
These connectors provide structural support.
Make four risers by inserting pin headers into sockets.
Put them into the bottom board - the socket side should go into the bottom board, the pin heard - to stick up. Place the middle deck, fitting the pins into holes.
Cut the protruding pin ends flash with the board surface: lift that "sandwich" with one hand, squeezing it firmly so the raisers stay in place, and snip the extending pin points off with a cutter.
Put that "sandwich" back on the table, solder one of the pin in each pin header, then on the other side - one pin of the socket, for the fit test. Lift and see if all the raisers are straight/plumb, and oriented as mentioned above, pin headers to the middle deck and the sockets to the bottom.
IMPORTANT: make sure that the bottom PCB has the switch soldering pads facing out! In the end they will be on the bottom of the lower PCBs.
Solder all the pin points, trying to form nice round caps.
Try to spin it - it should rotate freely.
If the metal belt over the middle deck bearings is still there and touches the ball - use a sharp knife to cut and scrape it off the contact point. Try not to poke the bearing out. That copper stripe is very thin and does not require much force.
In the end the bearing should be exposed just enough to support the large ball.
Install power switch on the middle deck
It is easier to install the power switch before the MCU connectors.
As with the raisers - cut the switch pins flash with the board, solder them in trying to make nice round balls.
IMPORTANT: In this case the soldering joins should not be sharp or pointy - the battery will rest on them, lest the battery be punctured!
Install MCU (controller) socket on the middle deck pin headers on MCU
Note that I used the low-profile sockets for the MCU.
Pin headers that usually come with nice!nano and other controllers are too tall, they would not fit into the space between the boards well. That is you may use them, but you'd need to make the solder joins in MCU absolutely flat, and in the end you may end up with USB connector being too close to the board. So it is safer to use low-profile sockets and headers.
Put the sockets, insert the headers into them, place the MCU on top.
As with the raisers - trim the protruding pins flash with the boards.
Hold the MCU down, solder the corner joins, the flip the board over and solder the corner points of the sockets.
CHECK the sockets are sitting right on the board, that there is no gap between the sockets and boards.
Solder remaining pins of MCU and sockets.
I re-used a controller salvaged from another project, so it lacks the plastic guard on the pin header.
Install switches and buttons on the middle deck
The same approach as before - cut the pins flash and make the solder joins nice and round
For the buttons: put a dab of solder on one pad, then align the button on the board and solder that one corner. Verify that all pins are on top of their pads, and solder them all in place. Repeat for other buttons.
Put sensor and its lens into the sensor module
Sensor in installed from the side that does not have other components.
As with other parts - solder the corner pins first, check the alignment, solder the rest of the pins.
Watch out for the tiny components around the opening, try not to knock them off, they are important.
Lens is installed from the side with capacitors and other parts.
Melt the lens pins from the other side to fix it in place.
(I broke them off, so had to hot-glue it for that.)
Install sensor on the middle deck
This is the second most complicated step after the bearings.
I used single-thread wire from CAT5 cable, it is strong and flexible enough for the task.
Insert the end of the wire into the sensor connector hole in the middle deck, and solder it in there.
It should be tilted like shown in picture, that will provide better fit later.
Try not to cover the wire in solder - that will make it much more rigid, we need it to remain flexible now.
Once soldered, cut it leaving about an inch.
These six connector wires should be looking like this:
Place the sensor module on these wires, lens should be pointing up, away from the middle PCB:
Tilt the sensor module like shown in the picture below and solder it. Start with the outer wires, check the alignment and then finish the other holes.
NOTE: I made these connectors a bit too long in this build, you may make it a bit shorter, about 8 mm,
With tweezers, bend the wires, trying to form an arc
The wider the arc, the easier it will bend further, and less chance to break.
Push the sensor in place, shaping the wires into an upturned U.
In the end it should be in approximately this position:
Test-fit the ball again.
The sensor board should be tangent to the ball, with the lens center pointing to the ball.
The ball should not touch the lens, 1.5-2mm is needed, it will be adjusted later.
Put pin headers and sockets between the middle and the top decks
The same operation as for the bottom and the middle decks.
Prepare socket-pin pairs, insert the socket side into the middle PCB, place the top PCB on the pin side, cut off the protruding pin ends, solder one spot in each, check the alignment, solder remaining pins, forming the nice balls.
NOTE: There are no clear dedicated orientation marks on the top PCB. This "frowning" side should look down, towards the middle PC, there are outline marks around the connectors on that side:
Install switch sockets
As with pin headers and sockets, form nice round balls of solders.
- (optionally) Install the bearings into the top deck
Bearings in the top PCB are nice to have, but can be omitted.
They are preventing ball "kick-up" when it is pushed up from the bottom. In use it does not happen often, but may be annoying.
The large ball will stay in place, will not fall out even without them, yet the edges of that top PCB may scratch its surface.
So I recommend to install them.
With the large ball - drop the bearings in, wiggle the large board to have settle, to be just touching it, but not pushing it out.
Cover bearing openings with solder.
Rotate the ball, check it moves freely, reflow the solder to adjust the bearings.
Do the same with the outer bearings.
Due to the tolerances in the boards, raisers, soldering joint not perfectly aligned, those outer bearings may be at slightly different position, may be even not touching the ball, and that is ok.
Their function is primarily to prevent ball from scratching when it touches these board ends when transported.
Align outer bearings as best possible, close enough to the ball, while staying firmly in their holes.
Add solder around the holes
Detach the PCB, flip it upside down, add solder around the bearings, trying not to move them.
Put the top PCB back, check the bearing alignment, confirm the ball moves well.
Make sure there is some freeplay between the ball and inner bearings. Push the ball from the bottom, it should go up a tiny bit, but should not feel too loose. Without that the ball may be locking up due to extra friction.
If you install the cross-deck tie-downs - the boards will be squeezed together much closely, so that gap between the top deck bearings and the ball may reduce.
If needed - re-heat and reflow the solder around bearings to adjust the gap.
Clean the boards
I used solder with water-soluble flux core, so I washed the boards in hot water with a toothbrush, then dried them with compressed air, blowing the water from all sockets, from under the lens.
It would be a good idea to plug the drain - to catch the bearing balls if they fall out. So this wash is an additional test for them.
Now the boards look nice and shiny:
No flux gunk around the bearings and soldering joints:
Install battery connector, attach the battery, install MCU
I used a battery without connector, so I soldered its leads directly to the board.
I used Scotch tape, rolled with the sticky layer outside, as a buffer from both sides of the battery.
This way it stays in place, may move a little, but does not touch nice!nano components or the soldering joints on the board.
To get a similar feeling I used White Clicky Kailh Choc switches - with springs replaced to Sprit's 25gf ones.
Also I reduced the travel distance to stop right after the click - for that I cut 2.5mm bumpons in half and attached them on top of the switches.
That made the click quite close to what I have in Elecom trackballs, not exactly the same, but close enough.
Flash the firmware
Download the default version of the firmware: a_ball-nice_nano_v2-zmk.uf2
Connect the trackball to the computer, press twice the reset button (consult the mark on the bottom of the middle deck), a new drive should appear in the system.
Copy the downloaded file to that drive.
The trackball will restart, and should be functional.
Set the configuration switches as you need them: thumb v. fingers, left v. right.
- Adjust the sensor position
If the buttons work, but the pointer is either sluggish or moving sporadically, or not moving at all - try to adjust the sensor module.
For that remove the top board, and move the module away from the ball.
The working position seems to be quite consistent in my devices: the lower edge of the sensor touches (sits on) the bottom PCB and its top edge is on the line between the raiser corners:
The first copy is on the left, and the one assembled for this manual is on the right:
At work:
Next Steps
What has not been shown/described:
Board Anchoring
There are holes for the cross-deck tie-downs, i.e. you may use plastic or metal stand-offs to prevent PCBs from detaching.
I planned to use snapping-in nylon stand-offs, only to find that those I have are 12mm long, while the distance between the boards is around 11.4, so those stand-offs actually were not working well.
I plan to order M3 nylon screws/stand-offs for that.
Bluetooth Connectivity
That part of firmware is in testing, will add as a separate article.
Wireless Dongle
The wireless dongle replaces Bluetooth (BT) connectivity, thus allowing to use a USB port of the computer for the dongle.
That version of firmware is plans for the nearest future.
Online Configuration
The default firmware version already supports https://ZMK.Studio, so the buttons can be re-assigned as needed. note that ZMK.Studio does not present mouse key codes nicely, you need to select the key to see its bindings.
Power Management
The power switch on the trackball disconnects the battery.
That is to charge the battery this switch needs to be in ON position.
Comments
Post a Comment