H2O flow meter is based on hall H2O sensor and the STM32L053R8 mcu.
Thanks to this SW/HW you can take under control your water consumptions.
The consumption are show via Virtual Com on the PC but are also stored in the internal EEPROM of STM32L053R8.
For this example we used the:
- STM32CubeIDE (ver.1.4)
- The Reference Manual for STM32L053R8 is here (RM0367)
- The Reference Manual for HAL/LL manual for STM32L0 library (UM1749)
Thanks the STM32 ecosystem is easy to transfer this project on other STM32
Below some images of the messages received on PC via Virtual Com.
The I/O used on NUCLEO-L053R8 are in the red boxes below.
NOTE: The jumper JP1 must be present if you power the NUCLEO via an external USB power supply.
- JP1 – must be present if you power the NUCLEO via an external USB power supply.
- D15/D14 – (PB6/PB7) are reserved for I2C
- D13 – (PA5) is the Green LED present on the NUCLEO
- A0 – (PA0) is ADC reserved for monitor external power supply
- D0/D1 – (PA4/PA2) are used for USART2 for communicate to the PC (Virtual Com via NUCLEO USB)
- PC13 – is the HALL input signal (also connected to B1, Blue Button present on the NUCLEO)
- D7 – (PA8) is reserved for Input
- D9 – (PC7) is reserved for Output
Below there is the pins allocation in the IOC file
Schematic is below, here there is the PDF file.
We display the result on the PC using Virtual Com port, thanks to emulator integrated in the NUCLEO board.
For more info concerning printf via usart see this tutorial.
- Functions explanation used in this project
- X-CUBE-RTC – Real Time Clock (RTC) software expansion for STM32Cube (AN4759)
- For more info concerning printf via usart see this tutorial.
- How to use – UART Interrupt
Power Supply NOTE:
- Use FIREFOX or CHROME for a clear view of the images present in this web site
- For enlarge the image press: CTRL +
For reduce the image press: CTRL –