ESP32-Based Vibration Motor Controller with I2C IO Expansion
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary of the Circuit
This circuit appears to be designed for interfacing an ESP32 Wroom Dev Kit with an MCP23017 IO Expansion board, controlling a vibration motor through an NPN transistor, and ensuring current flow protection with a diode. The ESP32 is responsible for the logic control and communicates with the MCP23017 via I2C protocol, using GPIO 21 and GPIO 22 for SDA and SCL lines, respectively. The vibration motor is driven by the transistor, which is controlled by a signal from the MCP23017. A resistor is used to limit the base current of the transistor. The diode is likely used to protect the circuit from any back EMF generated by the motor.
Component List
ESP 32 Wroom Dev Kit
- Microcontroller development board based on the ESP32 chip.
- Provides WiFi and Bluetooth connectivity.
- Features multiple GPIO pins for interfacing with other components.
MCP23017 IO Expansion Board
- 16-bit I/O expander with I2C interface.
- Allows for additional GPIOs to be added to microcontroller-based systems.
NPN Transistor (ECB)
- A bipolar junction transistor used for switching and amplification.
- Has three terminals: emitter, collector, and base.
Resistor
- A passive two-terminal electrical component that implements electrical resistance as a circuit element.
- In this circuit, it has a value of 1300 Ohms.
GND
- Represents the ground reference point in the circuit.
Vcc
- Represents the positive supply voltage in the circuit.
Diode
- A semiconductor device that allows current to flow in one direction only.
- Used to protect the circuit from reverse current flow.
Vibration Motor
- An electromechanical device designed to produce vibration through an unbalanced mass on a motor shaft.
Wiring Details
ESP 32 Wroom Dev Kit
3V3connected to MCP23017 IO Expansion BoardVCC.GNDconnected to MCP23017 IO Expansion BoardGND.GPIO 22(SCL) connected to MCP23017 IO Expansion BoardSCL.GPIO 21(SDA) connected to MCP23017 IO Expansion BoardSDA.
MCP23017 IO Expansion Board
VCCconnected to ESP 32 Wroom Dev Kit3V3.GNDconnected to ESP 32 Wroom Dev KitGND.SCLconnected to ESP 32 Wroom Dev KitGPIO 22.SDAconnected to ESP 32 Wroom Dev KitGPIO 21.PA1connected to one end of the Resistor (other end connected to NPN Transistor base).
NPN Transistor (ECB)
emitterconnected to GND.collectorconnected to Vibration Motor-and Diodeanode.baseconnected to one end of the Resistor (other end connected to MCP23017 IO Expansion BoardPA1).
Resistor
- One end connected to NPN Transistor
base. - Other end connected to MCP23017 IO Expansion Board
PA1.
Diode
anodeconnected to NPN Transistorcollector.cathodeconnected to Vibration Motor+and Vcc.
Vibration Motor
+connected to Vcc and Diodecathode.-connected to NPN Transistorcollector.
Documented Code
No code has been provided for the microcontrollers in the circuit. Therefore, there is no code documentation to include at this time. When code is available, it should be documented here with explanations of its functionality and how it interfaces with the hardware components.