Friday, January 17, 2020

A Simple Arduino program, blinking a LED for beginners

A Simple Arduino program, blinking a LED for beginners

Introduction:- Arduino  board is a complete board for learning use of micro controller.It uses micro controller IC ATMega328 16 Mega Hertz. It is 8 bit micro controller with 32 kb of program memory. It has inbuilt programmer to upload program through USB port. Input dc supply jack is provided for giving input dc supply 8-12 volt. Inbuilt voltage regulator are used to provide 5 volt and 3.3 volt regulated power supply for internal use. 13 numbers digital input / output pins are provided for external devices connection. one LED is internally connected to pin number 13. Analog I/O pins, PWM pin and serial transfer Rx Tx pins are also provided.




Micro controller is a very small computer on a single chip. It consist of inbuilt CPU, storage memory, input output ports. Arduino board has every thing required for use of micro controller. It needs to upload a program and run. In this post I am writing a very small program to explain program structure and syntax use for Arduino programming. It used open source integrated environment development software for arduino. Screen shot of arduino IDE for windows is as shown below. Software can be downloaded from net.


When you open this arduino IDE in PC you will see this screen. Open blink example from menu bar
file  examples//basic/ blink . you will see screen open with above code. now please see the code it is similar to c++ programming language. this is very first and small program for beginners. first part of program is void setup() in this function we write the code which has to executed  only once. To use any digital input/output pin we have to configure the pin as input or output with a line of code like pinMode(pin number, OUTPUT/INPUT). Here we are using function pinMode to declare LED_BUILTIN (pin 13) as a output pin.

void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

Second part of program is loop function it runs continuously till the program is not stopped.
In loop function   digitalWrite(LED_BUILTIN, HIGH);  is use to write (give) a high value to  LED_BUILTIN (pin  13). when high value is given to pin 13 led connected to this pin gets on. Function   delay(1000);   Provides a delay of 1000 mili  seconds. This keeps pin 13 high for 1000 ms. Then the function digitalWrite(LED_BUILTIN, LOW);  is use to write low on  LED_BUILTIN (pin  13). When low value is given to pin 13 led connected to this pin gets off. Again function delay(1000); is used to give 1000 ms off time for pin 13 led. this complete code is repeated continuously as it is in loop function. Code for loop function is as given below.

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

After writing the program code in editor window it need to compile. in editor. Below menu bar there is a tool bar. In tool bar there are tab buttons for compile and upload the program.there is tool tip on each button. so by clicking on compile button program will compile and a message of successfully compiled or some error will display in output window.if your program is written correctly it will compile successfully.after compile we have to upload the program in Arduino board. For this we have to connect our board to computer with the help of USB cable which comes with board. The USB cable serves two purpose first it gives the power supply to the board and second it upload the hex code to the board. As soon as code upload is completed a message is displayed on IDE that upload is completed. Now micro controller runs this program and you will see that led connected to pin 13 starts blinking at the rate  of 1 second off and 1 second on. To blink a led can be done by any electronic circuit. but to change on/ ff duration will required to change components. With micro controller we have to change delay time in our program and upload. you can experiment by changing time period. any other output pin can also be use to control other led. We can also use 5 volt miniature relay in place of led and control any device from relay. Maximum output current of any output pin is max 50 ma. so we should be care full to connect load to pin that current should be in safe limit. Arduino is very vast can not be cover in such a small post. so for any doubt please ask in comment or take some help from net.
This program as well as many programs are given in  examples of arduino IDE that can be used for further learning. I hope this post will help full to you. your valuable suggestion and comments are welcome for improvement.



https://vijayelectronicsforu.blogspot.com/2018/06/transformer-introduction-and.html

https://vijayelectronicsforu.blogspot.com/2018/06/dc-motor-construction-and-working.html

http://vijayelectronicsforu.blogspot.com/2018/07/radio-receiver-block-diagram.html

Thursday, September 6, 2018

Basic Integrated circuit

Basic Integrated circuit

Introduction:- Any electronic circuit is uses different types of operation like amplification , generating oscillation, modulation, demodulation, comparing two signals, adding binary numbers, storing some binary number like many other operations.
All these operation required some components like transistor diode resistance capacitor etc. All these components are fixed on a PCB as per drawing then by giving operating supply and output load connection circuit start working.

Integrated circuit:- The required operating function circuit is design in a single package that is known as integrated circuit as all components are integrated. ICs come in single in line package and duel in line packages. Surface mount ICs are very commen now a days in mobile phone and computer dvd cd payer etc. Main thing to note is this each IC has a uniqe number which gives the details of that IC function. Basically we can divide all ICs in three categaries. first is audio amplifier, video amplifier, operation amplifier all theses are analog ICs. IC used for adder, comparator, microcontoller, microprocesser, sd card, ram, pen drive etc are works  on digital data so they all are known as digital ICs. All digital circuit work on 5 volt dc or 3.3 volt dc. All digital ICs are works on TTL logic. Anolog ICs for different functions comes in different operating voltage that we should check with the data sheet of that IC.
For a complete fuction we can get a single IC, we have to fix IC and few components on PCB and circuit becomes complete. Many assembled modules are also available for amplifiers and other things. It is a very brief idea about ICs for beginners.

Saturday, August 25, 2018

सोल्ड्रिंग ऑयरन का उपयोग कैसे करना सोल्ड्रिंग की विधि

सोल्ड्रिंग ऑयरन का उपयोग कैसे करना सोल्ड्रिंग की विधि

भूमिका:- इलेक्ट्रॉनिक प्रोजेक्ट में सोल्डरिंग का बहुत महत्व है।यदि ड्राई सोल्डर रह जाता है तो बाद में बहुत प्रॉब्लम होती है।
विधि:- सभी कम्पोनेन्ट की लीड को अच्छे से साफ करके टिनिंग कर लेना चाहिए। ऐसा करने से सोल्डरिंग के समय आसानी होती है
पीसीबी में कम्पोनेन्ट फिट करने के पहले ट्रेक को साफ करना चाहिये।
सोल्डरिंग करते समय पेस्ट का उपयोग आवश्यक है ।
इलेक्ट्रोलाटिक केपेसिटर में प्लस माईनस का ध्यान  रखना बहुत जरुरी है।

http://vijayelectronicsforu.blogspot.com/2018/08/star-delta-starter-principle-circuit.html

Monday, August 13, 2018

LCD INTERFACING WITH ARDUINO FOR MESSAGE DISPLAY

LCD INTERFACING WITH ARDUINO FOR MESSAGE DISPLAY

Introduction:- Liquid crystal display is used with microcontroller to display any message or digital output value. general purpose lcd has 2 row of 16 charactor to display. It is used as output display device. It has 16 pins for connection. pin 1 is connected to ground, pin 2 is connected to + 5 v, pin 3 is connected to potentiometer midile point for lcd contrast control,  pin 4 is Registor select pin for selecting data resistor or command Registor. pin 5 is read/write enable. pin 6 is enable pin. pin 7 to pin 14 are for data db0 to db7 respectively. Pin 15 is back light led plus and pin 16 is back light led minus.

Circcuit:- Arduino board and lcd display is to be connect as per circuit diagram given below. connect the board with usb cable to pc. copy and paste program given below in Arduino ide. compile and upload the program.liquid crystal libbrary is included in program. functions used are lcd.begin() to initialise lcd disply. lcd.print() to write  message in display memory. lcd.disply() to display message and lcd.noDisplay() to turn off message.



All comment are written in blue color and code is in white color.
/* code start  (multiline comment)
  LiquidCrystal Library - display() and noDisplay()

 Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
 library works with all LCD displays that are compatible with the
 Hitachi HD44780 driver. There are many of them out there, and you
 can usually tell them by the 16-pin interface.

 This sketch prints "Hello World!" to the LCD and uses the
 display() and noDisplay() functions to turn on and off
 the display.

 The circuit:
 * 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
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)*/

 


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

// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

// In setup()  we are using first function lcd.begin(16,2) to initilise lcd with 16 number of  //columns and 2 rows.
void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // In lcd.print("hello, world") we give command to write hello world in display memory
  lcd.print("hello, world!");
}
//The code written in void loop() will repeat continouly
void loop() {
// the function noDisplay() is used to blank (turn off) the display message

  lcd.noDisplay();
  delay(500); // this provide delay of 500 mili second

  lcd.display(); // this function turn on display message
  delay(500); // this provide delay of 500 mili second
}
//code ends
// is used to write comment in side the code. The above code to be write on arduino ide compile and load on Arduino board. It will start displaying blinking "hello world" message on lcd display. You can change the message displyed by changing the parameter of lcd.print(" message to display") function. This post will be help full . please comment for any quary and suggestions for improvement.



http://electronicsandmicrocontroller.blogspot.com/2018/07/a-simple-arduino-program-blinking-led.html

Sunday, August 12, 2018

Variable frequency variable voltage VVVF

Variable frequency variable voltage VVVF

Introduction :- The motor used in any machine need to be operate at variable speed.Earlier DC motor was used for applicatios where speed control is requred. The speed of ac motor is considered as fixed speed because the speed is depend upon number of pole and frquency of supply. But now a day with invent of VVVF drive it becomes easy to control speed of motor by producing variable voltage variable frequency supply for motor.
Working:-
In VVVF drive three phase voltage is converted in to dc voltage generally 500  v dc. Then three phase inverter circuit is used to produce 3 phase ac supply of  varable frequency and variable voltage. Voltage to frequency ratio remains constant.It uses digital control system for firing control of IGBT and inverter parameter setting. All the data of motor (such as voltage current rpm)  and operational requirements are  stored in parameters of drive.  VVVF drive has a display and key pad which are used for parameter setting. During running of motor running data load current and fault candition is also displayed on display. Drive key pad has buttons for start stop local remote forward reverse etc. In addition to this external push buttons can also be connected in control terminal block for start stop speed increase decrease etc. drive has three power terminal nuetral terminal and earth terminal for input connection. similarly three power terminal and one earth terminal for motor connection.


different makes of drive has some difference in control terminal block connection but basically all are same. With the help of instruction manual given with drive and following all instructions care fully it is easy to use VVVF drive for speed control of ac motor application. please see my blog for more articles. your comment and suggestions are welcome. 

Saturday, July 28, 2018

Three phase welding rectifier circuit working

Three phase welding rectifier circuit working 

Introduction:- A three phase welding rectifier is used in places where very smooth and perfect welding work is required. It consist of three phase step down transformer, rectifier and current controlling saturable reactor.

Circuit description:- A three phase  transformer is used for step down three phase 400 volt to 3 phase 100 v ac for welding rectifier. In a three phase transformer there are three winding in primary connected in star/delta connection and three secondary winding also connected in star / delta connection. A three phase bridge configuration is used, as shown in diagram for ac to dc conversion.



for output current contolling saturable reactor is used.saturable reactor has two winding one is used in series with output dc line and other winding is connected dc power source with variable resistance to control output current.

A  MCB, Contactor and Over Load relay is used  in control circuit to switch on power to welding transformer and protection from over load. one cooling fan is also used for cooling of transformer not shown in diagram. Start and stop button is provided for on/off contactor.

Controlling Current:- When controlling current is less saturable reactor reactance is more causing low output current. As control current trough reactor is increases the reactor reactance decreases causing more output current.


https://vijayelectronicsforu.blogspot.com/2018/07/dc-motor-direction-control-by-two-relay.html

https://vijayelectronicsforu.blogspot.com/2018/07/welding-transformer-current-control.html


Friday, July 27, 2018

A simple Arduino program, blinking a LED for beginners

A Simple Arduino program, blinking a LED for beginners

Introduction:- Arduino UNO  board is a complete board for learning use of micro controller.It uses micro controller IC ATMega328 16 Mega Hertz. It is 8 bit micro controller with 32 kb of program memory. It has inbuilt programmer to upload program through USB port. Input dc supply jack is provided for giving input dc supply 8-12 volt. Inbuilt voltage regulator are used to provide 5 volt and 3.3 volt regulated power supply for internal use. 13 numbers digital input / output pins are provided for external devices connection. one LED is internally connected to pin number 13. Analog I/O pins, PWM pin and serial transfer Rx Tx pins are also provided.




Micro controller is a very small computer on a single chip. It consist of inbuilt CPU, storage memory, input output ports. Arduino board has every thing required for use of micro controller. It needs to upload a program and run. In this post I am writing a very small program to explain program structure and syntax use for Arduino programming. It used open source integrated environment development software for arduino. Screen shot of arduino IDE for windows is as shown below. Software can be downloaded from net.


When you open this arduino IDE in PC you will see this screen. Open blink example from menu bar
file  examples//basic/ blink . you will see screen open with above code. now please see the code it is similar to c++ programming language. this is very first and small program for beginners. first part of program is void setup() in this function we write the code which has to executed  only once. To use any digital input/output pin we have to configure the pin as input or output with a line of code like pinMode(pin number, OUTPUT/INPUT). Here we are using function pinMode to declare LED_BUILTIN (pin 13) as a output pin.

void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

Second part of program is loop function it runs continuously till the program is not stopped.
In loop function   digitalWrite(LED_BUILTIN, HIGH);  is use to write (give) a high value to  LED_BUILTIN (pin  13). when high value is given to pin 13 led connected to this pin gets on. Function   delay(1000);   Provides a delay of 1000 mili  seconds. This keeps pin 13 high for 1000 ms. Then the function digitalWrite(LED_BUILTIN, LOW);  is use to write low on  LED_BUILTIN (pin  13). When low value is given to pin 13 led connected to this pin gets off. Again function delay(1000); is used to give 1000 ms off time for pin 13 led. this complete code is repeated continuously as it is in loop function. Code for loop function is as given below.

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

After writing the program code in editor window it need to compile. in editor. Below menu bar there is a tool bar. In tool bar there are tab buttons for compile and upload the program.there is tool tip on each button. so by clicking on compile button program will compile and a message of successfully compiled or some error will display in output window.if your program is written correctly it will compile successfully.after compile we have to upload the program in Arduino board. For this we have to connect our board to computer with the help of USB cable which comes with board. The USB cable serves two purpose first it gives the power supply to the board and second it upload the hex code to the board. As soon as code upload is completed a message is displayed on IDE that upload is completed. Now micro controller runs this program and you will see that led connected to pin 13 starts blinking at the rate  of 1 second off and 1 second on. To blink a led can be done by any electronic circuit. but to change on/ ff duration will required to change components. With micro controller we have to change delay time in our program and upload. you can experiment by changing time period. any other output pin can also be use to control other led. We can also use 5 volt miniature relay in place of led and control any device from relay. Maximum output current of any output pin is max 50 ma. so we should be care full to connect load to pin that current should be in safe limit. Arduino is very vast can not be cover in such a small post. so for any doubt please ask in comment or take some help from net.
This program as well as many programs are given in  examples of arduino IDE that can be used for further learning. I hope this post will help full to you. your valuable suggestion and comments are welcome for improvement.



https://vijayelectronicsforu.blogspot.com/2018/06/transformer-introduction-and.html

https://vijayelectronicsforu.blogspot.com/2018/06/dc-motor-construction-and-working.html

http://vijayelectronicsforu.blogspot.com/2018/07/radio-receiver-block-diagram.html