Interfacing of Multiple DS18B20 Arduino
Hello everyone, hope you all are fine and having fun with your lives. Today, I am going to share a new project named as Interfacing of Multiple Temperature sensors DS18B20 arduino. I have already shared a tutorial on Interfacing of Temperature Senor 18B20 with Arduino but in that tutorial, we have seen how to connect one temperature sensor DS18B20 arduino. But today, I am gonna interface multiple temperature sensors DS18B20 Arduino. For this project I have used two sensors but you can use more if you want.
Temperature sensor DS18B20 is a one wire temperature sensor means we can get its data through a single wire and we can connect as many as we want temperature sensors with this single wire and can call them through their addressing. Each temperature sensor is allotted an address and when we call that address, we get its value. So, in today's project, I have used two sensors and displayed their values on LCD. Both of these sensors are connected with single wire. I am not using both DS18B20 sensors instead I am using one 18B20 and one 18S20 temperature sensors just to give a taste, but you can connect any kind of Dallas Temperature sensor. I have designed the simulation in Proteus and the simulation is also available for download. Anyways let's get started with interfacing of Multiple Temperature Sensors DS18B20 arduino.
Interfacing of Multiple DS18B20 Arduino
- You can download the complete simulation along with progrmming code by clicking the below button:
Download Simulation and Code
- Now, let's design our simulation because its always a good practice to design from basics. So, open your Proteus software and design the below circuit diagram:
- Now, as you can see in the above figure, I have used two temperature sensors DS18B20 Arduino is used as a micrcontroller and LCD is used for displaying the values of these two temperature sensors.
- Both of these temperature sensors are connected with a single wire of Arduino board which is Pin # 2.
- So, now using this single wire we can connect as many temerature sensors as we want.
- So, now next thing we need to do is to Get the Hex File from Arduino Software. So for that place the below code in your Arduino software and get your hex file.
#include <LiquidCrystal.h>
#include <OneWire.h>
OneWire ds(2); // pin 2
LiquidCrystal lcd(13,12,11,10,9,8);
void setup(void) {
lcd.begin(20,4);
lcd.print("Temp 1 = ");
lcd.setCursor(0,1);
lcd.print("Temp 2 = ");
lcd.setCursor(1,2);
lcd.print("www.TheEngineering");
lcd.setCursor(4,3);
lcd.print("Projects.com");
}
void loop(void) {
byte i = 0;
byte data[9];
byte addr[8];
int temp;
boolean type;
//get the addresses of Temperature Sensors
if(!ds.search(addr)){
return;
}
switch(addr[0]){
case 0x10: type = 1; break;//DS18S20
case 0x22: type = 0; break;//DS1822
case 0x28: type = 0; break;//DS18B20
default: break;
}
ds.reset();
ds.select(addr);
ds.write(0x44);
delay(750);
ds.reset();
ds.select(addr);
ds.write(0xBE);
//Leitura
for ( i = 0; i < 9; i++) {
data[i] = ds.read();
}
if(!type){//DS18B20 ou DS1822
lcd.setCursor(9,1);
if((data[1]>>7)==1){
data[1] = ~data[1];
data[0] = (~data[0]) + 1;
lcd.print("-");
}
else{
lcd.print("+");
}
temp = (data[1]<<4) | (data[0]>>4);
lcd.print(temp);
lcd.print(".");
temp = (data[0] & 0x0F) * 625;
if(temp>625){
lcd.print(temp);
}
else{
lcd.print("0");
lcd.print(temp);
}
}
else{//DS18S20
lcd.setCursor(9,0);
if((data[1]>>7)==1){
data[0] = ~data[0];
lcd.print("-");
}
else{
lcd.print("+");
}
temp = data[0]>>1;
lcd.print(temp);
lcd.print(".");
lcd.print((data[0] & 0x01)*5);
}
lcd.print(" ");
lcd.write(223);// degree symbol
lcd.print("C ");
}
- Now, when you uploaded your hex file in Arduino board of your Proteus software then run your Proteus file.
- If everything goes fine then you will get the results as shown in below figure:
- So, you can see in the above figure that I am getting the data of both these temperature sensors and displaying them on LCD.
- Both of these temperature sensors are showing different temperature values and their respective values are displayed over the LCD.
That's all for today, I hope you can now easily interface multiple temperature sensors with Arduino. Will meet in the next tutorial. Till then take care and have fun !!! :)
DC Motor Speed Control using Arduino in Proteus
Hello friends, hope you all are fine and having fun with your lives. Today, I am going to share a tutorial on DC Motor Speed Control using Arduino in Proteus ISIS. In my previous post, we have seen How to design a DC Motor Direction Control Project using Arduino in Proteus ISIS and if you haven't checked it out then I would recommend you to have a look at it first. Because, in today's tutorial, I am gonna extend that tutorial and will add the DC Motor Speed Control in it. So, today, we will control both the direction as well as speed of the DC Motor. Moreover, you should also have a look at How to use Arduino PWM Pins if you are not much familiar with PWM control.
In the previous tutorial, we have seen How to control the direction of a DC Motor, which is important when you are working on some robot and you need to move that robot in both forward and reverse direction. So, in such cases you need to do the direction control of DC motor. But in most projects, along with direction, we also need to control the speed of DC motor so that we can implement some PID algorithm on the motors. So, in such cases, there comes a need for DC Motor Speed control, which we are gonna cover in today's post. So, let's get started with it.
DC Motor Speed Control using Arduino in Proteus
- As I have explained earlier, I am gonna take it further from our previous tutorial. So, in previous tutorial, what we have done is, we have controlled the direction of DC Motor using Serial Terminal.
- When we send commands on the Serial Terminal the motor moves in clockwise or Anti-clockwise direction.
- So, now the above mentioned functionality will remain the same but an addition will be of speed control.
- I have placed a LDR sensor in the simulation and depending on the value of that LDR sensor our DC motor speed will either increase or decrease.
- So, you can download the complete simulation of DC Motor Speed Control by clicking the below button:
Download DC Motor Simulation
- As I always recommend, design this simulation on your own so that you learn most of it.
- So, first of all, design a circuit as shown in below figure:
- As you can see in the above figure, its exactly the same as we designed for Direction Control of DC Motor in Proteus ISIS with a slight difference.
- The difference is NPN transistor which is used for DC Motor speed control.
- The base of this NPN transistor is connected with PWM pin of Arduino board.
- So, I am generating a PWM pulse on this pin which is then applied on the base of transistor.
- Now if I increase the duty cycle of this PWM pulse then the transistor induction will increase and thus the speed of the DC motor.
- Now in order to control this PWM pulse I have used the LDR sensor, now depending on the LDR sensor the speed of DC motor will increase or decrease.
- Now upload the below code in your Arduino software and Get the hex file from Arduino software.
int Motor1 = 2;
int Motor2 = 3;
int PWMControl= 6;
int PWM_Input = A0;
int PWM_Value = 0;
void setup() {
pinMode(Motor1, OUTPUT);
pinMode(Motor2, OUTPUT);
pinMode(PWMControl, OUTPUT);
pinMode(PWM_Input, INPUT);
Serial.begin(9600);
}
void loop() {
PWM_Value = analogRead(PWM_Input);
PWM_Value = map(PWM_Value, 0, 1023, 0, 255);
analogWrite(PWMControl, PWM_Value);
if(Serial.available())
{
char data = Serial.read();
Serial.println(data);
if(data == 'C'){MotorClockwise();}
if(data == 'A'){MotorAntiClockwise();}
if(data == 'S'){MotorStop();}
}
}
void MotorAntiClockwise()
{
digitalWrite(Motor1, HIGH);
digitalWrite(Motor2, LOW);
}
void MotorClockwise()
{
digitalWrite(Motor1, LOW);
digitalWrite(Motor2, HIGH);
}
void MotorStop()
{
digitalWrite(Motor1, HIGH);
digitalWrite(Motor2, HIGH);
}
- So, now I am starting the simulation and then will send the commands via virtual Terminal and it will start moving and then by changing the LDR position DC motor speed control will take place.
- I know its not clear from above figure so that's why I have designed this video. In the below video you will get the clear idea of DC Motor speed motor.
So, that's all for today. I hope you have got the idea of DC Motor Speed Control. Take care and have fun !!! :)
DC Motor Direction Control with Arduino in Proteus
Hello friends, hope you all are fine and having fun with life. Today, I am going to share DC Motor Direction Control with Arduino. I have designed a complete simulation in Proteus, which will help you in understanding the controlling of DC motor. I would recommend you to first read How to Control relay in Proteus ISIS which will help you in understanding the functionality of relays because in today's tutorial, I have used relays to do the DC Motor Direction Control. I have already posted a tutorial on DC Motor Drive Circuit in Proteus ISIS.
So, for DC Motor Direction Control, I have used Arduino UNO baord, so you should also download this Arduino Library for Proteus so that you can use Arduino boards in Proteus software. I have also provide the simulation and the code for DC Motor Direction Control but I would recommend you to design it on your own so that you learn from it. If you have any problem then ask in comments and I will try to resolve them. In this project, I have used Serial Terminal. So, whenever someone, sends character "C" on serial terminal then the motor will move in Clockwise Direction and when someone sends character "A" then it will move in Anti-clockwise Direction and will stop on character "S". Anyways, lets get started with DC Motor Direction Control with Arduino in Proteus ISIS.
DC Motor Direction Control with Arduino in Proteus ISIS
- You can download the Proteus simulation for DC Motor Direction Control by clicking the below button:
Download Proteus Simulation for DC Motor
- So, now let's move on with designing it, first of all get the below components from Proteus and place them in your workspace:
- Now, design a circuit in Proteus software, as shown in below figure:
- You can see in the above figure that I have used two relays which I have used for DC Motor Direction Control.
- Moreover, there's a Virtual Terminal through which I am sending the commands.
- I have used Arduino UNO board for DC Motor Direction Control through Virtual Terminal. You should download the Arduino Library for Proteus so that you can use it in Proteus.
- Now upload the below code in your Arduino software and get the hex file. You should read how to get the Hex file from Arduino.
int Motor1 = 2;
int Motor2 = 3;
void setup() {
pinMode(Motor1, OUTPUT);
pinMode(Motor2, OUTPUT);
Serial.begin(9600);
}
void loop() {
if(Serial.available())
{
char data = Serial.read();
Serial.println(data);
if(data == 'C'){MotorClockwise();}
if(data == 'A'){MotorAntiClockwise();}
if(data == 'S'){MotorStop();}
}
}
void MotorAntiClockwise()
{
digitalWrite(Motor1, HIGH);
digitalWrite(Motor2, LOW);
}
void MotorClockwise()
{
digitalWrite(Motor1, LOW);
digitalWrite(Motor2, HIGH);
}
void MotorStop()
{
digitalWrite(Motor1, HIGH);
digitalWrite(Motor2, HIGH);
}
- In the above code, I have designed three functions which I am calling on Serial receive.
- The code is quite self explanatory but if you got problem then ask in comments and I will resolve them.
- Once everything's done then run your simulation and if you have done fine then it will start working as shown in below figure:
- Obviously, you can't see a moving DC motor in an image but you can get the idea from Relays position in above figure. :)
- The below video will give you the better idea of How it works.
So, that's all for today. Hopefully now you have got the idea of How to do DC Motor Direction Control with Arduino in Proteus ISIS. In the next tutorial, I am gonna add speed control of DC Motor. So, till then take care and have fun. :)
Genuino Library for Proteus
Hello friends, hope you all are fine and having fun with your lives. Today, I am going to share a new Genuino Library for Proteus. Genuino boards are just the same as Arduino boards but with slight difference of color and shape. I have already posted a tutorial on Arduino Library for Proteus in which I have explained how to download the Arduino Library and use it in Proteus. Today, I am going to post a similar library but for Genuino boards. Their functionality is exactly the same as the Arduino Library but they have better look and Genuino Color.
II hope you are gonna like this library as well. Other bloggers are welcome to share this library with their reader but do mention our link in creator section, we will be really obliged. Now, let's start with the Genuino Library for Proteus.
Genuino Library for Proteus
- First of all, download the Genuino Library for Proteus from the below button:
Genuino Library for Proteus
- In the above link, you will get an rar file which will have two files, named as:
- GenuinoTEP.LIB
- GenuinoTEP.IDX
- Now place these two files in the Library folder of your Proteus software.
Note:
- Now start your Proteus software and go to Component searching section and search for GenuinoTEP as shown in the below figure:
- Now place them in your Proteus work space and they will look like as shown in below figure:
- In the above figure, five of these genuino boards are visible. The sixth board is Arduino Mega1280, which is similar to Arduino Mega 2560 in shape so that's why I have omitted it in the above image.
- Now you can design any of your project on Genuino board quite easily in Proteus using this Genuino Library for Proteus.
- In order to upload the code in any of these boards you need to double click it to open its properties.
- For example I double click the Arduino UNO baord then the Properties panel will look like as shown in below figure:
- In the above figure, you can see a section named Program file, that's where you are gonna browse your hex file.
- You should read How to get Hex file from Arduino, if you don't know already.
- So, get the hex file and upload here and your Genuino board will get active.
- In the below video, I have explained in detail How to use this Genuino board in Proteus and have already tested the blink example.
That's all for today, I hope you will enjoy this Genuino Library for Proteus. Let me know your suggestions about this library. Have fun !!! :)
Bluetooth Library for Proteus
Hello friends, hope you all are fine. Today, I am going to share a new Bluetooth Library for Proteus. Using this Library, now you can quite easily use Bluetooth modules in Proteus ISIS. I have designed two Bluetooth modules which are HC-05 and HC-06. We all know about these modules. We use these modules for sending data through Bluetooth. Till now, there's no such Bluetooth Library designed for Proteus and we are the first developers of this awesome Bluetooth Library for Proteus. I hope you guys are gonna like it. I have also posted a tutorial in which I have done Arduino Bluetooth Communication using HC05 in hardware. I hope that one will also be interesting to read, if you have planned to start working on Bluetooth Module.
Other bloggers are welcome to share this Bluetooth Library for Proteus on their blogs but do mention our link as a respect to our efforts. These Bluetooth modules are not gonna accept AT Commands rite now as we haven't added much functionality in it but we are gonna add more soon. I will also add more Bluetooth modules in this library and will update it with time. Rite now, it just has two Bluetooth modules in it, which are:
You can do serial communication with these modules quite easily. So, let's get started with Bluetooth Library for Proteus an see How to install it and how to use it in Proteus.
Note:
Other Proteus Libraries are as follows:
Bluetooth Library for Proteus
- So, first of all, download this Bluetooth Library for Proteus by clicking the below button:
Bluetooth Library for Proteus
- In this rar file, you will find two files which are named as:
- BluetoothTEP.IDX
- BluetoothTEP.LIB
- So, download these two files and place them in the library folder of your Proteus ISIS software.
Note:
- Now open your Proteus software or restart it if its already open and search for Bluetooth and you will get something as shown in below figure:
- Now select both of these modules and place them in your workspace and it will look like something as shown in below figure:
- As, I told earlier, we have just used the basic TX and RX pins of these Bluetooth modules.
- That's why you can see in the above figure that only TXD and RXD are working while all others are not working.
- Let's have a look at it working, so let's design a simple circuit and do the communication between these two Bluetooth modules.
- If you haven't worked on Virtual Terminals then you should read How to use Virtual Terminal in Proteus.
- So, design a simple circuit as shown in below figure:
- Now click any HC-05 module and you will get a pop up window.
- In this window, select COM1 for first HC05 module and COM2 for second HC05 module.
- Now your COM1 and COM2 should be virtually connected, I have shown how to connect the COM ports virtually in the below video.
- Now, run your simulation and whatever you send in first terminal will show in second terminal and vice versa.
That's all for today, hope you have liked this post and are gonna enjoy it. Let me know about your remarks for this Bluetooth Library for Proteus. Have fun !!! :)
Arduino Bluetooth Communication using HC05
Hello friends, hope you all are fine and having fun with your lives. Today, I am going to share a new project in which we are gonna do Arduino Bluetooth communication. The Bluetooth module I have used for this project is HC-05, which is a serial Bluetooth module. We can quite easily perform the Bluetooth communication with this module using Arduino board. I have worked on many projects in which I have to send the data from sensors to my computer via Bluetooth. So, in such projects I normally use this Bluetooth module which is connected with the sensors and then Arduino gets the data from these sensors and then send this data to computer via Bluetooth module. In this project, I have used Arduino board but you can use PIC Microcontroller or 8051 Microcontroller as well. Because they both have the Serial pins on them.
Note:
Before reading any further, I think you must have a look at the below post from where you can download the Bluetooth Library for Proteus, using this library you can easily simulate HC-05 or , HC-06 in Proteus software:
I have also done Bluetooth communication with Android mobiles. In these projects I have sent the data from this Bluetooth module to Android mobiles but in such projects I have also designed Bluetooth app on which this data is received. Anyways, that's a topic of another tutorial. Today, I am gonna connect this Bluetooth module with Arduino board and then will send some data to my computer using Bluetooth. So, let's get started with Arduino Bluetooth communication using HC-05 module.
Arduino Bluetooth Communication using HC-05
- First of all, what you need to do is to buy the Arduino board. I have designed this project using Arduino UNO board but you can buy any of the Arduino Microcontroller board.
- Next thing you are gonna need is Bluetooth module which is HC-05. But this tutorial will also work for HC-06 or HC-07.
- Now if you have seen HC-05 then the pins are written on it so connect them with your Arduino board as shown below:
- This pin configuration is also shown in the below figure:
- Now that you have connected your Arduino board with the Bluetooth module HC-05 so you are ready to do the Arduino Bluetooth communication.
- Now upload the below code in your Arduino board:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3);
void setup()
{
Serial.begin(9600);
mySerial.begin(9600);
}
void loop()
{
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
}
- Its a simple software serial code in which we are sending data from our Serial terminal to Bluetooth means whatever you write in your serial terminal will be sent over to Bluetooth and whatever you receive on your Bluetooth will be shown in serial terminal.
- Now, download this Serial monitor software, I have designed this software and its quite simple one. You can use any other serial monitor like Virtual Terminal in Proteus or Hyper Terminal in Windows XP.
- We are gonna use this software to get the data on our computer via Bluetooth and you computer must have the Bluetooth in your computer. :P
- So, download this software by clicking the below button and you can read more about it Microsoft Visual Basic 2010 - Com Port Tutorial.
Download Serial Terminal
- Now turn on your Arduino and search for the Bluetooth device in your Bluetooth settings and paired with it as shown in below figure.
- The default pin code for HC-05 is 1234.
- Now you can see I have paired the HC-05 device.
- Now, open this software and connect with the COM port of your Bluetooth device.
- The Bluetooth device generates two COM ports in my case it generated COM11 and COM12 but COM11 worked.
- So, I connected with COM11 and then whatever I entered in my software is shown on the serial monitor of my Arduino and whatever I entered in the Serial monitor of Arduino is shown in the serial terminal software.
- Its quite simple and you can do it quite easily.
So, that's all for today and I hope you are gonna make it work in the single attempt. If still having problems then ask in comments and I will resolve them. So, today we have done Arduino Bluetooth communication using HC-05 module.
Automatically Connect with Wifi SSID using Arduino YUN
Hello Friends, hope you all are fine and having fun. In today tutorial i am going to elaborate How to Automatically Connect with Wifi SSID using Arduino YUN. If you recall one of my previous tutorials named Getting started with Arduino YUN , in which i gave a brief introduction about Arduino YUN, its working and features. In that tutorial, I have explained How to connect Arduino YUN with Wifi manually. A little problem encounters while connecting Arduino manually to available wifi networks that if wifi connection drops then, then Arduino will also disconnect automatically and if wifi connection is energized again, it will still remain disconnected unless you reconnect it by yourself. This thing has very serious drawbacks in industrial projects, where data is continuously uploaded through multiple servers and if at any stage connection drops and Arduino stops working then, this thing leads to drastic outcomes.
So there is serious need to design an algorithm in which Arduino automatically connects to the available wifi connections and should enables the server to upload data through it. This whole process is a bit lengthy and much complicated. So, i will elaborate all this in the coming tutorials. In today's tutorial i am going to restrict myself only How to get Available wifi SSID using Arduino YUN. First of all lets recall the basics of Arduino YUN. Arduino YUN has 2 micro processors embedded on the same board. First is the Arduino microprocessor and the second is Atheros micro processor. Atheros supports Linux server (commonly used in Apple computers). With both these on-board micro processors, we can do anything we want to do. The beauty of Arduino board is that it has built in wifi, Ethernet port, USB host and SD card slot. We can also upload data into Arduino through wifi without physically connecting it with computer. That's why Arduino boards are the most widely used micro processors now a days, and are able to handle multitasking industrial projects. Above was a little introduction about Arduino YUN and now lets get started with our today's tutorial.
Automatically Connect with Wifi SSID using Arduino YUN
- First of all open the Arduino softeare. On toolbar click on the icon named "Tools" and a new window will open. Then go to the option "Board" and from the next opened window select the board "Arduino YUN".
NOTE:
- Remember you must download the Arduino software version 1.5.5 + instead of 1.0.3 because Arduino sketches will be only compiled in 1.5.5 version which is specifically designed for Arduino YUN.
- After selecting the board, you will load the given below code into Arduino Board.
#include <Process.h>
#include <FileIO.h>
String ESSID = "TEP";
String Pass = "Pakistan";
String Encrypt = "psk2";
void setup() {
Serial.begin(9600);
delay(5000);
FileSystem.begin();
delay(5000);
Bridge.begin();
delay(5000);
}
void loop() {
// put your main code here, to run repeatedly:
WifiAuthentication();
}
void WifiAuthentication()
{
uploadScript();
delay(1000);
runScript();
delay(20000);
}
void uploadScript()
{
File script = FileSystem.open("/tmp/setupwifi.sh", FILE_WRITE);
script.print("#!/bin/sh\n");
script.print("/sbin/uci set network.lan=interface\n");
script.print("/sbin/uci set network.lan.proto=dhcp\n");
script.print("/sbin/uci delete network.lan.ipaddr\n");
script.print("/sbin/uci delete network.lan.netmask\n");
script.print("/sbin/uci set wireless.@wifi-iface[0].mode=sta\n");
script.print("/sbin/uci set wireless.@wifi-iface[0].ssid=" + ESSID + "\n");
script.print("/sbin/uci set wireless.@wifi-iface[0].encryption=" + Encrypt + "\n");
script.print("/sbin/uci set wireless.@wifi-iface[0].key=" + Pass + "\n");
script.print("/sbin/uci commit wireless; /sbin/wifi\n");
script.print("/etc/init.d/network restart\n");
script.close();
Process chmod;
chmod.begin("chmod");
chmod.addParameter("755");
chmod.addParameter("/tmp/setupwifi.sh");
chmod.run();
}
void runScript()
{
Process myscript;
myscript.begin("/tmp/setupwifi.sh");
myscript.run();
Serial.println("Connected");
}
- The above given code is a bit complicated and it consists of many steps. Now i am going to show all the steps through a block diagram and then i will try to explain every step one by one.
- Using this code, the Arduino YUN board will automatically connected to the available SSID which is in our case is TEP. So you can give any other SSID there and it will connect to that one.
- In the above block diagram, you can see that first of all Initialize Serial Port. When you will connect Arduino YUN with your computer through cable or as i described earlier that Arduino YUN also have built-in wifi so you can also connect Arduino YUN with computer through wifi.
- Then you will load the code to Initialize Serial Port, which is the first step and also shown in the above block diagram.
- In this project we have kept Baud rate of Arduino YUN 9600.
- The next step in the block diagram is to 'Initialize File System' . In this step we will load 'File System' into our code as viewed in the code image given above.
- Now in the next step we have to initialize the Arduino YUN Bridge. The block diagram representing the internal structure of Arduino YUN is shown in the image below:
- As i stated earlier in the beginning of the tutorial that Arduino YUN has 2 on-board micro processors and Arduino YUN is the intermediate source who performs communication between both micro processors.
- The Bridge library facilitates communication between the two processors, giving Arduino sketches the ability to run shell scripts, communicate with network interfaces, and receive information from the AR 9331 processor.
- The USB Host is connected to the ATmega 32u4, while the all external interferences(like Wifi, Ethernet, SD card) are connected to Linux micro processor.
- The beauty of this board is that Bridge libraries also enables the Arduino micr processor ATmega to communicate with the other interferences, which are also connected with Linux microprocessor.
- When bridge has been activated then, Arduino YUN enables its wifi and search for the nearby available wifi connections.
- When it will get some available wifi connections in its surrounding then, from its algorithm, Arduino YUN will get the SSID from that available wifi connections.
- The next thing which we have implemented in the code is to get SSID String. It is a built in function and also available in Arduino libraries that if it gets any available wifi connection near it, then it automatically gets strings from those connections.
- When Arduino has searched for all the available wifi connections near it and after getting the SSID of available wifi connections, it sends all these SSID to serial port of Arduino YUN board.
- After that Arduino YUN will automatically connect to that wifi connection whose SSID matches with the given SSID.
- Now the end step is very important and it distinguishes Arduino YUN from all other Arduino boards, which is, After sending data to serial port it again starts the loop and got o step #4 and it again starts to search for available wifi networks.
- This phenomenon can also be verified from the above shown block diagram.
- At any stage, if wifi connection drops then the loop will again start and will search for available wifi connections, get their SSID and it will send these SSID to serial port and it will rehabilitate the connection within no time and no problem will occur at any stage of data execution.
Alright friends, that was all from today's post. It is a very basic and very important post and we have seen How to Automatically Connect with Wifi SSID using Arduino YUN. I hope you have learned something new in today's post. If you have any problem in understanding any step of this tutorial then, you can ask in the comments and i will try my best to resolve the issue. Follow us to get the codes and simulations straight in your inbox. For more tutorial and projects, stay tuned and until next tutorial Take Care !!! :)
XBee Library for Proteus
Hello everyone, today I am going to share a new XBee Library for Proteus. I am quite excited while sharing it as we are the first developer for this XBee Library. Now you can quite easily use XBee module in your Proteus software using this XBee Library for Proteus.Wehave spent quite a lot of time in developing this and that's the reason I couldn't share new tutorials in the past few days. Anyways we are done with this new exciting XBee Library for Proteus, hope you are gonna enjoy this one. I have already sharede two libraried for Proteus which are Arduino Library for Proteus and GPS Library for Proteus. You can also interface this XBee module with Microcontrollers like Arduino, PIC Microcontroller and 8051 Microcontroller quite easily.
As its the first version of our XBee Library for Proteus so its not quite perfect and can't do the complex tasks such as analog inputs etc. It will just do the serial communication. This xbee module has two pins TX and RX and you can do your communication with it quite easily. We have designed this XBee Library for Proteus, after quite a lot of effort and we are quite proud that we are presenting it first time for Proteus. Other bloggers are welcome to share this library on their blogs to share the knowledge but do mention our blog post link in your post. :) You should also have a look at XBee Arduino Interfacing. So, let's get started with it.
XBee Library for Proteus
- First of all, download this XBee Library for Proteus by clicking on the below button:
XBee Library for Proteus
- Now once you click it you will get a zip file to download so download this zip and open it.
- In this zip file you will get two files named as:
- So, now place these two files in the libraries folder of your Proteus software.
Note:
- Now, start your Proteus ISIS software or restart it if its already running.
- Go to your components library and search for XBee Module as shown in below figure:
- Now place it in your workspace and it will look something as shown in below figure:
- If you don't know much about xbee module then you should also have a look at Introduction to XBee Module.
- As you can see in the above figure, its our xbee module in Proteus for the first time.
- As, I mentioned earlier, its a first version of xbee module so its not very advanced and it will do just the basic serial communication i.e. sending and receiving data.
- It has two pins on it which are TX and RX and using these two pins you can send and receive data quite easily.
- So, let's design a simple example and we will see How to do the Serial communication using this new XBee library for Proteus.
- Design a simple circuit as shown in below figure:
- Now what I did is, I simply place a Virtual terminal with both of these xbee modules.
- Now we need to change the Properties of one of these XBee module so double click on any one of these and you will get the below window:
- You should also have a look at Interfacing of XBee with Computer.
- Now, I have simply changed the Physical Port of this module to COM2 while the other module is at COM1.
- So, now one of my XBee module is at COM1 while the second module is at COM2.
- Now when I run my simulation then both XBee will start sending and receiving data on their respective COM Ports.
- So, what I need to do is to virtually combine these two ports and for that I have used a software named as Virtual Software Driver from Eltima and I combine these two ports.
- Now, run your simulation and whatever you type in the Virtual Terminal of first xbee will appear in the virtual terminal of second xbee. as shown in below figure:
- You can also interface this XBee modue with other microcontrollers like Arduino, PIC Microcontrollers or 8051 Microcontrollers etc.
- I have explained this whole tutorial in below video as well.
I hope you have enjoyed it and are gonna like it. Let me know if you got into any trouble and have problems in using this library. Also share your suggestions about improvement in this
XBee Library for Proteus. :)
GPS Library for Proteus
Hello friends, hope you all are fine and having fun with your lives. In today's tutorial, I am gonna share another awesome library designed by our team for Proteus, which is GPS Library for Proteus. It's my second library for Proteus, the first one was Arduino Library for Proteus which I have already shared. I am really enjoying designing these modules in Proteus because its a new and quite challenging thing. I haven't found even a single website who has designed these modules in Proteus already. So, now for the first time, you can have the GPS Library for Proteus using which you can easily simulate your GPS module in Proteus and can design your code for Arduino, PIC Microcontroller or 8051 Microcontroller.
Other bloggers are welcome to share this library and its my humble request that do mention our blog in credits. :) The GPS module, I have designed for Proteus is a simple GPS which has TX and RX pins and when you start the simulation, this module starts sending the NMEA data on its TX pin, which you can easily check using Virtual Terminal. I am gonna show you how to check it in today's post. Another important thing, obviously in Proteus Simulation we can't get the actual values of longitude,latitude etc, so in our model, I have used the dummy values for all these data. The benefit of this module is that you can easily design your code for GPS and can test it in your simulation. Plus, its design is cool as well. ;)
Note:
GPS Library for Proteus
- First of all, click on the below button and download GPS Library for Proteus.
GPS Library for Proteus
- After downloading, you will get a zip file containing three files in it.
- Now extract all these three files named as:
- GpsTEP.LIB
- GpsTEP.IDX
- GpsTEP.HEX
- Place these files in Libraries folder of your Proteus software.
Note:
- Now open your Proteus software, if you have already opened it then restart your Proteus software.
- Now in components list search for GPS Module and place it in your workspace.
- If everything's fine then you will get your module as shown in below figure:
- As you can see in the above figure, it has two pins in total which are TX and RX.
- Now double click this GPS module and you will get to its properties as shown in below figure:
- Now, one last thing you need to do is to upload the GpsTEP.HEX file, which you got in the downloaded zip file, in the Program File section.
- This GpsTEP.HEX file is essential for this model as its adding the functionality of GPS in this model.
- So, after adding the link of GpsTEP.HEX file in the Program File section, now your Gps module is ready to use in your circuit.
- So, now let's add a Virtual terminal and check the output of this GPS Module. If you haven't worked on Virtual Terminal before then you should read How to use Virtual Terminal in Proteus ISIS.
- Design a small circuit as shown in below figure:
Note:
- The baud rate of this GPS Module is 9600.
- The data sent by this GPS module is dummy as we can't get these values in simulation.
- Now let's run the simulation and check the Virtual Terminal and if everything goes fine then you will get results as shown in below figure:
- The first line is just the intro for this module and after that you will start receiving data which is in NMEA format.
- NMEA data will remain constant but will keep on coming.
- Now, instead of using this Virtual Terminal, you can use any microcontroller here like Arduino, PIC Microcontroller or 8051 Microcontroller etc. and can write your code easily and test it.
- In my coming tutorials, I am gonna share examples for this GPS module in which I will interface it with different Microcontroller.
- In the below video, I have explained this tutorial again so if you got any trouble then watch it as well.
That's all for today. You should also have a look at
Interfacing of GPS Module with Arduino in Proteus ISIS. I hope you guys have enjoyed today's post and are gonna get benefit from it. Let me know your views about today's tutorial and also give your suggestions and help us in making this GPS Library for Proteus more smarter. :)
Arduino Pro Mini Library for Proteus
Update: We have created a new version of this library, which you can check here:
Arduino Pro Mini Library for Proteus V2.0.
Hello friends, hope you all are fine and having fun with your lives. In today's post, I am gonna share Arduino Pro Mini Library for Proteus. Recently, I have shared
Arduino Nano Library for Proteus, and before that I have also posted
Arduino UNO Library for Proteus as well as
Arduino Mega 2560 Library for Proteus, and now I am gonna share Arduino Pro Mini Library for Proteus. Arduino Pro Mini is another Arduino board which also uses the same Atmega328 Microcontroller and has almost the same number of pins as Arduino UNO and Arduino Nano. Arduino Pro Mini is even more smaller than Arduino Nano board. It doesn't have the programmer on it so if you need to program it you have to use some TTL to Serial converter or you can also use Arduino UNO board in order to burn programming code in it.
So, in today's tutorial, I am gonna share the Arduino Pro Mini Library for Proteus, which is the first library ever made for this board. You won't find the Arduino Pro Mini Library for Proteus anywhere. I am quite proud that our blog is sharing this library for the first time. You can download this library freely from the link below and can now simulate your circuits quite easily. So, now let's get started with this new Arduino Pro Mini Library for Proteus.
I have added all the Arduino boards in a single library. This library contains six Arduino boards which are Arduino UNO, Arduino Mega 2560, Arduino Mega 1280, Arduino Nano, Arduino Mini and Arduino Pro Mini. You can download this complete Arduino Library by checking
Arduino Library for Proteus.
Arduino Pro Mini Library for Proteus
- First of all, download the Arduino Pro Mini Library for Proteus by clicking the below button.
Arduino Pro Mini Library for Proteus
- Now when you click it, you will get a zip file so extract this zip file and you will get two files named as ArduinoProMiniTEP.LIB and ArduinoProMiniTEP.IDX.
- So download these two files and place it in the libraries folder of your Proteus software.
Note:
- Now, after getting the Arduino Pro Mini Library for Proteus files and placing it properly in your Proteus software. Open your Proteus software and make a search for Arduino Pro Mini.
- Once you get this board, place it in your Proteus workspace and it will look like something as shown in below figure:
- Now next thing you need to do is to read How to get hex Fie from Arduino, so that you can get the hex file, which we are gonna upload in this Arduino Pro Mini board.
- So, once you get the link for your hex file, simply double click this board to open its properties.
- Now place this hex file in the Program File section of its Properties section as we have seen in Arduino Nano Library for Proteus tutorial.
- That's all, now using this Arduino Pro Mini Library for Proteus, you can easily simulate your circuits in Proteus and can test your codes.
- Now, let's design a simple blinking example as we have done for previous libraries.
- So, in order to dos so, design a simple circuit in Proteus as shown in below figure:
- So, now as usual, use the blink example from the Arduino software and get your hex file as described in How to get hex file from Arduino.
- So, after uploading the hex file, run your simulation. If everything goes fine then you will get results as shown in below figure:
- So, now that's how you can simulate Arduino Pro Mini in Proteus using Arduino Pro Mini Library for Proteus.