Arduino 101-Based Smart Motor Controller with I2C LCD and Magnetometer
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino 101 microcontroller interfacing with various components including a 16x2 I2C LCD, a QMC5883L Magnetometer, an L298N DC motor driver, a DC Motor, and a Rotary Potentiometer. The Arduino 101 serves as the central control unit, managing the display, motor control, and sensor data acquisition.
Component List
Arduino 101
- Description: A microcontroller board based on the Intel Curie module.
- Pins: A5/SCL, A4/SDA, AREF, GND, D13/SCK, D12/MISO, D11 PWM/MOSI, D10 PWM/SS, D9 PWM, D8, D7, D6 PWM, D5 PWM, D4, D3 PWM, D2, D1/TX, D0/RX, AIN, ioref, RESET, 3V3, 5V, VIN, A0, A1, A2, A3, ICSP MISO, ICSP SCK, ICSP MOSI
L298N DC Motor Driver
- Description: A dual H-Bridge motor driver module that allows control of the speed and direction of two DC motors.
- Pins: OUT1, OUT2, 12V, GND, 5V, OUT3, OUT4, 5V-ENA-JMP-I, 5V-ENA-JMP-O, +5V-J1, +5V-J2, ENA, IN1, IN2, IN3, IN4, ENB
DC Motor
- Description: A simple DC motor.
- Pins: pin 1, pin 2
Rotary Potentiometer
- Description: A variable resistor used to adjust levels such as volume or brightness.
- Pins: leg1, wiper, leg2
- Properties:
- Resistance: 10000 Ohms
16x2 I2C LCD
- Description: A 16x2 character LCD display with I2C interface.
- Pins: GND, VCC, SDA, SCL
QMC5883L Magnetometer
- Description: A 3-axis magnetic field sensor.
- Pins: VCC, GND, SCL, SDA, DRDY
Wiring Details
Arduino 101
- A5/SCL: Connected to SCL of 16x2 I2C LCD and QMC5883L Magnetometer
- A4/SDA: Connected to SDA of 16x2 I2C LCD and QMC5883L Magnetometer
- 5V: Connected to VCC of 16x2 I2C LCD, leg1 of Rotary Potentiometer, and VCC of QMC5883L Magnetometer
- GND: Connected to GND of 16x2 I2C LCD, leg2 of Rotary Potentiometer, GND of QMC5883L Magnetometer, and GND of L298N DC motor driver
- VIN: Connected to 12V of L298N DC motor driver
- D6 PWM: Connected to IN1 of L298N DC motor driver
- D5 PWM: Connected to IN2 of L298N DC motor driver
- A0: Connected to wiper of Rotary Potentiometer
L298N DC Motor Driver
- IN1: Connected to D6 PWM of Arduino 101
- IN2: Connected to D5 PWM of Arduino 101
- 12V: Connected to VIN of Arduino 101
- GND: Connected to GND of Arduino 101
- OUT1: Connected to pin 2 of DC Motor
- OUT2: Connected to pin 1 of DC Motor
DC Motor
- pin 1: Connected to OUT2 of L298N DC motor driver
- pin 2: Connected to OUT1 of L298N DC motor driver
Rotary Potentiometer
- leg1: Connected to 5V of Arduino 101
- wiper: Connected to A0 of Arduino 101
- leg2: Connected to GND of Arduino 101
16x2 I2C LCD
- SCL: Connected to A5/SCL of Arduino 101
- SDA: Connected to A4/SDA of Arduino 101
- VCC: Connected to 5V of Arduino 101
- GND: Connected to GND of Arduino 101
QMC5883L Magnetometer
- SCL: Connected to A5/SCL of Arduino 101
- SDA: Connected to A4/SDA of Arduino 101
- VCC: Connected to 5V of Arduino 101
- GND: Connected to GND of Arduino 101
Documented Code
Arduino 101 Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Additional Documentation (documentation.txt)
This documentation provides a comprehensive overview of the circuit, including a summary, detailed component descriptions, wiring details, and the code used in the Arduino 101 microcontroller.