Hello everyone.
After short break I welcome you to my next blog as part of Experimenting with Gesture Sensors. Since writing my previous blog Blog #10: C Library for Low-Level MAX25405 Control I completed my second project: gesture controlled Pacman with custom swipe gesture detection algorithm. But I will describe it later. Now I want to spend some time with describing secret features of the MAX25405 sensor which I found but they are not documented in the datasheet. I originally found them when I was experimenting with GUI program from Maxim. If you remember my third blog at the end I shown window with possibility to manually change register values of the MAX25405 Gesture Sensor:
I was looking to the window and possible configurations. Very quickly my attention targeted CSEL option with values in pico farads. Even before I received my Kit, I carefully read the device datasheet, but I did not remember any option with values in pico fard units. So, I went to the datasheet again and searched (Ctrl + F) for pico fards and the only occurrence I found in electrical specification: input pin capacitance which of course is not the thing which I was looking for. At this moment I realized that there are some secrecies, and this toy (GUI tool) is more powerful than I originally thought. It can give me a hint to some undocumented MAX25405 features.
Search for a hidden bits
For a searching the hidden registry bits that correspond to CSEL option I tried to select different options and see how the registry values change. Computed values are shown in left column of the window. Initial state of configuration registers was 0x04 0x02 0x24 0x8C 0x08 0x0F 0x0A.
CSEL field allows four values (indicating that it is most probably 2-bit field):
I changed value from default 0.133 pF to 0.26 pF, wrote the new value to the device and check the new register values. The only register which changed is AFE (analog frontend) configuration register which changed its value form 0x08 to 0x18. This means that bit number 4 (counted from 0 changed) changed from 0 to 1.
I changed value from 0.26 pF to 1pF and value of AFE configuration register changed from 0x18 to 0x28 which means that bit number 4 changed back from 1 to zero and bit number 5 changed from 0 to 1.
Lastly, I changed value from 1 pF to 2pF. New AFE register value was 0x38 which means that bits 4 and 5 were set to 1.
Now I know that CSEL value is configured using AFE register and more precisely it is located in 4th and 5th bits. In datasheet AFE register is visualized as follows:
And Now I know that bits 4 and 5 are not the dashes, but rather they are useful field. Experimentally I deduced Reset value as 0b00 and Access Type look as standard Read, Write field.
From GUI software combobox labels I also know that value 0b00 correspond to capacitance 0.133pF, value 0b01 correspond to capacitance of 0.26 pF, value 0b10 means 1pF and finally 0b11 means 2pF.
Now the secret CSEL field was disclosed.
Side note: Effect of CSEL on Measured Values
Because this feature was not described in the datasheet, I was of course interested what does it mean. From name and values we can see that it is most probably some configurable selectable capacitor somewhere on the analog signal path(s). I setup fixed scene and collected screenshot in all 4 CSEL possible configuration of the same scene. Effect of this field on measurements is visible. When you increase capacitor value you get lower negative (efficiently higher) output values but you also slightly reduce intensity of the measured values of the object. I think this bits are good for supressing background objects. On the following picture you can see outputs for each of possible configurations:
More hidden configuration bits
CSEL is not the only undocumented feature. I used the same approach as described for CSEL bit for finding other bits. I tried all configuration options available in GUI window and checked if they change bits which are not described in datasheet. I found following 5 hidden configuration fields including already mentioned CSEL and one which is described, but GUI software give more information about it.
- MODE: two bit field (bits 0 and 1) in Main2 register. Possible values according to GUI SW are Super Prox, Gesture 4 and Tracking 60.
- CRST: single bit field (bit 0) in SEQ1 register. Possible values are Cap Flipping Enable and Disable.
- BIP: single bit field (bit 2) in AFE configuration register. Possible values are Unipolar and Bipolar.
- CSEL: described above.
- RZOFF: single bit field (bit 7) in AFE configuration register. Possible values are Return to Zero Enable or Disable.
- Coarse ALC: This register is mentioned in datasheet as “Factory use only. Set to 0”. Datasheet do not mention its meaning, but GUI software does. Possible values are 10 uA (default and recommended) and 5 uA (prohibited by datasheet). I followed the datasheet and did not try to set this bit to 1 because I do not exactly know what “Factory use only” mean and what are prerequirements and consequences of using this mode outside factory.
Trim Register
At last, there is one full register which is omitted in datasheet. GUI software show its value. It is referred as Trim register and most probably is programmed in factory. It look as read-only register. I think it is used for storing some calibration value. This value is most probably used only internally, and you do not need it for gesture detection. In my case it is programmed to value 0x38 on both sensors which I have.
Any other secret registers?
As we have seen there are large gaps in I2C address space. Address space is following:
Address range |
Purpose |
0x00 – 0x06 |
Configuration/Status registers. All mentioned in datasheet. |
0x07 – 0x0F |
Gap |
0x10 – 0x87 |
Output values for each pixel (60 pixels in total). Each pixel has 2 byte output. 120 bytes in total. |
0x88 – 0xA4 |
Gap |
0xA5 – 0xA9 |
Configuration registers. All mentioned in datasheet. |
0xAA – 0xBB |
Gap |
0xBC |
Trim register |
0xBD – 0xC0 |
Gap |
0xC1 |
Configuration register. Mentioned in datasheet. |
0xC2 – 0xFF |
Gap |
Gaps most probably contains some other registers but there are no references to them.
Library support
My library which I introduced in previous blog post contains support for configuring all hidden features described above.
If you want to experiment with these features, then feel free to use my library.
Conclusion
Thank you for reading this blog. In this blog post I described features which I found as part of experimenting with Maxim Integrated MAX25405 Gesture Sensor evaluation kit and they are not described in datasheet. I shown how I found them and one feature shown in detail. Other I listed.
Three days remains to the competition deadline. I already completed all my projects and experiments and now I only spend time with writing blogs. Before I describe my final project, I will spend one or two blogs with describing my own gesture detection algorithm which I implemented for my project. Then I will describe my project and then depending on free time I describe some my other experiments or in case of insufficient time I will just publish my competition summary. Thank you for your attention and stay tuned to my latest blogs.
Next blog: Blog #12: Time-driven Swipe Gesture Detection Library
Top Comments