geekhack Projects > Making Stuff Together!

Help with prototype mouse - reward

(1/2) > >>

Hello Overclockers,
I'm trying to design a custom mouse. I had an electronics engineer design the PCB and had them printed by PCBWAY. It uses the PixArt PMW3360 sensor and a NXP lpc11u3x MCU.

The printed board​

However, when I plug it in, I get an error message saying the device was not recognized. No LED light up.

The engineer had me jumper contact JP1, no change.

He had me check some voltages: 1. With the (-) lead at the black circle and the (+) lead at top red box(T3V3), the value was 3.29
2. With the (-) lead at the black circle and the (+) lead at bottom red box (T1V9) the value was 1.92


3. With the (-) lead at black circle (TAG1), and positive lead at red circle(TU5V1), the value was 5.06.
The engineer says: "What you don't have is software for the NXP Microcontroller. The microcontroller has a usb block that should be communicating to windows via a driver.
It should inherently do this.
Once communication is achieved the microcontroller will need to be programmed to talk to the PixArt sensor.

You can see here, these are the two data lines that go from your computer to the MU
We checked TU5V1 against TAG1, and that looked good

This is where they connect at the MCU
What I am looking for are ambiguities. The hardware looks good, but there may need to be something we do in software to either get the driver to talk to the MCU or get the MCU to talk to the driver. "

I wrote to pixart, who replied: "From our understanding, the situation you are facing seems to have nothing to do with PixArt's sensor itself. Note that PMW3360 is purely a sensor that reports on delta X and delta Y values, with no USB driver inside. So for your Windows to recognize the 3360+PCB as a mouse device, you will need to have the relevant HID driver installed first."Is it that simple? I looked for some HID drivers but I'm not too sure what to look for?
Any help would be appreciated, and thank you for your time.

Since I'm doing this for money and not as a hobby, there will be a reward for anyone who can help diagnose and/or fix the problem.


The image sensor engineer is right. Your problem is in the MCU or the firmware you loaded on the MCU.

The best way to check that the MCU physically works is connect a debugger to it. It MCU can announce itself (and its type) to the debugger then it is likely the MCU is correctly running. This is likely the case since your HW engineer told you to verify voltages and you did it and hey were right. But a better way to test this is with debugger.

That leaves the MCU firmware as the reason for the problem.

Yeah, and if you schematic is the same as the same as your hardware then you have a bug in hardware design. The pull up resistor R2 should be 1.5 kOhm and not only 33 Ohm. That resistor is used together with USB_CON pin to announce to the host that an USB device is present and that it is full speed (in your case since connected to D+). If the device does not indicate its presence correctly then the host (PC) will not detect it even if the device firmware is otherwise good.

EDIT: Sometimes R2 does not need to be external and is built-in in the MCU. I did not check what is the situation with your particular MCU type.

Thanks a lot for your reply.

Sorry, I really don't know much about electronics. So I need custom firmware for the MCU? I also have no idea how to load it. I tried reading the MCU datasheet but I was just completely baffled.

What kind of debugger do I need.

Could you write the firmware and show me how to load it? I would pay you.

Thanks again!

Unfortunately, the MCU is not compatible with QMK (the most popular keyboard firmware that's also used in some computer mice), otherwise you could have used that. If you only have a hardware design, you'll need to write and flash the software for it to be able to act as a mouse. If there is no software flashed to the microcontroller, it won't do anything. (tho if using open source stuff, you NEED to check the licence)

I'm a bit curious about the shape, is it to be circular with no buttons? Or is this some kind of dev-board?

I'd recommend to not post name of the person who designed this publicly like this (and yours I assume), the internet can be a weird place.

By debugger I mean JTAG or SWD hardware debugger which is used to program and debug NXP Cortex M0 MCUs (the one you have used). For example I use ST-Link for STM MCUs. It would likely work with NXP too, but a better idea is to use some recommended by NXP.

Somebody should have loaded firmware on the MCU. It is very unlikely that you would have bought some special MCU preloaded with the firmware which is just right for your HW application (i.e. some kind of mouse). But if that is the case then maybe just fixing that R2 resistor may make it work. It definitely cannot work if D+ line is pulled up to 3.3V through only 33 Ohm resistor. Though it might work if your MCU has this pull-up functionality internally and the external R2 is not used. Who did your HW again when he put a wrong resistor in the schematic? Just to know who to avoid? Don't worry, just kidding. Mistakes happen.

If you do not have any idea about the firmware needed then you just forgot to budget for one of the major (and possibly the biggest) parts in your project. It may be anywhere from about 2 man-weeks up to many man-months depending on what you want and what libraries are already available and what licenses are acceptable for the final (possibly commercial) use.

I could write the firmware but it would be too expensive. Try to find somebody cheaper.


[0] Message Index

[#] Next page

Go to full version