1
0
Thomas Chef 30c932e5bf New soldered HW. ADC max min fixes. 3 rokov pred
..
Core 30c932e5bf New soldered HW. ADC max min fixes. 3 rokov pred
.gitignore 30c932e5bf New soldered HW. ADC max min fixes. 3 rokov pred
README.md 7d9c9e0f29 Update 'STM32/README.md' 3 rokov pred
VVBPowerSensor.ioc fc9a1934ff Added one wire 3 rokov pred

README.md

STM32 Blue Pill Project for reading current,temp and 1 on/off-function

This project that has been developed on the Mac with STM32CubeIDE, Version: 1.8.0 has the following features:

  • Read V peak-peak on AN5 input
  • Scan and send temperatures of all connected DS18B20 (Max 5 units)
  • Control out DI with UART2 Rx control (the blue pill green LED)

More STM32 Docs

Functions

Master clock with PLL is set to 56MHz
The TIM1 is used in OW to get an exact delay. When measuring OW then ADC interrupt is off.
ADC1 is set to contious mode with interrupt.
Max and Min values of ADC is measured and then sustracted and sent.
Control on UART2 Rx {0} and {1} will control the green led on the blue pill card.

Data is sent every 10 seconds in format:

{VPP,0,2164}
{OWT,080C25372F3D253F,16.62}
{OWT,28FF22DA551603C3,20.06}

ADC Timing

Tconv = Sampling time + 12.5 cycles
Example:
With an ADCCLK = 14 MHz and a sampling time of 1.5 cycles: Tconv = 1.5 + 12.5 = 14 cycles = 1 μs
In this application we want to sample a 50Hz signal = 20mS
Calcs here


Select the instructions depending on Espressif chip installed on your development board:

Example folder contents

The project hello_world contains one source file in C language hello_world_main.c. The file is located in folder main.

ESP-IDF projects are build using CMake. The project build configuration is contained in CMakeLists.txt files that provide set of directives and instructions describing the project's source files and targets (executable, library, or both).

Below is short explanation of remaining files in the project folder.

├── CMakeLists.txt
├── example_test.py            Python script used for automated example testing
├── main
│   ├── CMakeLists.txt
│   ├── component.mk           Component make file
│   └── hello_world_main.c
├── Makefile                   Makefile used by legacy GNU Make
└── README.md                  This is the file you are currently reading

For more information on structure and contents of ESP-IDF projects, please refer to Section Build System of the ESP-IDF Programming Guide.

Troubleshooting

  • Program upload failure

    • Hardware connection is not correct: run idf.py -p PORT monitor, and reboot your board to see if there are any output logs.
    • The baud rate for downloading is too high: lower your baud rate in the menuconfig menu, and try again.

Technical support and feedback

Please use the following feedback channels:

  • For technical queries, go to the esp32.com forum
  • For a feature request or bug report, create a GitHub issue

We will get back to you as soon as possible.