The NJU9103 is ideal for processing sensor signals as it not only offers a large measurement range but also has very compact dimensions (just eight pins). It also has a 16-bit-ΔΣ A/D converter with sampling rates of 0.814ksps to 6.51ksps, with a differential input and optionally pseudo-differential input. With an SPI interface, parameters can be adjusted easily via a microcontroller. Signal analysis and signal synthesis can be easily performed with the corresponding evaluation boards of the front end and microcontroller and just a few passive components.
The evaluation kit of the NJU9103 from NJRC was originally designed for an STM32 NUCLEO-F411RE development kit. However, due to the omission of the GUI NUCLEO board for reading the Arduino interface, a PC is required to display the measurement results, so the NUCLEO board was therefore deliberately omitted to simplify the measuring system. To enable a user-centric demonstration, the STM32F429 discovery board was used instead.
Generation of the sine wave signal
In this arrangement the STM32F429 generates a PWM signal that is connected to the differential input of the NJU9103 via a single-pole low-pass filter and a voltage divider. The digital measurements are then sent to the MCU via the SPI interface and shown on the display. The combination of the demo boards - comprising the PGA, ADC, analog switch and calibration DAC - demonstrates the performance of the analog front end in terms of resolution, precision, gain and speed.
Configuration of the microcontroller
The MCU is configured using the PC-based STM32CubeMX software, while the AFE is programmed with the aid of the Keil MDK (Microcontroller Development Kit) or Atollic TrueSTUDIO. Commands and data can be transmitted via SPI-BUS.
ST provides the software required for this purpose on its website (www.st.com). Rutronik also recommends that developers use the board support packages.
Communication with the NJU9103 runs via the SPI1. The timer TIM3 generates the PWM signal, while TIM4 triggers the interrupt to display the measurements on a display.
To generate a precise PWM signal, the counters and prescalers in TIM3 must be defined and set beforehand. The output is configured as a pull-up. The frequency of TIM3 is configured using the APB1 (Advanced Peripheral Bus) clock signal. It should be noted that only the APB1 interface has the maximum clock frequency available for the timer TIM3.
To synthesize the sine wave signal, the PWM signal (duty cycle) must be generated in an array. To filter or smooth the PWM signal, a low-pass first-order filter (1kOhm//1µF) with a 3dB point at 1kHz is used. The ohmic voltage divider can be selected in the AFE depending on the selected gain stages of the PGA. A sine wave signal is then sent to the output. It should be noted here that the maximum supply voltage of 1V must not be exceeded at the differential input of the AFE.
Programming the NJU9103
Once the demo board has been configured with CubeMX, the SPI interface and display are initialized, for which the board support package offers many useful functions to facilitate operation.
When configuring the registers of the AFE via the SPI interface, developers must heed an important point from the data sheet, namely that only bits 4 to 7 can be defined for the corresponding addresses of the registers, as opposed to the entire byte as would typically be the case. The registers can be initialized as described in the data sheet. Timer TIM4 is used to set the sampling frequency of the ADC. As per the Nyquist theorem, the sampling frequency is dependent on the signal frequency to be measured. The sine wave signal can be visualized with the aid of a connected display.
The combination of the two demo boards in this configuration is an ideal platform to demonstrate the performance of the new AFE from NJRC. This build also shows the diverse opportunities offered for sensor signal processing in the wide range of applications.
Find components at www.rutronik24.com.
Subscribe to our newsletter and stay updated: www.rutronik.com/newsletter