Nucleo 401RE Controlled Robotic Motor with Vibration Feedback and ADXL345 Accelerometer
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary of the Circuit
This circuit is designed to interface a Nucleo 401RE microcontroller with a DC motor with an encoder, an ADXL345 accelerometer, an INA219 current sensor, an L298N DC motor driver, a vibration motor, a potentiometer, and a 12V 5Ah battery. The Nucleo 401RE is responsible for controlling the DC motor via the motor driver, reading the motor's encoder signals, and interfacing with the accelerometer and current sensor over I2C. The potentiometer is used to provide analog input to the microcontroller, and the vibration motor is directly controlled by a digital output from the Nucleo 401RE. The battery provides the power source for the motor driver and, through the driver, the DC motor.
Component List
Nucleo 401RE
- Microcontroller board based on the STM32F401RE MCU
- Provides I/O, ADC, and communication interfaces
DC Motor with Encoder
- Actuator for motion applications
- Includes an encoder for feedback on motor position or speed
ADXL345
- A digital accelerometer providing acceleration data via I2C
INA219
- A current sensor module that measures voltage and current, interfacing over I2C
L298N DC Motor Driver
- A dual H-bridge motor driver that controls the direction and speed of DC motors
Vibration Motor
- A small motor that provides haptic feedback
Potentiometer
- A variable resistor providing analog input to control the system
12V 5Ah Battery
- The power source for the motor and motor driver
Wiring Details
Nucleo 401RE
3V3connected to ADXL345 VCC5Vconnected to DC Motor with Encoder VCC, INA219 VCC, L298N DC motor driver 5V, Potentiometer VCCGNDconnected to common ground netA0connected to Potentiometer OutputD2connected to DC Motor with Encoder Encoder AD3connected to DC Motor with Encoder Encoder BD5connected to L298N DC motor driver ENAD9connected to Vibration Motor POSD11connected to L298N DC motor driver IN1D12connected to L298N DC motor driver IN2D14(SDA) connected to ADXL345 SDA and INA219 SDAD15(SCL) connected to ADXL345 SCL and INA219 SCL
DC Motor with Encoder
Encoder Aconnected to Nucleo 401RE D2Encoder Bconnected to Nucleo 401RE D3GNDconnected to common ground netVCCconnected to Nucleo 401RE 5VMotor +veconnected to L298N DC motor driver OUT1Motor -veconnected to INA219 VIN -
ADXL345
GNDconnected to common ground netVCCconnected to Nucleo 401RE 3V3SDAconnected to Nucleo 401RE D14 (SDA)SCLconnected to Nucleo 401RE D15 (SCL)
INA219
GNDconnected to common ground netVCCconnected to Nucleo 401RE 5VSCLconnected to Nucleo 401RE D15 (SCL)SDAconnected to Nucleo 401RE D14 (SDA)VIN -connected to DC Motor with Encoder Motor -veVIN +connected to L298N DC motor driver OUT2
L298N DC Motor Driver
OUT1connected to DC Motor with Encoder Motor +veOUT2connected to INA219 VIN +12Vconnected to 12V 5Ah Battery 12v +GNDconnected to 12V 5Ah Battery 12v - and common ground net5Vconnected to Nucleo 401RE 5VENAconnected to Nucleo 401RE D5IN1connected to Nucleo 401RE D11IN2connected to Nucleo 401RE D12
Vibration Motor
POSconnected to Nucleo 401RE D9NEGconnected to common ground net
Potentiometer
GNDconnected to common ground netOutputconnected to Nucleo 401RE A0VCCconnected to Nucleo 401RE 5V
12V 5Ah Battery
12v +connected to L298N DC motor driver 12V12v -connected to L298N DC motor driver GND
Documented Code
There is no code provided for the microcontroller. The documentation of the code would typically include descriptions of the functions, initialization routines, main loop, interrupt service routines, and any libraries used. Since no code is available, this section cannot be completed. If code becomes available, it should be documented here following the same structure.