Professional Documents
Culture Documents
Week 4
Week 4
July 5, 2023
EVM430-FR6047 MAXREFDES70
Manufacture Ti Maxim Intergrated
Host MCU MSP430FR6xxx Silicon Labs EFM32ZG110F32
Analog frontend Built in MAX35101
Design All in one SOC Separated component connected via SPI
Expansion Easily accessible header Header protected in case, fewer pins
Noise reduction No Yes
Specialies real time clock Tamper resistance, RTC, scheduling
Toolchain support Ti-CGT and GCC GCC
Documents Available Available
Hardware Design
Software Implementation
main() begins with initializing the host and send configuration info to MAX35101
while(1) section only execute a state machine to control a screen
Most of calculation only happens when the MCU sees the INT pin got asserted by
MAX35101
This action trigger an interrupt, which is where the important bit resides
Initialization Details
main() begins with initialize the main MCU and setup SPI bus and GPIO for built in
buttons as well as INT pin
Next, it blinds reset the MAX35101 and calls a different init routine which init the
MAX35101
Details of this routine will be explained in next slide
Then it set the MAX35101 to periodically measure data and enter while(1).
Interrupt Details
The reference source have 2 interrupt source, GPIO interrupt and timer interrupt
The timer interrupt routine only increment a timer counter.
The GPIO interrupt routine lives in GPIO EVEN IRQHandler()
GPIO EVEN IRQHandler() check the GPIO interrupt flag to see if the interrupt come
from the INT pin assertion or not
If this is the case, it will go to calculation routine to calculate velocity and volumetric flow.
Calibration
Calibration
Calibrate the MAX35101 timer can be
done automatically by sent a calibration
command to it
According to documents from Maxim
Integrated, calibration of the meter can be
done by creating volumetric correction
gain table used in formula (3)
This table can be created by measuring
with reference meter 24 time with 24
different, increasing flow rate together and
calculate the offset gain needed
This table can be written to
VOLUMETRIC FLOW CORRECTION TABLE
array in LookUpTable.h
Week 4 Report July 5, 2023 20 / 34
Accuracy
Accuracy
Accuracy
Due to lack of data, the model for the initial state have few problems as stated below:
We only have the velocity of the water flow. This is a difficult to model only the velocity
of the flow as a 1x1 matrix for the filter.
Attempts were made to make the model has the inital state as a 2x1 matrix. But not yet
known what is the derivative of velocity.
Most of the papers we encountered were mostly using a matrix 2x1 to represent the initial
state. And very little information about the model we are working with, which is
ultrasonic water flow.
There is a paper about ultrasonic water flow applied with Extended Kalman filter. But:
It use another factor with velocity, which is temperature.
Since our model does not measure temperature, we cannot extend this idea further unless
we know what is the second state variable for the model.
Since there’s currently no data on the second state variable. Our sample code could not
be used.
MAX35101
Hardware digital filter
Software digital filter
MAX35101
MAX35101
Hardware filter
We could design a hardware filter or use another filter chip to process data. Some examples
are listed here:
HSP43220: a linear phase low pass decimation filter which is optimized for filtering narrow
band signals in a broad spectrum of a signal processing applications. Use FIR filter.
SM5846AP is a multi-function digital filter that incorporates 4/8 times oversampling
digital audio signal reproduction, digital deemphasis, digital attenuation and soft mute
functions. Use IIR filter.
Further reading about this section is required.
Software filter
Performance Comparison
Suggestions
Error result