This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR5989: ESI module doesnt detect rotation on water meter

Part Number: MSP430FR5989

Hello everybody!

I would like to ask for some help regarding the ESI module in msp430fr5989.

When I test my code, I use a metal screw as the "rotating disk", mainly so Set_DAC() function can complete. Then I can imitate the rotation with this screw.

However, when I connect my device to the water meter, it doesnt detect its rotation. I have no idea how to solve this problem.

The things I tried:

  • I increased the SEPARATION_FACTOR to 10 in Set_DAC() funtion
  • After determining the noise level, I tried to increase it
  • I tried to move the coils closer to the disc (less than 3-4 mm)

I also noticed that, if the noiselevel is less than 5, Set_DAC() completes without the rotating disc.

I think(only speculation) that the rotating disc is made from aluminum or tin.

I have read section 4.6 in SLAA639.

I am attaching some pictures and my code.

Any help is appreciated.

  ESI_MAIN_2LC_2020_01_30_e2e.zip

  • Hello ,

    I am looking into this and will get back to you.

  • Hello Balint,

    The magnetic distortion caused by rotation of the wheel of the meter is different to that one caused by your test setup. You would need to re-calibrate the setup with the meter. For that the meter would need to run... the wheel in its final mounting configuration needs to rotate...

    To do that you need an water circulation with a speed controlled pump; alternatively you could use a valve to throttle the flow... of what I've seen from your pictures your setup is able to do that.

    Johann

  • Dear Johann,

    I calibrate the setup every time I'm doing a test. 

    It makes no difference if I test the device on the water meter or with the screw. Also this doesnt make any difference if set_dac() completes without any rotation.

    I can provide more pictures of my setup if needed.

    Bálint

    EDIT:

    I have an exact same rotation wheel that is currently removed from the water meter, I can use that for calibration too.

  • Also, if calibration doesnt complete automatically, then I use for example the water meter to finish the calibration. After that, I rotate the water meter but I doesnt get any ESI interrupt, besides ESIIFG1, the ESISTOP flag.

    I think I might get wrong DAC values, but I couldnt prove it (and I dont know how to fix it), its just my theory.

    Bálint

    EDIT:

    In TSM_auto_cal funtion I struggle to meet this criteria: if (mathTemp > 12)

    If I manage to make past TSM_auto_cal, I noticed that if the noise_level is greater than 8, I cannot complete the calibration.

    If I complete the calibration, the difference between the upper and lower DAC values is between 2-6

    Is that the expected values?

  • Also, the code that I use was generated with FLOWESI GUI, and that used SMCLK=2MHz, since I use SMCLK=8MHz, I changed a few things:

    in ESI_TSM_INITPARAMS_DEFAULT structure, I changed ESI_TSM_SMCLK_DIV_1 to ESI_TSM_SMCLK_DIV_4

    I added 2 extra lines in esiConfig() function

    Hope this helps.

    Bálint

  • UPDATE:

    We figured out that we had a faulty capacitor on our custom board. It was responsible for some of the problems.

    The device can complete the calibration, detect the rotation and it counts the impulses correctly. However tests showed us, that if the device is constantly counting, after about  an hour it stops counting. The program doesnt freeze, if I move the coils a little bit closer it starts counting again. 

    I couldnt figure out what causes this, but I am thinking that the lack of recalibration is responsible for  this. Can someone confirm/deny this?

    • set_dac() still completes if noise level is less than 5 (is this an issue or is this intended?)
    • SEPARATION_FACTOR is 8
    • The difference between DAC1 upper and lower register is between 6 - 10

    Any help is greatly appreciated.

    Bálint

  • Can somebody provide me with some information/help?

  • Hi Bálint,

    coulf you request friendship... this would allow to close this case ofline with higher efficiency; the results will be postet here again later

    Johann

**Attention** This is a public forum