Giter Site home page Giter Site logo

stm32-nucleo-h745zi-q's Introduction

STM32-NUCLEO-H745ZI-Q



About

This repository contains various projects on the STM32H745ZI-Q NUCLEO dual-core development board which will form the foundation of my automated indoor farm project. The main goal is to present the various projects, the steps taken, along with any challenges that were overcome.

Key Topics

  • Parallel 4-bit LCD
  • Serial Temperature and Humidity Sensor
  • DMA Soil Moisture Sensor
  • Water Pump I/O 120V Relay
  • Bluetooth Low Energy (BLE) RF
  • PWM OP-AMP LED Growlight
  • CMSIS - RTOS task and scheduling
  • Altium Custom PCB

The Workflow

NUCLEO_H745_NHD_20x4_PARALLEL_LCD

The first project consisted of implementing a parallel 20x4 LCD display. The LCD communicates with the microcontroller using 8-bit data and command instructions sent through the bi-directional data bus. Using the timing diagram and online resources, I created an initialization function that uses the necessary 8-bit commands along with an enable pin, and a register select pin to interpret the type of data (data/command). I was able to split the data into two 4-bit nibbles which allowed me to initialization the LCD in 4-bit mode saving 4 pins on the microcontroller. Some challenges arose when writing to the correct location on the display, timing the initialization sequence, and determining the order to send the two 4-bit data nibbles when in 4-bit mode. In the future, the plan is to switch to an UART/SPI/I2C LCD for the final implementation of this project in order to simplify the schematic by minimizing the pin requirements.

NUCLEO_H745_DHT11_SERIAL_TEMP_SENSOR

The next project was implementing the DHT11 sensor using single-wire serial communication. This was done using a 10KOhm pull-up resistor between the signal line and Vdd(+3.3V). Had issues with: implementing the timer to have an accurate delay, used ossciloscope to debug the signal line and determined timer delays were not correct. Then used PWM and the osscilloscope to measure the actual period and corrected it through the internal clock configuration. Also had issues with displaying the decimal values of the temp and humidity readings. Had to convert the 8-bit decimal value to float by dividing by 10 then I added it with the tens and ones value to get full value.

NUCLEO_H745_CAPACTIVE_SOIL_MOISTURE_SENSOR

Next project I set up the analog capacitive soil moisture sensors, I want to have multiple sensor read using only one ADC, this will be implemented using the DMA to pipe multiple inputs to memory. Tried to set up the DMA1 to transfer adc values to memory but ran into issue with implementation. No data gets passed through dma. Tried using different dma streams, with ADC1 request multiplexed on DMAMUX1 using address 9U. Everything found online points to system level driver issues. Going to implement the adc individually for each soil sensor for now. Researched possible issues relating to the DMA. Found that the STM32H7 has dCache coherrency issues. Have to run cache cleaning and invaildation routines for the MPU to accept new data values in RAM.

Copyright

This project is licensed under the terms of the MIT license and protected by Udacity Honor Code and Community Code of Conduct. See license and disclaimer.

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.