sábado, 30 de agosto de 2014

How To Simulate Arduino With PROTEUS ISIS

arduiny.com/how-to-simulate-arduino-with-proteus-isis/

How To Simulate Arduino With PROTEUS ISIS

By Abseed
In Basics
Dec 21st, 2013
0 Comments
20194 Views
By: Ahmed Abseed For: www.arduiny.com
Proteus is the most powerful tool in simulating programmable circuits at all.
You can use it to enjoy simulating some of Arduino’s most famous boards perfectly. Follow the bit by bit tutorial below:
1- Download PROTEUS-ARDUINO Library by clicking here. (direct download)
2- Extract the zipped file downloaded and copy both two files you get (ARDUINO.IDX and ARDUINO.LIB) to PROTEUS setup directory: Labcenter\LIBRARY
3- Now, Start PROTEUS-ISIS and search for ARDUINO in it’s library. You will find Three ready to be used Arduino boards in “Emulator”.
www.arduiny.com

4- To upload your sketch to the simulated board :
a) Run ARDUINO software. from FILE menu, select PREFERENCES, and adjust ARDUINO software setting like in the image. That enables you to get .HEX file after compiling your sketch.
upload arduino sketch to proteus
b) Compile your sketch and copy the address of the generated .HEX file by pressing (CTRL + C)
upload arduino sketch to proteus
    c) Double click the simulated board in PROTEUS and paste what you copied…..Enjoy!!!
upload arduino sketch to proteus

Arduino Library For Proteus A complete step by step tutorial on How to simulate Arduino in Proteus

http://www.theengineeringprojects.com/2014/06/arduino-library-proteus.html

Arduino Library For Proteus

A complete step by step tutorial on How to simulate Arduino in Proteus

You are here:
Liked this post ???
Receive Quality Tutorials in your Inbox in one click:
   
Rating: 5.0/5 (1 vote cast)
Hello friends, hope you all are fine and enjoying life, today’s post is asked by one of our readers on our facebook page so I thought to share it with all of you. Arduino is a modern microcontroller board, which has now become very popular among engineers but one problem with Arduino is that there’s no virtual tool to test its coding. So, if you need to test the coding then you have to buy the hardware. But it’s not the case anymore, now you can test the Arduino coding via Proteus quite easily as its library has been developed.
So today, we will have a look on how to test the working of Arduino coding in Proteus. In order to test the coding in Proteus, we need hex file of the program so we will also see how to get the hex file of Arduino. So first of I will provide the download link for Arduino Library and how to add it in Proteus and then we will have a look on how to get the hex file of Arduino sketch which is a little difficult section and finally we will have look on how to upload the hex file into Proteus and get a working simulation.
If you also want any tutorial, then send us your request and we will try our best to post it as soon as we can. Let’s start today’s tutorial.

Arduino Library For Proteus

  • First of all, download the Arduino Library for Proteus by clicking the below link.
  • Unzip the folder, you will find two files in it named as ARDUINO.LIB and ARDUINO.IDX
  • Now place both of these files at this location C:\Program Files (x86)\Labcenter Electronics\Proteus 7 Professional\LIBRARY i.e. in the library folder of Proteus software.
  • Now open Proteus ISIS and open the component library browser and search for Arduino as shown in below figure.
  • You will find three arduino board, which are currently supported by this library. Click on any of these boards and design your circuit.

How to Get Arduino Hex File ???

  • Now next thing we need to do is to get the hex file of Arduino, which isn’t much difficult.
  • Open the Arduino software and click on File and then Preference. A new window will open up as shown in below figure
  • Tick both of the options which are encircled in the above figure and named as compilation and upload. Now click OK to close this prefrence window.
  • Start writing the code, here, I am going to use the blink example of Arduino.
  • After writing your code, click on compile and you will see a lot of lines in the output pane.
  • After the completion of compilation, you will find a link in the output pane as shown in the figure below, you don’t need to find it as it will be the second last line.
  • This is the link for your hex file, copy this link and place it in your computer address bar and you will get your hex file.
  • The address you need to copy is till .tmp which is the temporary folder ad in this folder Blink.cpp.hex will be your hex file, the name name of hex file will be the same as your Arduino sketch name.

Design Arduino Circuit in Proteus

  • Now we have done both the things, i.e. added our arduino library in Proteus and have also get the hex file for our Arduino sketch.
  • Now design your circuit in Proteus, I have designed a simple circuit as shown in below figure:
  • Now double click on the Arduino UNO and the properties window will open up, in this window, you will find a Program File option, in that option click on browse and select the hex file and click OK.
  • That’s it, now click on the Play button and your circuit will start functioning.
You will find it difficult for the first time but it will become easy later on. That’s all for today, will see you guys in the next tutorial. Take care !!!

ARDUINO SIMULATION USING PROTEUS( ISIS )

http://2embeddedrobotics.blogspot.com/2014/03/arduino-simulation-using-proteus-isis.html#.VAILBGMllU5

 

ARDUINO SIMULATION USING PROTEUS( ISIS ) 

 

ARDUINO SIMULATION USING PROTEUS( ISIS )

ISIS design environment helps an embedded system developer from the painful electronic verification of the circuits. It became the first choice for electronics engineer to verify its design and simulate it in real-time environment before making it real hardware. It reduces the design time and cost also. 
In this article we will see how to simulate an Embedded System design with ARDUINO UNO Board having ATMEGA328 microcontroller. Engineers who are frequently using the Arduino for their application would know that how to blink LED in arduino.


ADDING LIBRARY TO ISIS: 
  • Download the Library from here.  click here
  • Now extract the ARDUINOLIBS,zip and open the folder copy ARDUINO.LIB and ARDUINO.IDX files
  • Now paste these 2 files into library folder which could be located at "C:\Program Files\LabcenterElectronics\LIBRARY\" in your system
  • once you paste your file its over for ISIS.
MAKING DESIGN IN ISIS:
  • Open ISIS software then goto component mode and click P(pick from library) 
  • write arduino and select and click into the workspace and connect an LED to pin 13 of arduino 
WRITING PROGRAM:
  • Open ArduinoIDE and open the blink project
  • Goto: file->prefrences->compilation   check that box
step by step process in images>>

* Now click on verify button or go to sketch and verify
* Now note the address of the location of hex file generated by arduino. which is in blue color circle.
DUMPING HEX FILE INTO BOARD:
Now open the ISIS design again and double click on ARDUINO image in ISIS design.
Now give the path in the field shown below in orange color circle.
now press ok and hit the run button to play the simulation and enjoy :-)
Download Project:  click to download project. click here

3 comments:

  1. u r great sir..................
    Reply
  2. thank you so much for this :D
    Reply
  3. thanks for ur info sir...
    Reply
 
Copyright © 2014 2embeddedrobotics • All Rights Reserved.
Template Design by PAZZOTECH SOLUTIONS • Powered by Blogger
Click here to get help
Facebook

 

Instalar Proteus ISIS y arduino

 http://ingeerick.weebly.com/arduino/libreria-arduino-para-proteus-simulino-v3

LIBRERIA ARDUINO PARA PROTEUS | SIMULINO V.3

 
Imagen
Hola a todos, nuevamente estoy activo en el blog, lamentablemente o mejor dicho "Afortunadamente" me encuentro dando mis residencias profesionales, lo cual me ha impedido estar de lleno publicando material, más sin en cambio creo que ya me he acoplado mejor a la forma de trabajar y prometo estar mucho más seguido por aquí.

En esta ocasión les traigo una librería que hará que sus proyectos se vean mucho mejor, al tiempo que les facilitara el estar colocando los distintos Atmega, cristales, etc.... para simular los Arduinos, a demás que integra un plus, si un sensor ultrasonico. Cabe destacar que esta librería no es mía y que la he descargado de http://blogembarcado.blogspot.mx/ quienes merecen todo el credito.


archivos necesarios

Imagen

Son dos los archivos que necesitaremos:
  • ARDUINO.LIB
  • ARDUINO.IDX
Ambos están incluidos en un archivo comprimido en Rar, que podrán obtener dando clic en la imagen de la derecha.


INSTALACIÓN

Este paso dependerá de la versión de Isis Proteus que tengas y teniendo los archivos antes mencionados ya descomprimidos:

  • Para la versión 7.X:
Tendrás que copiar los archivos que se incluyen en el Rar, en la siguiente dirección:

Windows de 32 bits:
C:\Program Files\Labcenter Electronics\Proteus 7 Professional\LIBRARY

Windows de 64 bits:
C:\Program Files(x86)\Labcenter Electronics\Proteus 7 Professional\LIBRARY


  • Para la versión 8.X
Tendrás que seguir los siguientes pasos:
  1. Abrir Isis Proteus
  2. Crear un nuevo esquemático. (Entrar en la pantalla donde nos deja colocar componentes para realizar las simulaciones)
  3. Dar clic en el menú "Library" y despues en "Library Manager".
  4. Dar clic en el botón "Create library"
  5. En la pantalla que se abra, lo único que tienes que hacer es arrastrar los archivos descargados ahí, en otras palabras copialos a esa carpeta.
  6. Cierra Proteus, para después volverlo a abrir y listo ya podrás escoger las placas arduino, como si escogieras cualquier otro componente.

Espero que les sea de ayuda esta librería tanto como a mi, saludos y mucho éxito en todos sus proyectos.

 

Control Stepper Motor Speed with Labview and Arduino

Control Stepper Motor Speed with Labview and Arduino

 

http://arduiny.com/control-stepper-motor-speed-with-labview-and-arduino/


By: Ahmed Abseed     For: arduiny.com
This Tutorial Is:
  • > Using Labview to interface Arduino to PC via USB port.
  • > Using Labview to send data that describes Motor Speed to Arduino without any toolkits.
  • > Solving the problem of Arduino serial port hanging.
  • > Using Arduino to generate Stepping pulses.
  • > Using Arduino Mega’s Serial port 1 to show stepper motors speed on a serial LCD.

                   The best way to interface Arduino to PC is via its USB port. Arduino uses virtual Serial COM port to interface its USB connector to PC. At the same time Arduino uses its USB to interface its own serial (USART) port…. Bravo Arduino!!!
                   To send data to Arduino from your computer just connect it to USB port and use a program that can deal with computers serial port. This program can be Aeduino Serial port monitor, MIKRO C Serial terminal tool, PIC MP-LAB, or a program you establish. The one you build on yourself can be made by using a programming language like C, C#, C++, Python, Basic, NI-LABVIEW… etc.
                    Your own program not only has the advantage of interfacing the port, but performing a specific mission you need in your project as well. And so I do down here.
1-    In Labview (any version) establish the following front panel.
control stepper motor speed with labview and arduino
2-    Establish the following block diagram. (click to enlarge)
control stepper motor speed with arduino and labview
And here is the another case of (if) statement.
control stepper motor speed
This virtual instrument:
  • > Starts communication with Arduino.
  • > Detects if there is a change in control knob value.
  • > If there is a change it sends the new value to Arduino.
  • > Else, it clears serial port Input/output register to avoid data overflow and serial port overloading.
  • > When pressing STOP, it sends “0” (brake or hold order) to Arduino.

3-  In Arduino software, type the following code.
//By: Ahmed Abseed For: arduiny.com
// This Sketch receives a byte from serial port represents the
//delay time value between stepping sequence pulses
// It still works till another byte is sent to arduino’s serial port.
// It also Calculates Motor speed and sends it to another Serial Port.
byte labview;
unsigned int wait;  
byte go;
void setup(){
Serial.begin(9600);
Serial1.begin(9600);
pinMode(7,OUTPUT); pinMode(8,OUTPUT);
pinMode(9,OUTPUT); pinMode(10,OUTPUT);}
void loop(){
start:
if (Serial.available()) { labview = Serial.read();
if(labview!=’0′) { wait = (labview-48); show();}
else {brake(); goto start;}}
else {
digitalWrite(7,HIGH); digitalWrite(8,LOW);
digitalWrite(9,LOW); digitalWrite(10,LOW);
delay(wait);
digitalWrite(7,LOW); digitalWrite(8,HIGH);
digitalWrite(9,LOW); digitalWrite(10,LOW);
delay(wait);
digitalWrite(7,LOW); digitalWrite(8,LOW);
digitalWrite(9,HIGH); digitalWrite(10,LOW);
delay(wait);
digitalWrite(7,LOW); digitalWrite(8,LOW);
digitalWrite(9,LOW); digitalWrite(10,HIGH);
delay(wait);}}
void show() {
Serial1.write(254); Serial1.write(1); delay(4);
Serial1.print(“Speed = “); Serial1.print(300/wait); Serial1.print(” rpm”);}
void brake() {
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
digitalWrite(9,LOW);
digitalWrite(10,LOW);}
This Arduino Sketch:
  • Checks if labview sent a new value.If there is a new value, it converts it into integer byte with the same value.This integer byte represents the delay interval used in stepping sequence. That, the greater the delay the lower the speed and vice versa.
  • Else, Arduino continue running the motor at current speed. This prevents the processor from overloading the serial port and pushes it to avoid Arduino Serial port hanging… Bravo Arduiny.com.
  • Calculates motor speed from its resolution and delay intervals between steps as following:
Rpm = (60 x 1000 x step angle) / (360 x (delay m.sec))
Rpm = (1000 x step angle) / (6 x (delay in msec))
 I used a 1.8 deg/step motor in this project and so:
Rpm = 300 / (delay in msec)
  • Sends the calculated motor speed to another Serial port of Arduino Mega to show if our code works.
4-    I simulated this tutorial with PROTEUS and worked perfectly.
5-    In real application, it controlled my stepper motor perfectly on the long run.
control stepper motor speed with arduino and labview

ircuit Designing of LCD with Arduino in Proteus ISIS A complete step by step tutorial on Circuit Designing of LCD with Arduino in Proteus ISIS

Circuit Designing of LCD with Arduino in Proteus ISIS A complete step by step tutorial on Circuit Designing of LCD with Arduino in Proteus ISIS

http://www.theengineeringprojects.com/2014/07/circuit-designing-lcd-arduino-proteus-isis.html

  • First of all, design a circuit of LCD and Arduino in Proteus ISIS, if you have already added the Arduino Library then you won’t find any problem in finding the Arduino in components library of Proteus. Design the circuit as shown in below figure:
  • Now, we need to design Arduino sketch for LCD, so open Arduino software and place below code into it.
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
{
lcd.begin(16, 2);
lcd.print(“www.TheEngineer”);
lcd.setCursor(0,1);
lcd.print(“ingProjects.com”);
}
void loop() {}
Note:
  • For Arduino code, I have used Liquid Crystal Arduino Library, which you can download from the below link and add it in the libraries folder of Arduino software.
  • Now compile the code, and get the Arduino hex file which will be in the tmp folder, you can read Arduino Library for Proteus to know in detail how to get the hex file of Arduino sketch.
  • Now double click the Arduino in Proteus ISIS and properties window will pop up.
  • In properties panel, under the Program File section, browse to Arduino hex file as shown in below figure and upload it.
  • Now click Ok and Run your simulation, if everything goes fine then your LCD will start showing the characters as shown in below figure:
  • That’s all, was it difficult ??? I dont think so Anyways, if you got into any trouble, do ask in comments.
  • In the coming posts, we will explore Arduino in Proteus ISIS more. Till then take care !!!

Diseño y simulación mediante PROTEUS ISIS de un control PID en un sistema de calefacción.

http://colab-proteus.blogspot.com/2012/04/diseno-y-simulacion-mediante-proteus.html


PRESENTADO POR:

Aristides  Piñeres Ospino

Se tiene un horno, el cual debe trabajar a una temperatura de 120ºC aproximadamente. Para lograr la estabilidad del sistema se usa un controlador PID. Además, se debe utilizar el simulador PROTEUS para analizar el comportamiento del sistema en general.

Para diseñar este sistema de control se puede utilizar el método de Ziegler-Nichols de lazo abierto. Con este método lo que se pretende es obtener un 25% del sobrepaso máximo a la respuesta escalón.

Este método solo se puede utilizar si la respuesta de una planta ante una entrada escalón se aproxima a la respuesta de un sistema de primer orden ante la misma entrada.

Por lo tanto, La función de transferencia de la planta se aproxima mediante un sistema de primer orden con un retardo de transporte.


Donde L es el tiempo de retardo, T la constante de tiempo y K la ganancia estática de la planta.

Estos parámetros vienen dados por las siguientes formulas:


Ziegler y Nichols sugirieron establecer los valores de Kp, Ti y Td de acuerdo con la fórmulaque aparece en la siguiente tabla.



Para el diseño, se debe verificar mediante PROTEUS, si el modelo matemático que describe el comportamiento del horno corresponde a la ecuación (1).

En la categoría “transducers” existe un componente llamado “OVEN”


OVEN es un horno o sistema de calefacción que posee un sensor de temperatura llamado T, además se le pueden variar sus características funcionales tales como:Temperatura Ambiente de trabajo, resistencia térmica, constante de tiempo deestablecimiento, constante de tiempo de calentamiento, coeficiente de temperatura yPotencia de calentamiento.

Opciones del componente “OVEN”






El componente SWITCH permite introducir un retardo cualquiera a la respuesta del Horno ante una entrada escalón.

 El componente OVEN se configura de la siguiente manera:
·         Temperature Ambient (°C)= 25
·         ThermalResistencetoAmbient (°C/W)= 0.7, Resistencia térmica del sistema.
·         Oven Time Constant (sec)= 10 constante de tiempo del horno. Para evitar largas simulaciones su valor se ajusta a 10 segundos.
·         Heater Time Constant (sec)= 1Para evitar largas simulaciones su valor se ajusta a 1 segundos.
·          
·         Temperaturecoefficient (V/°C)= 1 sensibilidad del sensor T. Es decir ante una temperatura de trabajo del horno de 100ºC, T debe marca 100ºV.
·         HeatingPower (W)= 120
  
      Debido a los valores anteriores, la grafica INTERACTIVE ANALYSIS debe poseer un valor en  “stop time” de 100 y El cambio en la señal de entrada escalón es de 0 a 2.

     Al realizar la simulación es el resultado es el siguiente:


    Es claro que la anterior grafica se aproxima a un sistema de primer orden, por lo tanto la ecuación (1) puede describir el comportamiento del horno.
  
     Hallando los parámetro L, T, K, Kp, Ki, Kd.
    
    Analizando la grafica anterior se obtienen los siguientes datos:







       diagrama de bloques del sistema de control.
      
     Topología del sistema de control.

     Una topología para el controlador PID electrónico puede ser el siguiente circuito:



·         

      El sumador mediante amplificador operacional



·    El valor de la referencia se obtiene mediante una fuente de voltaje DC de 15v y una resistencia variable de un 1k.
      Para una temperatura de trabajo de 120ºC se tiene que El valor de referencia debería ser de 12V.


·      Con el valor máximo de la referencia corresponde a 15 V, es necesario cambiar la sensibilidad del sensor T de 1ºC/V  a 0.1ºC/V, para ello se utiliza un atenuador.  La configuración electrónica del atenuador puede ser un divisor de voltaje.

        Esquemas del sistema de control.


     
         Para una referencia de 11.9 voltios se tienen los siguientes resultados:

     

     Según la ecuación (9) ante una referencia de 11.9V, la temperatura de trabajo debería ser de 119ºC. Sin embargo, según los datos tomados, la temperatura de trabajo es de 124ºC, lo cual quiere decir que hay un error relativo del 4.2%.

     Por otra parte el sobrepaso máximo es de 44.3%, es decir con los valores calculados nose logro el objetivo del 25%, ya que el error relativo es de 77.4%. Para corregir esto se deben cambiar los valores de los capacitores. Por ejemplo C1=400uF y C2=1uF.


     En esta ocasión el sobrepaso máximo es de 26.4%, dato aceptable ya que el error relativo seria del 5.6%.

     Según la ecuación (9) ante una referencia de 11.9V, la temperatura de trabajo debería ser de 119ºC. Sin embargo, según los datos tomados, la temperatura de trabajo es de 125ºC, lo cual quiere decir que la nueva relación entre entrada y salida es de:


Sobrepaso máximo=28.3%

Con los nuevos valores de los capacitores Kp=401; Kd=40 y Ki=10;