Pmod ISNS20 Reference Manual
The Digilent Pmod ISNS20 (Revision A) is a small current sense module with a digital SPI interface. The board combines an Allegro ACS722 Hall Effect current sensor with a 12-bit analog-to-digital converter from Texas Instruments. The Pmod ISNS20 is quick, accurate, and easy to use for a variety of applications.
Download This Reference Manual
- High accuracy current sensor
- Measure current with 120Hz/20kHz/80kHz jumper selections
- ±20A DC or AC input
- Accurate to within ±2%
- 12-bit ADC
- 6-pin Pmod port with SPI interface
- Follows Digilent Pmod Interface Specification Type 2
The Pmod ISNS20 is designed to send current data over Serial Peripheral Interface to a host board. The Pmod ISNS20 sends a 12-bit digital value that represents the amount of current flowing through the terminal block. It should be mentioned that unlike reading voltage, current is read in series. This digital representation can be used in software or FPGA logic, displayed, or sent through a serial monitor.
Interfacing with the Pmod
The Pmod ISNS20 communicates with the host board via the SPI protocol. The 12 bits of digital data are sent to the system board in 16 clock cycles with the most significant bit first. For the ADC7476, each bit is shifted out on each falling edge of the serial clock line after the chip select line is brought low with the first four bits as leading zeroes and the remaining 12 bits representing the 12 bits of data. The datasheet for the ADC7476 recommends that for faster microcontrollers or DSPs, the serial clock line is first brought to a high state before being brought low after the fall of the chip select line to ensure that the first bit is valid.
Pinout Description Table
|5||GND||Power Supply Ground|
|6||VCC||Positive Power Supply (3.3V)|
The Pmod ISNS20 uses three wires to communicate with the host board. The wires used are Chip Select (CS), Serial Clock (CLK), and Data Out (DO) – also known as MISO. At 0.0 Amps, the ADC will return over SPI a value of 2048. At full negative current, a value of 0 will be returned, and likewise at full positive current a value of 4095 will be returned. Knowing this we can derive the equation needed in order to convert this signal into useful information.
The scaling value at the beginning of the equation was derived using the provided sensitivity of 66mV/A off of the ACS722 data sheet. Note that the provided sensitivity is based on a reference voltage of 3.3V to the sensor and our design provides a regulated 3.0V for a cleaner signal, so some more correction may be needed if absolute accuracy is needed. See the provided example code for an example on error correction implementation.
Table 2 below shows how to configure the sampling rate frequency. The current sensing chip allows either 20khz or 80khz sampling rate which is configured with Jumper 2. Enabling Jumper 1 turns on an analog filter to bring it down to 120Hz. The lower frequency is useful to keep noise down on <120Hz AC circuit applications, such as reading from mains power.
|Sample rate frequency configuration|
In order to read the amperage flowing through the ISNS20, the power source will need to be wired in series through the green terminal block, noting proper polarity indicated by the silkscreen on the PCB. An example of this is seen below. When using the ISNS20 for measuring Alternating Current (such as from mains), absolute care should be taken. Improper use of the ISNS20 on mains power can result in fire, injury, and even death – extreme caution should be taken.
Any external power applied to the Pmod ISNS20 must be within 3.0V and 3.6V; however, it is recommended that Pmod is operated at 3.3V.
The pins on the pin header are spaced 100 mil apart. The PCB is 1.3 inches long on the sides parallel to the pins on the pin header and 0.8 inches long on the sides perpendicular to the pin header.