DIY Vending Machine Using STM32 Blue Pill | STM32f103C8T6 Mircrocontroller Used |

by Md_Rahat_Hasan in Circuits > Microcontrollers

114 Views, 1 Favorites, 0 Comments

DIY Vending Machine Using STM32 Blue Pill | STM32f103C8T6 Mircrocontroller Used |

DIY How to make Vending Machine using STM32 BLUE PILL | STM32 Microcontroller Based Project

A vending machine is an automated device that dispenses various items such as snacks, beverages, cigarettes, lottery tickets, or other consumer products to customers after they insert currency or credit into the machine. Vending machines are widely used in locations such as schools, offices, airports, malls, and other public places for convenient, self-service purchases.

We will use the STM32 Blue Pill microcontroller to make a vending machine. There will be basic programming. However, the people are not familiar with STM32 as much as Arduino. There is a big difference between STM32 and Arduino. No problem I made a detailed video on it on YouTube. You will easily understand the process.


Supplies

Component List.png

Component List:

  1. STM32F103C8T6 Microcontroller (You can use any 32-bit STM Microcontroller)
  2. ST-Link V2 Connection Interface
  3. Yellow DC Motor....................4x
  4. L293D Motor Driver IC..........2x
  5. IR sensor Module .................4x
  6. Push buttons
  7. 16x2 LCD Display
  8. White LED
  9. Buzzer

Spring Making

Srping.png

I made these springs out of GI wire for the product lineup. it will attach to the motor. To make this you need 14 sizes of GI wire. I wrap it in a perfume battle and make the shape of springs. For holding the spring I cut a plastic board-like biscuit shape and made 3 holes, this middle hole for attaching to the dc motor, and after that, I tied it by screws with the spring.


Motor Control Using PWM Signal From STM32

motor driver.png

This Circuit is for One Motor Connection.

First of all, I am showing you how to control the DC motor by using the PWM mode of STM32. To control the motor you need motor driver ic L293D. Because the stm32 blue pill can not provide that much current to operate the DC motor.


LCD Control & Necessary Files

LCD connection.png

Download the LCD's necessary file from Google Drive:

https://drive.google.com/file/d/1xDsKPFEuVL4eIkznz8WZm2sMZYe2LdtQ/view?usp=sharing

IR Sesnor for Product Dectection

Buzzer Adding

Full Pin Configuration

pin configure.png

Full Circuit Diagram

Full circuit Diagram.jpg

Full Code C & Hex Files