GithubHelp home page GithubHelp logo

vladajankovic / stm32f103r6-mcu-project Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 949 KB

License: GNU General Public License v3.0

C 99.61% Assembly 0.24% Makefile 0.16%
cubemx freertos microcontroller proteus-8 simulation stm32 stm32cubemx

stm32f103r6-mcu-project's Introduction

STM32F103R6-MCU-project

project!

Tools used in project:

  • Proteus 8 Professional
  • STM32CubeMX
  • Eclipse IDE for Embedded C/C++
  • FreeRTOS

Project description:

This project uses the STM32F103R6 microcontroller for communication with various sensors and devices. Sensors and devices used in this project:

  • LM35 - sensor for measuring temperature
  • RAINGAUGE - sensor for measuring the amount of liquid precipitation
  • ANEMOMETER - sensor for measuring wind speed
  • WINDVANE - sensor for indicating wind direction

Signals received for the sensors are processed in different ways based on the sensor.
The RAINGAUGE sensor sends an impulse when it is filled with water, and is calibrated to send an impulse every 1200 milliseconds on 30 mm/h rainfall. The ANEMOMETER sensor outputs a square wave signal. The curent wind speed is equal to the frequency of the signal multiplied by a factor 2.4 in km/h units. The WINDVANE and LM35 are connected to a multiplexer controlled with the MX_SELECT signal. The output signal MX_OUT is connected to the ADC peripheral of the MCU.

A MOTOR module representing a fan is connected in a circuit that is controlled by a PWM signal from the MCU. When the temperature is below 30 degrees Celsius, the fan is stationary. Above 30 and below 35 degrees Celsius, the fan is rotating at half its maximum speed, and ablove 35 up to 60 degrees Celsius, the fan spins at maximum speed. This is possible by changing the duty cycle of the PWM signal based on the current temperature.

The oscilloscope is used for displaying the output signals of some sensors (mainly digital signals). A virtual terminal is used for a simplified output of the sensor values (a - azimuth angle, s - wind speed, t - temperature, r - rainfall amount). The MCU establishes communication with the virtual terminal via UART serial communication protocol.

The LM041L 16x4 LCD display is used for displaying the sensor values, in each row, along with an arrow indicator. For each sensor value, the arrow indicates the change from the previous to the current value. If the current value is higher than the previous, the arrow points UP. If the current value is lower than the previous, the arrow points DOWN. If no change occurs, the arrow does not change.

MCU timers are used for generating a PWM signal, processing ANEMOMETER output signal through Input Capture Channel mode with rising edge trigger, while an external interrupt is used for capturing the RAINGAUGE impulse. The MCU also uses FreeRTOS tasks, queues and timers to collect and update sensor values every 200 milliseconds, communicate with and control the LCD display, virtual terminal, ADC peripheral, fan motor, multiplexer.

stm32f103r6-mcu-project's People

Contributors

vladajankovic avatar

Stargazers

Lazar Vulic avatar

Watchers

 avatar

stm32f103r6-mcu-project's Issues

LCD show Wspd:0

image
why it always show ''0''?

and I can't find sensor RAINGAUGE in my protues library
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.