Arduino Based DC Motor Speed Controller with 16X2 LCD

The DC motor controller has been designed using Multi-purpose LCD Arduino Nano shield, circuit, PCB layout  and Arduino code available at our website www.twovolt.com , it can control DC motor 7-12V DC , it can drive motor upto 5Amps. Speed of motor can be set using trimmer potentiometer, 16X2 LCD display the Bar-Graph of speed of motor. Potentiometer is connected to Analog Pin A0 and Digital pin 9 which provides PWM output, this PWM signal goes to gate of MOSFET.

Compact multipurpose Arduino Nano 16X2 LCD shield can be used to develop various projects, shield provided with various things, LM 35 Temperature sensor, 3X Tactile Switch, Vertical trimmer Potentiometer, 12V Relay with NO/NC output, power Mosfet, AC714 current sensor and 16X2 LCD.

Arduino/LCD Pins

  • LCD RS pin to digital pin 12
  • LCD Enable pin to digital pin 11
  • LCD D4 pin to digital pin 5
  • LCD D5 pin to digital pin 4
  • LCD D6 pin to digital pin 3
  • LCD D7 pin to digital pin 2
  • LCD R/W pin to ground

Arduino Pins Various Devices

  • Switch 1 Arduino Pin A3
  • Switch 2 Arduino Pin D6
  • Switch 3 Arduino Pin D7
  • Current Sensor ACS714 Arduino Pin A5
  • Trimmer Potentiometer Arduino Pin A0
  • LM35 Sensor Arduino Pin A4
  • Power Mosfet Arduino Pin D9
  • Relay Arduino Pin D8

Arduino Code


/*
Motor Speed Controller with 16X2 LCD Bar-Graph Display, Circuit, PCB Layout ,
and code available at our website www.twovolt.com, Its Modified code,
original author of the code is Rui Santos, http://randomnerdtutorials.com/

*/

// include the library code
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int potPin = A0; // Potentiometer
int motorPin = 9; // Driver FET PWM
int potValue = 0; // Pot Value
int motorspeed = 0; // Pot Value to PWM
int pBari = 0; // Bar-Graph
int i = 0; // foor loop

//progress bar character
byte pBar[8] = {
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
};

void setup() {
// setup our led as an OUTPUT
pinMode(motorPin, OUTPUT);
// set up the LCD’s number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD
lcd.print(” MOTOR SPEED”);
//Create the progress bar character
lcd.createChar(0, pBar);
}

void loop() {
// clears the LCD screen
lcd.clear();
// Print a message to the LCD
lcd.print(” MOTOR SPEED”);
//set the cursor to line number 2
lcd.setCursor(0,1);
// read the value from the potentiometer
potValue = analogRead(potPin);
// turns the potValue into a Speed Of the Motor
motorspeed=map(potValue, 0, 1024, 0, 255);
//Speed up the motor
analogWrite(motorPin, motorspeed);
// turns the brighness into a percentage for the bar
pBari=map(motorspeed, 0, 255, 0, 17);
//prints the progress bar
for (i=0; i<pBari; i++)
{
lcd.setCursor(i, 1);
lcd.write(byte(0));
}
// delays 350 ms
delay(350);
}


Download Arduino Code

LED Dimmer Using Arduino 16X2 LCD and Potentiometer

Another  project LED Dimmer using multi LCD Arduino Nano shield, vertical trimmer potentiometer can used to adjust the LED brightness, LCD shows the bar-graph reading of LED dimmer.  MOSFET helps to drive LED up to 5A constant. Circuit works with 12V DC. Project has many parts , unused parts can be used omit if not required.

Arduino Pins

  • LCD RS pin to digital pin 12
  • LCD Enable pin to digital pin 11
  • LCD D4 pin to digital pin 5
  • LCD D5 pin to digital pin 4
  • LCD D6 pin to digital pin 3
  • LCD D7 pin to digital pin 2
  • LCD R/W pin to ground
  • Arduino Analog Pin A0 Potentiometer
  • Arduino Digital PWM D9 LED Driver

Arduino Code


/*
LED Dimmer with 16X2 LCD Bar-Graph Display, Circuit, PCB Layout ,
and code available at our website www.twovolt.com, Modified code,
original author of the code is Rui Santos, http://randomnerdtutorials.com/

*/

// include the library code
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int potPin = A0; // Potentiometer
int ledPin = 9; // Driver FET PWM
int potValue = 0; // Pot Value
int brightness = 0; // Pot Value to PWM
int pBari = 0; // Bar-Graph
int i = 0; // foor loop

//progress bar character for brightness
byte pBar[8] = {
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
};

void setup() {
// setup our led as an OUTPUT
pinMode(ledPin, OUTPUT);
// set up the LCD’s number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD
lcd.print(” LED Brightness”);
//Create the progress bar character
lcd.createChar(0, pBar);
}

void loop() {
// clears the LCD screen
lcd.clear();
// Print a message to the LCD
lcd.print(” LED Dimmer”);
//set the cursor to line number 2
lcd.setCursor(0,1);
// read the value from the potentiometer
potValue = analogRead(potPin);
// turns the potValue into a brightness for the LED
brightness=map(potValue, 0, 1024, 0, 255);
//lights up the LED according to the bightness
analogWrite(ledPin, brightness);
// turns the brighness into a percentage for the bar
pBari=map(brightness, 0, 255, 0, 17);
//prints the progress bar
for (i=0; i<pBari; i++)
{
lcd.setCursor(i, 1);
lcd.write(byte(0));
}
// delays 750 ms
delay(750);
}

Temperature Controlled Fan ON-OFF Switch Using Arduino Nano 16X2 LCD and LM35 Sensor

 

Compact Temperature controlled fan on/off switch is based on Arduino Nano multipurpose TWOVOLT shield, the circuit consist LM35 temperature sensor, 16X2 LCD, 12V relay including driver transistor, circuit works with 12V supply and can controlled any fan from 12V to 230V AC, for testing purpose I have connected 12V DC fan. At normally open switch of relay. The shield has many other parts can be omit if not required, refer circuit diagram for more info. Relay can switch load up to 7amps supply 5V to 230V AC.

Download PDF Schematic

 

Arduino Pins LCD

  • LCD RS pin to digital pin 12
  • LCD Enable pin to digital pin 11
  • LCD D4 pin to digital pin 5
  • LCD D5 pin to digital pin 4
  • LCD D6 pin to digital pin 3
  • LCD D7 pin to digital pin 2
  • LCD R/W pin to ground

Arduino Pins Various Devices

  • Switch 1 Arduino Pin A3
  • Switch 2 Arduino Pin D6
  • Switch 3 Arduino Pin D7
  • Current Sensor ACS714 Arduino Pin A5
  • Trimmer Potentiometer Arduino Pin A0
  • LM35 Sensor Arduino Pin A4
  • Power Mosfet Arduino Pin D9
  • Relay Arduino Pin D8

 

Default temperature trigger point is set to 35C, if you want to change the value , change here

Arduino Code for this project


/*
Tempereture Controlled Fan ON/OFF using arduino tempereture display on 16X2
LCD, Arduino Code, Circuit Diagram, PCB Layout Available at www.twovolt.com.
The project switch on the Fan at max set point
*/
#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
int tempPin = A4; // LM35 Temp Sensor Analog Output
int Relay = 8; // Relay Pin
int temp;
int tempMin = 25; //
int tempMax = 35; // Switch On The Relay

void setup() {
pinMode(Relay, OUTPUT);
pinMode(tempPin, INPUT);
lcd.begin(16,2);
}
void loop() {
temp = readTemp(); // Temperature
if(temp < tempMin) { // if temp is lower than Minimum-Temp

}
if(temp > tempMax) { // if temp is higher than Temp-Max
digitalWrite(Relay, HIGH); // Turn on Relay
} else { // else Turn of The Relay
digitalWrite(Relay, LOW);
}
lcd.print(“TEMP: “);
lcd.print(temp); // Display Temp
lcd.print(“C “);
lcd.setCursor(0,1); // move cursor
lcd.print(“FAN:ON/OFF”);
lcd.print(“”);
delay(300);
lcd.clear();
}

int readTemp() { // Temperature and convert it to celsius
temp = analogRead(tempPin);
return temp * 0.48828125;
}

High Current Half Bridge DC Motor Driver with Integrated Driver IFX007

The High Current DC Motor driver project has been designed using IFX007T IC from infinion, The project can drive large size brushed DC motor , speed control is easy using PWM , the board also has few features like short circuit protection, over temperature and over current protection, its provide current feedback can be interface with arduino , raspberry pai. Motor connections and DC supply input possible using screw terminals, all inputs can be feed using 5 pin male header connector, onboard power LED,    The IFX007T is an integrated high current half bridge for motor drive applications. It is part of the Industrial & Multi-Purpose Nova lithic™ family containing one p-channel high-side MOSFET and one n-channel low-side MOSFET with an integrated driver IC in one package. Due to the p channel high-side switch the need for a charge pump is eliminated thus minimizing EMI. Interfacing to a micro controller is made easy by the integrated driver IC which features logic level inputs, diagnosis with current sense, slew rate adjustment, dead time generation and protection against over temperature, under voltage, over current and short circuit. The IFX007T provides a cost optimized solution for protected high current PWM motor drives with very low board space consumption.Download PDF Schematic.

 

 

The IFX007T is part of the Industrial & Multi Purpose NovalithIC™ family containing three separate chips in one package: One p-channel high-side MOSFET and one n-channel low-side MOSFET together with a driver IC, forming an integrated high current half-bridge. All three chips are mounted on one common lead frame, using the chip-on chip and chip-by-chip technology. The power switches utilize vertical MOS technologies to ensure optimum on state resistance. Due to the p-channel high-side switch the need for a charge pump is eliminated thus minimizing EMI. Interfacing to a microcontroller is made easy by the integrated driver IC which features logic level inputs, diagnosis with current sense, slew rate adjustment, dead time generation and protection against over temperature, under voltage, overcurrent and short circuit. The IFX007T can be combined with other IFX007Ts to form a H-bridge or a3-phase drive configuration.

 

Features

  • Operation up to 40 V
  • Current limitation level of 55 A min.
  • Path resistance of max. 12.8 mΩ @ 25°C (typ. 10.0 mΩ @ 25°C)
  • High side: max. 6.5 mΩ @ 25°C (typ. 5.3 mΩ @ 25°C)
  • Low side: max. 6.3 mΩ @ 25°C (typ. 4.7mΩ @ 25°C)
  • Enhanced switching speed for reduced switching losses
  • Capable for high PWM frequency combined with active freewheeling
  • Switched mode current limitation for reduced power dissipation in over-current
  • Status flag diagnosis with current sense capability
  • Over temperature shutdown with latch behavior
  • Under-voltage shutdown
  • Driver circuit with logic level inputs
  • Adjustable slew rates for optimized EMI
  • Green Product (RoHS compliant)

 

 

Short circuit protection

  • The device provides embedded protection functions against
  • output short circuit to ground
  • output short circuit to supply voltage
  • short circuit of load
  • The short circuit protection is realized by the previously described current limitation in combination with the
  • over temperature shutdown of the device.

 

 

 

 

 

Input circuit

The control inputs IN and INH consist of TTL/CMOS compatible schmitt triggers with hysteresis which control the integrated gate drivers for the MOSFETs. Setting the INH pin to high enables the device. In this condition one of the two power switches is switched on depending on the status of the IN pin. To deactivate both switches, the INH pin has to be set to low. No external driver is needed. The IFX007T can be interfaced directly to a microcontroller

 

Dead time generation

In bridge applications it has to be assured that the high-side and low-side MOSFET are not conducting at the same time, connecting directly the battery voltage to GND. This is assured by a circuit in the driver IC, generating a so called dead time between switching off one MOSFET and switching on the other. The dead time generated in the driver IC is automatically adjusted to the selected slew rate.

 

Adjustable slew rate

In order to optimize electromagnetic emission, the switching speed of the MOSFETs is adjustable by an external resistor. The slew rate pin SR allows the user to optimize the balance between emission and power dissipation within his own application by connecting an external resistor RSR to GND

 

PWM control

For the selection of the max. PWM frequency the choosen rise/fall-time and the requirements on the duty cycle have to be taken into account. We recommend a PWM-period at least 10 times the rise-time.

Example:

Rise-time = fall-time = 4 μs.

=> T-PWM = 10 * 4 μs = 40 μs.

=> f-PWM = 25 kHz.

The min. and max. value of the duty cycle (PWM ON to OFF percentage) is determined by the real fall time plus the real rise time. In this example a duty cycle make sense from approximately 20% to 80%. If a wider duty cycle range is needed, the PWM frequency could be decreased and/or the rise/fall-time could be accelerated.

20Amps H-Bridge DC Motor Driver with Current and Fault Feedback Using IR2104-IR2101 IRFP4468

H-Bridge has been designed around IR2104 IC from international Rectifier, The board has been made mainly for DC-Motor Driver application, the driver can handle load up to 20 Amps, I have tested this board with 90V DC supply. The circuit uses N Channel IRFP4468 MOSFETS from international rectifier. MOSFET required large size heat sink.   Board has shunt resistor and signal conditioning circuits to provide voltage proportional to current passing through load. Comparator provides fault output, normally fault output is high goes low when its detect the over current passing through output..

FEATURES

  • Motor DC Supply 12V To 90V DC (Screw Terminal Connector)
  • Logic Supply 12V DC
  • Load 20 Amps (Screw Terminal Connector)
  • Fault Output Normally High, Goes Low When Over Current/Short Occurs
  • Current Feedback Output 200mv/1Amp ( If R5 Current Sense 0.01E)
  • Header Connector for Inputs (7 Pin Header Connector)
  • On Board Shunt Resistor for Current feedback
  • PWM Frequency 10 to 20 KHz
  • Duty Cycle 0-99%
  • Logic Pins support 3.3V, 5V, 12V (Inputs and PWM)

Connections

  • CN1 Supply Input
  • CN3 Logic Inputs, Current Feedback Output
  • CN2 Motor/Load Connections

CN3 Connections

Pin 1 Load Supply, Pin 2 GND, Pin 3 12V Gate Driver Supply, Pin 4 Input-1, Pin 5 SD1 Shutdown Input ( If IR2104 Used), Pin 6 Input 2, Pin 7 Shutdown Input ( If IR2104 Used), Pin 8 GND, Pin 9 Current Feed Back Output, Pin 10 Fault/Over Current Output, Pin 11 5V DC Output, Pin 12 Voltage Feedback Output

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

L298 Dual/Single DC Motor Driver Shield Arduino Nano

Dual Motor L298 H-Bridge Control project can control two DC motors OR single motor with 2X current. The circuit is designed around popular dual H-Bridge L298 from ST. This board can be configured to drive a single motor with high current rating also. This can be achieved with the help of jumpers on the board. An onboard 5V regulator can take a maximum of 18V of DC input. Should you wish to drive this board with higher voltage then 18V, you will need to connect a external 5V regulated source to the logic circuit. For this you will need to remove J-5V. This board can fit in any small toy or robot due to small size and very low profile. L298 IC is mounted under the PCB in horizontal position to make board small and low profile to fit any small robot. On board 5V regulator can be used to power up external Micro-Controller board as well as internal logic supply.

 

 

Features

Motor supply: 7 to 46 VDC
Control Logic Input: Standard TTL logic level
Output DC drive to motor: up to 2 A each (Peak)
On Board 5V Regulator (Close J-5V to Use On Board 5V Regulator)
Enable and direction control pins available
External Diode Bridge for protection
Heat-sink for IC
Power-On LED indicator
Header Connector for Inputs and PWM
On Board PCB Solderable Jumpers for Enable
Screw terminal connector for easy input supply (PWR) / output (Motor) connection

 

L298 to Arduino Nano Connections>I1>D4,I2>D5,E1>D6,I3>D9,I4>D10,E2>D11

 

 

 

Mini DC Motor Speed and Direction Controller for Low Voltage Motors Using L293D & 555 Timer

 

Project has been designed around L293 H-Bridge for Bidirectional motor operations, & 555 Timer IC which has been used as PWM generator for speed control. L293 is capable of continuous output current 600mA. Operating voltage 5V DC. Specially designed for low voltage Mini motors. Great control on speed via onboard preset, while direction is controlled by changing jumpers settings. PWM Duty cycle range 20% to 90% . Great kit can be used in science projects, toys, mini motor speed controllers, robotics, model-making.

DC Motor Speed and direction controller project based on L293D H-Bridge and 555 Timer IC. 555 Generate PWM and L293D works as output driver. The 293D provides bidirectional drive current up to 600mA a voltage from 5V to 12V. L293D includes the output clamping diodes for protections.

Specifications

  • Supply 5 to 12 V
  • Inhibit facility/enable
  • PWM Frequency 5KHz Maximum
  • High Noise immunity
  • Over temperature protection
  • Capable of delivering output current up to 600 mA per channel
  • The control/interface lines are accessible with Berg connector
  • Header connector for motor and supply connection
  • PR1 : Preset Speed Adjust
  • SW1 : 3Pin Jumper and Closer for Direction change
  • CN1 : DC Motor Supply input 5V to 12V DC

 

 

 

 

The L293 and L293D devices are quadruple high-current half-H drivers. The L293 is designed to provide bidirectional drive currents of up to 1 A at voltages from 4.5 V to 36 V. The L293D is designed to provide bidirectional drive currents of up to 600-mA at voltages from 4.5 V to 36 V. Both devices are designed to drive inductive loads such as relays, solenoids, DC and bipolar stepping motors, as well as other high-current/high-voltage loads in positive-supply applications.

Each output is a complete totem-pole drive circuit, with a Darlington transistor sink and a pseudo- Darlington source. Drivers are enabled in pairs, with drivers 1 and 2 enabled by 1,2EN and drivers 3 and 4 enabled by 3,4EN.

 

 

Digital Potentiometer Using Optical Rotary Encoder & LS7184

The primary application of the project is to replace the mechanical potentiometer with optical encoder which is long life, accurate, smooth in operation. The simple project has been designed around LS7184 quadrature clock converter IC from LSI semiconductor, AD5220-10 Digital potentiometer from Analog Devices, and optical encoder from Burns.

Quadrature clocks derived from optical encoder, when applied to the A and B inputs of the LS7184, are converted to strings of Clock and an Up/down direction control. These outputs interfaced directly to AD5220-10 Digital potentiometer IC.

The AD5220-10 contains a single channel, 128 positions, and digitally-controlled 10K ohms variable resistor (VR) device. This device performs the same electronic adjustment function as a potentiometer.

Jumper J1 provided for scale of the 3-state input to select resolution x1, x2 or x4. The input quadrature clock rate is multiplied by factors of 1, 2 and 4 in x1, x2 and x4 mode, respectively, in producing the output UP/DN clocks. x1, x2 and x4 modes selected by the MODE input logic.

levels are as follows:

Mode = 0 : x1 selected

Mode = 1 : x2 selected

Mode = Float : x4 selected

Features

  •     Supply 5V DC
  •     J1 Encoder pulse multiplication ( Jumper JL Close =1X, Jumper JH Close = X2, J1 Open = X4)
  •     Header Connector for Supply and Output
  •     Potentiometer Resistance 10K Ohms
  •     R5 Resistor For Programmable output pulse width (200ns to 140μs) – Read Data Sheet
  •     X1 , X2 and X4 mode selection
  •     Excellent regulation of output pulse width
  •     On-chip filtering of inputs for optical or magnetic encoder applications.
  •     TTL compatible I/Os

Note : Input for external component connection. A Resistor (R5) connected between this input and VSS adjusts the output clock pulse width (Tow). Refer to graph for appropriate bias resistor value.

 

 

 

 

 

 

 

 

EXAMPLE CIRCUITS OF LS7184 & LS7183

 

 

DOWNLOAD DATA SHEET LS7184

DOWNLOAD DATA SHEET AD5220

DOWNLOAD DATA SHEET ENA1J-B28-L00128L

 

RC Signal Monitor Using 20 Bargraph LEDs Including RC Switch ( RC Signal Reader Using Bar-Graph Display)

The versatile Bar-Graph SMD components based R/C signal monitor & R/C switch is a great tool for R/C hobbyist R/C modeller and DIY robotics, Tiny Bar-Graph displays provide a Red color bright, easy to read display of Radio Control (R/C) signal from 1mS to 2mS.  This Bar-Graph has 20 segments in single color and display R/C signal in span of 1mS to 2mS. The Barograph RC Signal reader is based on PIC micro-controller PIC16F886. This high performance measurement provides unique capabilities and can be used in various applications like Radio Signal Monitor, Robotics, Machine Control, RC Remote Tester, RC Signal to ON/OFF switch by connecting Relay board or Solid state relay at output of any suitable LED. Multi switches also possible connecting relay boards on all separate LEDs. Solder Jumpers provided on bottom side of PCB to select particular output to interface with Relay or Solid state Relay. PIC16F886 is heart of the project.

Note: This board has been designed for multiple options and has few extra components. Check BOM carefully before soldering the components.  Solder the parts as described in parts list. 

 

 Features

  • Supply 5V DC
  • Input 1mS to 2 Ms
  • Display Range 1.5mS to 2mS Center to Left 10 LEDs & 5mS to 1mS Center to Right 10Leds
  • Output Display 20 Color RED SMD LEDs
  • Compact Board with SMD Components
  • Supply input Header Connecter
  • Solder Jumper on each LED for Output Control, Alarm, and Relay

 

 

 

 

 

 

 

 

 

 

 

 

 

1 2 3 7