Overclock.net banner

81 - 100 of 158 Posts

·
Registered
Joined
·
562 Posts
It's a brilliant idea to be fair. I also considered using an ic for debouncing because I think my code ignores the hardware interrupts which are used to lower latency for left click. I compromised by preserving the original software debounced circuit pinout so that it can still be used. In theory a click could be skipped if it were of short enough duration so as to miss the code in the loop. maybe that is also an issue in the buxtronix wheel code idk.
I'm often blown away by the genius behind that firmware.
 

·
Registered
Joined
·
1,787 Posts
Discussion Starter #82
To minimize latency in the firmware I'll be reading the whole port at once, either during or right before the ISR. I gave some thought to how I might handle macros in the future, and I think what I'd do is read the port in, then use bitwise operators with an intercept mask and an override mask. That would let the macro take as long as it wants to run, without impacting the latency of other switches beyond that two lines of code.
 

·
Registered
Joined
·
562 Posts
wow, you got it together. whatever makes you happy, even if you can't hack the programming, it won't take long to change the pcb for an atmega.
 

·
Registered
Joined
·
1,787 Posts
Discussion Starter #85
Got the scroll wheel working(mechanically). Feels pretty solid. Though I am a bit worried about one of the traces running to the encoder. There's only soldermask separating it from the brace part of one of the outside legs of the encoder, so it's possible vibration would cause it to wear through that and ground one of the encoder data lines. Just something to keep in mind when laying down traces near the encoder.

Everything seems to be working electrically, at least as far as can be tested without firmware. Sensor even seems to be running, you can see it go in and out of sleep mode because the LED changes brightness when it detects motion.
 

·
Registered
Joined
·
562 Posts
I read a datasheet for pcb layout ages ago warning to always solder unused inputs to ground to prevent floating, then checked the atmega32u4 datasheet, and they forbid it in case they are set to output by mistake, which can smoke not just the pin, but the whole mcu. I guess the onboard pullups have that problem solved. I had to redesign the pcb anyway as I had neglected to include a hole for the wheel support. There's so much stuff that passes design rules check that makes you think everything is fine.

here's a q2024 sensor single sided pcb for the io1.1. through hole parts on one side, surface mount on the other, and no vias. some of the old school designers were gifted at routing.
 

Attachments

·
Registered
Joined
·
1,787 Posts
Discussion Starter #88
One thing to be aware of, the top result on google for usb wire colors is wrong, D- is white, and D+ is green. I don't want to admit how long it took for me to figure that out.

In any case, the factory loaded USB bootloader seems to be working.
 

·
Registered
Joined
·
562 Posts
no jumpers whatsoever. I got my first batch of dummy pcbs in today from jlcpcb. the good ones should be in two weeks time extrapolating from the arrival date of these. I was worried the switches would be in the wrong locations but they work in the mouse shell, although could be moved a little. That's something you gotta look out for to keep down costs, there's a lot of useful information you can gather from a faulty pcb, it's better to wait until they come and check your design for errors before you re-order. If I do screw the pcb up again I will modify it for the intellimouse 1.3 shell.

I thought I would have to go to 1.25 mm holes for the switches but 1.2mm is perfect as is. I bought a lot of 10 dirt cheap d2fc-f7n omron and one of them randomly has twice the actuation force for some reason lol.
I think I saw the faulty image you are talking about. I used to do minor radio circuit mods and the information was often riddled with errors, which was made worse due to sites copying each other. back then i'd look for like 3 different versions and pick best two of three. another issue was language differences, some words could change meaning over time and geography. For my pcb I used the g203 pinout and plug to make life easier. I would have liked to have the plug at the front like the original pcb, to keep weight down but the learning curve was too steep.
 

·
Registered
Joined
·
1,787 Posts
Discussion Starter #90 (Edited)
no jumpers whatsoever. I got my first batch of dummy pcbs in today from jlcpcb. the good ones should be in two weeks time extrapolating from the arrival date of these. I was worried the switches would be in the wrong locations but they work in the mouse shell, although could be moved a little. That's something you gotta look out for to keep down costs, there's a lot of useful information you can gather from a faulty pcb, it's better to wait until they come and check your design for errors before you re-order. If I do screw the pcb up again I will modify it for the intellimouse 1.3 shell.
Yeah, I've made a few fixes to the PCB design since I got my boards, but so far nothing that will keep me from making these work; just have to put more work in. If I do order new boards though it will go a lot faster.
I thought I would have to go to 1.25 mm holes for the switches but 1.2mm is perfect as is. I bought a lot of 10 dirt cheap d2fc-f7n omron and one of them randomly has twice the actuation force for some reason lol.
How was the fit of the rotary encoder? The leads on my switches measure 1.0mm, but the datasheet recommended 1.2mm to account for manufacturing tolerances. The boards I got from OSHPark had a little bit of play for the switches, and a close fit for the rotary encoder. I didn't have to force or bend anything, but it also didn't rattle around once it was in. I'd be more specific but I don't have pin gauges to make an accurate measurement. I think some PCB manufacturers drill oversize to account for plating thickness, and others use the drill size you specify, and let you account for plating thickness yourself.
I think I saw the faulty image you are talking about. I used to do minor radio circuit mods and the information was often riddled with errors, which was made worse due to sites copying each other. back then i'd look for like 3 different versions and pick best two of three. another issue was language differences, some words could change meaning over time and geography. For my pcb I used the g203 pinout and plug to make life easier. I would have liked to have the plug at the front like the original pcb, to keep weight down but the learning curve was too steep.
Yeah, though even if you are matching a pinout, you need to know which pin of the microcontroller goes to which position on the connector. At least it doesn't require replacing the PCB to fix if you get it wrong, just rearrange the connector.
 

·
Registered
Joined
·
562 Posts
the alps ec10 is a perfect fit with your footprint, didn't even need to straighten out the tabs. on my later pcbs I expanded the holes to make swapping encoders easier. i find when the hole is too small that solder suckers no longer work, so I end up cutting off the pins and soldering them to the top of the blocked hole. it's hard to get alps ec10 in 7mm size so that's why I was reinstalling them so often, as I had to adjust height and melt the encoder to fit a non standard allen key.
 

·
Registered
Joined
·
1,787 Posts
Discussion Starter #92
Ah, if something is difficult to desolder I just use solder wick.

I did consider using allen keys to make mouse wheel axles, but the hex in the encoder is something of an oddball size. Maybe 1/16 would work, but I didn't have one that size to try. 1.5mm is definitely too small and 2mm is too big.
 

·
Registered
Joined
·
562 Posts
I've had good results with it. A 5/64 allen key for a ttc encoder is a good match, assuming the keys weren't out of order in the box, although it does rock a little, and an unidentified metric type for the alps. melting is hard though, it would be dope if I had a tiny hexagonal broach for the job. I try to avoid modifying wheels though, it's only for custom situations. In your case it is easy to use an oem wheel.
 

·
Registered
Joined
·
1,787 Posts
Discussion Starter #94 (Edited)
I'm almost satisfied with the vacuforming buck. Also made some cables. Still experimenting to see what I like best, but it's definitely not the most flexible cable I made, that one bunched up too much. I'll try to find the cable for the camera so I can post better photos.
 

Attachments

·
Registered
Joined
·
1,787 Posts
Discussion Starter #95
Found the cable for the camera.

Made a couple practice runs vacuforming. First attempt kinda worked but part of the plastic overheated, ruining the texture. Second attempt went better, but I need to make a better frame to get a good seal on the vacuum box. Also, the clay buck started disintegrating, so i'll probably only get one more shell out of it before having to sculpt a new one.

Decision I need to make now is if I like this shape enough to risk the more expensive plastic with the color/texture I like better.

top shell is approx 10 grams.
 

Attachments

·
Registered
Joined
·
562 Posts
It's gonna be tricky to get the button actuators lined up and functional. the way I check them in my io1.1 is remove the wheel and peer into the shell through the wheel aperture while the shell is on.

I did order the cog pcb wheel after I came across a suitable photointerrupter and example circuit. It is a reflective type, but I can separate the components. Maybe there will need to be a pinhole or slot obscurer, maybe not, if the cog spokes are sufficiently wide to compensate the led diffusion. The one piece photointerrupters would be too narrow at 5mm. the power consumption is hilariously overkill, but as long as it works it will do for prototyping.

because they are discrete components they can sink the input_pullup current without dying through overcurrent like the previous type I played with which were voltage output. they can then use the same circuit as the lk optical switches in the bloody and astrum mice.
https://www.aliexpress.com/item/32526995173.html
 

Attachments

·
Registered
Joined
·
1,787 Posts
Discussion Starter #97
If you add say 100k from pin 1 to pin 3 of that opamp, you probably can get rid of any software debouncing.

Though that sensor only has a single phototransistor, so you will need two of them to get direction.
 

·
Registered
Joined
·
562 Posts
The astrum doesn't use an opamp in this circuit, because the photodetector is part of a voltage divider it doesn't need voltage amplification, as all it is doing is switching the median 2.5v to 5v or 0v. I haven't used opamps successfully before so I am staying away from them if I can.
The hybrid mechanical and optical approach likewise eliminates any need for photointerrupter debouncing, as the light beam change will be treated as a Set in the SR latch terminology, if it occurs when the roller microswitch is pressed and when the roller microswitch releases, that will be treated as a reset, then wheel rotation will be incremented.

when the roller microswitch is pressed, if the light beam is not interrupted, and unpressed, wheel rotation will be decremented. This has the side effect of the encoder failing in a usable way, if the optical parts burn out, menus and weapons in games can still be cycled through, albeit in one direction only.

here is the lk switch datasheet page which bst provided. I am unsure what the function of the capacitor is, maybe noise immunity of some kind.
because the roller microswitch acts as one channel of the quadrature encoder, the other optical channel only needs a single type to get direction, the advantage here, being the hardy nature of the optical parts.
I realise it is a little hard to explain because I don't think anyone has made a hybrid encoder before.
 

Attachments

·
Registered
Joined
·
1,787 Posts
Discussion Starter #99
Third time's a charm. Used a bigger sheet, took more time heating it up, moving it a lot to avoid hotspots.

Was a little harder to get the plastic off the buck than the first two attempts, so I drilled a hole in the top and blew in some compressed air. Needed a hole there for scroll wheel anyway.

also took some photos of the vacuform setup. First photo has the most accurate color.
 

Attachments

·
Registered
Joined
·
2 Posts
Can you explain me what parts are you going to use to build the mouse... I am nottalkig about specific parts like sensor type and MCU type. But about everything you need to build mouse like that.
Something like this:
Sensor
MCU
micro switches...
Pretty much everything that is on PCB

Thank you...
 
81 - 100 of 158 Posts
Top