̶D̶u̶m̶p̶s̶t̶e̶r̶ ̶m̶o̶u̶s̶e̶ ̶M̶1̶5̶0̶  Free 2.4GHz devboard (nRF24LE1 and CCD) - Page 1
Forum section: electronics / projects

author: RoGeorge
author_rank: Super Contributor
timestamp: August 14, 2023, 08:36:54 am
content: Found yesterday a Logitech wireless mouse M150 (without its receiver):There were 2xAA GP alkalines inside, one leaked. Dismantled out of curiosity (a single Philips screw to unscrew, located under batteries). The surprise was to find inside a programmable nRF24LE1 (8051 core with integrated 2.4GHz transceiver), and an optical sensor with available datasheet ADNS-2080 (22x22 pixels CCD). The optical sensor datasheets even has a typical schematic for a nRF24LE1 wireless mouse, and the radio protocol of the nRF24LE1 is the same as the one used in the very cheap nRF24L01 modules for Arduino.https://infocenter.nordicsemi.com/pdf/nRF24LE1_PS_v1.6.pdfhttps://www.mouser.com/datasheet/2/678/avagotechnologies_ADNS-2080-908926.pdfThe battery leak was easy to remove with some vinegar and a toothbrush. Then powered the PCB from a 3V lab supply to see if it works, it was taking about 15mA at first, then went down to 7mA, but the LED didn't lit.Damaged? Nope, the LED was IR, for a lower power consumption.Can be seen it's working when looking through a mobile phone camera.Since it has case/batteries/wireless/buttons and the optical sensor, could make a nice standalone data logger, or maybe a handheld scanner/small 22x22 webcam, or a very fast (~100 000 FPS) 1 pixel 7 levels digital photodiode, etc.Found how to improvise a nRF24LE1 programmer from an Arduinohttps://github.com/polkabana/nRF24LE1_ProgrammerLooking further for FOSS tools, to write nRF24LE1 (8051 core) code under Linux, but the Nordic's libraries seems to be for Keil only.I'm not familiar with Nordic MCUs, what's the way to start? What IDE/compiler/libs to use?

author: globoy
author_rank: Frequent Contributor
timestamp: August 14, 2023, 02:39:39 pm
content: Years ago I did a bunch of development with the 24LE1 but was too poor for Keil at the time so I used SDCC (https://sdcc.sourceforge.net/). It's actually a pretty good compiler for 8051 and has good documentation. I just ported over the appropriate chip-specific header files and used Make to build. I would occasionally look at the assembly it produced to find the best ways to optimize my C when necessary. FWIW, here are the flags I gave the compiler for the chip.Code:CFLAGS = --nogcse --model-large --std-c2x --code-loc 0x0000 --code-size 0x4000 --xram-loc 0x0000 --xram-size 0x400The nRF24LE1 was a fun chip. Simple enough that you could easily understand it (and the accompanying radio) but capable enough to do some real things.There's also a library that a guy named Brennen Ball wrote that might help you. Info athttp://blog.diyembedded.com/2010/06/nrf24le1-sdk-for-sdcc.html. And I made a programmer too:https://danjuliodesigns.com/projects/nrf_prog.htmlandhttps://danjuliodesigns.com/products/nrf_prog2.html

author: Nominal Animal
author_rank: Super Contributor
timestamp: August 14, 2023, 03:47:30 pm
content: It's those optical sensors or similar that I want. Three of them, specifically, so I could construct my own quaternion/bivector trackball using any ball of about snooker ball size, just sitting in a reader cradle; not captive. In normal use, would be nice to use it to pan and zoom; in 3D, would be optimal for orienting the work at hand.

author: RoGeorge
author_rank: Super Contributor
timestamp: August 15, 2023, 05:04:30 am
content: Quote from: globoy on August 14, 2023, 02:39:39 pmThat will come very useful, thank you for the SDCC hint.The download links (i.e.http://www.diyembedded.com/lib/nrf24le1/lib_nrf24le1_sdk_v4.0.zip) didn't work for me, but I could find and download the most recent SDK from Nordic.The good news is both the Keil C51 and the Nordic SDK can be used under Linux (with WineHQ).Didn't download yet anything into the nRF chip, but at least the demo projects from Nordic (for nRF24LE1) can be opened and compiled with the latest Keil C51 (which can be used free with some limitations).Just for the docs, adding here the install notes:Code:0. - download:- Keil from https://www.keil.com/demo/eval/c51.htm- Nordic nRFgo SDK 2.3 from https://www.nordicsemi.com/Products/nRF24-series1. - install Keil C51 (C51V961.EXE) with right click open with Wine- !!! change the default path to C:\Keil instead of C:\Keil_v5, because that is the path expected by the nRF Go SDK 'nrfgo_sdk_2.3.0_setup.exe'2. - install in Wine the nRFgo SDK (nrfgo_sdk_2.3.0_setup.exe)- !!! check the last checkbox, too, to copy the headers into C:\Keil\C51\INC\Nordic, in Linux that path will be found at:~/.wine/drive_c/Keil/C51/INC/Nordic- the installed Nordic SDK is in 'C:\Nordic Semiconductor', which in Linux will be at:~/.wine/drive_c/Nordic Semiconductor/- projects examples are in 'C:\Nordic Semiconductor\nRFgo SDK 2.3.0.10040\source_code\projects\nrfgo_sdk\', so in:~/.wine/drive_c/Nordic Semiconductor/nRFgo SDK 2.3.0.10040/source_code/projects/nrfgo_sdk/3. - install with Wine the nRFprobe (nrfprobe_v2_0_0_7252.exe), or else dll err at debug (ignore the install message asking for Keil v4, install it in Keil v5)Didn't try to program the chip yet. Starting with Keil first in order to minimize the unknowns. Once I'll have a Keil demo running on hardware, will switch to the SDCC.Quote from: Nominal Animal on August 14, 2023, 03:47:30 pmIn case you want the same optical sensors, apparently the Logitech Wireless Mouse M150 is still in production, often sold as a combo of wireless Keyboard+Mouse+2.4GHz receiver. I don't have the receiver, but I suspect that will have inside a nRF24LU1 (which is about the same chip as the nRF24LE1, but with native USB). Beware there is also a nRF24LE1 OTP, pin compatible but not reprogrammable. The mouse I've found has the 2011 date written on the PCB. More recent HW version might have different components, but it's very easy to open the mouse and check (one Philips screw under batteries, without braking any warranty seal).I've tried to picture the trackball you describe, but couldn't. What do you mean by trackball "sitting in a reader cradle; not captive". If the snooker ball can move freely, where should be the optical sensors sited?

author: Nominal Animal
author_rank: Super Contributor
timestamp: August 15, 2023, 11:21:03 am
content: Quote from: RoGeorge on August 15, 2023, 05:04:30 amConsider a ball sitting on a truncated triangular pyramid (tetrahedron), as in the attached picture.The sensors are located as near the peaks of the stand as possible.In theory, two would suffice, but using three one can reduce angular and directional jitter. (Or maybe it's just the symmetry that appeals to me. I could use two and a four-sided pedestal, but the three-sided one leaves more room for my fingers to dangle. Similarly, a larger support yields more precision, but I'd like my palm to be able to rest naturally over the sphere, without my fingers hitting the support base.)Logitech QuickCams for Mac, early webcams in the nineties, had a spherical camera with exactly such a truncated triangular pyramid/tetrahedron support made out of rubber.In a typical trackball, you'd just have one sensor at the bottom. However, most optical sensors cannot detectrotationin the sensor plane, i.e. rotation of the ball around the vertical axis. With two or more sensors, you can compute the rotation quaternion corresponding to the tangential delta vectors at each sensor. For non-3D use, the normal trackball movement would just pan/scroll, but that rotation would zoom in/out. Very useful in EDA on my non-dominant hand, dominant hand holding a mouse or hovering on top of a trackpad.

author: RoGeorge
author_rank: Super Contributor
timestamp: August 15, 2023, 12:00:27 pm
content: For some reason I thought the ball has to roll free on a surface.If the center of the ball is to sit at a fixed point, the easiest DIY would be to fix 1-2 mouse sensors near the surface of a ball from a former roll-on deodorant.Same mechanical ensemble, but with a lever stuck in it, would make a nice optical joystick, capable to sense relative tilting, plus rotation around the lever's axis.

author: Nominal Animal
author_rank: Super Contributor
timestamp: August 15, 2023, 02:18:57 pm
content: Quote from: RoGeorge on August 15, 2023, 12:00:27 pmOops. By "non-captive", I meant that I want to be able to just lift the ball out of the cradle, without it being stuck. Makes cleaning it much easier.Quote from: RoGeorge on August 15, 2023, 12:00:27 pmI prefer bigger, maybe tennis ball size. You do need at least two sensors measuring tangential displacement in a plane, and the accuracy for the axis of rotation is the better the further the sensors are from each other. With three, especially symmetrically positioned, you can increase the accuracy.Quote from: RoGeorge on August 15, 2023, 12:00:27 pmYou might use 9 degrees of freedom gyroscope chips for that. Those would also work for my trackball case, if I made it big enough to stuff a BT transceiver and an MCU, the sensor, and a battery or rechargeable LiPo cell or similar in it (maybe with inductive or capacitive charging). With an MPU9250, one might use small magnets or a magnetized iron inner structure in the charger to create a magnetic field defining the Y axis, with horizontal plane being the pan plane, and rotation in it (around a vertical axis) being the zoom. Acceleration against direction of gravity would change it from input device to stress ball.The 2-3 optical sensor approach is better in that all the electronics and logic would be in the cradle, and one could use basically any smooth accurate ball of suitable size. Making the three supports' distance adjustable, would allow adjusting for the ball size a bit.Apologies for semi-derailing the thread with my own musings!

author: globoy
author_rank: Frequent Contributor
timestamp: August 15, 2023, 02:28:15 pm
content: @RoGeorge - Sorry should have checked if links had rotted as they so often do. I have a copy of the SDK as well as Brennen's serial bootloader for the LE1 and LU1, and some demos. But it's all too large to attach here so if you want send me your email in a PM and I'll wetransfer the files to you.