-
Notifications
You must be signed in to change notification settings - Fork 0
Hardware
This section covers the hardware used in the Ultrasonic Security System.
- STM32F401RE
- HC-SR04 Ultrasonic Sensor
- 28BYJ-48 Stepper Motor
- ULN2003 Stepper Driver
- Power Supply
- PIR Sensor
The STM32F401RE is a microcontroller board based on the ARM Cortex-M4 architecture. It is used as the main controller for the Ultrasonic Security System.
- 32-bit ARM Cortex-M4 processor
- 84 MHz clock speed
- 512KB Flash memory
- 96KB RAM
- Up to 11 timers, up to six 16-bit and two 32-bit timers
- Up to 81 I/O pins
- Up to 12 communication interfaces
The HC-SR04 Ultrasonic Sensor is used for object detection in the Ultrasonic Security System. It uses ultrasonic waves to measure the distance between the sensor and an object.
The HC-SR04 sensor has four pins. See details here: HC-SR04 Tutorial
- VCC - Power supply (5V)
- Trig - Trigger pin for sending ultrasonic waves. Send a 10μs pulse to start the detection
- Echo - Echo pin for receiving ultrasonic waves. The duration of the pulse indicates the distance
- GND - Ground
The sensor sends a short ultrasonic pulse and then listens for the echo. The duration of the echo pulse is proportional to the distance between the sensor and the object. This sensor can measure distances from 2 cm to 400 cm with an accuracy of 3 mm.
To use it, you need to send a 10μs pulse to the trigger pin, and then measure the duration of the pulse on the echo pin. The formula to calculate the distance is:
Distance = (Duration of the pulse * Speed of sound in air) / 2A stepper motor is an electromechanical device that converts electrical pulses into discrete mechanical movements. The 28BYJ-48 Stepper Motor is a popular stepper motor used in various projects. It is typically used with a driver board like the ULN2003 to control its movement. It typically draws about 240 mA of current and uses a signicant amount of power to operate and as such requires an external power supply.
The 28BYJ-48 stepper motor has 5 pins. However they will be connected to the driver board. See details here: 28BYJ-48 Stepper Motor Tutorial. As such, simply attach the pins to the driver board in the correct order.
Stepper motors move in discrete steps, where each step corresponds to a fixed angle of rotation. In each step a different coil is energized, causing the motor to move. It has a step angle of 5.625°, which means it takes 64 steps to complete a full 360° rotation.
The ULN2003 Stepper Driver is used to control the 28BYJ-48 stepper motor. It is a high-voltage, high-current Darlington transistor array that can be used to drive inductive loads such as relays, solenoids, and stepper motors. The ULN2003 is used to provide the necessary current and voltage to the stepper motor coils.
The ULN2003 driver board has 5 pins for the stepper motor and 4 pins for the control signals, as well as 2 pins for power. See details here: ULN2003 Stepper Driver Tutorial.
- IN1, IN2, IN3, IN4 - Control pins for the stepper motor
- VCC - Power supply (5V)
- GND - Ground
The Ultrasonic Security System requires a power supply to provide the necessary voltage and current to the components. The power supply should be able to supply enough power for the stepper motor.