Progress on a fully custom mouse. - Page 14 - Overclock.net - An Overclocking Community
Forum Jump: 

Progress on a fully custom mouse.

Reply
 
Thread Tools
post #131 of 146 (permalink) Old 08-05-2019, 02:35 PM
New to Overclock.net
 
gipetto's Avatar
 
Join Date: Jun 2017
Posts: 550
Rep: 12 (Unique: 9)
I recieved a slotted optical switch pcb a few days ago and tried it out today. while the pcb itself works perfectly without light interference due to the lm393 onboard, it doesn't work as well as i had hoped as a rotary encoder. there are back scrolls as many as 1 in 10 and it is very hard to align correctly. I think the backscrolling may be due to rotational bounce in the wheel. no pics because my phone doesn't work properly.
I do recommend those pcbs though, very easy to work with, and possibly a good reference circuit for a quadrature design.

edit: fixed the bugs in the code, wheel works perfectly now. one bug was caused by changing a pinmode from input to output, the delay caused the issue, the other was caused by inverting the logic level of the hardware debouncing. It actually caused an unstable condition which I didn't think was possible but made sense upon thinking about it.

Last edited by gipetto; 08-05-2019 at 07:40 PM.
gipetto is offline  
Sponsored Links
Advertisement
 
post #132 of 146 (permalink) Old 08-18-2019, 10:25 AM
New to Overclock.net
 
Join Date: Jul 2019
Posts: 28
Rep: 6 (Unique: 5)
i wonder if we could make a pcb that could fit any shell to make your own mouse like we do our own keyboards. and obviously the pcb will need hotswap switches.
https://cdn.discordapp.com/attachmen.../universal.png
tailslol is offline  
post #133 of 146 (permalink) Old 08-18-2019, 11:03 AM - Thread Starter
New to Overclock.net
 
TranquilTempest's Avatar
 
Join Date: Aug 2011
Posts: 1,773
Rep: 79 (Unique: 64)
Quote: Originally Posted by tailslol View Post
i wonder if we could make a pcb that could fit any shell to make your own mouse like we do our own keyboards. and obviously the pcb will need hotswap switches.
https://cdn.discordapp.com/attachmen.../universal.png
Well, making a custom mouse PCB is a whole lot cheaper than a custom keyboard PCB. Though you can get away without it using off the shelf sensor module and a teensy or arduino micro. Though I think it's just easier to make a custom PCB so you get everything where you want it. sensor, mounting holes, switch locations, encoder, etc. While microswitches technically have mounting holes, I don't think it's easier to use those than a PCB.

TranquilTempest is offline  
Sponsored Links
Advertisement
 
post #134 of 146 (permalink) Old 08-18-2019, 01:53 PM
New to Overclock.net
 
gipetto's Avatar
 
Join Date: Jun 2017
Posts: 550
Rep: 12 (Unique: 9)
Switch sockets come with a weight penalty and are quite deep also, which would likely necessitate drilling a hole in the base for each socket so that the pcb isn't risen up and bottoming out the switches.

While it would be possible to make a custom pcb which integrates the mcu and sensor, there are already similar offerings on the market, for instance the deathadder 3.5g and logitech g403 wired pcb. I've also seen a two part mod with a steelseries rival pcb.

I don't think there would be any weight advantage between a teensy+ sensor board vs an integrated board so there's really no advantage to this for a one-off unless you want the better build quality. It could be cheaper if you can solder smt and have the programmers.
gipetto is offline  
post #135 of 146 (permalink) Old 09-23-2019, 11:52 AM
New to Overclock.net
 
gipetto's Avatar
 
Join Date: Jun 2017
Posts: 550
Rep: 12 (Unique: 9)
I redid my pcb to add support for the ergo intellimouse1.3 shape and isp headers. I removed the reset button due to space constraints from the screw hole. it is accessible from the isp headers. I was strongly considering using jlcpcb's assembly service but they were missing the 1.9v regulator, and I already have enough money spent. Still waiting for my tech to finish soldering.

https://github.com/itsnoteasy/misc/t...mouse8onethree
Attached Thumbnails
Click image for larger version

Name:	intellimouseonepointthree.png
Views:	11
Size:	31.9 KB
ID:	297458  

gipetto is offline  
post #136 of 146 (permalink) Old 10-12-2019, 05:52 PM - Thread Starter
New to Overclock.net
 
TranquilTempest's Avatar
 
Join Date: Aug 2011
Posts: 1,773
Rep: 79 (Unique: 64)
Thought I should leave this here, really helpful for understanding the USB stuff: https://www.beyondlogic.org/usbnutshell/usb1.shtml

One thing I originally missed was the 10uf maximum and 1uf minimum capacitance across the 5v input. The maximum inrush current limitation is understandable, but I didn't realize there was a minimum as well, used for device detection. I had 10uf there because I was already using that for the sensor(MCU datasheet recommends 4.7), but there's a tolerance on that cap, and there's more capacitance on the other side of the voltage regulators, I'm not sure how long those take to charge.

I'm sure this won't matter in normal usage, but it probably would have if I ever tried to get it compliance tested. I think I'll add say 10 ohms in series. it will make it easy to measure current usage, and take the edge off the inrush. Any voltage drop across it would have been lost in the LDO regulators anyway.


Last edited by TranquilTempest; 10-12-2019 at 09:02 PM.
TranquilTempest is offline  
post #137 of 146 (permalink) Old 10-13-2019, 10:26 PM - Thread Starter
New to Overclock.net
 
TranquilTempest's Avatar
 
Join Date: Aug 2011
Posts: 1,773
Rep: 79 (Unique: 64)
On storing sensitivity presets and other settings in the onboard flash:

The flash memory on my MCU comes in 512 byte pages. You can write one byte at a time, but you can only change 1s into 0s with that operation. To change 0s into 1s you have to erase the whole page. I think this means if I write 0b00000001 to an address, and later write 0b00000010, the value stored will be 0b00000011. If it works like that, I might use the first ~8 bytes of the page as an index, write one bit in the index every time I update a preset, to show which address contains the most recent value. Then I only need to erase after I've filled the whole page, cutting the program erase cycles down to ~1/63 of what it would be using a static address. If there's an error I'll just revert back to the default array of presets.

Or I could just traverse the page until there aren't any more entries, and use the last one. I only really have to read from it when I first plug in the mouse, so I'll probably end up doing this, I'll just keep the current index and values in RAM.

Chip is specified for 20k p/e cycles minimum, so I shouldn't have any problem with endurance using either of these methods.


Last edited by TranquilTempest; 10-14-2019 at 03:09 AM.
TranquilTempest is offline  
post #138 of 146 (permalink) Old 12-01-2019, 10:14 AM
New to Overclock.net
 
gipetto's Avatar
 
Join Date: Jun 2017
Posts: 550
Rep: 12 (Unique: 9)
I decided to get to grips with jlcpcb's assembly service using this kicad script tutorial: https://dubiouscreations.com/2019/10...sembly-service

to use the service i had to move all components to one side and replace the regulator with an adjustable type, as there was no fixed 1.9v in their parts library. i used a value of 2kohms for r1 and 3.3k ohms for r2. any assembly to be done is through hole only. I haven't ordered yet as an earlier version was to be done this week. this will probably be the last work done on the pcb.
https://github.com/itsnoteasy/misc/t...use8onethreev2

edit, had to change the regulator again because jlcpcb put a 9 euro tooling fee on a 10c texas instrument part, also changed led_p resistors to 39.07 ohms by seriesing 49.9r and 180r
Attached Thumbnails
Click image for larger version

Name:	jlcpcb.png
Views:	18
Size:	178.3 KB
ID:	309304  


Last edited by gipetto; 12-02-2019 at 10:04 AM.
gipetto is offline  
post #139 of 146 (permalink) Old 12-31-2019, 12:07 PM
New to Overclock.net
 
gipetto's Avatar
 
Join Date: Jun 2017
Posts: 550
Rep: 12 (Unique: 9)
I got the assembled pcbs in today and figured now would be a good time to learn how to flash over isp. so, following the qmk instructions I flashed a teensy2.0 clone as an avrisp programmer, then wired it to the pcb and flashed it with an atmel-dfu bootloader. but i don't have an example makefile so unless i go the backwards and slightly illegal way of flashing the halfkay bootloader i'm stuck. can anyone help me out? If not it's ok, the other set of pcbs have the halfkay bootloaders on them.
Attached Thumbnails
Click image for larger version

Name:	IMG_20150615_010102.jpg
Views:	14
Size:	1.52 MB
ID:	315164  


Last edited by gipetto; 12-31-2019 at 01:18 PM.
gipetto is offline  
post #140 of 146 (permalink) Old 12-31-2019, 03:36 PM - Thread Starter
New to Overclock.net
 
TranquilTempest's Avatar
 
Join Date: Aug 2011
Posts: 1,773
Rep: 79 (Unique: 64)
Here's an example makefile that uses GCC and AVRDUDE https://gist.github.com/holachek/3304890

But I'm definitely not the person to ask about how to set up a toolchain. Maybe try r/embedded or stackoverflow.

TranquilTempest is offline  
Reply

Tags
custom , modding , mouse , pcb , shell

Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the Overclock.net - An Overclocking Community forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.
User Name:
If you do not want to register, fill this field only and the name will be used as user name for your post.
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself.
Email Address:

Log-in



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off