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.

AFE539A4EVM: Failing to enter PI

Part Number: AFE539A4EVM
Other Parts Discussed in Thread: AFE539A4, LM5176

Tool/software:

Hi there,

I have been playing with some AFE539A4EVMS with an LM5176EVM to protoype and test a TEC module. I had an issue early on connecting to the SMART_DAC GUI, but previous customer support was very helpful in resolving this.

I have been coming across an issue, however, where I can't seem to get the module to enter into PI mode. I have tried changing the common-mode and setpoints to the expected values from thermistor tests, but the DAC remains in Fixed-output. I also tried doing some low-configuration tests based on the information in the AFE datasheets and this article from TI, https://www.ti.com/lit/an/slaae59/slaae59.pdf?ts=1750885232549&ref_url=https%253A%252F%252Fwww.google.com%252F

So far, I have seen two EVMs break and fail to communicate with the GUI again even when the USB IC is replaced, and tests have been inconclusive for entering PI. I would greatly appreciate advice in how to program through the GUI, and I look forward to speaking with others further.

Sincerely,

Kelvin De Leon

  • Hi Kelvin, 

    The device has an internal comparator to set the DAC output to a safe mode in overcurrent events. It looks like the EVM has a pullup on this input. Can you try toggling the comparator polarity? Perhaps the device is reading the comparator output as high and holding the device at the safe output. Or you can just try pulling the pin low externally. 

    In the GUI, is the state machine enabled? This is required to run the PI loop. 

    Best,

    Katlynne Jones

  • Toggling the comparator seems to be the solution, thank you so much

  • Hi Katlynne,

    I apologize in advance if I made another silly errorr, but I would greatly appreciate assistance again.

    I have been playing around wtih the AFE PI mode, and have seen the DAC levels change with the Setpoint, KI, KP, and common mode, but I haven't seen the expected dynamic behavior from the AFE. The settings seem to just choose a 'fixed output' without changing, so I was wondering if theres anything else I may be missing to get this to work to test this better.

  • Hi Kelvin,

    Do you mean when you change the KP and KI terms the output voltage changes? 

    Do you have the AFE in a closed loop system? The AFE tries to adjust the DAC output so that the closed loop path causes the ADC input to reach the target setpoint. If you have a static input on the ADC, you'll get a static DAC output, or a runaway DAC output depending on the KP/KI terms you've chosen.

    Best,

    Katlynne

  • Hi Kelvin,

    Do you mean when you change the KP and KI terms the output voltage changes? 

    Do you have the AFE in a closed loop system? The AFE tries to adjust the DAC output so that the closed loop path causes the ADC input to reach the target setpoint. If you have a static input on the ADC, you'll get a static DAC output, or a runaway DAC output depending on the KP/KI terms you've chosen.

    Best,

    Katlynne

  • Good morning Katlynne,

    For my tests, I am aiming for 30 degrees on a TEC which requires a common mode of x1D2  for a setpoint of 2BC, or 2.31 Volts for 1.24 Volts.

    I am taking in a thermistor value to the ADC from the TEC which lowers as the temperature rises, and a lower Voltage from the DAC raises the temperature in my system. I set the loop polarity to true because of this.

    I found that changing the KP and KI will change how intensely itll rail towards the setpoint, but i won't see the DAC try to change when the ADC passes it. Changing the setpoint and common mode give similar results, but I haven't been able to find settings to see a desired PI test result to build from

    I appreciate any help once again, 

    Sincerely,

    Kelvin De Leon

  • Hi Kelvin, 

    Sorry for the delay here. I'm still a bit confused. Can you share a schematic of your configuration with the EVM and the TEC? And can you capture the DAC output changing with respect to the ADC input on a scope? It seems like the DAC is responding to the change in ADC, so I guess I don't understand what the actual issue is. 

    Best,

    Katlynne Jones

  • No worries, and I have it connected like this, where I take the DAC to a buck-boost and the thermistor to the ADC.

    I am seeing a common mode of x1D2 to hit 30 degrees celsius by longterming, with the ADC reading 1.2V when I have Kp and Ki at 0. The problem I'm noticing is that the DAC output won't change with respect to the ADC, as the output seems to only be dependant on the common mode, Kp, Ki, and setpoint.

    I checked with the oscilloscope too, but the DAC stays a constant voltage no matter the Kp and Ki I use. I see the ADC changing with the temperature, but no matter how long I let it run, the DAC won't try to go back to the setpoint regardless of the Kp values I have tried.

    I believe the ADC is being recognized as 0 V, which would explain why the values are railing and steady; when I put the setpoint to x000, the output is the common_mode, but elsewhere, the circuit tries to rail the DAC towards the 0 setpoint. I dont believe the issue is hardware/setup, because I am seeing the thermistor reading on the AFE directly, and everything else in the system is working appropriately. The AEN is also pulled up to 5V, and the rest of the equipment I'm using are the LM5176 EVM, SMART_DAC_DIY, TEC with thermistor, and the AFE539A4 EVM.

    I hope I'm missing something obvious, but I look forward to working on this further with you

    Sincerely,

    Kelvin De Leon

  • Hi Kevin, 

    Thanks for the additional details. I would ask if you're sure the state machine is running (register 0x27 has 0x0003),but given that the output is responding to changes in the setpoint then the state machine is running. 

    Are these the settings you're currently using? Make sure channel D/3 is powered up. There is only one ADC in the device, and this channel can be considered as the "global ADC". The ADC on channel A/0 that is used for the control loop is actually muxed to channel D, so it will not work unless channel D/3 is also enabled and powered on in voltage mode. 

    Also make sure the ADC input type in the SRAM Parameters section matches how you have the input type for channel A configured. 

    Best,

    Katlynne Jones

  • I am, i make sure to disable and re-enable after every change. I have tried playing around with those settings, and I was getting the same static results. I will keep it enabled from now on, but I still don't see the expected behavior of the DAC changing values no matter how high my Kp is. 

    I will buy three more EVMs, because maybe all of mine have broken, but I would really appreciate a definitive guideline for how to set this up. I have previously checked through datasheets and the TEC closed loop tutorial, which have conflicting pseudocode/register values for common-config and the DAC-x-VOUT register with eachother. 

    This the latest among a series of tests I have tried, where I didn't see any dynamic behavior after several minutes. I have also tried shorting several places on the SMART-DAC and EVM, with failing results for every test. I would appreciate feedback for what I may be missing or may be necessary moving forward, as I am still stuck with the PI consistently failing.

    AFE539AEVM 

    SmartDAC-DIY EVM

    I understand this is alot of time to 'waste' on one person, so I really appreciate the help as you can. 

    Sincerely,

    Kelvin De Leon

  • Hi Kelvin, 

    Not a problem! Thanks for your patience as well. 

    The EVM comes out of the box with the state machine running and the default settings as shown in the datasheet. 

    When you get the new EVM I'd recommend stopping the state machine with the drop down in the GUI, and then going to the low-level page and selecting read all. This will get all of the current register settings in the device. You can save these settings by selecting file -> save config so you can refer to these settings later. Just remember to always stop and then restart the state machine before updating the settings. 

    After you've done that, I'd recommend toggling the comparator polarity as you did earlier in the thread so that the state machine is not stuck in the "safe output mode"

    Then, I'd recommend connecting a DC source from 0-5V to the ADC input pin and then monitor the DAC output to verify that it is changing proportionally with the change to your ADC input. You can play around with updating the Kp, Ki, loop polarity, common mode, and setpoint at this time to verify that you see the DAC output respond to the change in settings. Remember that you can change the setpoint and common mode in the dynamic register locations, but any other parameter in the SRAM register space will only take effect if you disable then re enable the state machine. 

    Only after you have verified the AFE EVM is working on its own would I recommend you connect your DCDC to the DAC output. Then after that I would connect your NTC and attempt the closed loop control. 

    The pseudo code example at the end of the datasheet is just an example and does not reflect the default settings of the device. They don't match, but both should be valid setups. 

    I think one of the most important things before connecting your DCDC is to make sure the R1, R2, R3 feedback network is configured correctly so you get the DCDC output you want from the DAC output. Your NTC range also needs to be in the range of the ADC. The default ADC range is 0-VDD which should be 5V on the EVM unless you are powering it externally, but you can change this if necessary. 

    Best,

    Katlynne Jones

  • Hey Katlynne, the tests with the new boards seem to be working, and the advice with the DC supply for the ADC and saving configuration files were very helpful.

    I appreciate all the helpSweat smile, I feel more confident in designing with this, and in general, moving forward.

    Sincerely,

    Kelvin De Leon

  • Hi Kelvin, 

    Great! Feel free to reach out if you come across more questions. 

    Best,

    Katlynne