Overclock.net banner
1 - 11 of 11 Posts

·
lololol
Joined
·
4,380 Posts
Discussion Starter · #1 · (Edited)
20210608_043301.JPG


tl;dr: custom firmware running on g305 + two mcu receiver (one for wireless, one for hs usb)


well, logitech conveniently included test points on the g305 pcb
that break out the mcu's debug port. which means that i can flash my own firmware onto the g305 after soldering on
an swd cable

code:

information about g305 and its hero sensor:

receiver board using nrf52810 + atsam3u:

mouse

the mcu of the g305 is the nrf52810.

the nrf52 radio has a fast ramp-up option
that allows the radio to start transmission 40us after enabling.

the radio packet size is 13 bytes (preamble:1, address:4, data:6, crc:2),
corresponding to 13*8 = 104bits. at 2 Mbps, this equates 52us on-air time.

so it is easily possible to transmit packets every 100us, which is well under
125us. actually it's possible to transmit even more frequently if the radio is
never disabled, but that wastes power. it is also possible to use a shorter
address and/or a 1 byte crc, at the cost of lower tolerance to
noise/interference.

receiver

it is necessary to use two mcu's as currently there is no mcu supporting both a
wireless radio and a high-speed usb controller.

here, the receiver consists of the nrf52840 dk
and stm32f723 disco
boards.

they are connected with a couple jumpers for communication over SPI

hero sensor "overclocking"

by default the hero sensor in the g305 is configured to run at roughly
1000 frames/s, and scales up to 12000 frames/s depending on the motion speed.

apparently, register 0x20
controls the maximum frame period (and hence, the minimum framerate) and can be
set such that the minimum framerate is slightly above 8000 frames/s.

main loop synchronization

both the phase and frequency of the main loop in the mouse are synchronized to
the CS pin in the receiver. this is accomplished by requesting and receiving
timing information at 1 second intervals, whenever the mouse is idle. (possible
to increase intervals to >30s once locked in.)

packets are received by the receiver in a timing window of less than 1us. this
allows the time between receiving the wireless data and putting it in the usb
cable to be minimized.


latency due to the fact that this thing is wireless
slightly less than 120us between when the mouse finishes reading from the sensor,
and when there's data in the usb cable. because the phase of the main loop in the mouse
is synchronized to usb microframes, the latency doesn't drift.
2513484

2513485



power consumption/battery life

will fill out details later. at 8kHz with overclocked sensor in motion, roughly 3x
higher consumption than stock firmware. at 1kHz, roughly 30-40% lower
consumption than stock firmware.

for the most part, this arose out of collaborating in a discord group chat with perigoso, snapplefish, and a couple others. if you're interested in messing with the firmware or electronics related to this, message me to join the group chat.
 

·
►¿¿¿
Joined
·
2,282 Posts
That is ****ing amazing work by you guys, hopefully mouse vendors picks up on this to let us get high performance wireless mice at some point
 

·
low IQ
Joined
·
53 Posts
by default the hero sensor in the g305 is configured to run at roughly
1000 frames/s, and scales up to 12000 frames/s depending on the motion speed.
Thanks for finally debunking the nonsense of all the sheep sperging out at anyone who claims these mice have excessive power saving.
 

·
Registered
Joined
·
20 Posts
by default the hero sensor in the g305 is configured to run at roughly 1000 frames/s, and scales up to 12000 frames/s depending on the motion speed.
the initial latency penalty due to this is pretty obvious and easily noticeable. what's insane is that many wired mice also do this. i guess saving 2 cent an year justifies the lag.
 

·
lololol
Joined
·
4,380 Posts
Discussion Starter · #5 ·
the weird thing with hero is that if i don't restrict framerate at all (register 0x20, value <= 5), the tracking suffers for slow movements. framerate is 9000 something. but if i restrict it to about 8300fps (set register 0x20 to 6), i can't tell any difference from the stock 1k fps setting (register 0x20, value = 50) for slow tracking.
 

·
Registered
Joined
·
5 Posts
Great job, going to order both dev boards next week to try this out. Quick google shows the g pro and the g pro x have the same test points on the pcb and are even labeled. i wonder if it uses the same mcu as the g305.
 

·
lololol
Joined
·
4,380 Posts
Discussion Starter · #7 ·
looks like nrf52840, which makes sense because nrf52810 doesn't have usb.

the same code should be usable with changes only to, makefile, linker script, and probably power initialization
 

·
Registered
Joined
·
49 Posts
This is brilliant :)
Is it possible to make a custom pcb instead of using the G305 pcb?
I'd love to put together a wireless custom pcb, but all I can find online is wired information (including your firmware).
 

·
lololol
Joined
·
4,380 Posts
Discussion Starter · #10 ·
well it's possible, but someone's gotta do it :p
if you have experience with pcb design, add me on discord
 

·
Registered
Joined
·
567 Posts
well it's possible, but someone's gotta do it :p
if you have experience with pcb design, add me on discord
don't know if you have seen this but someone has cracked the srom encryption on the adns 9800. i remembered you were trying the same on the pmw3360 which is similar
better download it before the site gets a cease and desist.
 
1 - 11 of 11 Posts
Top