fiduciary

Author Topic: CFX Motion Sensor going haywire  (Read 3473 times)

0 Members and 1 Guest are viewing this topic.

Offline Ben300

  • No Force
  • *
  • Posts: 10
  • Um...Hello?
CFX Motion Sensor going haywire
« on: January 10, 2020, 01:44:34 PM »
I'm having a bit of an issue with my saber. I purchased a Sabertrio Neo saber, which uses a CFX board (and a neopixel setup). Out of the box, it worked fine. However, after installing a new soundfont, I noticed that sometimes the motion sensor would start acting up, and when the blade was ignited it would start making sounds as if I was swinging the blade around wildly even if I wasn't moving it at all. In an effort to fix it I tried restoring the settings with RICE, but now the issue has not only not gone away, but it's happening all the time with every soundfont no matter what. I tried upgrading the firmware to the latest beta (1.0.003), but it didn't fix the issue (in fact it made it so the blade wouldn't even turn on at all), so I reverted back to what the saber came with (1.0.001)

I've read in a Facebook post from Sabertrio that this might be caused by an issue with the motion sensor, but it's mainly a software issue. From their post:

Quote
[CFX MOTION SENSOR GLITCH]

There has been a handful of reported cases where a Crystal Focus X equipped Neo Saber would exhibit one of the following symptoms:

- Clash sounds triggering even though the saber is stationery.
- Smoothswing sounds going haywire.
- No swing sounds playing.

The reason for this is due to a production variance of the on board motion sensor where certain pieces required just a little more time than what was given during the boot stage to initialize. Further compounding this was that battery charge level also played a part in influencing the timing required which made this issue hard to detect during production quality checks and testing. As a result, the motion sensor did not properly reset and started given false readings which then creates the symptoms as described above.

Since it was sort of working out of the box, is there perhaps something I can do to fix it manually on my end? I'm kind of new to this whole saber stuff, so any help would be appreciated. It would suck to have my first saber already struck by hardware issues ^^

Offline erv

  • Plecter Labs Inc. "Keeper of the Buttered Toast"
  • Manufacturer
  • Master Force User
  • *
  • Posts: 4920
  • Formerly known as Irvin PLECTER
    • Plecter Labs - Props Electronics
Re: CFX Motion Sensor going haywire
« Reply #1 on: January 11, 2020, 12:29:46 AM »
I'm having a bit of an issue with my saber. I purchased a Sabertrio Neo saber, which uses a CFX board (and a neopixel setup). Out of the box, it worked fine. However, after installing a new soundfont, I noticed that sometimes the motion sensor would start acting up, and when the blade was ignited it would start making sounds as if I was swinging the blade around wildly even if I wasn't moving it at all. In an effort to fix it I tried restoring the settings with RICE, but now the issue has not only not gone away, but it's happening all the time with every soundfont no matter what. I tried upgrading the firmware to the latest beta (1.0.003), but it didn't fix the issue (in fact it made it so the blade wouldn't even turn on at all), so I reverted back to what the saber came with (1.0.001)

I've read in a Facebook post from Sabertrio that this might be caused by an issue with the motion sensor, but it's mainly a software issue. From their post:

Quote
[CFX MOTION SENSOR GLITCH]

There has been a handful of reported cases where a Crystal Focus X equipped Neo Saber would exhibit one of the following symptoms:

- Clash sounds triggering even though the saber is stationery.
- Smoothswing sounds going haywire.
- No swing sounds playing.

The reason for this is due to a production variance of the on board motion sensor where certain pieces required just a little more time than what was given during the boot stage to initialize. Further compounding this was that battery charge level also played a part in influencing the timing required which made this issue hard to detect during production quality checks and testing. As a result, the motion sensor did not properly reset and started given false readings which then creates the symptoms as described above.

Since it was sort of working out of the box, is there perhaps something I can do to fix it manually on my end? I'm kind of new to this whole saber stuff, so any help would be appreciated. It would suck to have my first saber already struck by hardware issues ^^

Hello ben (thank you for your first post here),
I indeed have 2 boards that got reported to have that issue and the 10.003 fixed the issue clearly.
Do you mean that the issue is still there after updating (to the version from yesterday) ?


as for the saber not lighting up, you need to read the fw changelog and adjust your timings. A lot of things have changed since 10.001. It's now stabilizing in the config structure and parameters, and sabertrio (like others) will soon produce a standard package for their saber relative to the current fw version. But until we get a stable release, you have work to do in your configs.

Please let me know about the sensor. The 10.003 did fix the clash issue for us. For the gyro (unwanted swings) we don't have a board with that issue on hands, and it's still unknown if it's a HW issue or not.


Offline Ben300

  • No Force
  • *
  • Posts: 10
  • Um...Hello?
Re: CFX Motion Sensor going haywire
« Reply #2 on: January 11, 2020, 02:03:25 AM »
I'm having a bit of an issue with my saber. I purchased a Sabertrio Neo saber, which uses a CFX board (and a neopixel setup). Out of the box, it worked fine. However, after installing a new soundfont, I noticed that sometimes the motion sensor would start acting up, and when the blade was ignited it would start making sounds as if I was swinging the blade around wildly even if I wasn't moving it at all. In an effort to fix it I tried restoring the settings with RICE, but now the issue has not only not gone away, but it's happening all the time with every soundfont no matter what. I tried upgrading the firmware to the latest beta (1.0.003), but it didn't fix the issue (in fact it made it so the blade wouldn't even turn on at all), so I reverted back to what the saber came with (1.0.001)

I've read in a Facebook post from Sabertrio that this might be caused by an issue with the motion sensor, but it's mainly a software issue. From their post:

Quote
[CFX MOTION SENSOR GLITCH]

There has been a handful of reported cases where a Crystal Focus X equipped Neo Saber would exhibit one of the following symptoms:

- Clash sounds triggering even though the saber is stationery.
- Smoothswing sounds going haywire.
- No swing sounds playing.

The reason for this is due to a production variance of the on board motion sensor where certain pieces required just a little more time than what was given during the boot stage to initialize. Further compounding this was that battery charge level also played a part in influencing the timing required which made this issue hard to detect during production quality checks and testing. As a result, the motion sensor did not properly reset and started given false readings which then creates the symptoms as described above.

Since it was sort of working out of the box, is there perhaps something I can do to fix it manually on my end? I'm kind of new to this whole saber stuff, so any help would be appreciated. It would suck to have my first saber already struck by hardware issues ^^

Hello ben (thank you for your first post here),
I indeed have 2 boards that got reported to have that issue and the 10.003 fixed the issue clearly.
Do you mean that the issue is still there after updating (to the version from yesterday) ?


as for the saber not lighting up, you need to read the fw changelog and adjust your timings. A lot of things have changed since 10.001. It's now stabilizing in the config structure and parameters, and sabertrio (like others) will soon produce a standard package for their saber relative to the current fw version. But until we get a stable release, you have work to do in your configs.

Please let me know about the sensor. The 10.003 did fix the clash issue for us. For the gyro (unwanted swings) we don't have a board with that issue on hands, and it's still unknown if it's a HW issue or not.

Thanks for the reply

I tried updating the firmware again and fiddling with the settings. The blade not lighting up was indeed an error on my part, I didn't set the ledstrip parameter correctly. However, after doing the update this morning the motion sensor is not working at all now. It still recognizes clashes, but no swing sounds. Also the dragtip leds don't light up anymore. Meaning, when I set the ledstrip to 120 and the dragstrip to 20 (the blade has 140), those 20 leds at the tip of the blade don't light up.

I've tried reverting back to the firmware Sabertrio put in, the 1.0.001, but the issue remains the same: no swing sounds anymore. I'm honestly not sure if this is actually a software issue, or I got unlucky and got a defective gyro :(

Offline erv

  • Plecter Labs Inc. "Keeper of the Buttered Toast"
  • Manufacturer
  • Master Force User
  • *
  • Posts: 4920
  • Formerly known as Irvin PLECTER
    • Plecter Labs - Props Electronics
Re: CFX Motion Sensor going haywire
« Reply #3 on: January 11, 2020, 02:38:22 AM »
blade lenght in your case would be 140. Drag tip defines the size from the tip (as before).

thank you for confirming the issue you have about the gyro. It seems to be rather a HW issue with the gyro working or not working sometimes. I'll try to work with another person facing the same issue to try several FW experiments, to get a further diag of what is happening, then I'll keep people posted here for sure

Offline Ben300

  • No Force
  • *
  • Posts: 10
  • Um...Hello?
Re: CFX Motion Sensor going haywire
« Reply #4 on: January 11, 2020, 03:30:58 AM »
blade lenght in your case would be 140. Drag tip defines the size from the tip (as before).

thank you for confirming the issue you have about the gyro. It seems to be rather a HW issue with the gyro working or not working sometimes. I'll try to work with another person facing the same issue to try several FW experiments, to get a further diag of what is happening, then I'll keep people posted here for sure

Much appreciated :)

I'm keeping the 1.0.003 firmware installed for now. Like I said: everything seems to work, clashes included. It's just the motions, like swings, that don't. I looked at the debug logs too, and I does print out attempts to play the swing sounds, but no sound actually occurs (and I don't think they match my movement either, so not sure if that's a sign that something is working or not).

If you need me to perform some tests and report the debug logs let me know.

Thanks again

Offline erv

  • Plecter Labs Inc. "Keeper of the Buttered Toast"
  • Manufacturer
  • Master Force User
  • *
  • Posts: 4920
  • Formerly known as Irvin PLECTER
    • Plecter Labs - Props Electronics
Re: CFX Motion Sensor going haywire
« Reply #5 on: January 11, 2020, 03:38:44 AM »
really ? That's very interesting ? Would you mind emailing me your whole SD card structure please (zip archive by dropbox or other big file transfer service). If you get logs that it's trying to play sound but don't get them, it's something else and it means that the sensor is actually working.
Thank you

Offline Ben300

  • No Force
  • *
  • Posts: 10
  • Um...Hello?
Re: CFX Motion Sensor going haywire
« Reply #6 on: January 11, 2020, 04:17:21 AM »
really ? That's very interesting ? Would you mind emailing me your whole SD card structure please (zip archive by dropbox or other big file transfer service). If you get logs that it's trying to play sound but don't get them, it's something else and it means that the sensor is actually working.
Thank you

I mailed you my current SD card structure, and also an example log. Hope that helps ^^

Offline erv

  • Plecter Labs Inc. "Keeper of the Buttered Toast"
  • Manufacturer
  • Master Force User
  • *
  • Posts: 4920
  • Formerly known as Irvin PLECTER
    • Plecter Labs - Props Electronics
Re: CFX Motion Sensor going haywire
« Reply #7 on: January 11, 2020, 04:55:40 AM »
thanks a lot. From the log, it's indeed playing the smoothswing pairs fact which isn't triggered by the motion sensor. I'll try your package to see if it shades new light to the issue then report and eventually have you try a couple of test FW if you're happy to do so

Offline Ben300

  • No Force
  • *
  • Posts: 10
  • Um...Hello?
Re: CFX Motion Sensor going haywire
« Reply #8 on: January 11, 2020, 05:03:50 AM »
thanks a lot. From the log, it's indeed playing the smoothswing pairs fact which isn't triggered by the motion sensor. I'll try your package to see if it shades new light to the issue then report and eventually have you try a couple of test FW if you're happy to do so

I'll gladly help out however I can ^^

Offline Ben300

  • No Force
  • *
  • Posts: 10
  • Um...Hello?
Re: CFX Motion Sensor going haywire
« Reply #9 on: January 12, 2020, 11:33:03 AM »
thanks a lot. From the log, it's indeed playing the smoothswing pairs fact which isn't triggered by the motion sensor. I'll try your package to see if it shades new light to the issue then report and eventually have you try a couple of test FW if you're happy to do so

Just wanted to add one more detail I've noticed. When running the readsensor command I'm getting different values from the sensor that appear to be somewhat reasonable. The initsensor command doesn't report any errors either. However, after running the readsensor command a few times in a row the board did hang on me, and I had to remove the battery to force it to restart. Again, I'm not sure if this says anything about the issue, but it might be useful to know.

The log from me running the commands:

Code: [Select]
DEBUG Enabled
 WHO_AM_I_M = 3D - WHO_AM_I_XG = 68
 XG boot ended
 MG boot ended
 ACX -409 ACY -4879 ACZ 6997
 ACX -314 ACY -4462 ACZ 6727
 ACX -300 ACY -4556 ACZ 6596
 ACX -307 ACY -4616 ACZ 6593
 ACX -278 ACY -4377 ACZ 6659
 ACX -301 ACY -4558 ACZ 6609
 ->SLEEP
...

Offline erv

  • Plecter Labs Inc. "Keeper of the Buttered Toast"
  • Manufacturer
  • Master Force User
  • *
  • Posts: 4920
  • Formerly known as Irvin PLECTER
    • Plecter Labs - Props Electronics
Re: CFX Motion Sensor going haywire
« Reply #10 on: January 12, 2020, 12:32:48 PM »
thanks a lot for testing this. It's normal to have the sensor "crash" after polling it this way, that's a former test command that was never meant to be used in real time while the sensor is analyzed by the rest of the fw, but it remains handy to get some reading. I have to do the same for the gyro.

thank you for confirming again that the boot and init of the sensor go well, perfect !

would you mind testing those two voltages for me (with the black probe of the DMM on the main negative power supply pad of the CFX). That's more 14V you'll read on the +9V measure point.
thank you



Offline Ben300

  • No Force
  • *
  • Posts: 10
  • Um...Hello?
Re: CFX Motion Sensor going haywire
« Reply #11 on: January 12, 2020, 01:11:02 PM »
thanks a lot for testing this. It's normal to have the sensor "crash" after polling it this way, that's a former test command that was never meant to be used in real time while the sensor is analyzed by the rest of the fw, but it remains handy to get some reading. I have to do the same for the gyro.

thank you for confirming again that the boot and init of the sensor go well, perfect !

would you mind testing those two voltages for me (with the black probe of the DMM on the main negative power supply pad of the CFX). That's more 14V you'll read on the +9V measure point.
thank you



Unfortunately I don't have a DMM on hand. Also, Sabertrio put a warranty sticker on the board that covers part of it, so I can't do a reading without breaking it, and I'm not sure I wanna do that in case there is indeed a hardware fault and I need to return the saber. I'm not exactly an expert when it comes to installing sabers, so I don't trust myself with replacing the board on my own. Sorry about this :(

Offline erv

  • Plecter Labs Inc. "Keeper of the Buttered Toast"
  • Manufacturer
  • Master Force User
  • *
  • Posts: 4920
  • Formerly known as Irvin PLECTER
    • Plecter Labs - Props Electronics
Re: CFX Motion Sensor going haywire
« Reply #12 on: January 13, 2020, 09:06:51 AM »
here's something to try
http://www.plecterlabs.com/Media/CFSounds/V10/firmware/beta/CrystalFocusX-v10-work-10.003C-TestGyro.zip

that firmware will:
- deliberately pause at boot time for 2 seconds so that you have plenty of time for opening the serial port and observe the log
- display additional register contents info after initalizing the motion sensor
- log accel and gyro readings every 200 ms so that we can have a look to the values

set debug=0, info is printed regardless and that will make a shorter log with only what we need currently.

that's what you should have

[... some preamble with serial number etc]
Code: [Select]
SDHC init
high speed turbo mode clock = 50000000
SDHC turbo clock mode
File System Mounted OK
SDHC Init success
SPECS:Sectors 7744512 (3584MB)
SD Clock (CSD) 25000000 Hz
SD Clock 50000000 Hz
Type SD
SD Version 3.0
High Speed
Card Installed
Initialized
Plecter Labs Crystal Focus
v10.003C - 01/2020
Init Motion Sensor
XG boot ended: OK (waited 1ms)
M boot ended: OK (waited 1ms)
WHO_AM_I_M = 3D - WHO_AM_I_XG = 68
Success
Motion sensor Debug:
CTRL_REG1_G = 10111000
CTRL_REG2_G = 00000000
CTRL_REG3_G = 00000001
CTRL_REG4 = 00000011








Allocating DMA channel...DMA Ch# 0
Status: OK
I2S DMA Ch=0
I2S CLOCK source = 90312500
Setting up audio DMA transfer
Adding Audio DMA callback
[BOOT] Scanning SD contents:


then after boot ended (those are values for my motion sensor, board on the bench). Spinning / rotating the board or hilt should produce higher gyro numbers in the range of (easily or greater) 3000-5000 (peak is 32000 ish)

Code: [Select]
[BMP] found extra/UI/blade.bmp
[BMP] found extra/PLI/pli.bmp
[BMP] found extra/PLI/bar.bmp
[BMP] found boot.bmp
[ACC] -250 -27 7997
[GYRO] 28 26 18
[ACC] -242 -21 7992
[GYRO] 23 23 22
[ACC] 221 -25 7998
[GYRO] -24 -27 21
[ACC] 234 -33 8009
[GYRO] -26 -26 24
[ACC] 222 -40 8015
[GYRO] 22 23 22
[ACC] 226 -37 8005
[GYRO] 24 24 22
[ACC] 233 -18 8019
[GYRO] 24 27 23


Offline Ben300

  • No Force
  • *
  • Posts: 10
  • Um...Hello?
Re: CFX Motion Sensor going haywire
« Reply #13 on: January 13, 2020, 09:46:28 AM »
here's something to try
http://www.plecterlabs.com/Media/CFSounds/V10/firmware/beta/CrystalFocusX-v10-work-10.003C-TestGyro.zip

that firmware will:
- deliberately pause at boot time for 2 seconds so that you have plenty of time for opening the serial port and observe the log
- display additional register contents info after initalizing the motion sensor
- log accel and gyro readings every 200 ms so that we can have a look to the values

set debug=0, info is printed regardless and that will make a shorter log with only what we need currently.

that's what you should have

[... some preamble with serial number etc]
Code: [Select]
SDHC init
high speed turbo mode clock = 50000000
SDHC turbo clock mode
File System Mounted OK
SDHC Init success
SPECS:Sectors 7744512 (3584MB)
SD Clock (CSD) 25000000 Hz
SD Clock 50000000 Hz
Type SD
SD Version 3.0
High Speed
Card Installed
Initialized
Plecter Labs Crystal Focus
v10.003C - 01/2020
Init Motion Sensor
XG boot ended: OK (waited 1ms)
M boot ended: OK (waited 1ms)
WHO_AM_I_M = 3D - WHO_AM_I_XG = 68
Success
Motion sensor Debug:
CTRL_REG1_G = 10111000
CTRL_REG2_G = 00000000
CTRL_REG3_G = 00000001
CTRL_REG4 = 00000011








Allocating DMA channel...DMA Ch# 0
Status: OK
I2S DMA Ch=0
I2S CLOCK source = 90312500
Setting up audio DMA transfer
Adding Audio DMA callback
[BOOT] Scanning SD contents:


then after boot ended (those are values for my motion sensor, board on the bench). Spinning / rotating the board or hilt should produce higher gyro numbers in the range of (easily or greater) 3000-5000 (peak is 32000 ish)

Code: [Select]
[BMP] found extra/UI/blade.bmp
[BMP] found extra/PLI/pli.bmp
[BMP] found extra/PLI/bar.bmp
[BMP] found boot.bmp
[ACC] -250 -27 7997
[GYRO] 28 26 18
[ACC] -242 -21 7992
[GYRO] 23 23 22
[ACC] 221 -25 7998
[GYRO] -24 -27 21
[ACC] 234 -33 8009
[GYRO] -26 -26 24
[ACC] 222 -40 8015
[GYRO] 22 23 22
[ACC] 226 -37 8005
[GYRO] 24 24 22
[ACC] 233 -18 8019
[GYRO] 24 27 23

Alright, installed the firmware, and this is what I got at bootup:

Code: [Select]
[DISPLAY] not found
 MCU serial #: E36C3981:53385333:35202020:FF0E393B
 SDHC init
 high speed turbo mode clock = 50000000
 SDHC turbo clock mode
 File System Mounted OK
 SDHC Init success
 SPECS:Sectors 31116288 (15872MB)
 SD Clock (CSD) 25000000 Hz
 SD Clock 50000000 Hz
 Type SD
 SD Version 3.
 High Speed
 Card Installed
 Initialized
 Plecter Labs Crystal Focus
 v10.003C - 01/2020
 Init Motion Sensor
 XG boot ended: OK (waited 1ms)
 M boot ended: OK (waited 1ms)
 WHO_AM_I_M = 3D - WHO_AM_I_XG = 68
 Success
 Motion sensor Debug:
 CTRL_REG1_G = 11111111
 CTRL_REG2_G = 10001111
 CTRL_REG3_G = 11111111
 CTRL_REG4 = 11111111
 Allocating DMA channel...DMA Ch# 0
 Status: OK
 I2S DMA Ch=0
 I2S CLOCK source = 90312500
 Setting up audio DMA transfer
 Adding Audio DMA callback
 [BOOT] Scanning SD contents:

Not sure what the motion sensor debug messages mean, but they don't match.

As for the motion sensor readings, they do seem reasonable. Here's me holding it still:

Code: [Select]
[ACC] 256 -1663 7791
 [GYRO] -86 -952 -17
 [ACC] 253 -1653 7812
 [GYRO] 101 946 -27
 [ACC] 266 -1669 7810
 [GYRO] 83 953 -18
 [ACC] 271 -1665 7821
 [GYRO] 90 961 -14
 [ACC] 278 -1642 7776
 [GYRO] 79 961 -18
 [ACC] -272 -1649 7788
 [GYRO] 95 950 -8
 [ACC] 234 -1662 7769
 [GYRO] -93 -954 -16

And me moving it left and right a bit:

Code: [Select]
[ACC] 1033 -2044 5245
 [GYRO] 90 956 -21
 [ACC] 2489 -3057 6388
 [GYRO] 92 961 -13
 [ACC] -1024 -716 9292
 [GYRO] 92 964 -14
 [ACC] 3199 -2534 7532
 [GYRO] 84 955 -11
 [ACC] 2332 -1852 5500
 [GYRO] -90 -940 -18
 [ACC] -1482 -4815 9694
 [GYRO] -93 -949 -20
 [ACC] 5098 -950 9553
 [GYRO] -84 -953 -20

I hope this helped a bit ^^

Offline erv

  • Plecter Labs Inc. "Keeper of the Buttered Toast"
  • Manufacturer
  • Master Force User
  • *
  • Posts: 4920
  • Formerly known as Irvin PLECTER
    • Plecter Labs - Props Electronics
Re: CFX Motion Sensor going haywire
« Reply #14 on: January 14, 2020, 02:27:30 AM »
Another fw to try, it SHOULD provide proper readback of the sensor debug (in the middle of the boot log)

http://www.plecterlabs.com/Media/CFSounds/V10/firmware/beta/CrystalFocusX-v10-work-10.003C-TestGyro2.zip

please do the same as you did, ie hilt still, then hilt moving with shake/clash and some rotations. No need to have full amplitude moves, small gestures will work too

 

retrousse