Overclock.net - An Overclocking Community - Reply to Topic

Thread: Progress on a fully custom mouse. Reply to Thread
Title:
Message:

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


  Additional Options
Miscellaneous Options

  Topic Review (Newest First)
10-13-2019 10:26 PM
TranquilTempest 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.
10-12-2019 05:52 PM
TranquilTempest 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.
09-23-2019 11:52 AM
gipetto 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
08-18-2019 01:53 PM
gipetto 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.
08-18-2019 11:03 AM
TranquilTempest
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.
08-18-2019 10:25 AM
tailslol 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
08-05-2019 02:35 PM
gipetto 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.
07-10-2019 05:00 AM
IPS.Blue
Quote: Originally Posted by JP54 View Post
Prototype in the picture is indeed wet layup plain weave but i have now my own tools and resources to work with prepreg and complex machined molds
Nice. Prepregs are expensive but worth it.


Quote: Originally Posted by TranquilTempest View Post
That is the idea. Not sure why it's not done more. The biggest mouse manufacturers would probably sell fewer mice if the switches never failed in that mode, but the smaller ones could probably gain enough market share to overcome that. I think once one mouse is sold in high volumes with it, the rest of the industry will follow.
I think «planned obsolescence» is a likely explanation.
07-09-2019 03:02 PM
TranquilTempest
Quote: Originally Posted by JP54 View Post
So you just treat the NC and NO pins as separate inputs and then have the firmware recognize them as "is or not" pressed? Why arent most mouse manufacturers doing this? Seems like in one go you could get rid of double-clicking and switch delay to overcome the bounce time that causes said double click.
That is the idea. Not sure why it's not done more. The biggest mouse manufacturers would probably sell fewer mice if the switches never failed in that mode, but the smaller ones could probably gain enough market share to overcome that. I think once one mouse is sold in high volumes with it, the rest of the industry will follow.
07-09-2019 02:01 PM
JP54
Quote: Originally Posted by gipetto View Post
Kicad has a steep learning curve, but it's not that difficult to use, once you have your habits formed. I started out making a few pcbs with a hand drill, hacksaw and flat screwdriver to carve out traces. Later on I wanted to try out pcbs so i installed fritzing and replaced all the wires with hand drawn traces on a standard rectangular pcb, which agreed well with my chaotic prototyping process.

Kicad forces you to do everything in a linear mathematical way to regulate the cognitive load. Design schematic, assign footprints, design rules check, export netlist, markout pcb outline and cutouts, then layout the ratsnest pcb traces. The end product might look simple, but everything posted here has 10+ previous failed iterations.

I think that if you want to design a pcb then start off with a simple project to familiarize yourself. To start with, stick to a through hole design and build something uncomplicated like a switch matrix for a keyboard numpad in fritzing. It may seem like a waste but you can use the bought pcbs to check for errors in layout and sizing.

You need to be more specific in what your issues are. It shouldn't be too difficult to make a blank pcb in the shape you want by following youtube tutorials for instance. Then if you want to know how to place a component do a search. some videos will force you into making custom component footprints, but since most components have common spacing it's not necessary and another existing part can be reused. By using lateral thinking you can navigate around most insurmountable obstacles.
Thanks for the advice. Since i'm a complete novice when it comes to this stuff i think ill try by something very simple such as the encoder/scroll click separate pcb on Kicad to get familiar with the whole process and the program

Quote: Originally Posted by TranquilTempest View Post

Easiest way to implement delay free switches is hooking the common contact to ground, and the other two contacts to different input pins. If the NO contact is closed, the button is pressed. If the NC contact is closed, the button is not pressed. If neither is closed, maintain current state.
So you just treat the NC and NO pins as separate inputs and then have the firmware recognize them as "is or not" pressed? Why arent most mouse manufacturers doing this? Seems like in one go you could get rid of double-clicking and switch delay to overcome the bounce time that causes said double click.

Quote: Originally Posted by IPS.Blue View Post
Wet lay-up plain weave?
Prototype in the picture is indeed wet layup plain weave but i have now my own tools and resources to work with prepreg and complex machined molds
This thread has more than 10 replies. Click here to review the whole thread.

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