SparkMouse Timer - Digispark Based Mouse Speedcubing Timer

by The_NooB in Circuits > Gadgets

924 Views, 2 Favorites, 0 Comments

SparkMouse Timer - Digispark Based Mouse Speedcubing Timer

DIY Capacitive Speedcubing Timer | SparkMouse Timer
1.jpg
sparkmouseedited.jpg

Speedcubing timers are expensive - like, really expensive.

Take the supposedly "original" SpeedStack timer (Gen 4) as example, it costs around 35 US dollar. There is also much much cheaper timer by Moyu and Qiyi and they cost around 8 US dollar. However, in comparison to this project, all the timers above are expensive.

This project costed me around 1.5 USD including all the material, so let's look at how I made one (and you can too!).

Supplies

  1. Mounting board
  2. Digispark (clone or original, as long as there is bootloader)
  3. Some aluminium foil
  4. Hot glue
  5. White glue/clear glue
  6. Resistor (1MOhm) x2
  7. Some wires, preferably thin one

Optional:

  1. Printer to print out the cutout

Backstory and Design

SparkMouse Timer: Digispark Based Mouse Speedcubing Timer
v3.jpg
v2.jpg

Mouse Timer

Before going any further, I would like to first introduce you the concept of "mouse timer". Mouse timer ain't exactly new thing. Here is a list of them that I can find:

Basically a mouse click is trigger by a microswitch which connect the mouse IC pin to somewhere. Desolder that switch and connect them to external trigger, BAM mouse timer.

And as a beneficial "side effect", since it works like a mouse, it can be directly be use on Android timer with OTG, as mouse click is basically the same thing as tapping the phone's screen.

Story

This is not the first timer that I have made. Realising the ability of csTimer to use mouse clicks to trigger the timer, I made the very first version (no picture, it got destroyed pretty soon). The first version is as usual, you guessed it, toilet roll and aluminium foil, where the aluminium foil act as switch that connect to the pin in the mouse. Then my friend seeing this be like: "wtf are you doing, so ugly, and doesn't work half of the time" Then he proceed and designed another one, this time with two microswitches acting as an AND gate (glorified "two switches connected in series") which are put under cardboard pad, thus the whole thing become a lot thinner.

I basically just copied his design and called it my V2. Then I thought, why not make it smaller? Then V3 is born, and that is the one I'm using until now.

At the time when I made the V3, I posted it as a parody advertisement in cubing group of my country, so I'm doing the same thing this time.

Design

The whole thing is powered by Digispark which is an Arduino like development board but a lot smaller. The main reason for using Digispark is because it can be programmed to act as a mouse via V-USB, and the number of pins is just enough. The timer body is constructed from simple shape to make my life easier cutting it (Seriously I don't understand why they like weird shape, doesn't looks nice and feel any more ergonomic. GAN timer has simple shape, but the price...). The body is made from layered mounting board (yes, again), but you don't have to follow this. You may design and 3D print one, or use harder material like wood. The sensors are made from aluminium foil thanks to CapacitiveSensor Library. And that's about it. (There will be a .stl file for you to look around the model)

To be honest, there aren't really much instructions other than follow what had been planned, so this is probably gonna be short.


Due to the way Digispark operate, there is a caveat with this design. Some USB controller is not happy about Digispark and not detecting it, so it may not work on your computer. For me, it doesn't work* on my desktop PC, but does work with my laptop and phone. So when I want to use it with the PC, I setup a VNC connection from my phone to the computer and connect the timer to my phone with OTG instead. The latency is unnoticeable, though I'm pretty sure there will be some delay in timing. Anyway, the solution to this is to use board that can act as USB HID natively, eg. Arduino Pro Micro & Arduino Leonardo, but they can be more pricey.

*On Linux, the Digispark won't be detected and listed in lsusb, and you will see "Unable to enumerate USB device" in dmesg. Windows won't detect it as well. But if anyone know any solution to solve this, comment below.

Cutting the Materials

vlcsnap-2021-07-07-17h40m37s267.png
roundcorner.jpeg
layers.jpeg

Print the cutout if you have a printer. Otherwise it is completely possible to construct the shape without it (thanks to the simple shape)

Now this text below is for you who doesn't have printer:

There are 6 layers you need to cut (dimension in mm):

  1. 200 x 30 - body (4 pieces)
  2. 40 x 30 - middle (2 pieces, if your mounting board is thinner, you may need more)
  3. 70 x 30 - hand (4 pieces)

Then proceed to trace and cut the shape according to the cutout.

To round the corner, refer to the second picture for radius and location of midpoint.

The one harder to cut without printer is the third layer, but really it doesn't have to be perfect. As long as the Digispark, wire and resistors fit, you are good to go.

Keep in mind that the design doesn't really have to be followed, as you may make your own design. Make sure to share that with me!

Downloads

Gluing the Layers (pt 1)

vlcsnap-2021-07-07-17h41m04s510.png
vlcsnap-2021-07-07-17h42m34s394.png
3layer.jpeg
middle layer.jpeg

Counting from the bottom layer, align and glue layer 1-3 together. Do the same for layer 4-5. After the glue is dry, drill a hole at appropriate place for layer 4-5 according to the cutout in step 2.

From now on, I will call the glued layer 1-3 as bottom layer, and layer 4-5 as middle layer.

Laying Out Wire

vlcsnap-2021-07-07-17h41m44s608.png
schematic.png

This step is slightly tricky, because I don't have exact number for the length of wires to use, so we have to do it by trial and error. Lay down wire on the bottom layer according to the schematic and approximate the length, then cut and strip the wire. Repeat for all the wires needed.

Soldering Time!

vlcsnap-2021-07-07-17h42m09s578.png
vlcsnap-2021-07-07-17h42m23s936.png

Solder all the wire prepared in previous step together. Tin all wires/resistors/contact first to make your life easier. Follow schematic in previous step.

I also solder a spliced USB cable directly to the USB contact, but you may use a female connector as well.

Gluing the Layers (pt 2)

vlcsnap-2021-07-07-17h44m00s028.png
vlcsnap-2021-07-16-16h35m48s245.png
vlcsnap-2021-07-16-16h36m06s684.png

Begin by placing everything at the right place. You may hot glue the component to fix them. Apply glue on the bottom layer, then pass the wires through the holes drilled on the middle layer. Press both layers together.

Making the Sensors

vlcsnap-2021-07-07-17h41m25s712.png
vlcsnap-2021-07-16-16h54m46s670.png
vlcsnap-2021-07-16-16h47m53s146.png

The sensors are really just... a piece of aluminium foil. It is generally good to have round shape sensor. Cut a small piece of foil and trim it down until it fits on the timer. Tape the wire to the aluminium foil and lay the foil on the timer. Use small sized tape to fix the aluminium foil on the timer.

Gluing the Layers (pt 3)

vlcsnap-2021-07-16-16h58m40s671.png
vlcsnap-2021-07-16-16h59m22s386.png
vlcsnap-2021-07-16-17h07m07s857.png

Apply glue directly on top of the sensor and close it off with the final top layer. Close the middle compartment for the Digispark board as well by gluing its top layer.

Note: If your mounting board is 1.5mm thick, following the design should works fine. However if it is 1mm thick, you may need extra layers in the middle so that the Digispark board can fit in it.

Finishing Up

vlcsnap-2021-07-16-17h11m13s513.png
vlcsnap-2021-07-16-17h11m57s340.png
vlcsnap-2021-07-16-20h09m42s993.png
vlcsnap-2021-07-16-20h10m21s428.png

Fill the middle compartment with hot glue. I also closed it with another piece of mounting board to make the whole thing tidier. Then I added 4 silicon rubber plug at the bottom to act as anti-slip legs. You may proceed to decorate your timer with anything you want (like hand logos at the sensors, etc.).

Programming

Screenshot_20210716_193609.png

First you have to setup your system and Arduino IDE for the Digispark depending on platform. Arduino IDE will be used for programming in this project.

Setup guide:

You also need to install the capacitive sensor library in your IDE. You can do that from Library Manager. (DigiMouse is automatically installed when you setup the board)

Next, get the Arduino sketch from my GitHub repository. Direct link here.

Unzip the file to any convenient place. You will notice there are two sketches in there: spark_mouse_timer and spark_mouse_timer_calibrate. The calibrate one is for determining how high the sensor value should go when they are touched, while the other one is actual code.

Try uploading the actual code first. If the sensor is too/not sensitive, upload the calibrate code. Then open up a notepad or text editor and plug in the timer. It should start typing the value out in the editor. Touch the sensor and record the value achieved, and find a suitable value to be replaced in the "threshold" variable in the actual code.

Note: Make sure you do the calibration after the glue is dry. I did it when the glue is not set and the sensor value went off the chart

Done!

3.jpg
SparkMouse Timer in action | 11.30 3x3 ao5
2.jpg

There you have it, DIY speedcubing mouse timer. What do you think about this project? Comment down below!