How do I connect Proteus (COMPIM) to Arduino Serial Monitor

Analyzing, Visualizing, and interacting with your data is one of the coolest things an engineer can achieve. The main purpose of this project is to visualize and analyze our generated data directly from Proteus 8 professional to your Arduino IDE. This can b done by connecting your Arduino IDE to Proteus 8 professional via a virtual serial port. The virtual serial port virtually connects the Arduino IDE to Proteus 8 professional using two inactive COM ports.


https://afronics1.blogspot.com/2021/12/connect-proteus-to-arduino.html

Software Involves

To achieve this idea of a project, we need to use a virtual serial port that acts a bridge between the two software, that is the Arduino IE a Proteus 8 Professional. Below is the software nee to accomplish this job.

  •         ComOcom
  •         Arduino IDE
  •         Proteus 8 Professional

ComOcom: The Null-modem emulator is a free GPL-licensed open source kernel-mode virtual serial port driver for Windows. You may construct an endless number of virtual COM port pairs with the Null-modem emulator and use any pair to link one COM port-based application to another. Two COM ports are provided by each COM port pair. One port's output is the other port's input and vice versa. Device emulators can use the Null-modem emulator to offer a serial interface.


In this example, the device emulation program uses one of the pair's ports, while the other can be utilized by a Windows or DOS application that needs to interface with the device via a COM port. For example, to send/receive faxes over IP, use a virtual COM port pair to connect Windows Fax to t38modem (T38FAX Pseudo Modem, part of the t38modem project). For COM port redirectors, the Null-modem emulator can be used to offer a serial interface. You can communicate with TCP/IP servers through a serial interface using the com2tcp (COM port to TCP redirector, part of the com0com project).


If you think com2tcp is what you're looking for but can't locate some key features (like RFC 2217 support), try hub4com instead. It is possible to handle data and signals from a single serial device by a number of different programs using the hub4com (HUB for communications, part of the com0com project) (for example, several applications can share data from one GPS device). It's also feasible to use the remote computer's real serial ports as if they were on a local computer. More information about com0com and com2tcp may be found in Using com0com and com2tcp, ReadMe.txt for com0com, ReadMe.txt for com2tcp, ReadMe.txt for hub4com, and on the Source Forge Project website.

Arduino IDE: The Arduino IDE is not only used for sketching cos for projects, you can also visualize, analyze and interact with data from the outside world. Using serial monitor a serial plotter. On the serial monitor, you can view your data in values and in a string form, such as the value of temperature in the surroundings, and also display in string format if it’s cool or hot base on the threshold temperature set in the code. You can also give input from the serial monitor to be displayed or for an action to be taken based on your desire. Likewise, Serial plotter, here you plot values received in a graph format. The serial plotter is a great platform to visualize your graphs, such as sine graphs, cosine graphs, and more.

Proteus 8 Professional: This software was designed by Lab Centre Electronics for researchers and students to simulate, test, and diagnose electrical and electronics circuits, components, and all. We will be using this software to simulate our circuit. The main purpose of the circuit is to read values from a potentiometer using an Arduino microcontroller which will then be displayed on the serial monitor and also plot it in a graph format. you can download and install the latest version of proteus here.

Components for this project:

Since we will be reading values from a potentiometer, therefore we need the following components in proteus 8 professional

  • Arduino Uno
  • Potentiometer
  • Comp

Arduino Uno: here we will embed a code that will receive analog signal variation from the potentiometer and display these in an integer or float format. You may want to see how to add Arduino and other components in Proteus, click here.

Potentiometer: the type of potentiometer we will be using is POT-HG. This component will be connected to the ground and power in the schematic capture of the Proteus and the output pin will be connected to the analog pin of the Arduino.

Compim: is like a gateway of a virtual port that connects the Proteus 8 Professional to the outside world. The receiver and transmitter of these components will be connected to the receiver and transmitter of the Arduino in proteus 8 professional. We will also include the virtual serial monitor in proteus and compare the values to the ones displayed in the serial monitor. Make sure the baud rate (9600) is the same as that of the code and serial monitor or plotter.


Circuit diagram

https://afronics1.blogspot.com/

Code

You can get the code using an example from aruino IDE named AnalogRead

Open Arduino Ide  then go to >>File   >>Example  >> Basics >>

/* AnalogReadSerial Reads an analog input on pin 0, prints the result to the Serial Monitor.
/*Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
/*Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
/*This example code is in the public domain.
https://www.arduino.cc/en/Tutorial/BuiltInExamples/AnalogReadSerial
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// print out the value you read:
Serial.println(sensorValue);
delay(1); // delay in between reads for stability
}

Out Put 

https://afronics1.blogspot.com/2021/12/connect-proteus-to-arduino.html


Download com0com Here

Download

Post a Comment

Please Select Embedded Mode To Show The Comment System.*

Previous Post Next Post

Contact Form