Arduino library for AS60xx ultrasonic flow converter sensor family from ScioSense.
The AS60xx sensor family from ScioSense offers ultrasonic flow converters for the next generation of ultrasonic water, gas, and heat meters. The sensors come in the size QFN48 package with digital SPI interface. This enables new use cases in single-chip solution provided ready flow information, system design compatible with mechanical meters, high flexibility in choice for external μC handling communication and further data management, precision down to low flow rates and leakage detection.
- Latest datasheet and application notes are on ScioSense site
- Buy the AS6031 on Mouser or Digikey
- Buy the AS6031F1 on Mouser or Digikey
- Buy the AS6040 on Mouser or Digikey
- Buy the AS6031 ST evaluation kit on Mouser
- Buy the AS6040 ST evaluation kit on Mouser
- Further information about the AS6031
- Further information about the AS6040
It is assumed that
- The Arduino IDE has been installed. If not, refer to "Install the Arduino Desktop IDE" on the Arduino site.
- The library directory is at its default location. Normally this is
C:\Users\[your_username]\Documents\Arduino\libraries
.
- In the Arduino IDE, navigate to the Arduino Library Manager on the left side (or, alternatively, select Sketch > Include Library > Manage Libraries...)
- Search for
ScioSense_AS60XX
- Select the library from the search results and press
Install
- Download the code from this repository via "Download ZIP".
- In Arduino IDE, select Sketch > Include Library > Add .ZIP library... and browse to the just downloaded ZIP file.
- When the IDE is ready this README.md should be located at
C:\Users\[your_username]\Documents\Arduino\libraries\ScioSense_AS60XX\README.md
.
Please make sure that you use the correct supply voltage: The AS60xx sensors run at VDD = 3.3V, but the ST Nucleo Shields are prepared to work with a supply voltage of 5V. The connections for the ultrasound transducer and temperature sensors can be found at the UFC ST Nucleo Shields - Expansion Boards User Guide. The 02_Ultrasound_and_Temperature example is prepared to measure two PT1000 sensors.
This example shows how to wire an ESP32 with a AS60xx ST Nucleo Shields to communicate through SPI.
AS60xx_ST | ESP32 |
---|---|
VCC | 5V |
GND | GND |
- | - |
- | - |
SSN | 5 |
MOSI | 23 |
SCK | 18 |
MISO | 19 |
INTN | 2 |
To build an example sketch
- (Re)start Arduino.
- Open File > Examples > Examples from Custom Libraries > ScioSense_AS60XX > 01_Basic_Ultrasound (or any other of the provided examples you wish to run)
- Make sure Tools > Board lists the correct board.
- Select Sketch > Verify/Compile.
Contributions in the form of issue opening or creating pull requests are very welcome!