Allegro Current Sensor LTspice Models
Interactive LTspice Models of Allegro Current Sensors
Kasey Hampton – Applications Systems Engineer
Manchester, NH
Revision History
Revision | Date | Comment | Responsible |
---|---|---|---|
1.0 | April 2020 | Initial Release | K. Hampton |
Abstract
Simple behavioral models for Allegro current sensors were developed to be simulated in LTSpice. The document explains how to import the device symbol into LTspice, how to change the model's sensitivity (among other device specific parameters), and how to create a simple test bench to assess the functionality of the model.
Procedure
Take the following steps to import, simulate, and modify the provided symbol for any of the included Allegro current sensor models.
- If the user does not already have LTSpice, the SPICE simulation software is free for download.
- After downloading the ALLEGRO_ACS_LT_Library.zip file, extract and save to a known local location. Included in this folder, is a subfolder labeled “lib”, along with this user guide.
- Copy this “lib” folder, and paste into the LTspiceXVII folder located in the documents section of the user's PC.
File Structure Example:
- lib (File folder)
- ALLEGRO_ACS_LT_Guide (Adobe Acrobat Document)
4. Open LTspice.
5. To place and use the current sensor model, open a new schematic by selecting the “New Schematic” icon ▶️ (or "File" ➡️ "New Schematic" or Ctrl+N).
6. Save the new schematic file to a known local location with a file extension of .ASC.
7. To place the generated symbol block, select F2 or “Edit” ➡️ “Component”.
8. This will open the “Select Component Symbol” dialogue window.
9. Open the “Allegro Current Sensors” directory by double clicking the folder.
10. Select the desired current sensor symbol (ACS followed by the three- or five-digit part number). The symbol and a description of the model will appear. Click “OK” to place the symbol.
11. After placing the symbol block, the user can generate a system specific test bench in the schematic file. The test bench below, for example, represents the ACS724 typical application. Each component, including resistors and capacitors, current supplies, and voltage supplies, were placed by going to the Select Component Symbol (F2), and placing the default LTSpice component.
Simulations
DC Analysis
Running a DC transient analysis allows the user to input a current step to the sensor and observe the proportional voltage output. To simulate and view the step response of the sensor, follow the steps below.
- Add a current supply to the schematic. Connect the current supply to the IP pins of the sensor by adding wires (F3). Right click on the current supply component. Select “Advanced”. Using the advanced settings of the current supply, the user can customize various characteristics of the input current step including the rise time and on time of the current pulse. Click “OK”.
- Ensure all other components in the test bench are given values. Right click on a blank portion of the schematic and select “Run”.
- The “Edit Simulation Command” dialogue window will appear, if this is the first simulation. Select the “Transient” tab. Enter a “Stop time”. Click “OK”.
Schematic for DC Analysis:
A schematic showing a current source (I1) connected to the IP+ and IP- pins of a U1 ACS724 component. The VCC pin is connected to a voltage source (V1) set to 5V. The OUT pin is connected to a load (C_LOAD) and a filter capacitor (C_F). The DUT_GND pin is connected to ground. The simulation command is set to '.tran 50u'.
5. Right click on a blank portion of the schematic and again select “Run”. A simulation window will appear. To view the input step, hover over the current supply and click the supply when the cursor resembles an ammeter. To view the voltage output, hover over the Viout pin and click the supply when the cursor resembles a probe. Note: it is helpful to add labels to nodes that will be probed, i.e Viout, VCC, and the applied current step. Click F4 or “Edit” ➡️ “Label Net” to place labels. When the node is probed, the user input label name will appear as the name of the simulation curve.
AC Analysis
Running an AC analysis allows the user to simulate the frequency response of the current sensor. To simulate and view the frequency response of the sensor, follow the steps below.
- Right click on the current supply component on the IP bus. Select “Advanced”. Using the advanced settings of the current source, the user can customize various characteristics of the supply. Add a value to the "AC Amplitude” characteristic. Click “Ok”.
- Ensure all other components pins of the symbol are given values. If no simulation has been run before, right click on a blank portion of the schematic and select “Run”. This will open the “Edit Simulation Command” dialogue window where the user can choose and customize the desired simulation. If an analysis has already been run, take the steps below:
- Right click the previous analysis command. The “Edit Simulation Command” dialogue window will appear.
- Select the “AC Analysis” tab.
- Input values for “Type of sweep”, “Number of points per decade”, “Start frequency”, and “Stop frequency”. Clicking “OK”.
3. The simulation commands will update and appear in the bottom left of the window.
Schematic for AC Analysis:
A schematic showing a current source (I1) connected to the IP+ and IP- pins of a U1 ACS724 component. The VCC pin is connected to a voltage source (V1) set to 5V. The OUT pin is connected to a load (C_LOAD) and a filter capacitor (C_F). The DUT_GND pin is connected to ground. The simulation command is set to '.ac dec 100 1k 10MEG'.
4. Note to run an AC analysis, the negative side of the IP bus should be grounded. This is a simulation condition.
5. Right click on a blank portion of the schematic and again select “Run”. The simulation window will appear. To view the frequency response of the sensor output, hover over the Viout pin and click the node when the cursor resembles a probe. The frequency response will appear in the simulation window. Here, the user can measure the bandwidth of the sensor.