Power constraint is a critical consideration undertaken by designers when selecting a microcontroller for an application — particularly with IoT applications where power plays a vital role. IoT nodes are only useful in the field if they last for years or even a decade on a single battery. The race for lower power devices between…
What is Lightweight Internet Protocol (LwIP)?
Connecting embedded microcontrollers to the internet is a crucial task in modern applications. The embedded controllers, particularly in consumer devices and wearables, now essentially require ping online. This is more important as the devices are getting smarter. Connecting to the internet is not just crucial but a hefty task as well. The typical TCP/IP stack…
Controlling Servo Motor with Stm32f103 microcontroller using stm32cubemx code configurator by STMicroelectronics and keil uvision 5 ide for cortex m1 series microcontrollers
This tutorial is a part of series of tutorials on pwm(pulse width modulation) signal generation with stm32f103 microcontroller. Previously we looked upon how to generate pwm signal with stm32 microcontroller using keil uvision 5 ide and stm32cubemx code configurator. We moved forward on generating variable pwm signal using internal timers of stm32f103 microcontroller. We studied about generating pwm, now…
Driving relays with stm32f103 microcontroller using uln2003 relay driver
In this tutorial i am going to teach you how to interface relays with stm32f103 microcontrollers. Stm32 microcontrollers works on 3.3 volt TTL logic. Where as electrical relays minimum take +5 volts to make a regular connection. We must need an external circuit to drive relays with stm32 microcontrollers. This post is about teaching you…
Stm32f103 microcontroller controlling stepper motor by A4988 stepper motor driver module
Stepper motors as the name depicts moves in steps. They are popular in industry due to their ability to rotate their shaft at an accurate location and outputting high torque at low angel movements. One can also control the stepper motor step speed and angle accurately with out the need of feed back mechanism. Though they…
Interfacing 7 segment display with stm32f103 microcontroller
This tutorial is about interfacing 7 segment led display with stm32 microcontroller using keil arm mdk 5 with stm32 HAL libraries for code compilation. Stm32cubemx is used to initialize the stm32f103c8t6 microcontroller peripherals/variables pins, operating frequency, oscillator selection etc. Stm32cubemx initialized settings are then imported to keil mdk arm 5 project. Stm32cubemx automatically generates code for…
Stm32f103 microcontroller Led on/off control with Push Button as Input
The post explains about how to use stm32 pins as input using keil and stmcubemx ide. A simple led on/off tutorial with push button as input is made to explain the coding and working. When a push button is pressed the led turns on and when push button is released the led turns off. The…
Stm32f103 Pwm(Pulse width modulation) signal generation using internal timers, keil MDK-ARMv6 and Stmcubemx Ide
This tutorial is about generating pwm (pulse width modulation) signal with stm32f103 microcontroller using its internal hardware timers. Stm32f103 microcontroller components/peripherals initialization code is generated using stmcubemx ide and code is written and compiled in keil MDK-ARMv6 ide. A simple led is derived on a fixed pwm signal output. Led dims and blinks according to the duty cycle and frequency…
Dc motor speed and direction control with stm32f103 microcontroller and l293d motor driver
In this tutorial i am going to teach you how to control speed of dc motor using stm32 microcontroller and l293d half h bridge control ic. Dc motors are common motors you see in your houses(DC water pumps, DC fans), toys etc. DC motors rotate at a constant speed but their speed can be varied…
Clap sensor using STM32 MCU
Security systems work by measuring different physical parameters. One such parameter is sound. Every moving object produces sound and vibrations. These sounds and vibrations can be sampled, and the object can be identified. Sampling sound waves and training the system to distinguish between objects requires plenty of time. For this tutorial, let’s take a simple…
How to measure voltage of multiple batteries connected in string/array in series or parallel combination with microcontrollers
Measuring an individual battery voltage or a whole bank of battery using any microcontroller(arduino, microship pic, Avr, Atmega, Intel, NXP, stm32)is an easy task. You can find many tutorials on internet on how to do so. But what about if we want to measure an individual battery connected to a cluster of batteries in series…
Blink Led with Stm32f103c8 microcontroller keil and Stmcubemx
After working a lot with 8-bit microcontrollers and learning all the protocols and functions they offer, now i thought to switch to 32-bit microcontrollers. I decided to go with arm 32-bit processors, because of their popularity in the market. I choose arm cortex-m3 processor series for my new hobby/learning projects. The reason behind choosing the…
Accessing-Reading and Writing to whole gpio ports of stm32 microcontrollers
This tutorial is about reading and writing to whole gpio port of stm32 microcontrollers. While working with stm32f103 microcontroller using stm32cubemx codeconfigurator ide and ARM keil uvision-5 ide with HAL libraries I noticed that the examples provided in the HAL libraries did not contain any example which explains how to access individual ports of stm32…
Interfacing a Piezo Buzzer with Stm32 Microcontroller
In this tutorial i am going to teach you how to interface a piezo buzzer with 32-bit stm32 microcontroller? It seems to be an easy project but proper circuit configuration and electrical concepts are critical to become a successful embedded hardware engineer. I will elaborate each component used in the project and why it is…
LDR(Light dependent resistor)/Photoresistor as light detector using stm32 microcontroller
In this tutorial i am going to teach you how to make a simple light detector with 32-bit stm32 microcontroller. LDR(light dependent resistor) is used as a light detector/sensor in the tutorial. Its a simple project and you might have made it before in your electronics class using 555 timer ic. Using a microcontroller to…
Mechanical Reed/Contact switch: Door open close sensor interfaced with stm32 microcontroller
Some times during designing a solution to a given problem in embedded domain its required to respond to a mechanical event. For example it is required to ring the alarm and send an sms to user when ever a particular house door is opened and closed. Do you ever wonder how when you open laptop,…
Led Bar array with stm32f103 microcontroller
Getting started with microcontroller and leds is a basic project from where newbies start their learning of new microcontrollers. After on they start to find the different features it offers and what are its advantage over the other microcontrollers. We are gone through Getting started with stm32f103 microcontroller and now its time to learn about its other…
Stm32f103 Variable Pwm(Pulse Width Modulation) Signal Output with timers, Keil Arm-mdk and Stm32cubemx ide
This is an advance tutorial on pwm generation. We are going to output/generate a variable pwm signal with stm32f103 microcontroller. Variable pwm signal is used for controlling the speed of Dc motors and fans. It is also used in dimmers to dim and bright the light bulbs, led arrays etc. Pwm solar chargers also work…
L293 and L293D h bridge motor driver Ic Pin out and Working
When ever you want to drive heavy loads with a small TTL signal you use a transistor, bjt or a mosfet. In case the circuit becomes complex and you need to drive load with two, three or four TTL signals you use a combination of transistors or mosfet to provide high power output to load. For…