Environment friendly Velocity Management of DC Geared Motor with Show Facility for Robotics Utility

[ad_1]

– Commercial –
Remark errors or corrections discovered for this circuit, and get the possibility to win large!

A DC motor is generally operated by direct present. It converts {the electrical} vitality into mechanical vitality. This rotational motion is the supply of required energy to run many purposes in Business. Velocity management is the crucial operate for motor operation. With velocity management of the motor, we are able to alter the velocity of the motor in accordance with the need of the appliance. It’s deployed in lots of real-time purposes like controlling robotic automobiles, paper mills, and elevators.

DC Motor

DC motor is a rotational machine which converts electrical vitality within the type of Direct Present into mechanical vitality within the type of rotational movement of the motor shaft. The velocity of the DC motor may be managed by various DC voltage. For making use of altering voltage, the PWM approach is helpful.

Building and Working

This circuit is constructed on a breadboard. This design is predicated on Arduino Nano Know-how. It includes Arduino Nano, L298 Motor Driver, Potentiometer 10K,1 Seven phase show, BO Motor 100 RPM, GearBox, Shaft, Battery Holder, Battery 18650 Li-on Cell 3.7V 2000mah (2 cell). Potentiometer has 3 pins – one is related to GND, one is related to 5V and the center pin is related to A1(analog pin). Seven phase pins a to g related from pin 13 to Pin 7 and the decimal pin related to six. It is a frequent cathode 7-segment show with 2 frequent pins related to GND. Pin 5 of Arduino Nano is related to Allow Pin A of the L298 Motor Driver. Pin 3, and Pin 4 are related to IN1 and IN2 of L298 Motor Driver. Connect BO Motors to motor pins of L298 Motor Driver and put wheels inside gearboxes. Motors may be managed by way of a potentiometer and velocity is displayed on a seven-segment show in RPM.

– Commercial –

Arduino Nano

The Arduino Nano is a micro-size, full, and breadboard-compatible board based mostly on the ATmega328. The Arduino Nano may be powered by way of the Mini-B USB connection. The facility supply is robotically chosen to the very best voltage supply. The ATmega328 has 32 KB. Every of the 14 digital pins on the Nano can be utilized as an enter or output, utilizing pinMode(), digitalWrite(), and digitalRead() features. They function at 5 volts. Every pin can present or obtain a most of 40 mA and has an inner pull-up resistor.

L298 Driver:

This L298N Primarily based Motor Driver Module – 2A is a high-power motor driver good for driving DC Motors and Stepper Motors. It makes use of the favored L298 motor driver IC and has the onboard 5V regulator which it might provide to an exterior circuit. It might management as much as 4 DC motors, or 2 DC motors with directional and velocity management. This L298N Motor Driver Module – 2A is ideal for robotics and mechatronics initiatives and excellent for controlling motors from microcontrollers, switches, relays, and many others. Good for driving DC and Stepper motors for micro mouse, line-following robots, robotic arms, and many others.

Potentiometer 10K

Potentiometers are useful in controlling the assorted electrical parameters of a circuit. It is a one-turn 10k Potentiometer with a rotating knob facility. This potentiometer is used to alter the resistance between 0 to 10k ohms worth by merely rotating the knob. The shaft is 15mm in size with a complete resistance of 10K ohm.

Seven Section Show

In fashionable occasions, seven-segment shows are generally utilized in show techniques for varied purposes. Seven-segment shows are made up of LEDs. These are used to show numbers just like the standing of petrol in automobiles, time in digital watches, show velocity of automobiles, velocity of washing machines, AC and varied forms of panels. The seven-segment show accommodates 7 leds to show numbers. You possibly can show numbers from 0 to 9 on a single seven-segment.

Widespread Cathode Seven-Section Show

For the frequent cathode, join frequent pins of seven segments to the GNDpin of Arduino Nano.
Join +5 volts pin of Arduino Nano to decimal level pin in collection to a 470 ohm- resistor to restrict the present. It is going to glow.
Within the Widespread cathode, a,b,c,d,e,f,g, and h pins of the phase show are related to Arduino Nano pins which may be managed by way of programming by assigning values.

Writer Prototype

Half Record

Arduino Nano, L298 Driver, BO Motor 100 RPM, Widespread cathode Seven Section Show, Potentiometer 10K,Tyre, Bread Board, Jumper Wires, USB Cable, Cardboard Field, Battery Holder, Battery Module 18650 3.7V 2000mah (2 cell)

Software program

Programming of the mission is finished on an Arduino 1.8.19 instrument. The Potentiometer 10k module is related to an Arduino Nano analog pin A1, 1 pin related to 5V of Arduino Nano, 1 pin is related to GND of Arduino Nano. Pin 5 of Arduino Nano is related to Allow Pin A of L298 Motor Driver. Pin 3, Pin 4 are related to IN1 and IN2 of L298 Motor Driver. Connect BO Motor 100 RPM to motor pins of L298 Motor Driver and put wheel inside gearbox. By means of Software program, Potentiometer sends analog sign to A1 pin and accordingly Arduino Nano sends instructions to L298 Motor Driver which in flip sends instructions to Motor to run in accordance with the worth of potentiometer.

Testing

Make connections as per the circuit diagram. Give voltage from Battery Holder 18650 Li-on Cell 3.7 V 2000 mah(2 cell – 7.4V). Verify the standing of seven-segment show if zero is displaying on it. Transfer the knob of potentiometer 10K and report the velocity displayed in RPM from 0 to 9 RPM. Right here 0 means 0 RPM and 9 means 90 RPM and a single dot on seven-segment show means most velocity 100 RPM. Observe the velocity of BO DC Motor in accordance with the rotation of Knob (0-255). Worth 0 from potentiometer means 0 RPM(revolution per minute-minimum velocity), worth 255 refers – 100RPM(most velocity). This prototype may be prolonged to 2 or extra motors with further seven-segment show or LCD show with course management of DC motor for varied robotics and industrial utility.

int seg_Pins[] = {13, 12, 11, 10, 9, 8, 7, 6}; // { a b c d e f g . )
int pot_map;
int pot_input;
////MOTOR1 PINS
int ena = 5;
int in1 = 3;
int in2 = 4;
byte seg_Code[11][8] = {
// a b c d e f g .
{ 1, 1, 1, 1, 1, 1, 0, 1}, // 0
{ 0, 1, 1, 0, 0, 0, 0, 0}, // 1
{ 1, 1, 0, 1, 1, 0, 1, 0}, // 2
{ 1, 1, 1, 1, 0, 0, 1, 0}, // 3
{ 0, 1, 1, 0, 0, 1, 1, 0}, // 4
{ 1, 0, 1, 1, 0, 1, 1, 0}, // 5
{ 1, 0, 1, 1, 1, 1, 1, 0}, // 6
{ 1, 1, 1, 0, 0, 0, 0, 0}, // 7
{ 1, 1, 1, 1, 1, 1, 1, 0}, // 8
{ 1, 1, 1, 1, 0, 1, 1, 0}, // 9
{ 0, 0, 0, 0, 0, 0, 0, 1} // .
};
void setup()
{
pinMode(A1, INPUT);
pinMode(ena, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
for (int i = 0; i < 8; i++)
{
pinMode(seg_Pins[i], OUTPUT);
}
Serial.start(9600);
}
void loop()
{
pot_input = analogRead(A1);
pot_map= map(pot_input, 0, 1023, 0 , 255);
//Serial.println(pot_input);
Serial.println(pot_map);
delay(300);
if ((pot_map > 1) && (pot_map <= 25))
{
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
analogWrite(ena, pot_map);
for (int n = 1; n < 2; n++)
{
display_Digit(n);
delay(2000); ///2 second delay
}
}
else if ((pot_map > 25) && (pot_map <= 50))
{
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
analogWrite(ena, pot_map);
for (int n = 2; n < 3; n++)
{
display_Digit(n);
delay(2000); ///2 second delay
}
}

else if ((pot_map > 50) && (pot_map <= 75))
{
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
analogWrite(ena, pot_map);
for (int n = 3; n < 4; n++)
{
display_Digit(n);
delay(2000); ///2 second delay
}
}
else if ((pot_map > 75) && (pot_map <= 100))
{
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
analogWrite(ena, pot_map);
for (int n = 4; n < 5; n++)
{
display_Digit(n);
delay(2000); ///2 second delay
}
}
else if ((pot_map > 100) && (pot_map <= 125))
{
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
analogWrite(ena, pot_map);
for (int n = 5; n < 6; n++)
{
display_Digit(n);
delay(2000); ///2 second delay
}
}
else if ((pot_map > 125) && (pot_map <= 150))
{
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
analogWrite(ena, pot_map);
for (int n = 6; n < 7; n++)
{
display_Digit(n);
delay(2000); ///2 second delay
}
}
else if ((pot_map > 150) && (pot_map <= 175))
{
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
analogWrite(ena, pot_map);
for (int n = 7; n < 8; n++)
{
display_Digit(n);
delay(2000); ///2 second delay
}
}
else if ((pot_map > 175) && (pot_map <= 200))
{
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
analogWrite(ena, pot_map);
for (int n = 8; n < 9; n++)
{
display_Digit(n);
delay(2000); ///2 second delay
}
}
else if ((pot_map > 200) && (pot_map <= 225))
{
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
analogWrite(ena, pot_map);
for (int n = 9; n < 10; n++)
{
display_Digit(n);
delay(2000); ///2 second delay
}
}
else if ((pot_map > 225) && (pot_map <= 255))
{
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
analogWrite(ena, pot_map);
for (int n = 10; n < 11; n++)
{
display_Digit(n);
delay(2000); ///1 second delay

}
}
else
{
for (int n = 0; n < 1; n++)
{
display_Digit(n);
delay(2000); ///2 second delay
}
}
}
void display_Digit(int digit)
{
for (int i = 0; i < 8; i++)
{
digitalWrite(seg_Pins[i], seg_Code[digit][i]);
}
}

Circuit Diagram :

Circuit Diagram

[ad_2]

Supply hyperlink

Save over $1,000 on the Galaxy Tab S9 Extremely within the Samsung sale

Easeking Star Projector Galaxy Gentle Projector with Bluetooth Speaker, A number of Colours Dynamic Projections Star Night time Gentle Projector for Children Adults Bed room, Area Lights for Bed room Decor Aesthetic