0

I have a client project to make a wireless head-mounted mouse. What wireless module should I use so that I can exchange data between my laptop and the arduino pro micro through the USB port like a wireless mouse? I am using an MPU6050 accelero+gyroscope sensor for cursor movement and Electrohouse Voice Recognition module V3.1 for speech recognition. To exchange such data between PC and arduino, I found a lot of options. Hence, I am confused. Please help me decide what to use so that cost efficiency and effectiveness can be acheived. Should I use bluetooth, RF shield , XBEE or any other module?

1

The wireless medium you choose is largely irrelevant. The important thing to realise is that it's not (in most cases) the wireless medium that is communicating with the computer.

Most wireless mice use the nRF24L01+ (or rather the integrated SoC equivalent) to communicate. They use a USB dongle plugged into the computer for that communication. The computer has no clue what an nRF24L01+ is, but it does know what a USB mouse is. So there is a microcontroller in the dongle which receives data from the nRF24L01+ and interprets it, and sends the right instructions over USB to make the computer think it's a USB mouse.

What the data is that's sent over the wireless, and exactly what form that wireless connection takes, is completely irrelevant as far as the computer is concerned. In general one if the SoC equivalent to the nRF24L01+ (such as the nRF52810) is chosen because it's a single chip solution with a simple to use wireless protocol, which makes for cheap and easy development and implementation.

The only exception to this general rule (and there is always an exception to every rule) is Bluetooth. This is because there is the concept (as far as the computer is concerned) of a Bluetooth mouse. So it is possible, using the right Bluetooth adaptor on your Arduino, for the computer itself to see the Arduino as a Bluetooth mouse. This can be harder to implement using small microcontrollers, but results in a potentially lower cost solution with fewer components.

The simplest solution for you, though, is probably:

  • One Arduino that has a native USB connection (Pro Micro, Leonardo, etc - anything ATMega32U4 based)

This will be connected directly to the computer and programmed to emulate a USB mouse

  • One Arduino that best suits your sensors (probably doesn't really matter what for this. Mini? Micro? Nano? Uno? They would probably all do fine).

To this you attach your sensors, your voice recognition, etc.

  • A pair of wireless connectivity modules of some form

I'd recommend the nRF24L01+ - simple to use, has a very convenient packet-based protocol, cheap, and there's plenty of examples and libraries out there. These are connected to both Arduinos and are used to communicate between them.

Then it's up to you to decide what information gets sent between the Arduinos to make the one connected directly to the PC send the right mouse movements.

5
  • Is the module you mentioned suitable for sending both speech data and cursor movement data to the pc from the user arduino? I ask this because the click operations and cursor movement operations are to be sent via the user side arduino. Can the module handle sending this amount of data? Like voice commands such as select, enter , options and cursor movement .? Jan 16 '20 at 8:47
  • Your VR module handle all that data doesn't it?
    – Majenko
    Jan 16 '20 at 8:53
  • Yes, everything worked nicely andd without delay through the usb cable when i spoke a command to the VR module while moving the cursor. Can the nRF24L01 module send this data without delay? Jan 16 '20 at 9:26
  • So you're not sending large amounts of data them. Just a command to click the mouse.
    – Majenko
    Jan 16 '20 at 9:37
  • If the VR module is anything like the ones I have used in the past, it's "Audio -> Microphone -> VR Module -> [serial] -> Arduino -> Do whatever you want". It's the "do whatever you want" bit that is the communication over wireless. That could be a single bit in a single byte.
    – Majenko
    Jan 16 '20 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.