Overclock.net banner

1 - 20 of 158 Posts

·
Registered
Joined
·
1,787 Posts
Discussion Starter #1 (Edited)
Over the past few years I've slowly been gaining knowledge about electronics, and recently I've been thinking there's not really anything about mouse technology that really mystifies me, so why not try to design and build one myself? It might be a little overambitious, but there's nothing wrong with failing.


Details of the current design:
PMW3360 (3389 should be an easy change though)
8 hardware debounced switches, 3 of which will be on separate board, for thumb buttons.
ALPS encoder
MCU: EFM8UB10F16G-C-QFN28 (may change later, but want to at least try it first)
61mm x 60mm, but I think I can get it smaller.

Prototype shell will be made by vacuforming over a clay sculpture. If that doesn't work out I may try 3d printing.

This is the first PCB I've laid out, and I'm not quite done with it yet, but I think it's good enough to get some feedback on. Learning to use KiCAD at the same time:
 

Attachments

·
lololol
Joined
·
4,371 Posts
noice

why not centered sensor?
 

·
Overclocker
Joined
·
11,350 Posts
The switches need 3 holes, your render at least to me has the middle leg blocked with some weird trace shapes. I don't get it either why mice sold in mass have no hardware debounce and instead rely on software with delays.

Never heard of that MCU, I would rather use some kind of AR but then I'm too lazy and cheap to go through all the trouble and expenses to make a custom mouse.

Good luck!


---

Why would sensor need to be centered on a PCB if it's centered on the mouse itself? ;)
There are some existing solutions for using 3360 with other MCUs dev boards. That's probably the trickiest part, to communicate with the sensor.
 

·
Registered
Joined
·
1,787 Posts
Discussion Starter #4
noice

why not centered sensor?
Partly trying to minimize size and deconflict buttons behind scroll wheel, partly because I vaguely remember a whitepaper from the era of ball mice about people being more accurate when the sensor was placed close to the index finger. Though I readily admit that study may have been based on people using a mouse for the first time ever, and I'm having a hard time finding it now.
 

·
Registered
Joined
·
1,787 Posts
Discussion Starter #5
The switches need 3 holes, your render at least to me has the middle leg blocked with some weird trace shapes. I don't get it either why mice sold in mass have no hardware debounce and instead rely on software with delays.
That's just KiCAD being silly with the thermal relief on through hole ground pads, Those holes are indeed marked to be drilled. It's just showing up because it's not marked to be etched away.
Never heard of that MCU, I would rather use some kind of AR but then I'm too lazy and cheap to go through all the trouble and expenses to make a custom mouse.

Good luck!
ARM or AVR? The microcontroller choice is mostly me satisfying my own curiosity, though it is significantly cheaper than my second choice, which would be the atmega32u4.
---

Why would sensor need to be centered on a PCB if it's centered on the mouse itself? ;)
There are some existing solutions for using 3360 with other MCUs dev boards. That's probably the trickiest part, to communicate with the sensor.
Well, communicating with the sensor is just SPI, and there's a datasheet available, so not too big a deal.
 

·
lololol
Joined
·
4,371 Posts
That's probably the trickiest part, to communicate with the sensor.
nah... the sensor communication code i wrote for avr can be easily ported to be used with other mcu architectures...

trickiest part is probably getting usb stuff set up; i never did this myself but just used usb code from https://www.pjrc.com/teensy/usb_mouse.html
 

·
Registered
Joined
·
562 Posts
I don't see any spi level converters. Are you going the voltage divider route, then running the mcu at 3.3v and hope the mcu sees the low voltage from the 3360? I once made a shell myself by using a blowlamp to melt perspex over another mouse, then a towel to press it down around it.
 

·
Registered
Joined
·
1,787 Posts
Discussion Starter #8 (Edited)
I don't see any spi level converters. Are you going the voltage divider route, then running the mcu at 3.3v and hope the mcu sees the low voltage from the 3360? I once made a shell myself by using a blowlamp to melt perspex over another mouse, then a towel to press it down around it.
MCU has an internal 5v to 3.3v regulator, and that's what it runs its IO on. Said 3.3v also drives the sensor's VDDIO pin(internal regulator can provide up to 100mA). There is a separate 1.9v regulator for the sensor's normal VDD.

Might have picked a MCU that can run on 1.9 if USB signaling didn't need 3.3 anyway.

Interesting idea with molding a shell. I do have a heat gun that might work.
 

·
Registered
Joined
·
1,787 Posts
Discussion Starter #10
I'm on a similar project but less complicated as I'm only trying to replicate a mouse design on a different pcb shape.

If you want to take a look : https://www.overclock.net/forum/375-mice/1723924-let-s-get-microsoft-wmo-zowie-divina-married.html

What king of button switches are you planning to use ?

I wish you good luck !
Switches will be Omron D2F-01F.

Took a look at your thread, it's interesting, but I would have added better debouncing if I was going through the trouble of a custom PCB anyway. Here's some more info on that: https://www.overclock.net/forum/375-mice/1712696-hardware-switch-debouncing-mod.html
 

·
Registered
Joined
·
562 Posts
That would be too invasive of a mod imo. it's fine if you are doing a whole pcb. I don't think zowies double click anyway due to the 5.6k mcu pullup in the Cypress line.
 

·
Registered
Joined
·
634 Posts
Good start. Very nice if you could get vacuforming / deep drawing to work reliably and cheaper than 3D printing.
 

·
lololol
Joined
·
4,371 Posts
I don't see any spi level converters. Are you going the voltage divider route, then running the mcu at 3.3v and hope the mcu sees the low voltage from the 3360? I once made a shell myself by using a blowlamp to melt perspex over another mouse, then a towel to press it down around it.
3360 datasheet recommends vddio between 1.8 and 3.6 so 3.3v is totally fine...
 

·
Registered
Joined
·
562 Posts
It's a good tradeoff tbh, One voltage regulator taking the place of 4-5 level converters. I hope it works without issue. two external pullups for the wheel encoder would reduce bounce also.
 

·
Registered
Joined
·
562 Posts
@TranquilTempest do you happen to have the ec10 footprint to share? I have a similar project on the go. I doubt i'll ever finish it though, as kicad is new to me. edit: also the 3 pin switch footprint. I'm using a 5 pin header for that lol.
 

·
Registered
Joined
·
1,787 Posts
Discussion Starter #16 (Edited)
@TranquilTempest do you happen to have the ec10 footprint to share? I have a similar project on the go. I doubt i'll ever finish it though, as kicad is new to me. edit: also the 3 pin switch footprint. I'm using a 5 pin header for that lol.
Not "official" ones, but I did make some.

The encoder footprint is a little sketchy. Couldn't figure out how to get routed slots in the footprint editor, so I used round holes. Maybe you can define plated slots somewhere else, but I haven't got that far yet. I believe pins 1 2 3 correspond to A B C, but you shouldn't trust me on that.

Switch footprint was much easier.
 

Attachments

·
Registered
Joined
·
562 Posts
Thanks for the help, I guess I can upload my schematic if I replace the proprietary sensor with an adns9800 or something, but it's nothing you haven't seen before. When I made my first pcb with fritzing I used 2mm holes for the sides of the ec10 encoder. I may have had to cut them down the side with a sidecutters, can't remember.

kicad only has ec11 mechanical encoders and from memory, those use the center pin as common, whereas the ec10 has an outer pin as common. I screwed up the first pcb I made, so after that I put an extra 2 mounting holes so that I could rotate the encoder 180 degrees to correct the wiring.

kicad still needs a little work, because the NO and NC pins are reversed between the spst and spdt.
 

·
Registered
Joined
·
1,787 Posts
Discussion Starter #18
Thanks for the help, I guess I can upload my schematic if I replace the proprietary sensor with an adns9800 or something, but it's nothing you haven't seen before. When I made my first pcb with fritzing I used 2mm holes for the sides of the ec10 encoder. I may have had to cut them down the side with a sidecutters, can't remember.

kicad only has ec11 mechanical encoders and from memory, those use the center pin as common, whereas the ec10 has an outer pin as common. I screwed up the first pcb I made, so after that I put an extra 2 mounting holes so that I could rotate the encoder 180 degrees to correct the wiring.

kicad still needs a little work, because the NO and NC pins are reversed between the spst and spdt.
I used 2.1mm holes because those pins have a kink in them, but I haven't tested if that's enough clearance or not. If it's not, I can just bend the pins straight to make it work.

And yeah, it would make more sense if pin 1 was common, pin 2 was NO, and pin 3 was NC. Though instead of messing with the existing symbol I just made the footprint match the symbol.
 

·
Registered
Joined
·
562 Posts
Good idea going for the 1.2mm hole for the microswitch pins. I used 1.25 which I found worked well. This pcb should be better than the old fritzing one because the bendpoints forced the middle click switch against the wheel. The pic is just a rough arrangement, nothing measured for the io1.1 yet. I don't think I can solder this smt mcu though. I'd love to use the alps em11b hall effect encoder, but if it is anything like the ec11 then it would hit the upper shell. maybe if it was countersunk into the wheel..
 

Attachments

·
Registered
Joined
·
1,787 Posts
Discussion Starter #20 (Edited)
That encoder would make the middle click a lot more complicated though. Maybe put it on a second PCB, so that it can move up and down with the mouse wheel.

As for soldering annoying surface mount parts, QFP isn't too bad, just drag a blob across the pins then wick up the excess. With the QFN I think I'm going to solder it before anything else, by tinning the pads first, using lots of flux, and reflowing the center pad by heating the bottom of the board with a heat gun.
 
1 - 20 of 158 Posts
Top