1 / 6 / 2023
To set up the motor control circuit, connect the first motor to the motor controller module's Out1 and Out2, and also to Out3 and Out4. Attach the positive wire from the battery pack to the +12V pin and the negative wire to the GND pin of the module. Link the GND pin of the module to the GND pin of the Arduino. Connect Arduino pin 5 to In1, pin 4 to In2, pin 3 to In3, and pin 2 to In4 of the module. Finally, connect the middle pin of the potentiometer to Arduino pin A0, and the other two pins to the 5V and GND pins on the Arduino
The potentiometer’s range of output values is divided into two parts. The first part is from 0 - 512, which is used for moving the motors in one direction, and the next from 512 - 1023 moves the motors towards another direction.
In one set of code, HIGH is written to M1 and M2, while in another set we write a LOW, therefore spinning towards the opposite direction.
map()
and analogWrite()
functions will also be used here.In the code, the potentiometer value is scaled between 0-255 (which is the range of valid PWM pins). We will set the speed using the PWM function analogWrite()
.
A point turn, also known as a three-point turn or a K-turn, is a maneuver performed by a vehicle to change its direction by 180 degrees in a relatively confined space. It is typically used when a vehicle needs to turn around on a narrow road or in situations where making a U-turn is not feasible.
To initiate the point turn, command one motor to rotate forward (clockwise) and the other motor to rotate backward (counterclockwise). This will cause the wheels on one side of the vehicle to move forward while the wheels on the other side move backward.
This can be done with the help of the previous two tasks, that is Speed and Direction controlling of a DC Motor.
The objective of the task is to construct an obstacle avoiding vehicle combining the distance sensing capability of the ultrasonic sensor with the motor control of the DC motor(s). The vehicle can autonomously detect obstacles in its path and navigate around them.
The vehicle is equipped with an ultrasonic sensor, typically mounted on the front left and right side of the vehicle, and Two DC motors responsible for controlling its movement.
The ultrasonic sensor emits ultrasonic waves, which travel in the air and bounce back when they encounter an obstacle. The sensor measures the time it takes for the waves to return after being emitted.
By calculating the time taken for the waves to return, the sensor determines the distance between the vehicle and the obstacle in its path.
The Arduino of the vehicle receives the distance information from the ultrasonic sensor. Based on this information, it determines the necessary action to avoid the obstacle.
The motor driver controlling circuit adjusts the speed and direction of the DC motor(s). Based on the control signals from the microcontroller, the DC motor(s) are activated to execute the desired action. For instance, if the vehicle needs to avoid an obstacle on its left, the right motor may be powered to turn the vehicle slightly to the right.
LT-spice is a widely used electronic circuit simulation software developed by Linear Technology (now part of Analog Devices).
LTspice allows us to create and simulate circuit schematics using a wide range of electronic components such as resistors, capacitors, inductors, transistors, operational amplifiers, and many more. You can draw the circuit using the built-in schematic editor or import existing circuit files.
The objective of the task is to create a 555 astable multivibrator.
The task is to measure the temperature using an LM35 temperature sensor and Arduino and display it on the monitor.
LM35 is a temperature measuring device having an analog output voltage proportional to the temperature. It provides output voltage in Centigrade (Celsius). It does not require any external calibration circuitry. The sensitivity of LM35 is 10 mV/degree Celsius. As temperature increases, output voltage also increases.
Temperature sensors are utilized to monitor various environments and machinery, power plants, and manufacturing. Temperature sensors are used to measure water temperatures in reservoirs and boreholes.
The task is to measure temperature and humidity using DHT11 and display the readings on an LCD display.
The DHT11 is a basic, ultra low-cost digital temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air and outputs a digital signal on the data pin.
This sensor is used in various applications such as measuring humidity and temperature values in heating, ventilation, and air conditioning systems, weather stations, and smart home devices.
In this task, we will measure the speed of a Brushless Direct Current (BLDC) motor using a Hall effect sensor. The Hall effect sensor detects the presence of a magnetic field.
The BLDC motor is equipped with a magnet, which is placed in proximity to the Hall effect sensor. As the motor spins, the magnet passes over the sensor, which generates a pulse signal. The frequency of these pulses is proportional to the motor speed.
The Arduino can be programmed to count the number of pulses received in a specific time frame, allowing for the calculation of the motor's speed.
Speed measurement of BLDC motors is crucial in applications such as motor controllers, drones, electric vehicles, and robotics.
In this task, we will charge a Li-ion battery using solar energy. The voltage of the battery will be measured at the beginning and end of the charging process.
The solar panel will generate DC voltage when exposed to sunlight, which will then charge the Li-ion battery. The TP4056 charger board is used to manage the charging process safely.
Using a multimeter, we can measure the initial voltage of the battery before charging and the final voltage after charging.
Solar energy charging systems are increasingly popular for renewable energy applications, powering various devices, and reducing dependency on traditional energy sources.
To construct a headlight system that automatically turns on/off based on ambient light conditions using a 555 timer IC and LDR (Light Dependent Resistor).
The LDR will detect the level of ambient light. When the light level falls below a certain threshold, the 555 timer will activate the relay, turning on the LED headlights. When the ambient light level rises above the threshold, the headlights will turn off.
Automated headlight systems are commonly used in vehicles to enhance safety by ensuring that headlights are activated in low-light conditions.
To create a basic solar panel configuration using diodes for a small-scale solar energy project.
Diodes are used to prevent reverse current flow in the solar panel setup. By connecting the diodes appropriately, we can ensure that the generated solar power is utilized effectively.
Basic solar panel setups are fundamental in understanding renewable energy systems and can be scaled up for larger solar power applications.
To design a solar tracker system that uses a servo motor to follow the sun's movement throughout the day, maximizing energy absorption from solar panels.
The solar tracker utilizes LDRs to detect the direction of sunlight. The servo motor adjusts the position of the solar panel based on the readings from the LDRs, ensuring optimal exposure to sunlight.
Solar tracker systems significantly increase the efficiency of solar panels by ensuring they are always positioned to capture maximum sunlight.