A STM32F428I-DISC1 based sonar which implements the HC-SR04 ultrasonic sensor and a mini-servo

Overview

STM32 Sonar

STM32 Sonar

Youtube

This is a Sonar based on the STM32 microcontroller. It uses the following parts:

  • STM32F428I-DISC1 Devboard
  • HC-SR04 ultrasonic sensor
  • Generic mini-servo motor

Two hardware timers of the STM32 are implemented, one for measuring the ECHO of the ultrasonic sensor, one for generating the PWM to drive the servo. One GPIO pin is implemented to send the trigger signal to the ultrasonic sensor. In software, FreeRTOS is used for multi-threading.

Source code

The following is a list which shows files that could be of interest to you if you are inspecting the source code. Most of the code in the repository is pre-generated by TouchGFX/STM32 software, so this is a quick glossary of the files where I've actually written code.

  • core/src/main.c
  • STM32CubeIDE/Application/User/hcsr04.c (and the corresponding .h file in core/src/inc)
  • STM32CubeIDE/Application/User/PWM.c (and the corresponding .h file in core/src/inc)
  • TouchGFX/gui/src/home_screen/homeView.cpp

TODO

  • More detailed code comments, explaining the workflow etc.
  • Calculation of the coordinates for the shapes on the screen that make up the sensor readings can be done in a separate thread.
  • The calculated coordinates should really be saved in the 'zones' variable. Declaration of the array of TouchGFX shapes and their painters (PainterRGB565), required to update the screen, should also not be done in the screen refresh callback, but I've had trouble making it work that way.
Owner
Robert Sorić
Comp. Eng. graduate from Osijek, Croatia. Passionate about embedded software development and music.
Robert Sorić
DIY Zigbee CC2530 Motion sensor (AM312/ AM412/ BS312/ BS412), Temperature /Humidity /Pressure sensor (BME280), Ambient Light sensor (BH1750), 2.9inch e-Paper Module

How to join: If device in FN(factory new) state: Press and hold button (1) for 2-3 seconds, until device start flashing led Wait, in case of successfu

Sergey Koptyakov 5 Feb 13, 2022
DIY Zigbee CC2530 Motion sensor (AM312/ AM412/ BS312/ BS412), Temperature /Humidity /Pressure sensor (BME280), Ambient Light sensor (BH1750), 2.9/2.13/1.54 inch e-Paper Module

How to join: If device in FN(factory new) state: Press and hold button (1) for 2-3 seconds, until device start flashing led Wait, in case of successfu

Sergey Koptyakov 28 Jul 27, 2022
An ultrasonic 3D scanner

An Ultrasonic 3D Scanner Detailed build log and infos on my website If you're looking for instructions detailed enough to build it for yourself, just

Alex Toussaint 42 Feb 24, 2022
Quartz Arc codebase for STM32F769I-DISCO and STM32F769I-DISC1 development boards

QuartzArc_STM32F769I_Discovery Quartz Arc codebase for STM32F769I-DISCO and STM32F769I-DISC1 development boards This codebase is covered by Creative C

1s and 0s 3 Apr 23, 2022
Quartz Arc codebase for STM32F429I Disc1 development boards

QuartzArc_STM32F429I_Disc1 Quartz Arc codebase for STM32F429I Disc1 development boards This codebase is covered by Creative Commons CC-BY-NC-SA licens

1s and 0s 2 Nov 25, 2021
My new zigbee project. Wireless temperature and humidity mini sensor with electronic ink display 2.13 inches, low power consumption, compact size, enclosure with magnets.

My new zigbee project. Wireless temperature and humidity mini sensor with electronic ink display 2.13 inches, low power consumption, compact size, enclosure with magnets. The device use SHTC3 sensors, chip CC2530, battery CR2477.

Andrew Lamchenko 13 Feb 22, 2022
Sensirion Mass Flow Sensor Arduino library, modified from MyElectrons and Nabilphysics Arduino repositories for SFM3300 Digital Mass Flow Sensor

Sensirion Mass Flow Sensor Arduino library, modified from MyElectrons and Nabilphysics Arduino repositories for SFM3300 Digital Mass Flow Sensor. When the sensor data gets stuck, the library has a hard reset function to ensure that it is read continuously.

Paul Ryan Santiago 3 Apr 11, 2022
Zerobug is a 3D-printed micro-servo hexapod robot powered by a Raspberry Pi Zero and a STM32F103

ZeroBug - DIY Hexapod Robot Zerobug is a 3D-printed micro-servo hexapod robot powered by a Raspberry Pi Zero and a STM32F103. The Pi Zero is in charge

Max K 141 Aug 2, 2022
Tiny and cheap robot car for inspecting sewer pipes >= 125 mm. With pan servo for the ESP32-Cam module

ESP32-Cam Sewer inspection car Version 1.0.0 - work in progress Based on esp32-cam-webserver by Owen Carter. Additional Features Pan servo for the ESP

Armin 3 Feb 17, 2022
4 channel servo controller code for Arduino Mega 2560 for AASD-15A and similar motor driver

eh-msc-4dof 4 channel servo controller code for Arduino Mega 2560 for AASD-15A and similar motor driver Arduino sketch for generating pulses needed to

null 4 Jan 8, 2022
multispectral monitoring of a sourdough starter; esp32 eink module, scd30 co2 sensor, vl6180 distance sensor

EINK STARTER MONITOR See full blogpost here Tracks height of starter with a VL6180 i2c distance sensor, and CO2/temperature/humidity with an SCD30. A

AKA 15 Feb 16, 2022
Servo library with stm developed by the Liek Software Team. We are working on new versions.

Liek-Servo-Library Liek Servo Library is a library that makes it easy for you to drive servo motors with STM32F10x series cards. The library is still

null 14 Jan 13, 2022
CRServoF - The CSRF serial protocol to PWM servo converter

CRServoF - The CSRF serial protocol to PWM servo converter I wanted to create a small project to mess around with PWM servo output for ExpressLRS, and

Bryan Mayland 84 Aug 3, 2022
visual servo for mars rover

Mars_Rover visual servo for mars rover Start the simulation without mars environment roslaunch curiosity_mars_rover_description main_simple.launch Sta

Chenghao Wang 17 Jul 28, 2022
CppUTest For QP/C++ implements a CppUTest port of the QP Framework, with supporting utilities, enabling easy host based unit testing of active objects.

CppUTest for the QP/C++ Real-Time Embedded Framework Build and Test status: Copyright Matthew Eshleman If this project inspires your team to select th

Cove Mountain Software 4 May 14, 2022
Lo-Fi SAMD21 based mini chip tune synthesizer - Seeed Studio - Seeeduino XIAO arduino project

samd21_mini_synth Lo-Fi SAMD21 based mini chip tune synthesizer Seeed Studio - Seeeduino XIAO arduino project link to the video Description This time

Marcel 5 Jun 14, 2022
Remote Arduino Uno-based TFT graphical display for VSR Mini Mega Alternator Regulator

VSMMAR_Remote_Display Remote Arduino Uno-based TFT graphical display for VSR Mini Mega Alternator Regulator This project is an optional accessory for

null 1 Nov 6, 2021
Treexy is a library that implements a compact hierarchical data structure that can store and manipulate volumetric data, discretized on a three-dimensional grid

Treexy is a library that implements a compact hierarchical data structure that can store and manipulate volumetric data, discretized on a three-dimens

Davide Faconti 284 Aug 8, 2022
Elk is a tiny embeddable JavaScript engine that implements a small but usable subset of ES6

Elk is a tiny embeddable JavaScript engine that implements a small but usable subset of ES6. It is designed for microcontroller development. Instead of writing firmware code in C/C++, Elk allows to develop in JavaScript. Another use case is providing customers with a secure, protected scripting environment for product customisation.

Cesanta Software 1.4k Aug 12, 2022