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.

syncing sine, cosine, and reference at startup on AMC1210EVM

Other Parts Discussed in Thread: AMC1210

I have AMC1210EVM and trying to understand how to sync the carrier, cosine, and sine signals at startup.

 

  • Clay,

    I think you'll want to look at the Clock Divider Register (0x1B) of the AMC1210. You need to set up the signal generator (pattern register/clock divider), enable the signal generator (write a 1 to bit 10), select the filter module you want to sync with (bits 8-7), and then write a 1 to bit 9. Writing a 1 to bit 9 starts phase calibration, reading from the register will indicate if the device is still performing phase calibration or if it has completed phase calibration.

    Example 2 in the "Resolver Applications" section of the data sheet describes the process of setting up the device for resolver applications. Let me know if you still have any questions.

     

    -Kevin

  • Kevin,

    This sound exactly like the problem I've been trying to get some help with. I've implemented all the steps as outlined in the datasheet and app note. The problem I'm seeing is sometimes my value is 180 degres away from where is should be. This sounds like a phase calb issue. I'm wondering if there are timing or sequence of operations considerations that are not mentioned in the documentation. Ideally, I'd love to see some example code setting up the AMC1210 for a resolver application . I've searched the web for a week now with no results. Any help would be appreciated.

    Les

  • Les,

    Not too far in the future I should have some "sample code" ready for our evaluation kit for the AMC1210, which may or may not fit your application exactly but may help. Until then, I will see if I can dig up any answers toward your phase calibration issue.

    -Kevin

  • Les,

    Depending on where you are in your rotation the device may provide a 180 degree flip, which would be what you're seeing. What you will need to do is read your sine and cosine channels and determine which channel has the highest amplitude and run phase calibration with respect to that channel. When the amplitude of the channel you are calibrating against is too small errors can occur.

     

    -Kevin

  • Kevin,

    I did discover the in some situations the amplitude can be too low for the calibration procedure depending on resolver position and will be taking that into account. 

    In my case right now the resolver is static - positioned at 45 degrees - good amplitute on both sine and cosine. Sometime when I power up the system it reads the at or near 45 degrees - sometimes around 225. The angle may vary with +/- 5 degrees.  Have not noticed any pattern - quite random. Question: What should the sequence of events be:  trigger the PCAL and wait for it's status and then toggle the MFE ?   Should the MFE be in disable state until the very end of the start up sequence ? I"ll be trying the later this morning.

  • Kevin,

     

    Seems like made a little progress. I was not pulsing the RESET line of the AMC1210 prior to doing all the configuration.Previously

    I was just reseting my processor and not the AMC1210. SInce reseting the AMC1210 prior to config  I'm not seeing the 180 issue anymore.

    Still have start-up consistency issues. Resolver is not moving but - sometimes comes up a few degrees off from where should be.

  • Kevin,

     

    I'm getting accurate stable values now after playing with the timing delay used when syncing the integrators (setting MFE low then high).  Here is a outline

    of the steps I'm taking. Might be of help to others.


    Initialization Sequence for AMC1210

    - Pwr up
    - Normal Processor Init items: GPIO, SPI ( I'm using SPI to access the AMC1210 ), etc.

    - wait 500ms
    - pulse the AMC1210 Reset (RST) low (wait 1ms)  then high.
    - wait 100ms

    - load the Sine Wave Reference Pattern

    - Load the AMC1210 Configuration Registers. I'm using the same parameters
      as the example discussed in app note SBAA144.pdf with one exception. I
      believe the value loaded in register 0x1B should be 0x1C03 - this enables
      the MFE - this might be a bug in the example...
      Using channels 1 and 2:  Channel 1 - sine, Channel 2 - cosine
     
    uint8_t  DeviceConfig[] =
    {
     
    // reg  uppr lwr

       0x01,0x00,0x00,    // Filter 1
       0x02,0x0F,0x7C,
       0x03,0x07,0x0F,
                     
       0x07,0x00,0x00,    // Filter 2
       0x08,0x0F,0x7C,
       0x09,0x07,0x0F,
       
       0x19,0x03,0xE7,   // 1000 samples for carrier gen    // Control Register
       0x1B,0x1C,0x03   //  Clock Divider Register
                             
    };
       
     
     
    - wait 500ms for system to stabilize

    - load 0x1C03 into register 0x1B to reset the PCAL bit
    - wait 15ms
    - load 0x1E03 into register 0x1B to set the PCAL bit

    - wait 100ms

    - now looping and reading the PCAL bit until gone low.
      this step might be useless now since waiting the 100ms
      previously, but the delay above gave me more consistent results...
      
    - wait 500ms

    - load 0x1403 into 0x1B to clear MFE  - start integrator sync

    - wait 16ms  (this seems to be critical delay in my application. certain values
      cause serious errors in my final value. There is is some multiple of a time
      involved here - have not researched this enough yet.
     
    - load 0x1C03 to set MFE back high  
     
    - wait 250ms

    - (start data collection loop)

    - read Interrupt Register (0x00) and check to make sure data registers 1 and 2 have data.

    - if both have values, read them and store in buffers. I buffer 32 values and then compute average.
      use averaged sine and cosine values in arctan2 function to get angle. 

  • Les,

    Glad to hear everything is working! Thanks for your outline as well.

    -Kevin

  • Hi Kevin,

    It's been just about a year since I was working with this AMC1210 in a resolver application. I've had to come back to it because we are having problems

    getting consistent results out of our design. The prototype seemed fine but since then we have expanded to use two AMC1210s to measure two resolvers. 

    The AMC1210s share a common SPI port with separate SEL lines. The problem I'm having now is the timing of the setup of the device seems to be super critical.

    We have two resolvers - an Azimuth measuring one and an elevation measurement. We configure the Az first and then the Elevation. After setup the resolvers are read

    alternately - Az first and then 25ms later El and that repeats. The problem is with the Az cosine value (Data register 2)  - while keeping the resolver locked physically we may get one of two values for the Az cosine whenever I power up the system. Obviously this causes my resultant angle to changed by a degrees - which will not work.  I do not see this behavior on the El channel. I have changed the hardware and it still seems to follow the Az cosine value.

    Do you have a very detailed description of the configuration of the AMC1210 including sequence of register writing and any timing requirements ? I'm following the exact configuration in the AMC1201 app note for resolvers - even using 8Khz for my reference frequency. I'd love to get in touch with other user who have experience with this AMC1210.  I need urgent assistance with this.

    Thanks,

    Les Noel

  • Hello Les,

    Sorry to hear the AMC1210 is giving you issues. Luckily, since our last discussion I've had time to experiment with the AMC1210 pretty extensively. The EVM project I mentioned earlier in this thread was resumed and now the EVM is working it's way through the release process.

    Currently the AMC1210 has Rev. B silicon in production. Rev. B introduced the master filter enable (MFE) bit and the mechanics behind the phase calibration (PCAL) bit. The MFE bit was implemented in an effort to provide synchronization, a critical detail for resolver and current shunt applications, for the filter modules. This MFE bit works pretty well for current shunt applications because the integrator filter is often bypassed and data is produced directly from the sinc filter. The MFE bit only stops the sinc filter of all of the filter modules though, not the integrators.

    This is a considerable problem for resolver applications because they require utilizing the integrator filters in addition to the sinc filters to provide demodulation and integrated results over half period multiples of the carrier signal. As soon as an integrator is enabled it begins integrating regardless of the state of the sinc filter or the MFE bit. To overcome this problem you have to stop the clock to the delta-sigma modulator connected to the respective filter module (assuming the AMC1210 is RECEIVING a clock from the Delta-Sigma modulator). In the case of the EVM the clock for the ADS1205 is shared by the AMC1210, so I just stop the clocks to both devices. If the AMC1210 is providing a clock to your delta-sigma modulator then stopping the clock to the AMC1210 should work as well. An acquisition cycle for me looks something like this;

    • Disable clock to AMC1210 and to ADS1205
    • Reset the AMC1210
    • Load the Pattern Register
    • Program Control Registers (With MFE high!)
    • Program Sine/Cosine filter module registers
    • Enable the clock to AMC1210 and ADS1205
    • Write the PCAL bit high
    • Delay 200 clock cycles (50MHz MCU Clock w/32MHz AMC1210/ADS1205 clocks) to reduce digital noise on the device during phase calibration (this may not be necessary)
    • Begin looping and reading the PCAL bit, wait for it to fall low - but watching for a failure where PCAL does not fall low
    • Begin data acquisition

    The acquisition cycle itself looks like this;

    • AMC1210 ACK pin goes high
    • Read AMC1210 Interrupt register to determine which channel(s) produced data
    • Read appropriate AMC1210 filter module data register(s)

    I've got pretty consistent results under this scheme from one power up to the next. The data does vary a bit, but not much. The AMC1210 does not have any sort of internal memory to store results from a previous session, so there will always be a little bit of deviation.