There are several options with different advantages and disadvantages to connect microcontrollers and dataloggers to computers. Some of the same protocols can also be used to communicate between computers e.g. to upload data to a centralized server.
Serial protocol is the simplest way to communicate between computers and hardware. Physical serial ports have been removed from new computers, but the protocol is still used by numerous devices with USB-adapters.
Serial ports were originally physical ports in the computer, but
hardware serial ports are now longer used in similar form because they
have been replaced by USB-ports.
However the communication protocol is
so simple and convenient to program that e.g microcontrollers use the
same protocol and USB-adapters are used on the computer to from a serial
port.
You can find the serial ports connected to your computer from
“Device manager”(You can type
devmgmt.msc
) in windows run dialog (press win+R) to open Device Manager.
The easiest way to see traffic from a serial port is to use a terminal program such as free Bray’s Terminal 1
There are different voltage levels that the serial port protocol can use: microcontrollers typically use TTL level (3.3V or 5V) and computers use 15V, therefore you need to use correct adapter for each device. The communication protocol with different voltage levels is the same so you can use a level shifter circuit to if you need to connect two devices using a different voltage level.
Some instruments still use the +15V serial ports (e.g. Agilent 34970A panel meter that is used in the exercises.) The advantage of the higher voltage level is that it can be used with longer cables.
Serial ports have several different settings for baudrate and other traffic options. Also the wiring may differ between devices. So if you experience problems always check the traffic settings and make sure you use the correct cable. Open the cable to check if you can or make a new one, if you can’t open a cable without breaking it you can use a multimeter to check which wires are connected.
USB-port has become the most popular connection for dedicated DAQ boards. USB has generic drivers for keyboards, mice, printers etc. which makes it possible for devices from diffent vendors to work without separate drivers.
unfortunately there is no device class in the USB standard for for DAQ cards. Therefore you Vendor specific drivers, that need to be programmed separately for each manufacturer and you may not have drivers for all operating systems.
Can be connected directly directly to computer or local network, or to Internet.
There are several possibilities for wireless connections that vary in speed , power consumption and signal transmission range . It pays off to spend some time choosing the right one for the application.
The range of the radio signal depends on:
License free bands for radio communication in Europe are 433, 868, 2400 and 5700 MHz. You are not allowed to use devices that operate with 900MHz, those are made for USA.
Fairly short range and speed <1Mbs. Can be programmed as a serial port. Bluetooth low energy is very popular in human fittness trackers etc.
Modules for short and long range. Forms a mesh network where all radios can talk to each other. Speed <1Mbs. Programmed using a serial port.
Radiomodems are usually low frecuency serial port repeaters and can have range of up to 10-20km. Speed <1Mbs.
Range some hunders of meters. Speed maximum 100-200Mbs. Programmed using TCP/IP or UDP. Any ethernet device can be connected to a WLAN network.
Mobile phone networks. Global coverage within mobile phone network. LTE upload speed up to 50Mbit/s, but depends heavily on network quality. Can be used to transmit fairly large amounts of data from local buffer.