The Relay-Based Mouse Emulator

mouse

[Nixie]’s job involves using some test software that requires moving a mouse around, clicking a few buttons, checking if everything is okay, and repeating the process over and over again. This is obviously a solution for some keyboard macros, but in a fit of sadistic spite, the test software requires someone to move a mouse around the screen. What is [Nixie] to do? Make a mouse emulator and automate the whole thing, of course.

The Memulator, as [Nixie] calls the device, is the latest in a series of devices to increase productivity when testing. The first version was the mouse tumor, an odd-looking device that simply switched off the LED for an optical mouse, keeping the cursor in one spot while [Nixie] hammered a button repeatedly. The second version is more advanced, capable of moving the cursor around the screen, all without doing an iota of USB programming: [Nixie] is simply using a resistive touch pad, some relays and a few pots to turn buttons into cursor movements. It’s such a simple solution it almost feels wrong.

There’s some interesting tech here, nonetheless. For some reason, [Nixie] has a few cases of old, can-shaped soviet-era relays in this build. While using such cool, awesome old components in such a useful and productive build seems odd, if you’re trying to fix ancient software that’s so obviously broken, you might as well go whole hog and build something that will make someone in twenty years scratch their head.

Vertical video of the Memulator below.

28 thoughts on “The Relay-Based Mouse Emulator

  1. Why picture the old version instead of the one that the article is about?

    Anyhow, good solution to an annoyance. I’m all for automation; especially when it keeps someone from going insane due to repetitive work.

  2. USB mouse programming isn’t way out of your league. It’s actually pretty simple using the Arduino IDE and a board with native USB (Teensy & Leonardo).

    The latest Teensy 3.1 has USB mouse support for both relative and absolute position. In the setup() function, you use Mouse.screenSize(width, height) to set the scale, then in loop, you can use Mouse.moveTo(x, y) to cause the cursor to move to any pixel on your screen.

    Of course, you can also use Mouse.move() and Mouse.click() to do regular mouse stuff easily, which works on all these boards. It’s really very easy.

    (full disclosure: I’m the author of Teensyduino)

    1. Teensy is SO cool :) I had my mouse going in a triangle on my screen in no time, basically before I had connected my first LED – then made a “smiley button” (while writing in cyrillic you have to switch to English to write “:D” or “:P” or any of those and then switch back). I just used the Teensy in keyboard mode :) I have seen people use it to enter malware in computers that don’t allow USB sticks, but allow USB keyboards :D

  3. I like the hardware solution.

    I solved a similar problem with software. Excel was installed, but the machine was in total IT lockdown, so a little VBA Mouse_Event later, I had a $#|T$T@|N Excel macro doing my clickery pokery for me.

      1. Luckily for me, I’m not the one with the clicking job, but the person who gets annoyed about how inefficient certaing things are (at work). Often, afterwards the solution, they call me “supernerd”…But wouldn’t you care about a job where your boss gives you an “old” oscilloscope for free when you ask to buy it? (Textronix TDS210 with newly replaced screen)

        The point in here is that comunication with R+D is bad, or more correctly, their department is small and they don’t have time (and a bit of willingness) to hear what production has to say about their testing methods. They don’t have the right mindset either. So it becomes easier to develop a board like this than wait for them to implement anything more complex than “please, allow me to install these drivers”.

        AND, military relays, you know…can’t beat that.

    1. Absolutely, I’m the first one who recognizes this is overkill and that there was probably a software solution (at the time when I was designing, I’m sure I said it somewhere on the blog) BUT…

      URSS military relays that look like electrolitics!

      When you have 72 of them, there is a certain urge to use them anywhere…

      And, as an afterthought, I would rather have people at work reconfiguring some potentiometers for X-Y coordinates, something they can understand, than interacting with some “obscure”(for them) software wich would probably demand my attention/intervention if they messed up something (they’re a bit of lusers, if you know what a BOFH is).

  4. I am confused… There are numerous programs on the ‘net to do this, which can be triggered by a click, keypress, or run at a predefined interval. The trigger event could easily be generated with a wire and BJT across one of the mouse switches, or a keyboard key switch, or whatever.
    Am I missing something? Why was it necessary to go to this incredible amount of work for this task? Are the existing free mouse macro programs not sufficient in some way? It appears to be running on a PC, so I am really confused here…

  5. In the video it looks like Docklight is being used. This is a serial terminal program that allows some automation by way of setting up transmit sequences and highlighting certain responses in the receive window, so this is a hammer being used to crack a nut – surely the *best* approach would be to add more automation to the test program? VB or even Excel could be used to write a little GUI to perform the testing, or at least the transmit sequences.

    1. It is Docklight, but the problem it’s not the automation per se (wich in fact is not needed) we need to interact with the program one click at a time, to see the effect it has on the board we are testing, What I needed was a way to avoid moving the mouse around 15 times per board test (that consumes time and it is cumbersome).
      The part that can automate tasks in Memulator (pic and relays) it’s me just wanting to have fun, you could otherwise, use only trimmers and switches to achieve the same result.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.