The document describes an experiment to interface an LED and switch with an STM32 microcontroller, where the LED is controlled by the switch using the STM32. It discusses the components used, including the STM32 microcontroller, LED, button, resistors, and programming tools. The procedure involves designing the circuit in Proteus, writing code in STM32CubeMX to control the LED based on the button state, and simulating the circuit behavior.
Nhận viết luận văn đại học, thạc sĩ trọn gói, chất lượng, LH ZALO=>0909232620
Tham khảo dịch vụ, bảng giá tại: https://vietbaitotnghiep.com/dich-vu-viet-thue-luan-van
Download luận văn đồ án tốt nghiệp ngành điện tử công nghiệp với đề tài: Thiết kế, thi công bãi giữ xe ứng dụng công nghệ RFID và xử lý ảnh, cho các bạn làm luận văn tham khảo
Nhận viết luận văn đại học, thạc sĩ trọn gói, chất lượng, LH ZALO=>0909232620
Tham khảo dịch vụ, bảng giá tại: https://vietbaitotnghiep.com/dich-vu-viet-thue-luan-van
Download luận văn đồ án tốt nghiệp ngành điện tử công nghiệp với đề tài: Thiết kế và thi công hệ thống điểm danh nhân viên sử dụng vi điều khiển ARM, cho các bạn làm luận văn tham khảo
Nhận viết luận văn Đại học , thạc sĩ - Zalo: 0917.193.864
Tham khảo bảng giá dịch vụ viết bài tại: vietbaocaothuctap.net
Download luận văn đồ án tốt nghiệp ngành điện tử công nghiệp với đề tài: Ứng dụng xử lý ảnh thiết kế thi công mạch chống trộm thông minh, cho các bạn làm luận văn tham khảo
The document discusses the MicroBlaze soft processor core designed by Xilinx for implementation in FPGAs. It provides details on the MicroBlaze architecture such as its RISC design, support for PLB and LMB buses, optional cache blocks, and FSL for custom functions. Advantages are highlighted like flexibility, high performance, and support in Xilinx development tools. Limitations around instruction set and lack of MMU/atomic operations are also outlined.
Nhận viết luận văn Đại học , thạc sĩ - Zalo: 0917.193.864
Tham khảo bảng giá dịch vụ viết bài tại: vietbaocaothuctap.net
Download luận văn đồ án tốt nghiệp với đề tài: Nghiên cứu thiết kế các mạch lọc tương tự, cho các bạn làm luận văn tham khảo
Nhận viết luận văn Đại học , thạc sĩ - Zalo: 0917.193.864
Tham khảo bảng giá dịch vụ viết bài tại: vietbaocaothuctap.net
Download luận văn đồ án tốt nghiệp ngành điện tử công nghiệp với đề tài: Ứng dụng công nghệ iot để thiết kế hệ thống giám sát và điều khiển thiết bị công nghiệp, cho các bạn làm luận văn tham khảo
Để xem full tài liệu Xin vui long liên hệ page để được hỗ trợ
:
https://www.facebook.com/garmentspace/
https://www.facebook.com/thuvienluanvan01
HOẶC
https://www.facebook.com/thuvienluanvan01
https://www.facebook.com/thuvienluanvan01
tai lieu tong hop, thu vien luan van, luan van tong hop, do an chuyen nganh
Nhận viết luận văn đại học, thạc sĩ trọn gói, chất lượng, LH ZALO=>0909232620
Tham khảo dịch vụ, bảng giá tại: https://vietbaitotnghiep.com/dich-vu-viet-thue-luan-van
Download luận văn đồ án tốt nghiệp ngành điện tử công nghiệp với đề tài: Thiết kế, thi công bãi giữ xe ứng dụng công nghệ RFID và xử lý ảnh, cho các bạn làm luận văn tham khảo
Nhận viết luận văn đại học, thạc sĩ trọn gói, chất lượng, LH ZALO=>0909232620
Tham khảo dịch vụ, bảng giá tại: https://vietbaitotnghiep.com/dich-vu-viet-thue-luan-van
Download luận văn đồ án tốt nghiệp ngành điện tử công nghiệp với đề tài: Thiết kế và thi công hệ thống điểm danh nhân viên sử dụng vi điều khiển ARM, cho các bạn làm luận văn tham khảo
Nhận viết luận văn Đại học , thạc sĩ - Zalo: 0917.193.864
Tham khảo bảng giá dịch vụ viết bài tại: vietbaocaothuctap.net
Download luận văn đồ án tốt nghiệp ngành điện tử công nghiệp với đề tài: Ứng dụng xử lý ảnh thiết kế thi công mạch chống trộm thông minh, cho các bạn làm luận văn tham khảo
The document discusses the MicroBlaze soft processor core designed by Xilinx for implementation in FPGAs. It provides details on the MicroBlaze architecture such as its RISC design, support for PLB and LMB buses, optional cache blocks, and FSL for custom functions. Advantages are highlighted like flexibility, high performance, and support in Xilinx development tools. Limitations around instruction set and lack of MMU/atomic operations are also outlined.
Nhận viết luận văn Đại học , thạc sĩ - Zalo: 0917.193.864
Tham khảo bảng giá dịch vụ viết bài tại: vietbaocaothuctap.net
Download luận văn đồ án tốt nghiệp với đề tài: Nghiên cứu thiết kế các mạch lọc tương tự, cho các bạn làm luận văn tham khảo
Nhận viết luận văn Đại học , thạc sĩ - Zalo: 0917.193.864
Tham khảo bảng giá dịch vụ viết bài tại: vietbaocaothuctap.net
Download luận văn đồ án tốt nghiệp ngành điện tử công nghiệp với đề tài: Ứng dụng công nghệ iot để thiết kế hệ thống giám sát và điều khiển thiết bị công nghiệp, cho các bạn làm luận văn tham khảo
Để xem full tài liệu Xin vui long liên hệ page để được hỗ trợ
:
https://www.facebook.com/garmentspace/
https://www.facebook.com/thuvienluanvan01
HOẶC
https://www.facebook.com/thuvienluanvan01
https://www.facebook.com/thuvienluanvan01
tai lieu tong hop, thu vien luan van, luan van tong hop, do an chuyen nganh
Originally conceived as a processor for desktop systems, ARM processors are now widely used in embedded applications and markets. Some significant products that used ARM processors include the Apple Newton PDA (ARM6 core), Apple iPod (ARM7 core), and Apple iPhone and Nokia N93/N100 (ARM11 core). ARM processors are based on reduced instruction set computer (RISC) architecture. They are designed for low power consumption applications like mobile devices. Some key features of ARM processors include 32-bit instruction set with 16-bit Thumb extension, unified memory address space, and relatively low power consumption.
Serial communication involves transmitting data one bit at a time over a communication channel. It requires fewer cables than parallel communication and has lower costs. Serial communication uses a transmitter to convert data to a serial bit stream and a receiver to reassemble the data. Common serial interfaces for embedded systems include UART, SPI, and I2C. These interfaces are used to connect microcontrollers to devices like sensors, displays and memory.
Nhận viết luận văn đại học, thạc sĩ trọn gói, chất lượng, LH ZALO=>0909232620
Tham khảo dịch vụ, bảng giá tại: https://baocaothuctap.net
Download đồ án môn học Vi xử lý trong đo lường điều khiển với đề tài: Thiết kế thiết bị khóa cửa bằng bảo mật và thẻ chip RFID, cho các bạn làm luận văn tham khảo
This document summarizes different types of semiconductor memories. DRAM uses a capacitor and transistor to store data as charge. SRAM uses a 6 transistor latch. Mask ROM is one-time programmable. EPROM and EEPROM can be reprogrammed using ultraviolet rays or electrical pulses. FRAM uses a ferroelectric capacitor. Memory cells are arranged in a grid and accessed using row and column decoders. The document then describes the operation of DRAM, SRAM, flash memory, and NAND flash memory cells.
The document discusses the STM32 USART (Universal Synchronous/Asynchronous Receiver/Transmitter). It can operate synchronously or asynchronously and in full-duplex mode. Synchronous operation involves transmitting data in frames with character boundaries, while asynchronous operation uses start and stop bits to encode timing properties. The USART can be used for serial communication and interfaces like I2C, RS-232, and Ethernet. It involves transmitting one bit at a time compared to parallel communication which transmits multiple bits simultaneously. The USART includes features like interrupt requests and a data frame format involving start, data, parity, and stop bits.
This document provides an overview of microcontroller programming using C language for ATMEL and PIC microcontrollers. It discusses microcontroller architecture, including the central processing unit, memory, timers/counters, and interrupts. It then introduces the ATMEL 89C2051 microcontroller, describing its pin configuration, special purpose I/O, memory, and other features. The document outlines the structure of microcontroller C programming and provides sample programs to blink an LED. It also discusses configuring the hardware and software environment, compiling and burning programs to the microcontroller, and writing interrupt subroutines.
Mô hình bài toán xếp TKB cho trường ĐH, CĐ và phần mềm TKBUBùi Việt Hà
Đây là Slide (cũ) của tôi trình bài tại các hội thảo về bài toán xếp thời khóa biểu cho các trường đại học, cao đẳng đồng thời giới thiệu mô hình thiết kế phần mềm TKBU 4.0
Nhận viết luận văn Đại học , thạc sĩ - Zalo: 0917.193.864
Tham khảo bảng giá dịch vụ viết bài tại: vietbaocaothuctap.net
Download luận văn đồ án tốt nghiệp ngành điện tử công nghiệp với đề tài: Ứng dụng xử lý ảnh trong hệ thống phân loại sản phẩm, cho các bạn có thể tham khảo
The document discusses the PIC-18 microcontroller. It describes the PIC-18 as an 8-bit microcontroller with 16-bit instruction sets, 256 bytes of EPROM, 2KB of SRAM, and 32KB of flash memory. It operates at 40MHz and has features like a 10-bit A/D converter, instruction pipelining, and low power consumption. The document also provides details on the pin diagram, architecture, memory organization, addressing modes, and pipelining of the PIC-18 microcontroller.
This document discusses digital counters and registers. It covers the operation of synchronous and asynchronous counters, analyzing different counter types, and implementing counters using HDL. It describes shift registers and using counters and registers to troubleshoot sequential logic systems. The document provides objectives for Chapter 7 and details asynchronous ripple counters, propagation delays, synchronous parallel counters, modifying counter MOD numbers, and IC-based asynchronous counters.
Liên hệ page để tải tài liệu
https://www.facebook.com/garmentspace
My Blog: http://congnghemayblog.blogspot.com/
http://congnghemay123.blogspot.com/
Từ khóa tìm kiếm tài liệu : Wash jeans garment washing and dyeing, tài liệu ngành may, purpose of washing, definition of garment washing, tài liệu cắt may, sơ mi nam nữ, thiết kế áo sơ mi nam, thiết kế quần âu, thiết kế veston nam nữ, thiết kế áo dài, chân váy đầm liền thân, zipper, dây kéo trong ngành may, tài liệu ngành may, khóa kéo răng cưa, triển khai sản xuất, jacket nam, phân loại khóa kéo, tin học ngành may, bài giảng Accumark, Gerber Accumarkt, cad/cam ngành may, tài liệu ngành may, bộ tài liệu kỹ thuật ngành may dạng đầy đủ, vật liệu may, tài liệu ngành may, tài liệu về sợi, nguyên liệu dệt, kiểu dệt vải dệt thoi, kiểu dệt vải dệt kim, chỉ may, vật liệu dựng, bộ tài liệu kỹ thuật ngành may dạng đầy đủ, tiêu chuẩn kỹ thuật áo sơ mi nam, tài liệu kỹ thuật ngành may, tài liệu ngành may, nguồn gốc vải denim, lịch sử ra đời và phát triển quần jean, Levi's, Jeans, Levi Straus, Jacob Davis và Levis Strauss, CHẤT LIỆU DENIM, cắt may quần tây nam, quy trình may áo sơ mi căn bản, quần nam không ply, thiết kế áo sơ mi nam, thiết kế áo sơ mi nam theo tài liệu kỹ thuật, tài liệu cắt may,lịch sử ra đời và phát triển quần jean, vải denim, Levis strauss cha đẻ của quần jeans. Jeans skinny, street style áo sơ mi nam, tính vải may áo quần, sơ mi nam nữ, cắt may căn bản, thiết kế quần áo, tài liệu ngành may,máy 2 kim, máy may công nghiệp, two needle sewing machine, tài liệu ngành may, thiết bị ngành may, máy móc ngành may,Tiếng anh ngành may, english for gamrment technology, anh văn chuyên ngành may, may mặc thời trang, english, picture, Nhận biết và phân biệt các loại vải, cotton, chiffon, silk, woolCÁCH MAY – QUY CÁCH LẮP RÁP – QUY CÁCH ĐÁNH SỐTÀI LIỆU KỸ THUẬT NGÀNH MAY –TIÊU CHUẨN KỸ THUẬT – QUY CÁCH ĐÁNH SỐ - QUY CÁCH LẮP RÁP – QUY CÁCH MAY – QUY TRÌNH MAY – GẤP XẾP ĐÓNG GÓI – GIÁC SƠ ĐỒ MÃ HÀNG - Công nghệ may,kỹ thuật may dây kéo đồ án công nghệ may, công nghệ may trang phục, thiết kế trang phục, anh văn chuyên ngành may, thiết bị may công
We are one of the best embedded systems training institute for advance courses. We are the pioneer of the embedded system training in Pune & Pcmc with the expertise of over 16 years. we are working in the field training & development of embedded systems & currently we are also working on live projects as per the requirements of clients. though we provide many different courses & training in embedded all aim at giving good practical knowledge to students as well help them in their career.
We are one of the best embedded systems training institute for advance courses. We are the pioneer of the embedded system training in Pune & Pcmc with the expertise of over 16 years. we are working in the field training & development of embedded systems & currently we are also working on live projects as per the requirements of clients. though we provide many different courses & training in embedded all aim at giving good practical knowledge to students as well help them in their career.
Originally conceived as a processor for desktop systems, ARM processors are now widely used in embedded applications and markets. Some significant products that used ARM processors include the Apple Newton PDA (ARM6 core), Apple iPod (ARM7 core), and Apple iPhone and Nokia N93/N100 (ARM11 core). ARM processors are based on reduced instruction set computer (RISC) architecture. They are designed for low power consumption applications like mobile devices. Some key features of ARM processors include 32-bit instruction set with 16-bit Thumb extension, unified memory address space, and relatively low power consumption.
Serial communication involves transmitting data one bit at a time over a communication channel. It requires fewer cables than parallel communication and has lower costs. Serial communication uses a transmitter to convert data to a serial bit stream and a receiver to reassemble the data. Common serial interfaces for embedded systems include UART, SPI, and I2C. These interfaces are used to connect microcontrollers to devices like sensors, displays and memory.
Nhận viết luận văn đại học, thạc sĩ trọn gói, chất lượng, LH ZALO=>0909232620
Tham khảo dịch vụ, bảng giá tại: https://baocaothuctap.net
Download đồ án môn học Vi xử lý trong đo lường điều khiển với đề tài: Thiết kế thiết bị khóa cửa bằng bảo mật và thẻ chip RFID, cho các bạn làm luận văn tham khảo
This document summarizes different types of semiconductor memories. DRAM uses a capacitor and transistor to store data as charge. SRAM uses a 6 transistor latch. Mask ROM is one-time programmable. EPROM and EEPROM can be reprogrammed using ultraviolet rays or electrical pulses. FRAM uses a ferroelectric capacitor. Memory cells are arranged in a grid and accessed using row and column decoders. The document then describes the operation of DRAM, SRAM, flash memory, and NAND flash memory cells.
The document discusses the STM32 USART (Universal Synchronous/Asynchronous Receiver/Transmitter). It can operate synchronously or asynchronously and in full-duplex mode. Synchronous operation involves transmitting data in frames with character boundaries, while asynchronous operation uses start and stop bits to encode timing properties. The USART can be used for serial communication and interfaces like I2C, RS-232, and Ethernet. It involves transmitting one bit at a time compared to parallel communication which transmits multiple bits simultaneously. The USART includes features like interrupt requests and a data frame format involving start, data, parity, and stop bits.
This document provides an overview of microcontroller programming using C language for ATMEL and PIC microcontrollers. It discusses microcontroller architecture, including the central processing unit, memory, timers/counters, and interrupts. It then introduces the ATMEL 89C2051 microcontroller, describing its pin configuration, special purpose I/O, memory, and other features. The document outlines the structure of microcontroller C programming and provides sample programs to blink an LED. It also discusses configuring the hardware and software environment, compiling and burning programs to the microcontroller, and writing interrupt subroutines.
Mô hình bài toán xếp TKB cho trường ĐH, CĐ và phần mềm TKBUBùi Việt Hà
Đây là Slide (cũ) của tôi trình bài tại các hội thảo về bài toán xếp thời khóa biểu cho các trường đại học, cao đẳng đồng thời giới thiệu mô hình thiết kế phần mềm TKBU 4.0
Nhận viết luận văn Đại học , thạc sĩ - Zalo: 0917.193.864
Tham khảo bảng giá dịch vụ viết bài tại: vietbaocaothuctap.net
Download luận văn đồ án tốt nghiệp ngành điện tử công nghiệp với đề tài: Ứng dụng xử lý ảnh trong hệ thống phân loại sản phẩm, cho các bạn có thể tham khảo
The document discusses the PIC-18 microcontroller. It describes the PIC-18 as an 8-bit microcontroller with 16-bit instruction sets, 256 bytes of EPROM, 2KB of SRAM, and 32KB of flash memory. It operates at 40MHz and has features like a 10-bit A/D converter, instruction pipelining, and low power consumption. The document also provides details on the pin diagram, architecture, memory organization, addressing modes, and pipelining of the PIC-18 microcontroller.
This document discusses digital counters and registers. It covers the operation of synchronous and asynchronous counters, analyzing different counter types, and implementing counters using HDL. It describes shift registers and using counters and registers to troubleshoot sequential logic systems. The document provides objectives for Chapter 7 and details asynchronous ripple counters, propagation delays, synchronous parallel counters, modifying counter MOD numbers, and IC-based asynchronous counters.
Liên hệ page để tải tài liệu
https://www.facebook.com/garmentspace
My Blog: http://congnghemayblog.blogspot.com/
http://congnghemay123.blogspot.com/
Từ khóa tìm kiếm tài liệu : Wash jeans garment washing and dyeing, tài liệu ngành may, purpose of washing, definition of garment washing, tài liệu cắt may, sơ mi nam nữ, thiết kế áo sơ mi nam, thiết kế quần âu, thiết kế veston nam nữ, thiết kế áo dài, chân váy đầm liền thân, zipper, dây kéo trong ngành may, tài liệu ngành may, khóa kéo răng cưa, triển khai sản xuất, jacket nam, phân loại khóa kéo, tin học ngành may, bài giảng Accumark, Gerber Accumarkt, cad/cam ngành may, tài liệu ngành may, bộ tài liệu kỹ thuật ngành may dạng đầy đủ, vật liệu may, tài liệu ngành may, tài liệu về sợi, nguyên liệu dệt, kiểu dệt vải dệt thoi, kiểu dệt vải dệt kim, chỉ may, vật liệu dựng, bộ tài liệu kỹ thuật ngành may dạng đầy đủ, tiêu chuẩn kỹ thuật áo sơ mi nam, tài liệu kỹ thuật ngành may, tài liệu ngành may, nguồn gốc vải denim, lịch sử ra đời và phát triển quần jean, Levi's, Jeans, Levi Straus, Jacob Davis và Levis Strauss, CHẤT LIỆU DENIM, cắt may quần tây nam, quy trình may áo sơ mi căn bản, quần nam không ply, thiết kế áo sơ mi nam, thiết kế áo sơ mi nam theo tài liệu kỹ thuật, tài liệu cắt may,lịch sử ra đời và phát triển quần jean, vải denim, Levis strauss cha đẻ của quần jeans. Jeans skinny, street style áo sơ mi nam, tính vải may áo quần, sơ mi nam nữ, cắt may căn bản, thiết kế quần áo, tài liệu ngành may,máy 2 kim, máy may công nghiệp, two needle sewing machine, tài liệu ngành may, thiết bị ngành may, máy móc ngành may,Tiếng anh ngành may, english for gamrment technology, anh văn chuyên ngành may, may mặc thời trang, english, picture, Nhận biết và phân biệt các loại vải, cotton, chiffon, silk, woolCÁCH MAY – QUY CÁCH LẮP RÁP – QUY CÁCH ĐÁNH SỐTÀI LIỆU KỸ THUẬT NGÀNH MAY –TIÊU CHUẨN KỸ THUẬT – QUY CÁCH ĐÁNH SỐ - QUY CÁCH LẮP RÁP – QUY CÁCH MAY – QUY TRÌNH MAY – GẤP XẾP ĐÓNG GÓI – GIÁC SƠ ĐỒ MÃ HÀNG - Công nghệ may,kỹ thuật may dây kéo đồ án công nghệ may, công nghệ may trang phục, thiết kế trang phục, anh văn chuyên ngành may, thiết bị may công
We are one of the best embedded systems training institute for advance courses. We are the pioneer of the embedded system training in Pune & Pcmc with the expertise of over 16 years. we are working in the field training & development of embedded systems & currently we are also working on live projects as per the requirements of clients. though we provide many different courses & training in embedded all aim at giving good practical knowledge to students as well help them in their career.
We are one of the best embedded systems training institute for advance courses. We are the pioneer of the embedded system training in Pune & Pcmc with the expertise of over 16 years. we are working in the field training & development of embedded systems & currently we are also working on live projects as per the requirements of clients. though we provide many different courses & training in embedded all aim at giving good practical knowledge to students as well help them in their career.
Programming the ARM CORTEX M3 based STM32F100RBT6 Value Line Discovery BoardGaurav Verma
This programming manual is providing the complete details of programming the STM32 Value-line discovery (a low-cost) evaluation board for Value-line of STM32 microcontrollers from STMicroelectronics.
The document describes an IoT-based air pollution monitoring system for smart cities. The system monitors air quality parameters like CO2, smoke, methane, SO2, hydrogen, NH3, and benzene using sensors like MQ135 and MQ-2. The sensor data is collected using a NodeMCU microcontroller and displayed on an LCD. The data is also sent to the cloud using IoT. The system is intended to provide real-time air quality information to enable effective decision making and address high pollution levels in Indian cities.
ESP32 WiFi & Bluetooth Module - Getting Started Guidehandson28
The document provides information about the ESP32 WiFi and Bluetooth SoC module. It discusses the ESP32's dual-core processor, integrated antennas and radios, power efficiency features, and applications in mobile devices and IoT. It also provides specifications, pinout diagrams, and instructions for integrating the ESP32 with the Arduino IDE. Examples are given for running code on the ESP32 to scan for WiFi networks and toggle an LED with a button press.
This document describes the design of a navigation robot called NAVIGATION CAMP - BOT. The robot uses an ATMega 2560 microcontroller and Zigbee wireless modules to navigate between different locations in a building based on commands from a user. Sharp sensors are used to detect obstacles and infrared sensors help navigate around them. When the robot reaches its destination, an audio output and LCD display provide information to the user. The goal is to help users easily navigate unknown indoor areas.
Mohammad Arshad has over 14 years of experience in embedded systems and software development. He has expertise in C/C++, microcontrollers like MSP430, STM32, and AVR, and real-time operating systems like FreeRTOS. Some of his project experiences include developing firmware for a fingerprint-based one-time password device, a voice encryption device for Android, and a TCP/IP-enabled LCD TV network. He is currently working as a senior technical lead at Tarang Software Technologies in Bangalore.
Introducing the Android Development Kit (adk) and showing developers how easy it is to control physical objects with their Android device.
For all the links see https://github.com/amirlazarovich/codelab-adk-leds
Getting Started with the NodeMCU- NodeMCU Programming (By Akshet Patel)AkshetPatel
This document provides an overview of a programming session on the NodeMCU microcontroller. It covers prerequisites of basic programming and electronics knowledge. It then discusses installing the Arduino IDE and adding board support for the NodeMCU. The document introduces the NodeMCU hardware and the structure of Arduino programs with setup and loop functions. It also explains how LEDs work and provides the code to blink an LED using the digitalWrite command in the loop function. Finally, it mentions that circuits can be simulated using TinkerCAD.
Decibel meter using IoT with notice boardIRJET Journal
This document describes a system to monitor sound levels using an IoT device and display the results. A sound sensor measures noise intensity and sends the data to a NodeMCU microcontroller via WiFi. The NodeMCU then uploads the real-time data to a cloud database and displays it on a local LCD screen. The system can detect low, moderate, and high noise levels and activate different colored LEDs and a buzzer accordingly. The cloud database allows monitoring sound levels remotely from any location. The system is intended to help control and monitor noise, especially in industrial areas.
The document describes an experiment using an Arduino board to blink an LED. The aim is to learn about interfacing and IoT programming. The apparatus used includes an Arduino Uno board, LED, 330 ohm resistor, jumper wires, and breadboard. The theory explains that blinking an LED is a simple way to get familiar with microcontrollers and establishing this baseline provides a foundation for more complex experiments. The Arduino code written blinks an LED connected to pin 8 of the Arduino board by setting the pin to HIGH for 1 second and then LOW for 1 second in a loop.
This experiment connects two mbed microcontrollers together using an I2C link. I2C is a serial communication protocol that uses only two wires (SDA and SCL) for data transmission between an initiator "master" device and a responding "slave" device. The procedure connects the SDA and SCL pins of two mbed boards together to establish I2C communication between them, with one acting as the master and the other as the slave. Running a program on each mbed demonstrates the successful transmission of data via the I2C link.
The document summarizes the key components used to design a connected thermometer, including an HC-06 Bluetooth module, DHT11 temperature and humidity sensor, Arduino Uno microcontroller, LCD display, and LED battery. It also discusses the Arduino programming language and environment. The demonstration section shows how to connect the components and display real-time temperature and humidity readings over Bluetooth on a smartphone. The conclusion reflects on learning about IoT systems and their business models.
Designed keeping in mind the latest technology on a single board. It is really easy to design, experiment with, and test circuitry without soldering. Students can explore a wide variety of electronic concepts simply by placing components on to the breadboard. It is very useful in electronics laboratories for performing IoT experiments. It is also useful to build and test circuits as well as making projects related to IoT integrating with the cloud platform. visit https://researchdesignlab.com/esp32-development-board-trainer-kit.html for more details
Embedded system & IoT Course | certification Program | Learn and BuildLearn and Build
Introduction to embedded systems and IoT, during this course you will learn how to create IoT web applications like flask ,analytics, google clouds etc. and have many opportunities to explore. Best industry expert will guide your path and become an IoT expert.
The document provides information on using Arduino IoT Cloud to build IoT projects. It discusses what Arduino and IoT are, describes the features of Arduino IoT Cloud including auto-generated sketches and device-to-device communication. It also outlines the steps to create an IoT project using an Arduino MKR WiFi 1010 board, and provides an example of a project to control an LED from the cloud.
By the end of this presentation you will be able to tell :
1. What is Arduino ?
2. Languages Supporting Arduino
3.Difference between microprocessor and microcontroller ?
4. Various different Arduino Boards
5. Arduino UNO R3 DataSheet
6. Parts and Functions of Arduino UNO R3 Board
7. Variables, functions and libraries used in Arduino board
8. Arduino Code: Blink Example
9. Applications of Arduino in real life
10. Simulators used for Arduino coding
This document provides an introduction to getting started with Internet of Things (IoT) development using an ESP8266 microcontroller board. It discusses what IoT is, common IoT architecture and tools, and demonstrates controlling an on-board LED from a Blynk mobile app. The demo connects an ESPectro Core board to the Blynk server and mobile app, allowing the LED to be toggled via a virtual button. Overall, the document offers a high-level overview of IoT and a simple first project to build an IoT device with an ESP8266 and Blynk.
IRJET - Automatic Mechanism for LED Parameters Testing & CheckingIRJET Journal
This document describes an automatic mechanism for testing and checking the parameters of LEDs. The mechanism uses an Arduino microcontroller interfaced with sensors and displays to automatically measure the voltage, current, power, and brightness of LEDs without human error. It can help consumers differentiate between branded and non-branded LEDs by testing all key parameters. The system applies different currents to the LED using a driver circuit and displays the results on an LCD and Nokia graphic display. This provides an affordable way to automatically test LED parameters compared to expensive industrial testing units.
PIC en la práctica Un enfoque basado en proyectos por D. W. Smith.pdfSANTIAGO PABLO ALBERTO
This document is an introduction to the book "PIC in Practice" which teaches how to program and use PIC microcontrollers. It discusses the basics of microcontroller hardware including program memory, clock, inputs/outputs and types. It explains that the book uses assembly language and provides graded examples to teach microcontroller programming and applications. Complete code is given for all examples so readers can learn and modify the programs.
Similar to Weather monitoring System Using STM32 (20)
TCP / IP protocol.
Welcome to our comprehensive PowerPoint presentation on the fundamental concepts of TCP/IP (Transmission Control Protocol/Internet Protocol). This presentation is designed to provide a clear and insightful overview of the TCP/IP model, a cornerstone of modern networking.
Delve into the heart of power system dynamics with our comprehensive PowerPoint presentation on the "Swing Equation." If you're involved in power system operation and control, an electrical engineering student, or simply intrigued by the complexities of managing the electric grid, this presentation is a must-see.
Introduction to Power System Stability: Gain a fundamental understanding of why power system stability is crucial for reliable electrical energy supply.
The Swing Equation Explained: Learn what the Swing Equation is and why it plays a central role in power system stability analysis.
Synchronous Machines: Explore the role of synchronous machines in power generation and their critical impact on system dynamics.
Rotational Inertia and Angular Velocity: Understand the concepts of rotational inertia and angular velocity and how they relate to power system behavior.
Generator Response to Disturbances: Discover how generators respond to faults, load changes, and other disturbances, affecting system stability.
Equations and Formulas: Get a detailed look at the mathematical representations and formulas behind the Swing Equation.
Numerical Simulations: Witness practical examples and numerical simulations to grasp the real-world application of the Swing Equation.
Impact on Control Strategies: Understand how power system operators use the Swing Equation to develop control strategies for maintaining stability.
Case Studies: Explore real-world case studies where the Swing Equation has played a critical role in power system control and protection.
Future Challenges and Developments: Peek into the evolving landscape of power system operation and control, and how the Swing Equation adapts to modern challenges.
Explore the future of electric mobility with our in-depth analysis of the Tesla Model Y. This PowerPoint presentation delves into every aspect of this groundbreaking electric SUV, providing a comprehensive overview for enthusiasts, potential buyers, and anyone interested in cutting-edge automotive technology.
Key Presentation Highlights:
Introduction to Tesla: Understand the company's mission, vision, and impact on the automotive industry.
Model Y Overview: Get acquainted with the Model Y's specifications, features, and design elements.
Performance & Efficiency: Dive into the Model Y's exceptional performance and efficiency, from acceleration to range.
Autopilot & Full Self-Driving: Learn about Tesla's autonomous driving capabilities and the future of self-driving cars.
Battery Technology: Explore the innovative battery technology that powers the Model Y and its implications for sustainable transportation.
Environmental Impact: Discover how the Model Y contributes to reducing carbon emissions and advancing sustainability.
Market & Competition: Gain insights into the electric vehicle market and how the Model Y stacks up against its rivals.
Safety Features: Explore Tesla's commitment to safety through advanced driver-assistance systems and crash test results.
Ownership Experience: Learn about the unique benefits and challenges of owning a Model Y, from charging infrastructure to maintenance.
Future Developments: Get a glimpse into Tesla's future plans, including upcoming models and technology advancements.
This document discusses optical fiber materials and attenuation in optical fibers. It describes how optical fibers use total internal reflection to transmit light pulses along thin glass or plastic fibers. Attenuation is the loss of light energy as pulses travel along the fiber and is caused by scattering, bending, and absorption. The key fiber materials are glass, typically silica from sand, and plastic, though plastic fibers have higher attenuation than glass.
This document discusses polymorphism in Java technologies. It defines polymorphism as an entity providing multiple implementations or behaviors. There are two types of polymorphism: compile-time polymorphism, which is resolved during compilation through method overloading and operator overloading; and run-time polymorphism, where a call to an overridden method is resolved at runtime based on the object being referred to. Method overriding provides a specific implementation of a method declared in the superclass and is used for run-time polymorphism. The advantages of polymorphism include cleaner code, reusability, extensibility, and better alignment with real world problems.
The document discusses a buck converter, which is a type of DC-DC converter that steps down voltage. It contains sections on the circuit diagram and operating modes, advantages and disadvantages, applications, and a conclusion. The circuit diagram section explains that there are two operating modes - when the switch is on and the diode is off, and when the switch is off and the diode is on. The advantages are that buck converters offer efficient voltage step-down with few components, while the disadvantages include slow response to fast loads and needing compensation. Applications include powering audio amplifiers, self-regulating power supplies, and stepping down computer supply voltages.
Distance protection measures the impedance between the relay location and the fault point, comparing it to a set value. A distance relay measures the current and voltage to determine the impedance ratio and operates if this ratio indicates a fault within its protection zone. Distance relays are widely used for high-speed transmission and distribution line protection due to their non-unit characteristics and permanent settings.
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...IJECEIAES
Medical image analysis has witnessed significant advancements with deep learning techniques. In the domain of brain tumor segmentation, the ability to
precisely delineate tumor boundaries from magnetic resonance imaging (MRI)
scans holds profound implications for diagnosis. This study presents an ensemble convolutional neural network (CNN) with transfer learning, integrating
the state-of-the-art Deeplabv3+ architecture with the ResNet18 backbone. The
model is rigorously trained and evaluated, exhibiting remarkable performance
metrics, including an impressive global accuracy of 99.286%, a high-class accuracy of 82.191%, a mean intersection over union (IoU) of 79.900%, a weighted
IoU of 98.620%, and a Boundary F1 (BF) score of 83.303%. Notably, a detailed comparative analysis with existing methods showcases the superiority of
our proposed model. These findings underscore the model’s competence in precise brain tumor localization, underscoring its potential to revolutionize medical
image analysis and enhance healthcare outcomes. This research paves the way
for future exploration and optimization of advanced CNN models in medical
imaging, emphasizing addressing false positives and resource efficiency.
International Conference on NLP, Artificial Intelligence, Machine Learning an...gerogepatton
International Conference on NLP, Artificial Intelligence, Machine Learning and Applications (NLAIM 2024) offers a premier global platform for exchanging insights and findings in the theory, methodology, and applications of NLP, Artificial Intelligence, Machine Learning, and their applications. The conference seeks substantial contributions across all key domains of NLP, Artificial Intelligence, Machine Learning, and their practical applications, aiming to foster both theoretical advancements and real-world implementations. With a focus on facilitating collaboration between researchers and practitioners from academia and industry, the conference serves as a nexus for sharing the latest developments in the field.
Advanced control scheme of doubly fed induction generator for wind turbine us...IJECEIAES
This paper describes a speed control device for generating electrical energy on an electricity network based on the doubly fed induction generator (DFIG) used for wind power conversion systems. At first, a double-fed induction generator model was constructed. A control law is formulated to govern the flow of energy between the stator of a DFIG and the energy network using three types of controllers: proportional integral (PI), sliding mode controller (SMC) and second order sliding mode controller (SOSMC). Their different results in terms of power reference tracking, reaction to unexpected speed fluctuations, sensitivity to perturbations, and resilience against machine parameter alterations are compared. MATLAB/Simulink was used to conduct the simulations for the preceding study. Multiple simulations have shown very satisfying results, and the investigations demonstrate the efficacy and power-enhancing capabilities of the suggested control system.
A review on techniques and modelling methodologies used for checking electrom...nooriasukmaningtyas
The proper function of the integrated circuit (IC) in an inhibiting electromagnetic environment has always been a serious concern throughout the decades of revolution in the world of electronics, from disjunct devices to today’s integrated circuit technology, where billions of transistors are combined on a single chip. The automotive industry and smart vehicles in particular, are confronting design issues such as being prone to electromagnetic interference (EMI). Electronic control devices calculate incorrect outputs because of EMI and sensors give misleading values which can prove fatal in case of automotives. In this paper, the authors have non exhaustively tried to review research work concerned with the investigation of EMI in ICs and prediction of this EMI using various modelling methodologies and measurement setups.
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELgerogepatton
As digital technology becomes more deeply embedded in power systems, protecting the communication
networks of Smart Grids (SG) has emerged as a critical concern. Distributed Network Protocol 3 (DNP3)
represents a multi-tiered application layer protocol extensively utilized in Supervisory Control and Data
Acquisition (SCADA)-based smart grids to facilitate real-time data gathering and control functionalities.
Robust Intrusion Detection Systems (IDS) are necessary for early threat detection and mitigation because
of the interconnection of these networks, which makes them vulnerable to a variety of cyberattacks. To
solve this issue, this paper develops a hybrid Deep Learning (DL) model specifically designed for intrusion
detection in smart grids. The proposed approach is a combination of the Convolutional Neural Network
(CNN) and the Long-Short-Term Memory algorithms (LSTM). We employed a recent intrusion detection
dataset (DNP3), which focuses on unauthorized commands and Denial of Service (DoS) cyberattacks, to
train and test our model. The results of our experiments show that our CNN-LSTM method is much better
at finding smart grid intrusions than other deep learning algorithms used for classification. In addition,
our proposed approach improves accuracy, precision, recall, and F1 score, achieving a high detection
accuracy rate of 99.50%.
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSIJNSA Journal
The smart irrigation system represents an innovative approach to optimize water usage in agricultural and landscaping practices. The integration of cutting-edge technologies, including sensors, actuators, and data analysis, empowers this system to provide accurate monitoring and control of irrigation processes by leveraging real-time environmental conditions. The main objective of a smart irrigation system is to optimize water efficiency, minimize expenses, and foster the adoption of sustainable water management methods. This paper conducts a systematic risk assessment by exploring the key components/assets and their functionalities in the smart irrigation system. The crucial role of sensors in gathering data on soil moisture, weather patterns, and plant well-being is emphasized in this system. These sensors enable intelligent decision-making in irrigation scheduling and water distribution, leading to enhanced water efficiency and sustainable water management practices. Actuators enable automated control of irrigation devices, ensuring precise and targeted water delivery to plants. Additionally, the paper addresses the potential threat and vulnerabilities associated with smart irrigation systems. It discusses limitations of the system, such as power constraints and computational capabilities, and calculates the potential security risks. The paper suggests possible risk treatment methods for effective secure system operation. In conclusion, the paper emphasizes the significant benefits of implementing smart irrigation systems, including improved water conservation, increased crop yield, and reduced environmental impact. Additionally, based on the security analysis conducted, the paper recommends the implementation of countermeasures and security approaches to address vulnerabilities and ensure the integrity and reliability of the system. By incorporating these measures, smart irrigation technology can revolutionize water management practices in agriculture, promoting sustainability, resource efficiency, and safeguarding against potential security threats.
Comparative analysis between traditional aquaponics and reconstructed aquapon...bijceesjournal
The aquaponic system of planting is a method that does not require soil usage. It is a method that only needs water, fish, lava rocks (a substitute for soil), and plants. Aquaponic systems are sustainable and environmentally friendly. Its use not only helps to plant in small spaces but also helps reduce artificial chemical use and minimizes excess water use, as aquaponics consumes 90% less water than soil-based gardening. The study applied a descriptive and experimental design to assess and compare conventional and reconstructed aquaponic methods for reproducing tomatoes. The researchers created an observation checklist to determine the significant factors of the study. The study aims to determine the significant difference between traditional aquaponics and reconstructed aquaponics systems propagating tomatoes in terms of height, weight, girth, and number of fruits. The reconstructed aquaponics system’s higher growth yield results in a much more nourished crop than the traditional aquaponics system. It is superior in its number of fruits, height, weight, and girth measurement. Moreover, the reconstructed aquaponics system is proven to eliminate all the hindrances present in the traditional aquaponics system, which are overcrowding of fish, algae growth, pest problems, contaminated water, and dead fish.
Using recycled concrete aggregates (RCA) for pavements is crucial to achieving sustainability. Implementing RCA for new pavement can minimize carbon footprint, conserve natural resources, reduce harmful emissions, and lower life cycle costs. Compared to natural aggregate (NA), RCA pavement has fewer comprehensive studies and sustainability assessments.
1. LABORATORY REPORT
EMBEDDED SYSTEM DESIGN USING ARM CORTEX
Course Code: CUTM1039
ELECTRICAL & ELECTROCNICS ENGINEERING
SCHOOL OF ENGINEERING & TECHNOLOGY
CENTURION UNIVERSITY OF TECHNOLOGY & MANAGEMENT
RAMACHANDRAPUR, JATNI, KHURDA, BHUBANESWAR- 752050
Name: Hitesh Kumar Nath
Regd. No.:200301150005
Section: “A”
Branch: EEE
Semester: 4th
Semester
2. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
2 | P a g e
COURSE NAME : Embedded System Design using ARM Cortex
List of Experiments:
1. Familiarization of different IDE to program STM32F10 Micro-controller.
2. Interfacing LED with STM32 to generate LED patterns.
3. Interfacing switch and LED to control LEDs with digital sensor using STM32.
4. Interfacing LCD and LED to display and blinking LED using STM32.
5. Interfacing STM32 to blink built-in LED using Arduino IDE.
6. Interfacing STM32 with LED using Arduino IDE.
7. Interfacing STM32 with LED and switch using Arduino IDE.
8. Interfacing STM32 with buzzer and Switch using Arduino IDE.
9. Interfacing STM32 with 7 segment display using Arduino IDE.
10. Interfacing STM32 with LCD using Arduino IDE.
11. Interface STM32 with Keypad using Arduino IDE.
12. Interfacing STM32 with DC motor using Arduino IDE.
13. Interfacing STM32 with DHT11 and LCD using Arduino IDE.
14. Interfacing STM32 with PIR sensor using Arduino IDE.
15. Interfacing STM32 with IR sensor using Arduino IDE.
16. Interfacing STM32 with Relay module using Arduino IDE.
17. Interfacing STM32 with Servo motor using Arduino IDE.
18. Interfacing STM32 with Soil moisture using Arduino IDE.
19. Interfacing STM32 with Ultrasonic sensor using Arduino IDE.
20. Interfacing STM32 with GPS module using Arduino IDE.
21. Interfacing STM32 with Bluetooth module using Arduino IDE.
22. Interfacing STM32 with I2C LCD module using Arduino IDE.
3. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
3 | P a g e
INDEX
Exp.
No. Date Name of The Experiments
Page
No.
Teacher’s
Signature
01. 25-01-2022
Familiarization of different IDE to
program STM32F10 Micro-controller. 5-11
02. 27-01-2022
Interfacing LED with STM32 to generate
LED patterns. 12-17
03. 01-02-2022
Interfacing switch and LED to control
LEDs with digital sensor using STM32.
18-24
04. 02-02-2022
Interfacing LCD and LED to display and
blinking LED using STM32. 25-31
05. 03-02-2022
Interfacing STM32 to blink builtin LED
using Arduino IDE. 32-35
06. 15-02-2022
Interfacing STM32 with LED using
Arduino IDE. 36-41
07. 16-02-2022
Interfacing STM32 with LED and switch
using Arduino IDE. 42-46
08. 17-02-2022
Interfacing STM32 with buzzer and
Switch using Arduino IDE. 47-52
09. 22-02-2022
Interfacing STM32 with 7 segment
display using Arduino IDE. 53-60
10. 23-02-2022
Interfacing STM32 with LCD using
Arduino IDE. 61-65
11. 24-02-2022
Interface STM32 with Keypad using
Arduino IDE. 66-74
12. 08-03-2022
Interfacing STM32 with DC motor using
Arduino IDE. 75-79
13. 09-03-2022
Interfacing STM32 with DHT11 and LCD
using Arduino IDE. 80-85
14. 10-03-2022
Interfacing STM32 with PIR sensor using
Arduino IDE. 86-92
4. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
4 | P a g e
15. 15-03-2022
Interfacing STM32 with IR sensor using
Arduino IDE. 93-98
16. 16-03-2022
Interfacing STM32 with Relay module
using Arduino IDE. 99-103
17. 17-03-2022
Interfacing STM32 with Servo motor
using Arduino IDE. 104-108
18. 22-03-2022
Interfacing STM32 with Soil moisture
using Arduino IDE. 109-114
19. 23-03-2022
Interfacing STM32 with Ultrasonic sensor
using Arduino IDE. 115-120
20. 29-03-2022
Interfacing STM32 with GPS module
using Arduino IDE.
121-126
21. 30-03-2022
Interfacing STM32 with Bluetooth
module using Arduino IDE. 127-132
22. 05-04-2022
Interfacing STM32 with I2C module using
Arduino IDE. 133-137
5. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
5 | P a g e
Experiment No. 01. Date: 25.01.2022
AIM OF THE EXPERIMENT:
Familiarization of different IDE to program STM32F10 Micro-controller.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01. STM32CubeIDE - -
02. STM32CubeMX - -
03. Keil uVision - -
04. Arduino IDE - -
THEORY:
STM32CubeIDE:
STM32CubeIDE is ST’s first integrated development environment, and it serves as a reference
to developers working on STM32 microcontrollers. Many use a toolchain from a third-party
vendor, and we will continue to work with IAR, Keil, and others to ensure that they offer an
exceptional experience to their users. STM32CubeIDE is a highly symbolic initiative because
it provides a free and uniquely feature-rich environment to enthusiasts and professionals,
thanks to the integration of tools like STM32CubeMX that enable a more efficient workflow.
6. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
6 | P a g e
STM32CubeMX:
STM32CubeMX is a graphical tool that helps developers generate code that initializes a
system. Users get an interface to configure the micro-controller’s pinout and resolve conflicts
as well as set up hardware peripherals and middleware. They can also configure their clock tree
and benefit from a wizard that automates specific calculations. Similarly, another utility sets
up and tunes the DDR on systems with STM32MP1 MPUs. The tool also helps select the right
MCU or MPU and download its software package. Hence, it’s very often the first step for
developers looking to create an application. The tool is available in STM32CubeIDE or as a
standalone download.
Keil uVision:
µVision is a window-based software development platform that combines a robust and modern
editor with a project manager and make facility tool. It integrates all the tools needed to develop
embedded applications including a C/C++ compiler, macro assembler, linker/locator, and a
HEX file generator.
7. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
7 | P a g e
Arduino IDE:
The Arduino IDE is an open-source software, which is used to write and upload code to the
Arduino boards. The IDE application is suitable for different operating systems such
as Windows, Mac OS X, and Linux. It supports the programming languages C and C++. Here,
IDE stands for Integrated Development Environment.
PROCEDURE:
a. STM32CubeIDE:
Step-1: Getting started with STM32 cube IDE in this environment we basically saw the page
Step-2: Then we have to select the part number and click the next button.
8. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
8 | P a g e
Step-3: Then it asks to give the project name
Step-3: After giving the project name it gives an environment and according to our project we
have to fixed it.
9. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
9 | P a g e
b. STM32CubeMX
Step-1: When we work with STM32CubeMX first it gives us below environment
Here we have to click “Access to MCU Selector”.
Step-2: After that it ask to give part number and after giving that it will creates a new project.
c. Keil μVision
Step-1: When we work on STM32CubeMx, it generates code in Keil μVision.
Step-2: After that we write code of our projects.
Step-3: And when we write the code we click on the build and rebuild button.
Step-4: After clicking the button it’s a hex file of our projects.
10. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
10 | P a g e
d. Arduino IDE
Step-1: First we have to open the Arduino IDE and paste the link in preference.
Step-2: Then we have to installed the STM32 in board manager.
Step-3: After installing we have to set our board in Tools.
Step-4: After completion the process we able to write the code for STM32.
11. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
11 | P a g e
CONCLUSION:
After learned about STM32CubeIDE, STM32CubeIDE, Keil uVision and Arduino IDE, I have
familiarized with different IDE and it’s features to program STM32F10 Micro-controller. Also
got to know about the advantages of use this IDE.
Teacher’s Remark : Date of Submission: 27.01.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE
12. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
12 | P a g e
Experiment No. - 02 Date: 27.01.2022
AIM OF THE EXPERIMENT:
Interfacing LED with STM32 to generate LED patterns.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32F103C6
32-bit,20KB
RAM
1
02 LED 3 to 5v 2
03 RESISTOR 510 Ω 2
04 STM32CubeIDE For Programming -
05 PROTEUS
For Circuit
Design
-
THEORY:
STM32F103C6:
The STMicroelectronics STM32F103C6 is an ARM 32-bit Cortex-M3 Micro-controller,
72MHz, 32kB Flash, 10kB SRAM, PLL, Embedded Internal RC 8MHz and 32kHz, Real-Time
Clock, Nested Interrupt Controller, Power Saving Modes, JTAG and SWD, 2 Synch. 16-bit
Timers with Input Capture, Output Compare and PWM, 16-bit 6-ch Advanced Timer, 2 16-bit
Watchdog Timers, SysTick Timer, SPI, I2C, 2 USART, USB 2.0 Full Speed Interface, CAN
2.0B Active, 2 12-bit 10-ch A/D Converter, Fast I/O Ports.
13. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
13 | P a g e
Proteus:
Proteus is used to simulate, design and drawing of electronic circuits. It was invented by the
Labcenter electronic. By using proteus you can make two-dimensional circuits designs as well.
With the use of this engineering software, you can construct and simulate different electrical
and electronic circuits on your personal computers or laptops. Designing of circuits on the
proteus takes less time than practical construction of the circuit. The possibility of error is less
in software simulation such as loose connection that takes a lot of time to find out connection’s
problems in a practical circuit. Circuit simulations provide the main feature that some
components of circuits are not practical then you can construct your circuit on proteus.
Resistor:
A resistor is a passive two-terminal electrical component that implements electrical resistance
as a circuit element. In electronic circuits, resistors are used to reduce current flow, adjust
signal levels, to divide voltages, bias active elements, and terminate transmission lines,
among other uses.
14. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
14 | P a g e
PROCEDURE:
Step-1: First of all, I have created a new project in Proteus and giving the project name.
Step-2: After creating a new project I have selected the component which is used in my project.
Step-3: Then I have connected all the components.
Step-4: After that I have set the LED as digital and give the respective values to the resistor.
Step-5: Then I changed the power configuration of the projects.
Step-6: After that I have write the code in STM32CubeIDE and set the respective parameters.
Step-7: After write the code I have paste the HEX file in the micro-controller in Proteus and
click the run button.
CODE:
#include "main.h"
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
int main(void)
{
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
while (1)
{
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_1, GPIO_PIN_RESET);
HAL_Delay(500);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_1, GPIO_PIN_SET);
HAL_Delay(500);
}}
void SystemClock_Config(void)
16. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
16 | P a g e
{
__disable_irq();
while (1)
{
}
}
void assert_failed(uint8_t *file, uint32_t line){
}
OUTPUT:
17. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
17 | P a g e
CONCLUSION:
After the completion of the Experiment, I have learned how to Interfacing LED with STM32
to generate LED patterns.
Teacher’s Remark : Date of Submission: 01.02.2022
Students Signature : Hitesh Kumar Nath Regd. No.: 200301150005
Teacher’s Signature : Branch : EEE
18. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
18 | P a g e
Experiment No.- 03 Date: 01.02.2022
AIM OF THE EXPERIMENT:
Interfacing switch and LED to control LEDs with digital sensor using STM32.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32F103C6
32-bit,20KB
RAM
1
02 LED 3-5 V 1
03 BUTTON - 1
04 RESISTOR 100Ω AND 10K 2
05 STM32CubeMX
Development
Tool
-
06 PROTEUS Designing Tool -
THEORY:
STMicroelectronics' STM32F1 series of mainstream MCUs covers the needs of a large variety
of applications in the industrial, medical and consumer markets. High performance with first-
class peripherals and low-power, low-voltage operation is paired with a high level of
integration at accessible prices with a simple architecture and easy-to-use tools. Typical
applications include motor drives and application control, medical and handheld equipment,
industrial applications, PLCs, inverters, printers,
and scanners, alarm systems, video intercom,
HVAC and home audio equipment. - LCD
parallel interface, 8080/6800 modes - 5 V-
tolerant I/Os - Timer with quadrature
(incremental) encoder input - 96-bit unique ID.
19. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
19 | P a g e
Proteus:
Proteus Design Suite (designed by Labcenter Electronics Ltd.) is a software tool set, mainly
used for creating schematics, simulating Electronics & Embedded Circuits and designing PCB
Layouts. Proteus ISIS is used by Engineering students & professionals to create schematics &
simulations of different electronic circuits.
PROCEDURE:
Step-1: First of all, I have created a new project in proteus giving project name.
Step-2: After creating a new project I have select the component which is used in my project.
Step-3: Then I have connected all the components.
Step-4: Then I have set LED as digital and give values to the pullup resistor.
Step-5: After that I have changed the power configuration of the projects.
Step-6: Then I have written the code using STM32CubeMX.
Step-7: In STM32CudeMX I have MDK ARM and Generate code in Keil uVision.
Step-8: After that I compile the code and generate Hex file.
Step-9: Then I have pasted the HEX file in the micro-controller in Proteus.
20. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
20 | P a g e
CODE:
#include "main.h"
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
int main(void)
{
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
while (1)
{
if(HAL_GPIO_ReadPin(BUTTON_GPIO_Port,
BUTTON_Pin)==GPIO_PIN_RESET)
HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin,GPIO_PIN_SET);
else
HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin,GPIO_PIN_RESET);
}
}
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
21. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
21 | P a g e
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
RCC_ClkInitStruct.ClockType =
RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
{
Error_Handler();
}
}
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
__HAL_RCC_GPIOC_CLK_ENABLE();
22. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
22 | P a g e
__HAL_RCC_GPIOD_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_SET);
GPIO_InitStruct.Pin = BUTTON_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_PULLUP;
HAL_GPIO_Init(BUTTON_GPIO_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = LED_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_MEDIUM;
HAL_GPIO_Init(LED_GPIO_Port, &GPIO_InitStruct);
}
void Error_Handler(void)
{
__disable_irq();
while (1)
{
}
}
void assert_failed(uint8_t *file, uint32_t line)
{
}
24. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
24 | P a g e
CONCLUSION:
After done the Experiment I have Learned about interfacing switch and LED to control LEDs
with digital sensor using STM32.
Teacher’s Remark : Date of Submission: 02.02.2022
Students Signature : Hitesh Kumar Nath Regd. No.: 200301150005
Teacher’s Signature : Branch: EEE
25. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
25 | P a g e
Experiment No. 04 Date: 02.02.2022
AIM OF THE EXPERIMENT:
Interfacing LCD and LED to display and blinking LED using STM32.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32F103C6
32-bit,20KB
RAM
1
02 LED 3-5 V 3
03 LCD 16×2 1
04 STM32CubeMX Programming NA
05 PROTEUS Circuit Design NA
THEORY:
16 × 𝟐 LCD:
The term LCD stands for liquid crystal display. It is one kind of electronic display module used
in an extensive range of applications like various circuits & devices like mobile phones,
calculators, computers, TV sets, etc. These displays are mainly preferred for multi-
segment light-emitting diodes and seven segments. The main benefits of using this module are
inexpensive; simply programmable, animations, and there are no limitations for displaying
custom characters, special and even animations, etc.
26. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
26 | P a g e
LED:
The lighting emitting diode is a p-n junction diode. It is a specially doped diode and made up
of a special type of semiconductors. When the light emits in the forward biased, then it is called
a light-emitting diode. The LED includes two terminals namely anode (+) and the cathode (-).
PROCEDURE:
Step-1: I have created a new project in proteus by giving project name.
Step-2: After creating a new project I have selected the component which is used in my project.
Step-3: Then I have connected all the components.
Step-4: After that I have set LED as digital.
Step-5: Then I changed the power configuration of the projects.
Step-6: After I have written the code using STM32CubeMX.
Step-7: In STM32CudeMX I have MDK ARM and Generate code in Keil uVision.
Step-8: After that I compiled the code and generate Hex file.
Step-9: Then I have to paste the HEX file in the micro-controller in Proteus and click the run
button.
27. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
27 | P a g e
CODE:
#include "main.h"
#include "lcd_txt.h"
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
int main(void)
{
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
lcd_init(); // Programm LCD
lcd_puts(0,0,(int8_t*)"****LCD TEST****");
HAL_Delay(5000);
lcd_clear();
while (1)
{ HAL_GPIO_WritePin(GPIOA,GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3,1);
HAL_Delay(1000);
HAL_GPIO_WritePin(GPIOA,GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3,0);
HAL_Delay(500);
}
}
void SystemClock_Config(void)
{
28. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
28 | P a g e
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
RCC_ClkInitStruct.ClockType =
RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
{
Error_Handler();
}
}
static void MX_GPIO_Init(void)
29. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
29 | P a g e
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3,
GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOB,
GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13
|GPIO_PIN_14|GPIO_PIN_15, GPIO_PIN_RESET);
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13
|GPIO_PIN_14|GPIO_PIN_15;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
}
void Error_Handler(void)
{
30. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
30 | P a g e
__disable_irq();
while (1)
{
}
}
void assert_failed(uint8_t *file, uint32_t line)
{
}
CIRCUIT DIAGRAM:
31. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
31 | P a g e
CONCLUSION:
From the above experiment, I learned about the pin configuration of LCD and how to interface
with STM32.
Teacher’s Remark : Date of Submission: 03.02.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE
32. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
32 | P a g e
Experiment No. 05. Date: 03.02.2022
AIM OF THE EXPERIMENT:
Interfacing STM32 to blink builtin LED using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32 Blue pill Board
32-bit,20KB
RAM
1
02 TTL Converter
Serial Port
Converter
1
03 Jumper Wire Male to Female As per required
THEORY:
STM32 Blue pill Board:
• It contains the main MCU – the STM32F103C8T6 in a Quad Flat Package.
• A Reset Switch – to reset the Microcontroller.
• MicroUSB port – for serial communication and power.
• BOOT Selector Jumpers – BOOT0 and BOOT1 jumpers
for selecting the booting memory.
• Two LEDs – User LED and Power LED.
• 8 MHz Crystal – Main Clock for MCU.
• SWD Interface – for programming and debugging using ST-Link.
• 3.3V regulator (on the bottom) – converts 5V to 3.3V for powering the MCU.
TTL Converter:
The PL-2303 chip provides a convenient solution for connecting a UART-like full-duplex
asynchronous serial device to any Universal Serial Bus (USB) capable host. The PL-2303
highly compatible drivers could successfully simulate generic COM ports on most operating
systems. The function of each one of the 5-pins on this module’s board is labelled on the back
side as shown in the following picture.
33. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
33 | P a g e
➔ 3.3v pin (if your MCU device’s TTL logic is running at 3.3v level).
➔ TX pin (Goes to the RX pin of your MCU).
➔ RX pin (Goes to the TX pin of your MCU).
➔ GND pin.
➔ +5v pin (Goes to your MCU’s power input if it’s a 5v
TTL compatible).
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: After that I have go to the Arduino IDE for code.
Step-4: In Arduino IDE I have go to the File → Example → Basic → Blink.
Step-5: After getting the code I have set the input pin PC13 and compile the code.
Step-6: After doing all the things I have connected the TTL converter in my PC and start
uploading.
Step-7: After clicking the upload button it uploads the code and my Built-in Led start blinking.
CIRCUIT DIAGRAM:
34. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
34 | P a g e
CODE:
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(PC13, OUTPUT);
}
void loop() {
digitalWrite(PC13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(PC13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
OUTPUT ON HARDWARE:
35. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
35 | P a g e
CONCLUSION:
After doing this experiment I got to know about the STM32 and it’s pin configuration and also,
know that how to write program for STM32.
Teacher’s Remark : Date of Submission: 15.02.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch. : EEE
36. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
36 | P a g e
Experiment No. 06. Date: 15.02.2022
AIM OF THE EXPERIMENT:
Interfacing STM32 with LED using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32 Blue pill Board
32-bit,20KB
RAM
1
02 TTL Converter
Serial Port
Converter
1
03 Jumper Wire Male to Female As per required
04 LED - 2
05 Breadboard - 1
THEORY:
LED:
The lighting emitting diode is a p-n junction diode. It is a specially doped diode and made up
of a special type of semiconductors. When the light emits in the forward biased, then it is called
a light-emitting diode. The LED includes two terminals namely anode (+) and the cathode (-).
37. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
37 | P a g e
STM32 Blue pill Board:
• It contains the main MCU – the STM32F103C8T6 in a
Quad Flat Package.
• A Reset Switch – to reset the Microcontroller.
• microUSB port – for serial communication and power.
• BOOT Selector Jumpers – BOOT0 and BOOT1
jumpers for selecting the booting memory.
• Two LEDs – User LED and Power LED.
• 32.768KHz Oscillator – RTC Clock.
• SWD Interface – for programming and debugging using ST-Link.
• 3.3V regulator (on the bottom) – converts 5V to 3.3V for powering the MCU.
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: After that I have connected the positive terminal of the LED with the input pin of the
STM32 and negative terminal is connected with the ground.
Step-4: After that I have go to the Arduino IDE for code.
Step-5: After writing the program I have compile.
Step-6: After doing all the things I have connected the TTL converter in my PC and start
uploading.
Step-7: After clicking the upload button it uploads the code and my Led start blinking.
38. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
38 | P a g e
CIRCUIT DIAGRAM:
CODE:
Case-1:
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(PA5, OUTPUT);
pinMode(PA6, OUTPUT);
}
void loop() {
digitalWrite(PA5, HIGH); // turn the LED on (HIGH is the voltage level)
// wait for a second
digitalWrite(PA6, HIGH); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
digitalWrite(PA5, LOW); // turn the LED on (HIGH is the voltage level)
// wait for a second
digitalWrite(PA6, LOW); // turn the LED off by making the voltage LOW
delay(1000);
}
40. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
40 | P a g e
digitalWrite(A1, HIGH);
delay(100);
digitalWrite(A3, HIGH);
delay(100);
digitalWrite(A2, HIGH);
delay(100);
digitalWrite(A4, HIGH);
delay(100);
digitalWrite(A6, HIGH);
delay(100);
digitalWrite(A5, HIGH);
delay(500);
}
OUTPUT ON HARDWARE:
Case-1: Case-2:
41. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
41 | P a g e
CONCLUSION:
After completion of this experiment, I got to know about that how to blink LED with STM32
micro-controller using Arduino IDE.
Teacher’s Remark : Date of Submission: 17.02.2022
Students Signature : Hitesh Kumar Nath Regd. No. :200301150005
Teacher’s Signature : Branch : EEE
42. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
42 | P a g e
Experiment No. 07. Date: 17.02.2022
AIM OF THE EXPERIMENT:
Interfacing STM32 with LED and switch using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32 Blue pill Board
32-bit,20KB
RAM
1
02 TTL Converter
Serial Port
Converter
1
03 Jumper Wire Male to Female As per required
04 LED - 2
05 Breadboard - 1
06 Switch - 1
THEORY:
➔ A switch is a component which controls the open-ness or closed-ness of an electric circuit.
They allow control over current flow in a circuit (without having to actually get in there
and manually cut or splice the wires). Switches are critical components in any circuit which
requires user interaction or control.
➔ A switch can only exist in one of two states: open or closed. In
the off state, a switch looks like an open gap in the circuit.
This, in effect, looks like an open circuit, preventing current
from flowing.
➔ In the on state, a switch acts just like a piece of perfectly-
conducting wire. A short. This closes the circuit, turning the system "on" and allowing
current to flow unimpeded through the rest of the system.
43. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
43 | P a g e
Breadboard:
Breadboard comprises of a grid of holes, with
collections of holes electrically connected. Integrated circuits
(dual in-line packages/DIP), leaded components (e.g., LED's,
capacitors, resistors), connectors and wires can be inserted in
to the holes, enabling circuit prototypes to be built without
the need for soldering.
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: After that I have connected the positive terminal of the LED with the input pin of the
STM32 and negative terminal is connected with the ground.
Step-4: In switch one terminal ic connected with Power or 3.3 v and other terminal is connected
with input pin and this input pin is connected with register and then connected with ground.
Step-5: After that I have go to the Arduino IDE for code.
Step-6: After writing the program I have compile.
Step-7: After doing all the things I have connected the TTL converter in my PC and start
uploading.
Step-8: After clicking the upload button it uploads the code and when I click the button the
LED is glow.
44. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
44 | P a g e
CIRCUIT DIAGRAM:
CODE:
int buttonState = 0;
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(PB5, INPUT);
pinMode(PA5, OUTPUT);
pinMode(PA6, OUTPUT);
}
void loop() {
buttonState = digitalRead(PB5);
if (buttonState == HIGH) {
blink_led();
}
else if (buttonState == LOW) {
45. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
45 | P a g e
digitalWrite(PA5, LOW);
digitalWrite(PA6, LOW);
}
}
void blink_led() {
digitalWrite(PA5, HIGH);
digitalWrite(PA6, HIGH);
delay(1000);
OUTPUT ON HARDWARE:
46. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
46 | P a g e
CONCLUSION:
After completion of this experiment, I Learned about that how to blink LED using switch with
STM32 board.
Teacher’s Remark : Date of Submission: 18.02.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE
47. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
47 | P a g e
Experiment No. 08. Date: 18.02.2022
AIM OF THE EXPERIMENT:
Interfacing STM32 with buzzer and Switch using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32 Blue pill Board
32-bit,20KB
RAM
1
02 TTL Converter
Serial Port
Converter
1
03 Jumper Wire Male to Female As per required
04 LED Yellow 2
05 Breadboard - 1
06 Switch - 1
07 buzzer 2pin, 3.3V 1
THEORY:
Buzzer:
An audio signaling device like a beeper or buzzer may be electromechanical
or piezoelectric or mechanical type. The main function of this is to
convert the signal from audio to sound. Generally, it is powered
through DC voltage and used in timers, alarm devices, printers, alarms,
computers, etc. Based on the various designs, it can generate different
sounds like alarm, music, bell & siren.
The pin configuration of the buzzer is shown below. It includes
two pins namely positive and negative. The positive terminal of this is
represented with the ‘+’ symbol or a longer terminal. This terminal is powered through 6Volts
whereas the negative terminal is represented with the ‘-’ symbol or short terminal and it is
connected to the GND terminal.
48. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
48 | P a g e
STM32 Blue pill Board:
• It contains the main MCU – the STM32F103C8T6 in a Quad Flat Package.
• A Reset Switch – to reset the Microcontroller.
• microUSB port – for serial communication and power.
• BOOT Selector Jumpers – BOOT0 and BOOT1 jumpers
for selecting the booting memory.
• Two LEDs – User LED and Power LED.
• 8 MHz Crystal – Main Clock for MCU.
• SWD Interface – for programming and debugging using
ST-Link.
• 3.3V regulator (on the bottom) – converts 5V to 3.3V for powering the MCU.
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: After that I have connected the positive terminal of the LED with the input pin of the
STM32 and negative terminal is connected with the ground.
Step-4: I have connected the +ve terminal of the buzzer with 3.3V of the STM32 and -Ve
terminal of the buzzer is connected with gnd of the STM32.
Step-5: In switch one terminal ic connected with Power or 3.3 v and other terminal is connected
with input pin and this input pin is connected with register and then connected with ground.
Step-6: After that I have go to the Arduino IDE for code.
Step-7: After writing the program I have compile.
Step-8: After doing all the things I have connected the TTL converter in my PC and start
uploading.
Step-9: After clicking the upload button it uploads the code and when I click the button the
LED is glow and buzzer give sound.
49. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
49 | P a g e
CIRCUIT DIAGRAM:
CODE:
Case-1: Interfacing with buzzer and switch
const int buzzer = PA5;
const int buttonPin = PA6;
int buttonState = 0;
void setup() {
pinMode(buzzer, OUTPUT);
pinMode(buttonPin, INPUT);
}
void loop() {
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH)
{
tone(buzzer, 5000);
50. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
50 | P a g e
} else {
noTone(buzzer);
}
}
Case-2: Interfacing with buzzer, switch and LED
const int buzzer = PA5;
const int buttonPin = PA6;
const int led = PA4;
int buttonState = 0;
void setup() {
pinMode(buzzer, OUTPUT);
pinMode(led, OUTPUT);
pinMode(buttonPin, INPUT);
}
void loop() {
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH)
{
tone(buzzer, 30000 );
digitalWrite(led,HIGH);
} else {
noTone(buzzer);
digitalWrite(led,LOW);
51. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
51 | P a g e
}
}
OUTPUT ON HARDWARE:
Case-1:
Case-2:
Initial State After Upload the Code
52. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
52 | P a g e
CONCLUSION:
After doing this experiment, I got know about that how to work with buzzer and switch using
STM32 board.
Teacher’s Remark : Date of Submission: 22.02.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE
53. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
53 | P a g e
Experiment No. 09. Date: 22.02.2022
AIM OF THE EXPERIMENT:
Interfacing STM32 with 7 segment display using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32 Blue pill Board
32-bit,20KB
RAM
1
02 TTL Converter
Serial Port
Converter
1
03 Jumper Wire Male to Female As per required
04 Breadboard - 1
05 7 Segment Display - 1
THEORY:
Seven segment display is the most common device used for displaying
digits and alphabet. You can see the Seven Segment Display devices in TV
shows counting down to ‘0’. Use of LEDs in seven segment displays made it
more popular. The binary information can be displayed in the form of decimal
using this seven-segment display. Its wide range of applications is in
microwave ovens, calculators, washing machines, radios, digital clocks etc.
The seven segment displays are made up of either LEDs (Light emitting diode) or
LCDs (Liquid crystal display). LED or light emitting diode is P-N junction diode which emits
the energy in the form of light, differing from normal P-N junction diode which emits in the
form of heat. Generally, seven segment displays are available in 10 pin packages. The pin
diagram of seven segment display is shown in the above figure. Seven segment display is an
electronic circuit consisting of 10 pins. Out of 10 pins 8 are LED pins and these are left freely.
2 pins in middle are common pins and these are internally shorted. Depending on either the
54. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
54 | P a g e
common pin is cathode or anode seven segment displays can be either named as common
cathode or common anode display respectively.
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: 7 segment display connections are as follows
Pin a – PA8 pin of STM32 Pin b – PA7 pin of STM32
Pin c – PA6 pin of STM32 Pin d – PA5 pin of STM32
Pin e – PA4 pin of STM32 Pin f – PA3 pin of STM32
Pin g – PA2 pin of STM32 Pin DP – PB9 pin of STM32
Pin C – Ground pin of STM32
Step-4: Programming was done in the Arduino IDE. After completion of the program and
successfully ruining the program, we have uploaded that into the board.
Step-5: Rebooting the board then we have got the out output.
CIRCUIT DIAGRAM:
55. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
55 | P a g e
CODE:
#define A PA8
#define B PA7
#define C PA6
#define D PA5
#define E PA4
#define F PA3
#define G PA2
#define DP PB9 // decimal
#define common_cathode 0
#define common_anode 1
bool segMode = common_cathode;
int seg[] {A,B,C,D,E,F,G,DP}; // segment pins
byte chars = 35; // max value in the array "Chars"
byte Chars[35][9] {
{'0',1,1,1,1,1,1,0,0},//0
{'1',0,1,1,0,0,0,0,0},//1
{'2',1,1,0,1,1,0,1,0},//2
{'3',1,1,1,1,0,0,1,0},//3
{'4',0,1,1,0,0,1,1,0},//4
{'5',1,0,1,1,0,1,1,0},//5
{'6',1,0,1,1,1,1,1,0},//6
{'7',1,1,1,0,0,0,0,0},//7
{'8',1,1,1,1,1,1,1,0},//8
{'9',1,1,1,1,0,1,1,0},//9
{'a',1,1,1,0,1,1,1,0},//A/10
{'b',0,0,1,1,1,1,1,0},//b/11
{'c',1,0,0,1,1,1,0,0},//C/12
{'d',0,1,1,1,1,0,1,0},//d/13
{'e',1,0,0,1,1,1,1,0},//E/14
{'f',1,0,0,0,1,1,1,0},//F/15
{'g',1,0,1,1,1,1,0,0},//G/16
{'h',0,1,1,0,1,1,1,0},//H/17
56. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
56 | P a g e
{'i',0,0,0,0,1,1,0,0},//I/18
{'j',0,1,1,1,1,0,0,0},//J/19
{'l',0,0,0,1,1,1,0,0},//L/20
{'n',0,0,1,0,1,0,1,0},//n/21
{'o',0,0,1,1,1,0,1,0},//o/22
{'p',1,1,0,0,1,1,1,0},//P/23
{'q',1,1,1,0,0,1,1,0},//q/24
{'r',0,0,0,0,1,0,1,0},//r/25
{'s',1,0,1,1,0,1,1,0},//S/26 looks like number 5
{'t',0,0,0,1,1,1,1,0},//t/27
{'u',0,1,1,1,1,1,0,0},//U/28
{'y',0,1,1,1,0,1,1,0},//y/29
{'-',0,0,0,0,0,0,1,0},//-/30
{'.',0,0,0,0,0,0,0,1},//./31
{']',1,1,1,1,0,0,0,0},//]/32
{'[',1,0,0,1,1,1,0,0},//[/33
{'_',0,0,0,1,0,0,0,0},//_/34
};
void setup() {
pinMode(seg[0],OUTPUT);
pinMode(seg[1],OUTPUT);
pinMode(seg[2],OUTPUT);
pinMode(seg[3],OUTPUT);
pinMode(seg[4],OUTPUT);
pinMode(seg[5],OUTPUT);
pinMode(seg[6],OUTPUT);
pinMode(seg[7],OUTPUT);
}
void setState(bool mode) //sets the hole segment state to "mode"
{ for(int i = 0;i<=6;i++)
{
digitalWrite(seg[i],mode);
}
}
57. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
57 | P a g e
void Print(char Char)
{
int charNum = -1;// set search resault to -1
setState(segMode);//turn off the segment
for(int i = 0; i < chars ;i++){//search for the enterd character
if(Char == Chars[i][0]){//if the character found
charNum = i;
}
}
if(charNum == -1 )// if the character not found
{
for(int i = 0;i <= 6;i++)
{
digitalWrite(seg[i],HIGH);
delay(100);
digitalWrite(seg[i],LOW);
}
for(int i = 0;i <= 2;i++)
{
delay(100);
setState(HIGH);
delay(100);
setState(LOW);
}
}else // else if the character found print it
{
for(int i = 0;i<8;i++)
{digitalWrite(seg[i],Chars[charNum][i+1]);
}
}
}
void Print(int num) // print any number on the segment
{
setState(segMode);//turn off the segment
58. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
58 | P a g e
if(num > chars || num < 0 )// if the number is not declared
{
for(int i = 0;i <= 6;i++)
{
digitalWrite(seg[i],HIGH);
delay(100);
digitalWrite(seg[i],LOW);
}
for(int i = 0;i <= 2;i++)
{
delay(100);
setState(HIGH);
delay(100);
setState(LOW);
}
}else // else if the number declared, print it
{
if(segMode == 0){ //for segment mode
for(int i = 0;i<8;i++)
{
digitalWrite(seg[i],Chars[num][i+1]);
} }
else{
for(int i = 0;i<8;i++)
{
digitalWrite(seg[i],!Chars[num][i+1]);
}} }}
void loop() {
for(int i = 0;i < chars;i++) //print
{
Print(i);
delay(1000);
}
}
60. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
60 | P a g e
CONCLUSION:
From the above experiment, I learned about the 7-segment display and how to interface with
STM32 board.
Teacher’s Remark : Date of Submission: 23.02.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE
61. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
61 | P a g e
Experiment No. 10. Date: 23.02.2022
AIM OF THE EXPERIMENT:
Interfacing STM32 with LCD using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32 Blue pill Board
32-bit,20KB
RAM
1
02 TTL Converter
Serial Port
Converter
1
03 Jumper Wire Male to Female As per required
04 Breadboard - 1
05 LCD 16× 2 1
06 Potentiometer 10K 1
THEORY:
Alphanumeric LCD:
The term LCD stands for liquid crystal display. It is one kind of electronic display
module used in an extensive range of applications like various circuits & devices like mobile
phones, calculators, computers, TV sets, etc. These displays are mainly preferred for multi-
segment light-emitting diodes and seven segments.
The main benefits of using this module are
inexpensive; simply programmable, animations,
and there are no limitations for displaying custom
characters, special and even animations, etc.
The 16×2 LCD pinout is shown below.
➢ Pin1 (Ground/Source Pin): This is a GND pin of display, used to connect the GND
terminal of the microcontroller unit or power source.
62. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
62 | P a g e
➢ Pin2 (VCC/Source Pin): This is the voltage supply pin of the display, used to connect
the supply pin of the power source.
➢ Pin3 (V0/VEE/Control Pin): This pin regulates the difference of the display, used to
connect a changeable POT that can supply 0 to 5V.
➢ Pin4 (Register Select/Control Pin): This pin toggles among command or data register,
used to connect a microcontroller unit pin and obtains either 0 or 1(0 = data mode, and
1 = command mode).
➢ Pin5 (Read/Write/Control Pin): This pin toggles the display among the read or writes
operation, and it is connected to a microcontroller unit pin to get either 0 or 1 (0 = Write
Operation, and 1 = Read Operation).
➢ Pin 6 (Enable/Control Pin): This pin should be held high to execute Read/Write process,
and it is connected to the microcontroller unit & constantly held high.
➢ Pins 7-14 (Data Pins): These pins are used to send data to the display. These pins are
connected in two-wire modes like 4-wire mode and 8-wire mode.
➢ Pin15 (+ve pin of the LED): This pin is connected to +5V
➢ Pin 16 (-ve pin of the LED): This pin is connected to GND.
The features of this LCD mainly include
the following.
➢ The operating voltage of this LCD
is 4.7V-5.3V
➢ It includes two rows where each
row can produce 16-characters.
➢ The utilization of current is 1mA with no backlight
➢ Every character can be built with a 5×8 pixel box
➢ The alphanumeric LCDs alphabets & numbers
➢ Is display can work on two modes like 4-bit & 8-bit
➢ These are obtainable in Blue & Green Backlight
➢ It displays a few custom generated characters
63. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
63 | P a g e
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: STM32F103C6 along with a TTL converter, 16*2 LCD, Breadboard and jumper wires
as required.
Step-4: After that I have connected the LCD pin
Rs pin – PB11 of STM32 E pin - PB10 of STM32
D4 pin –PB0 of STM32 D5 pin –PA7 of STM32
D6 pin –PA6 of STM32 D7 pin –PA5 of STM32
15 + pin – 5v of TTL 16 – pin – gnd of STM32
Step-5: Then I have connected the potentiometer to 5v and gnd and middle point is connected
to V0 of LCD.
Step-6: For programming I have go to the Arduino IDE and after write the code I have
uploaded and got the output.
CIRCUIT DIAGRAM:
64. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
64 | P a g e
CODE:
#include <LiquidCrystal.h>
const int rs = PB11, en = PB10, d4 = PB0, d5 = PA7, d6 = PA6, d7 = PA5;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup() {
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print(“Interfacing LCD”);
lcd.setCursor(0, 1);
lcd.print(“Embedded System”);
delay(2000);
lcd.clear();
}
void loop() {
lcd.setCursor(0, 0);
lcd.print(“STM32–Blue Pill”);
lcd.setCursor(0, 1);
lcd.print(“Arduino”);
}
OUTPUT ON HARDWARE:
65. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
65 | P a g e
CONCLUSION:
From the above experiment, I got to know about pin configuration of LCD and to interface
with LCD using Arduino IDE.
Teacher’s Remark : Date of Submission: 24.02.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE
66. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
66 | P a g e
Experiment No. 11. Date: 24.02.2022
AIM OF THE EXPERIMENT:
Interface STM32 with Keypad using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32 Blue pill Board
32-bit,20KB
RAM
1
02 TTL Converter
Serial Port
Converter
1
03 Jumper Wire Male to Female As per required
04 Breadboard - 1
05 LCD 16 × 2 1
06 Potentiometer 10k 1
07 Keypad 4 × 4 1
THEORY:
Keypad:
A 4X4 KEYPAD will have eight terminals. In them four
are rows of matrix and four are columns of matrix. These 8
pins are driven out from 16 buttons present in the MODULE.
Those 16 alphanumeric digits on the module surface are the 16
buttons arranged in matrix formation.
4X4 KEYPAD MODULE Features and Specifications
• Maximum Voltage across each segment or button: 24V
• Maximum Current through each segment or button: 30ma
• Maximum operating temperature: 0°C to + 50°C
67. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
67 | P a g e
• Ultra-thin design
• Adhesive backing
• Easy interface
• Long life
Potentiometer:
A potentiometer is a variable resistor with three terminals whose voltage is adjustable
manually with the help of a movable contact, in order to control the flow of electric current
through it. Every variable resistor will have some kind of mechanical or electronic control to
vary its resistance, based on the variation of this resistance the voltage across it and current
through it is controlled with respect to Ohms Law. The most obvious use of the potentiometer
which most of us have spotted is volume control in
radios and other audio equipment.
Trimmers or trim pots are a special type of
rotary potentiometer that can be fixed once in the
circuit and used to make occasional adjustments to
the circuit. The rotary wiper on the POT can be
adjusted by using a small bladed screwdriver or a
similar plastic tool.
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: STM32F103C6 along with a TTL converter, 16*2 LCD, Breadboard and jumper wires
as required.
Step-4: After that I have connected the LCD pin
68. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
68 | P a g e
Rs pin – PB11 of STM32, E pin - PB10 of STM32
D4 pin –PB0 of STM32, D5 pin –PA7 of STM32
D6 pin –PA6 of STM32, D7 pin –PA5 of STM32
Anode pin – 5v of TTL, Cathode pin – gnd of STM32
Step-4: I have connected all the keypad pin with the below manner
➔ Row - PB12, PB15, PB3, PB4
➔ Column - PB5, PB6, PB7, PB8
Step-5: Potentiometer connected to 5v and gnd and middle pin is connected to V0 of LCD.
Step-6: Programming was done in the Arduino IDE. After completion of the program and
successfully ruining the program, we have uploaded that into the board and got the output.
CIRCUIT DIAGRAM:
69. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
69 | P a g e
CODE:
Case-1:
#include <Keypad.h>
#include <LiquidCrystal.h>
const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns
//define the cymbols on the buttons of the keypads
char hexaKeys[ROWS][COLS] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[ROWS] = {PA12, PA15, PB3, PB4}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {PB5, PB6, PB7, PB8}; //connect to the column pinouts of the keypad
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS,
COLS);
LiquidCrystal lcd(PB11, PB10, PA0, PA1, PA2, PA3);
void setup()
{
lcd.begin(16, 2);
lcd.print("EMBEDDED SYSTEM");
delay(2000);
lcd.clear();
lcd.setCursor(0, 0);
}
void loop()
{
char customKey = customKeypad.getKey();
if (customKey)
{
lcd.print(customKey);
}}
71. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
71 | P a g e
}
if (key=='2')
{
digitalWrite(ledpin1,HIGH);
}
if (key=='3')
{
digitalWrite(ledpin2,HIGH);
}
if (key=='4')
{
digitalWrite(ledpin,LOW);
}
if (key=='5')
{
digitalWrite(ledpin1,LOW);
}
if (key=='6')
{
digitalWrite(ledpin2,LOW);
}
}
OUTPUT ON HARDWARE:
74. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
74 | P a g e
CONCLUSION:
From the above experiment I got to know about that how to interface with keypad STM32
board and learned about the pin configuration. Also, know that the interfacing of Keypad with
LED.
Teacher’s Remark : Date of Submission: 08.03.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE
75. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
75 | P a g e
Experiment No. 12. Date: 08.03.2022
AIM OF THE EXPERIMENT:
Interfacing STM32 with DC motor using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32 Blue pill Board
32-bit,20KB
RAM
1
02 TTL Converter
Serial Port
Converter
1
03 Jumper Wire Male to Female As per required
04 Breadboard - 1
05 DC motor
Standard
130,4.5V-9V
1
06 L293D Motor Driver 1
THEORY:
DC Motor:
A DC motor is an electrical machine that converts electrical energy into mechanical
energy. In a DC motor, the input electrical energy is the direct current which is transformed
into the mechanical rotation.
The DC motor speed can be controlled by applying varying DC voltage; whereas the
direction of rotation of the motor can be changed by reversing the direction of current through
it. For applying varying voltage, we can make use of PWM
technique. For reversing the current, we can make use of
H-Bridge circuit or motor driver ICs that employ the H-
Bridge technique.
76. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
76 | P a g e
L293D Motor Driver IC:
A motor driver IC is an integrated circuit chip which is usually used to control motors
in autonomous robots. The most commonly used motor driver IC’s are from the L293 series
such as L293D, L293NE, etc. L293D consist of two H-bridge. H-bridge is the simplest circuit
for controlling a low current rated motor. L293D has 16
pins, they are comprised as follows:
Ground Pins - 4
Input Pins - 4
Output Pins - 4
Enable pins - 2
Voltage Pins - 2
Motor Driver IC L293D is running on the basic principle of H-Bridge, IC L293D has
two-channel it consists of H-Bridge circuit in each channel therefore it’s known as Dual H-
Bridge Motor Driver IC L293D. The circuit diagram of the H-Bridge is given below, the circuit
diagram consists of four switches to control the direction of rotation of the motor. To
understand the circuit diagram in a better way we will consider the following conditions.
• When Switch S1 & S4 closed, a positive voltage is
applied across the motor and it will rotate in a
clockwise direction and when both switches are open,
the motor will stop rotating.
• When Switch S2 & S3 Closed, an inverting voltage is
applied at the terminals of the motor and it will rotate
in an anti-clockwise direction and when both switches are open, the motor will stop
rotating.
H-Bridge Circuit Diagram.
• When Switches S1 & S3 are closed, the motor receives positive voltage at both
terminals, forcing the motor to burn out due to excessive heat.
• When Switches S2 & S4 are closed, the motor receives negative voltage at both
terminals, forcing the motor to burn out due to excessive heat.
• When Switches S1 & S2 are closed, the power supply gets shorted.
• When Switches S3 & S4 are closed, the power supply gets shorted.
77. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
77 | P a g e
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: I have connected the pin i.e.,
GND pin - GND of STM32
5V pin - 5V of TTL converter
Motor pin 1- A5 of STM32
Motor pin 2- A6 of STM32
Step-4: Programming was done in the Arduino IDE. After completion of the program and
successfully ruining the program, we have uploaded that into the board and got the output.
CIRCUIT DIAGRAM:
78. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
78 | P a g e
CODE:
const int direction1=PB3;
const int direction2=PB4;
{
pinMode(direction1, OUTPUT);
pinMode(direction2, OUTPUT); }
void loop(){
digitalWrite(direction1,HIGH);
digitalWrite(direction2, LOW);
delay(10000);
digitalWrite(direction1,LOW);
digitalWrite(direction2, LOW);
delay(1000);
}
OUTPUT ON HARDWARE:
79. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
79 | P a g e
CONCLUSION:
From the above experiment, I got to know about that how to work with DC motor and also I
learned that the interfacing of DC motor with STM32 board.
Teacher’s Remark : Date of Submission: 09.03.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE
80. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
80 | P a g e
Experiment No. 13. Date: 09.03.2022
AIM OF THE EXPERIMENT:
Interfacing STM32 with DHT11 and LCD using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32 Blue pill Board
32-bit,20KB
RAM
1
02 TTL Converter
Serial Port
Converter
1
03 Jumper Wire Male to Female As per required
04 Breadboard - 1
05 LCD 16 × 2 1
06 DHT11
Temperature and
Humidity Sensor
1
07 Potentiometer 10K 1
THEORY:
DHT11 Sensor:
DHT11 is a part of DHTXX series of
Humidity sensors. The other sensor in this series
is DHT22. Both these sensors are Relative
Humidity (RH) Sensor. As a result, they will
measure both the humidity and temperature.
The DHT11 Humidity and Temperature Sensor consists of 3 main components. A
resistive type humidity sensor, an NTC (negative temperature coefficient) thermistor (to
measure the temperature) and an 8-bit microcontroller, which converts the analog signals from
both the sensors and sends out single digital signal. DHT11 Humidity Sensor consists of 4 pins:
81. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
81 | P a g e
VCC, Data Out, Not Connected (NC) and GND. The range of voltage for VCC pin is 3.5V to
5.5V. A 5V supply would do fine. The data from the Data Out pin is a serial digital data.
Potentiometer:
A potentiometer is a variable resistor with three terminals
whose voltage is adjustable manually with the help of a movable
contact, in order to control the flow of electric current through it.
Every variable resistor will have some kind of mechanical or
electronic control to vary its resistance, based on the variation of
this resistance the voltage across it and current through it is controlled with respect to Ohms
Law.
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: I have connected the pin of DHT11 i.e.,
VCC – 5v of TTL converter
OUT – A0 of STM32 board
GND - GND pin of STM32
Step-4: After that I have connected the LCD pin
Rs pin – PB11 of STM32, E pin - PB10 of STM32
D4 pin – PB0 of STM32, D5 pin – PA7 of STM32
D6 pin – PA6 of STM32, D7 pin – PA5 of STM32
Anode pin – 5v of TTL, Cathode pin – gnd of STM32
82. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
82 | P a g e
Step-5: Potentiometer connected to 5v and gnd and middle point is connected to V0 of LCD.
Step-6: Programming was done in the Arduino IDE. After completion of the program and
successfully ruining the program, we have uploaded that into the board and got the output.
CIRCUIT DIAGRAM:
CODE:
#include <LiquidCrystal.h>
#include "DHT.h"
const int rs = PB11, en = PB10, d4 = PB0, d5 = PA7, d6 = PA6, d7 = PA5;
LiquidCrystal lcd (rs, en, d4, d5, d6, d7); // initializing the lcd pins
#define DHTPIN PA0
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
void setup()
83. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
83 | P a g e
{
dht.begin();
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print("DHT11 with STM32");
delay(3000);
lcd.clear();
}
void loop()
{
float h = dht.readHumidity(); //Gets Humidity value
float t = dht.readTemperature(); //Gets Temperature value
lcd.setCursor(0, 0);
lcd.print("Temp: ");
lcd.print(t);
lcd.print(" C");
lcd.setCursor(0, 1);
lcd.print("Humid: ");
lcd.print(h);
lcd.print(" %");
}
85. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
85 | P a g e
CONCLUSION:
From the above experiment, I got to know that how to work with DHT11 and learned that how
to interface with STM32 board.
Teacher’s Remark : Date of Submission: 10.03.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE
86. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
86 | P a g e
Experiment No. 14. Date: 10.03.2022
AIM OF THE EXPERIMENT:
Interfacing STM32 with PIR sensor using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32 Blue pill Board
32-bit,20KB
RAM
1
02 TTL Converter
Serial Port
Converter
1
03 Jumper Wire Male to Female As per required
04 Breadboard - 1
05 LCD 16 × 2 1
06 PIR 4.8V-20V 1
07 Potentiometer 10K 1
THEORY:
PIR Sensor:
A passive infrared (PIR) sensor recognizes infrared light emitted from nearby
objects. PIR sensors are used in thermal sensing applications, such as security and
motion detection. They are commonly used in security alarms, motion detection alarms,
and automatic lighting applications.
Passive infrared (PIR) sensors use a pair of pyroelectric sensors to detect heat
energy in the surrounding environment. These two sensors sit beside each other, and
when the signal differential between the two sensors changes (if a person enters the
room, for example), the sensor will engage.
87. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
87 | P a g e
The PIR sensors are of two types:
1. Thermal Infrared Sensors- Thermal Infrared sensors or Pyroelectric Infrared sensors
use Infrared as the source of heat energy for the detection of objects and their sensitivity
is independent of the wavelength. These sensors are slow with their detection time and
responsiveness.
2. Quantum Infrared sensors- Quantum sensors detect photons and are dependent on the
wavelength and are highly sensitive than those sensing heat. These sensors are fast in
their detection time and responsiveness but require frequent cooling for precise
measurement.
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: Then I have connected the pin of PIR sensor i.e.,
GND – GND of STM32
VCC – 5v of STM32
OUTPUT – A3 of STM32
Step-4: After that, I have connected the respective pin of the LCD i.e.,
88. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
88 | P a g e
Rs pin – PB11 of STM32, E pin - PB10 of STM32
D4 pin – PB0 of STM32, D5 pin – PA7 of STM32
D6 pin – PA6 of STM32, D7 pin – PA5 of STM32
Anode pin – 5v of TTL, Cathode pin – gnd of STM32
Step-5: Potentiometer connected to 5v and gnd and middle point is connected to V0 of LCD.
Step-6: Programming was done in the Arduino IDE. After completion of the program and
successfully ruining the program, we have uploaded that into the board and got the output.
CIRCUIT DIAGRAM:
CODE:
#include<LiquidCrystal.h>
const int rs = PB11, en = PB10, d4 = PB0, d5 = PA7, d6 = PA6, d7 = PA5;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
89. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
89 | P a g e
int calibrationTime = 10;
long unsigned int lowIn;
long unsigned int pause = 5000;
boolean lockLow = true;
boolean takeLowTime;
int pirPin = PA0;
int pinBuzzer =PB5;
void setup(){
lcd.begin(16,2);
pinMode(pirPin, INPUT);
pinMode(pinBuzzer, OUTPUT);
digitalWrite(pirPin, LOW);
lcd.print("calibrtng ");
delay(1000);
lcd.clear();
for(int i = 1; i < calibrationTime; i++){
lcd.print(i);
delay(1000);
lcd.clear();
}
lcd.clear();
lcd.setCursor(0,0);
lcd.print("DEVICE");
90. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
90 | P a g e
lcd.setCursor(0,1);
lcd.print("ACTIVE");
delay(1000);
lcd.clear();
}
void loop(){
if(digitalRead(pirPin) == HIGH){
digitalWrite(pinBuzzer, HIGH);
if(lockLow){
lockLow = false;
lcd.setCursor(0,0);
lcd.print("START ");
lcd.print(millis()/1000);
lcd.print(" sec");
delay(50);
}
takeLowTime = true;
}
if(digitalRead(pirPin) == LOW){
digitalWrite(pinBuzzer, LOW);
if(takeLowTime){
lowIn = millis();
takeLowTime = false;
91. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
91 | P a g e
}
if(!lockLow && millis() - lowIn > pause){
lockLow = true;
lcd.setCursor(0,1);
lcd.print("END ");
lcd.print((millis() - pause)/1000);
lcd.print(" sec");
delay(50);
}
}
}
OUTPUT ON HARDWARE:
When Motion is Detect Final Result
92. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
92 | P a g e
CONCLUSION:
After completed this experiment, I got know about the PIR sensor and it’s pin out and also
learned that how to interface with STM32 board.
Teacher’s Remark : Date of Submission: 15.03.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE
93. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
93 | P a g e
Experiment No. 15. Date: 15.03.2022
AIM OF THE EXPERIMENT:
Interfacing STM32 with IR sensor using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32 Blue pill Board
32-bit,20KB
RAM
1
02 TTL Converter
Serial Port
Converter
1
03 Jumper Wire Male to Female As per required
04 Breadboard - 1
05 LCD 16 × 2 1
06 IR 3.3V-5V 1
07 Potentiometer 10K 1
THEORY:
An infrared sensor is an electronic device,
that emits in order to sense some aspects of
the surroundings. An IR sensor can
measure the heat of an object as well as
detects the motion. These types of sensors measure only infrared radiation, rather than emitting
it that is called a passive IR sensor. Usually, in the infrared spectrum, all the objects radiate
some form of thermal radiation. These types of radiations are invisible to our eyes, which can
be detected by an infrared sensor. The emitter is simply an IR LED (Light Emitting Diode) and
the detector is simply an IR photodiode that is sensitive to IR light of the same wavelength as
that emitted by the IR LED. When IR light falls on the photodiode, the resistances and the
output voltages will change in proportion to the magnitude of the IR light received
94. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
94 | P a g e
IR sensors are classified into different types depending on the applications. Some of the typical
applications of different types of sensors. The speed sensor is used for synchronizing the speed
of multiple motors. The temperature sensor is used for industrial temperature control. PIR
sensor is used for an automatic door opening system and the Ultrasonic sensor is used for
distance measurement.
Active IR Sensor:
This active infrared sensor includes both the transmitter as well as the receiver. In most
of the applications, the light-emitting diode is used as a source. LED is used as a non-imaging
infrared sensor whereas the laser diode is used as an imaging infrared sensor.
Passive IR Sensor:
The passive infrared sensor includes detectors only but they don’t include a transmitter.
These sensors use an object like a transmitter or IR source. This object emits energy and detects
through infrared receivers. After that, a signal processor is used to understand the signal to
obtain the required information.
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: After that, I have connected the respective pin of the LCD i.e.,
Rs pin – PB11 of STM32, E pin - PB10 of STM32
D4 pin –PB0 of STM32, D5 pin –PA7 of STM32
D6 pin –PA6 of STM32, D7 pin –PA5 of STM32
Anode pin – 5v of TTL, Cathode pin – gnd of STM32
Step-4: Potentiometer connected to 5v and gnd and middle point is connected to V0 of LCD.
95. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
95 | P a g e
Step-5: Then, I have connected the pin of IR sensor with STM32 board i.e., VCC pin- 5V,
GND pin- ground and OUT pin- PB6.
Step-6: After doing this, I have written the code for this experiment and then compile the
program.
Step-7: After compile the code I have uploaded and successfully got the output.
CIRCUIT DIAGRAM:
CODE:
#include <LiquidCrystal.h>
const int rs = PB11, en = PB10, d4 = PB0, d5 = PA7, d6 = PA6, d7 = PA5;
LiquidCrystal lcd (rs, en, d4, d5, d6, d7);
const int sensora = PB6;
const int LED1 = PB4;
void setup(){
pinMode(LED1,OUTPUT);
96. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
96 | P a g e
lcd.clear();
lcd.begin(16,2);
lcd.setCursor(3,0);
lcd.print("IR Sesnsor");
lcd.setCursor(0,1);
lcd.print("Embedded System");
delay(500);
}
void loop(){
Sensor1();
delay(500);
}
void Sensor1(){
int statusSensor1 = digitalRead (sensora);
if (statusSensor1 == 1){
digitalWrite(LED1, LOW);
lcd.setCursor(0,0);
lcd.print("Object Is Not Found");
lcd.setCursor(1,1);
lcd.print(" The LED IS OFF ");
}
else
{
97. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
97 | P a g e
digitalWrite(LED1, HIGH);
lcd.setCursor(0,0);
lcd.print("Object is Found");
lcd.setCursor(0,1);
lcd.print(" The LED IS ON ");
}
}
OUTPUT ON HARDWARE:
(Initial State)
(Final State)
98. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
98 | P a g e
CONCLUSION:
After doing this experiment, I got to know about that how to work with IR sensor and done the
interfacing with STM32 board.
Teacher’s Remark : Date of Submission: 16.03.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE
99. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
99 | P a g e
Experiment No. 16. Date: 16.03.2022
AIM OF THE EXPERIMENT:
Interfacing STM32 with Relay module using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32 Blue pill Board
32-bit,20KB
RAM
1
02 TTL Converter
Serial Port
Converter
1
03 Jumper Wire Male to Female As per required
04 Breadboard - 1
05 Relay module 3.75V-6V 1
THEORY:
Relay is one kind of electro-mechanical component that functions as a switch. The relay
coil is energized by DC so that contact switches can be opened or closed. A single channel 5V
relay module generally includes a coil, and two contacts
like normally open (NO) and normally closed (NC).
A 5v relay is an automatic switch that is commonly used
in an automatic control circuit and to control a high-
current using a low-current signal. The input voltage of
the relay signal ranges from 0 to 5V.
5V Relay Pin Configuration:
Relay Pin Diagram:
Pin1 (End 1): It is used to activate the relay; usually this pin one end is connected to 5Volts
whereas another end is connected to the ground.
Pin2 (End 2): This pin is used to activate the Relay.
100. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
100 | P a g e
Pin3 (Common (COM)): This pin is connected to the main terminal of the Load to make it
active.
Pin4 (Normally Closed (NC)): This second terminal of the load is connected to either NC/
NO pins. If this pin is connected to the load then it will be ON before the switch.
Pin5 (Normally Open (NO)): If the second terminal of the load is allied to the NO pin, then
the load will be turned off before the switch.
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: After that, I have connected the pin of the relay module with STM32 board.
VCC- 5v of STM32 GND- GND of STM32
IN - PA4 pin of STM32 NO- One terminal of LED
COM- Another terminal of LED
Step-4: Also connected a switch with relay to control the light. One pin of switch is connected
a 1k res and grounded & another pin connected to input pin PB5 of STM32.
Step-5: After doing this, I have written the code for this experiment and compile the program.
Step-6: Then, I have given supply to the bulb and successfully got the output.
CIRCUIT DIAGRAM:
101. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
101 | P a g e
CODE:
const int relay = PA3;
int switchPin = PB5;
int buttonState = 0;
void setup() {
// put your setup code here, to run once:
pinMode(switchPin, INPUT);
pinMode(relay,OUTPUT);
digitalWrite(relay, HIGH);
}
void loop() {
buttonState = digitalRead(PB5);
if (buttonState == HIGH) {
digitalWrite(relay, LOW);
//delay(1000);
}
else if (buttonState == LOW) {
digitalWrite(relay, HIGH);
//delay(1000);
}
}
103. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
103 | P a g e
CONCLUSION:
After completed this experiment, I got know about the relay module and how to interface with
STM32 board.
Teacher’s Remark : Date of Submission: 17.03.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE
104. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
104 | P a g e
Experiment No. 17. Date: 17.03.2022
AIM OF THE EXPERIMENT:
Interfacing STM32 with Servo motor using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32 Blue pill Board
32-bit,20KB
RAM
1
02 TTL Converter
Serial Port
Converter
1
03 Jumper Wire Male to Female As per required
04 Breadboard - 1
05 Servo Motor 5V 1
06 Potentiometer 10K 1
THEORY:
Servo Meter:
A servo motor is a type of motor that can rotate with great precision. Normally this type
of motor consists of a control circuit that provides
feedback on the current position of the motor
shaft, this feedback allows the servo motors to
rotate with great precision. If you want to rotate
an object at some specific angles or distance, then
you use a servo motor. It is just made up of a
simple motor which runs through a servo mechanism. If motor is powered by a DC power
supply then it is called DC servo motor, and if it is AC-powered motor then it is called AC
servo motor. For this tutorial, we will be discussing only about the DC servo motor
working. Apart from these major classifications, there are many other types of servo motors
based on the type of gear arrangement and operating characteristics. A servo motor usually
comes with a gear arrangement that allows us to get a very high torque servo motor in small
105. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
105 | P a g e
and lightweight packages. Due to these features, they are being used in many applications like
toy car, RC helicopters and planes, Robotics, etc.
It consists of three parts:
1. Controlled device
2. Output sensor
3. Feedback system
It is a closed-loop system where it uses a positive feedback system to control motion and the
final position of the shaft. Here the device is controlled by a feedback signal generated by
comparing output signal and reference input signal.
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: Then, I have connected the pin of Servo motor i.e.,
VCC – 5v of STM32
GND – GND of STM32
IN - PA5 of STM32
Step-4: Connected a potentiometer to control the direction of the motor.
Step-5: After doing this, I have written the code for this experiment and then compile the
program.
Step-6: After compile the code I have uploaded and successfully got the output.
106. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
106 | P a g e
CIRCUIT DIAGRAM:
CODE:
#include <Servo.h>
Servo myservo;
int potpin = PA2;
int val;
void setup() {
myservo.attach(PA3); }
void loop() {
val = analogRead(potpin);
val = map(val, 0, 1023, 0, 180);
myservo.write(val);
delay(15);
}
108. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
108 | P a g e
CONCLUSION:
After completed this experiment, I got know about the servo motor and how to interface with
STM32 board.
Teacher’s Remark : Date of Submission: 22.03.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE
109. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
109 | P a g e
Experiment No. 18. Date: 22.03.2022
AIM OF THE EXPERIMENT:
Interfacing STM32 with Soil moisture using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01. STM32 Blue pill Board
32-bit,20KB
RAM
1
02. TTL Converter
Serial Port
Converter
1
03. Jumper Wire Male to Female As per required
04. Breadboard - 1
05. Soil Moisture 3.3V-5V 1
06. LCD 16 × 2 1
07. Potentiometer 10K 1
THEORY:
Soil moisture Sensor:
The soil moisture sensor is one kind of sensor used to gauge the volumetric content of
water within the soil. As the straight gravimetric dimension of soil moisture needs eliminating,
drying, as well as sample weighting. These sensors measure the volumetric water content not
directly with the help of some other rules of soil like dielectric constant, electrical resistance,
otherwise interaction with neutrons, and replacement of the moisture content.
The relation among the calculated property as well as moisture of soil should be
adjusted & may change based on ecological factors like temperature, type of soil, otherwise
electric conductivity. The microwave emission which is reflected can be influenced by the
moisture of soil as well as mainly used in agriculture and remote sensing within hydrology.
110. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
110 | P a g e
These sensors normally used to check volumetric water content, and another group of sensors
calculates a new property of moisture
within soils named water potential.
Generally, these sensors are named as
soil water potential sensors which
include gypsum blocks and
tensiometer.
The FC-28 soil moisture sensor includes 4-pins
• VCC pin is used for power
• A0 pin is an analog output
• D0 pin is a digital output
• GND pin is a Ground
This module also includes a potentiometer that will fix the threshold value, & the value can be
evaluated by the comparator-LM393. The LED will turn on/off based on the threshold value.
Specifications
The specification of this sensor includes the following.
• The required voltage for working is 5V
• The required current for working is <20mA
• Type of interface is analog
• The required working temperature of this sensor is 10°C~30°C
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: After that, I have connected the respective pin of the LCD i.e.,
Rs pin – PB11 of STM32, E pin - PB10 of STM32
D4 pin –PB0 of STM32, D5 pin –PA7 of STM32
111. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
111 | P a g e
D6 pin –PA6 of STM32, D7 pin –PA5 of STM32
Anode pin – 5v of TTL, Cathode pin – gnd of STM32
Step-4: Potentiometer connected to 5v and gnd and middle point is connected to V0 of LCD.
Step-5: The connection of Soil moisture sensor given bellow
GND – GND of STM32
VCC – 5v of STM32
OUTPUT – A3 of STM32(Analog pin)
Step-5: After doing this, I have written the code for this experiment and then compile the
program.
Step-6: After compile the code I have uploaded and successfully got the output.
CIRCUIT DIAGRAM:
CODE:
#include <LiquidCrystal.h>
const int rs = PB11, en = PB10, d4 = PB0, d5 = PA7, d6 = PA6, d7 = PA5;
LiquidCrystal lcd (rs, en, d4, d5, d6, d7);
int sensor_pin = PA4;
112. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
112 | P a g e
int output_value ;
void setup() {
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print("Soil Moisture");
delay(3000);
lcd.clear();
}
void loop() {
float moisture_percentage;
int sensor_analog;
sensor_analog = analogRead(sensor_pin);
moisture_percentage = ( 100 - ( (sensor_analog / 1023.00) * 100 ) );
lcd.print("Moisture Percentage = ");
lcd.print(moisture_percentage);
lcd.print("%nn");
delay(1000);
}
113. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
113 | P a g e
OUTPUT ON HARDWARE:
Starting condition
After upload the code
114. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
114 | P a g e
CONCLUSION:
After completed this experiment, I got know about the Soil moisture sensor and its pinout and
also learned that how to interface with STM32 board.
Teacher’s Remark : Date of Submission: 23.03.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE
115. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
115 | P a g e
Experiment No. 19. Date: 23.03.2022
AIM OF THE EXPERIMENT:
Interfacing STM32 with Ultrasonic sensor using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32 Blue pill Board
32-bit,20KB
RAM
1
02 TTL Converter
Serial Port
Converter
1
03 Jumper Wire Male to Female As per required
04 Breadboard - 1
05 LCD 16 × 2 1
06 Potentiometer 10k 1
07 Ultrasonic Sensor 5V DC 1
Theory:
Ultrasonic Sensor
An ultrasonic sensor is an instrument that measures the distance to an object using
ultrasonic sound waves. An ultrasonic sensor uses a transducer to send and receive ultrasonic
pulses that relay back information about an object’s
proximity.
Ultrasonic sensors work by sending out a sound
wave at a frequency above the range of human
hearing. The transducer of the sensor acts as
a microphone to receive and send the ultrasonic
sound. Our ultrasonic sensors, like many others, use a
116. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
116 | P a g e
single transducer to send a pulse and to receive the echo. The sensor determines the distance
to a target by measuring time lapses between the sending and receiving of the ultrasonic pulse.
The sensor has 4 pins. VCC and GND go to 5V and GND pins on the Arduino, and the
Trig and Echo go to any digital Arduino pin. Using the Trig pin we send the ultrasound wave
from the transmitter, and with the Echo pin we listen for the reflected signal.
As we connect the module to 5V and
initialize the input pin, it starts transmitting the
sound waves which then travel through the air and
hit the required object. These waves hit and
bounce back from the object and then collected by
the receiver of the module.
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: After that, I have connected the respective pin of the LCD i.e.,
Rs pin – PB11 of STM32, E pin - PB10 of STM32
D4 pin –PB0 of STM32, D5 pin –PA7 of STM32
D6 pin –PA6 of STM32, D7 pin –PA5 of STM32
Anode pin – 5v of TTL, Cathode pin – gnd of STM32
Step-4: Then, I have connected the pin of ultrasonic sensor with STM32 board i.e., Echo pin
– PA2 and Trig pin – PA3 and VCC and GND pin connected 5v and ground respectively.
Step-5: After doing this, I have written the code for this experiment and then compile the
program.
Step-6: After compile the code I have uploaded and successfully got the output.
117. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
117 | P a g e
CIRCUIT DIAGRAM:
CODE:
#include <LiquidCrystal.h>
#define echoPin PA2
#define trigPin PA3
long duration;
int distance;
const int rs = PB11, en = PB10, d4 = PB0, d5 = PA7, d6 = PA6, d7 = PA5;
LiquidCrystal lcd (rs, en, d4, d5, d6, d7);
void setup()
{
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
lcd.begin(16, 2);
lcd.setCursor(0, 0);
118. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
118 | P a g e
lcd.print("UltraSonic Sensor");
delay(3000);
lcd.clear();
}
void loop() {
digitalWrite(trigPin, LOW); //generate square wave at trigger pin
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH); //calculation of distance of obstacle
distance = (duration * 0.034 / 2);
lcd.setCursor(0, 0);
lcd.print("Distance : ");
lcd.print(distance);
lcd.println(" cm ");
delay(1000);
}
120. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
120 | P a g e
CONCLUSION:
After completed this experiment, I got know about the Ultrasonic sensor and it’s pinout and
also learned that how to interface with STM32 board.
Teacher’s Remark : Date of Submission: 29.03.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE
121. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
121 | P a g e
Experiment No. 20. Date: 29.03.2022
AIM OF THE EXPERIMENT:
Interfacing STM32 with GPS module using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32 Blue pill Board
32-bit,20KB
RAM
1
02 TTL Converter
Serial Port
Converter
1
03 Jumper Wire Male to Female As per required
04 Breadboard - 1
05 LCD 16 × 2 1
06 Potentiometer 10K 1
07 GPS Module 2.7V-6V 1
Theory:
GPS Module
GPS stands for Global Positioning System and used to detect the Latitude and
Longitude of any location on the Earth, with exact UTC time (Universal Time Coordinated).
This device receives the coordinates from the satellite for each and every second, with time
and date. GPS offers great accuracy and also provides other data besides position coordinates.
It’s a GY-NEO6MV2 XM37-1612 GPS Module. This GPS module has four pin +5V,
GND, TXD and RXD. It communicates using the Serial pins and can be easily interfaced with
the Serial port of the STM32F103C8.
GPS module sends the data in NMEA format (see the screenshot below). NMEA format
consist several sentences, in which we only need one sentence. This sentence starts
from $GPGGA and contains the coordinates, time and other useful information.
This GPGGA is referred to Global Positioning System Fix Data.
• GND is the Ground Pin and needs to be connected to GND pin on the Arduino.
• TXD (Transmitter) pin is used for serial communication.
122. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
122 | P a g e
• RXD (Receiver) pin is used for serial communication.
• VCC supplies power for the module. You can directly connect it to the 5V pin on the
Arduino.
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: After that, I have connected the respective pin of the LCD i.e.,
Rs pin – PB11 of STM32, E pin - PB10 of STM32
D4 pin –PB0 of STM32, D5 pin –PA7 of STM32
D6 pin –PA6 of STM32, D7 pin –PA5 of STM32
Anode pin – 5v of TTL, Cathode pin – gnd of STM32
Step-4: Then, I have connected the pin of GPS module with STM32 board i.e., RX pin – A9,
TX pin – A10, +5v pin – 5v and GND pin – ground.
Step-5: After doing this, I have written the code for this experiment and then compile the
program.
Step-6: After compile the code I have uploaded and successfully got the output.
123. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
123 | P a g e
CIRCUIT DIAGRAM:
CODE:
#include <LiquidCrystal.h>
#include <TinyGPS++.h>
const int rs = PB11, en = PB10, d4 = PB0, d5 = PA7, d6 = PA6, d7 = PA5;
LiquidCrystal lcd (rs, en, d4, d5, d6, d7);
TinyGPSPlus gps;
void setup()
{
Serial1.begin(9600);
lcd.begin(16,2);
lcd.print("Circuit Digest");
lcd.setCursor(0,1);
lcd.print("STM32 with GPS");
delay(4000);
lcd.clear();
}
124. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
124 | P a g e
void loop()
{
GPSDelay(1000);
unsigned long start;
double lat_val, lng_val;
bool loc_valid;
lat_val = gps.location.lat();
loc_valid = gps.location.isValid();
lng_val = gps.location.lng();
if (!loc_valid)
{
lcd.print("Waiting");
Serial.print("Latitude : ");
Serial.println("*****");
Serial.print("Longitude : ");
Serial.println("*****");
delay(4000);
lcd.clear();
}
else
{
lcd.clear();
Serial.println("GPS READING: ");
Serial.print("Latitude : ");
Serial.println(lat_val, 6);
lcd.setCursor(0,0);
lcd.print("LAT:");
lcd.print(lat_val,6);
Serial.print("Longitude : ");
Serial.println(lng_val, 6);
lcd.setCursor(0,1);
lcd.print("LONG:");
lcd.print(lng_val,6);
delay(4000);
125. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
125 | P a g e
}
}
static void GPSDelay(unsigned long ms)
{
unsigned long start = millis();
do
{
while (Serial1.available())
gps.encode(Serial1.read());
} while (millis() - start < ms);
}
OUTPUT ON HARDWARE:
126. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
126 | P a g e
CONCLUSION:
After completed this experiment, I got know about the GPS Module and its pinout and learned
that how to interface with STM32 board.
Teacher’s Remark : Date of Submission: 30.03.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE
127. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
127 | P a g e
Experiment No. 21. Date: 30.03.2022
AIM OF THE EXPERIMENT:
Interfacing STM32 with Bluetooth module using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32 Blue pill Board Micro-controller 1
02 TTL Converter
Serial Port
Converter
1
03 Jumper Wire Male to Female As per required
04 Breadboard - 1
05 Bluetooth Module HC-05 1
06 Bluetooth Terminal app - -
07 LED Yellow 1
THEORY:
Bluetooth Module (HC-05)
➔ It is mostly used Bluetooth module in embedded projects. It is a serial Bluetooth module
that uses serial communication having range less than 100m and operates at 5V (3.3V
minimum). It can be used to connect two microcontrollers wirelessly and also with mobile
phone and laptops. As there are many android applications are available, it is very useful
for making wireless Bluetooth controlled projects.
➔ It uses USART communication and can be interfaced with microcontrollers having USART
communication protocol.
➔ It has an integrated antenna. It has Master/Slave configurations that can be changed in AT
command mode that is useful when only one device should send the data (master to slave)
128. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
128 | P a g e
like for example from PC (MASTER) to slave (any MCU). A master can connect to other
devices and slave doesn’t connect to other connection other than master.
Modes of Operation
➔ It has two modes AT Command Mode & Data Mode.
➔ When Bluetooth is powered up it enters data mode default. This mode can be used for data
transfers. To enter into AT Command mode during power up we need to press the button
present in module to change the default settings of the module like master/slave
configurations.
➔ Pins of Bluetooth Module
▪ EN pin (ENABLE) -This pin is used to set Data Mode or AT Command Mode. By
default, it is in DATA MODE. When button pressed during power up it goes to AT
command mode.
▪ +5V pin- This is used for power supply to the module
▪ GND pin- This is used for ground for module
▪ TX pin- This pin to connected to RX pin of MCU
▪ RX pin- This pin connected to TX pin of MCU
▪ STATE- This pin indicates the status of the module, see below about indications
129. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
129 | P a g e
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: After uploading the program disconnect the RX and TX pin of TTL from STM32.
Step-4: The connection of Bluetooth module given bellow
GND – GND of STM board
3.3V – 3.3V of STM board
RX - A9 of STM board
TX – A10 of STM board
Step-5: 1 led connected to A5 pin of STM32 board.
Step-6: After doing this, I have written the code for this experiment and then compile the
program.
Step-7: After compile the code I have uploaded and successfully got the output.
CIRCUIT DIAGRAM:
130. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
130 | P a g e
CODE:
const int pinout = PA2;
char inputdata = 0;
void setup()
{
Serial1.begin(9600);
Serial1.print("CIRCUIT DIGESTn");
Serial1.print("BLUETOOTH WITH STM32n");
pinMode(pinout, OUTPUT);
}
void loop()
{
if(Serial1.available() > 0)
{
inputdata = Serial1.read();
if(inputdata == '1')
{
digitalWrite(pinout, HIGH);
Serial1.print("LED ONn");
}
else if(inputdata == '0')
{
digitalWrite(pinout, LOW);
131. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
131 | P a g e
Serial1.print("LED OFFn");
}
}
}
OUTPUT ON HARDWARE:
132. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
132 | P a g e
CONCLUSION:
After completed this experiment, I got know about the Bluetooth Module and its pinout and
learned that how to interface with STM32 board.
Teacher’s Remark: Date of Submission: 05.04.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE
133. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
133 | P a g e
Experiment No. 22. Date: 05.04.2022
AIM OF THE EXPERIMENT:
Interfacing STM32 with I2C display using Arduino IDE.
COMPONENTS USED:
Sl. No. Component/Equipment/Software Specification Quantity
01 STM32 Blue pill Board Micro-controller 1
02 TTL Converter
Serial Port
Converter
1
03 Jumper Wire Male to Female As per required
04 Breadboard - 1
05 LCD 16 × 2 1
06 Potentiometer 10K 1
07 I2C Module PCF8574 1
Theory:
PCF8574 Module
I have already discussed about PCF8574 GPIO Expander IC in this “Interfacing
PCF8574 with Arduino” tutorial. So, I will not go into the details but just a brief overview.
The PCF8574 is a 16 pin IC that acts as an I2C to 8-bit Parallel IO expander. What this
means that using I2C Communication from Microcontroller, you can effectively increase the
number of IO pins of your Microcontroller by 8. An important thing to remember when buying
a PCF8574 Module is that there are
two types of them available in the
market. One is a generic IO Expander
Module, which can be used as, well an
IO expander.
134. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
134 | P a g e
The other type of module is also based on the PCF8574 IC but it is designed in such a
way that it can be used only with LCD Display i.e. 16×2 and even 20×4 LCDs. So, for this
project, you have to choose the latter as it has all the necessary components and connections
related to interfacing a 16X2 LCD Display.
PROCEDURE:
Step-1: First I have connected the RX and TX pin of the TTL converter with STM32 A9pin
and A10 pin respectively.
Step-2: Then I have connected the ground and VCC pin of the TTL converter with STM32
Ground and 3.3v pin respectively.
Step-3: After that I have connected the pin of the I2C module with LCD according to the below
circuit diagram.
Step-4: Then I have connected the pin of I2C with STM32 i.e.,
VCC pin – 5V
GND pin – ground
SCL pin – PB6
SDL pin – PB7
Step-5: After doing this, I have written the code for this experiment and then compile the
program.
Step-6: After compile the code I have uploaded and successfully got the output.
135. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
135 | P a g e
CIRCUIT DIAGRAM:
CODE:
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
lcd.begin();
lcd.backlight();
lcd.clear();
lcd.setCursor(0,1);
lcd.print(" I2C LCD with ");
lcd.setCursor(0,1);
lcd.print(" STM32F103C8T6 ");
}
void loop()
{
}
137. EMBEDDED SYSTEM DESIGN USING ARM CORTEX LAB MANUAL
137 | P a g e
CONCLUSION:
After completed this experiment, I got know about the I2C LCD Module and its pinout and
learned that how to interface with STM32 board.
Teacher’s Remark : Date of Submission: 07.04.2022
Students Signature : Hitesh Kumar Nath Regd. No. : 200301150005
Teacher’s Signature : Branch : EEE