+393398979963 info@openvironment.net

Microcontrollor (MCU – Microcontroller Unit) and Micropreocessor (CPU – Central Processing Unit): the difference

“… a microprocessor is the central part of a computer, but it needs other additions in order to function, including input and output peripherals; a microcontroller, on the other hand, needs no other components, but has reduced computational capabilities.”
“… the microprocessor is currently the most common physical implementation of a CPU, and is used on almost all computers and digital devices such as cell phones and scanners.”
“A microcontroller, on the other hand, brings all the elements together within one small package, and in theory needs no other external components to operate. In fact, everything is enclosed in a single chip, including the memory for the program, RAM memory, clock oscillator, reset circuit, and peripherals.”

In Openvironment.net projects we almost exclusively use Microcontrollers for which we write the code (software), which, unlike software for a computer, performs very specific functions by interacting directly with the system hardware, so much so that it is more correctly called firmware.

Sensors & Actuators

These are electronic devices or components connected to the microcontroller, in detail:

Sensors:

They “sense” their surroundings (e.g., thermometer, hygrometer, luxmeter, barometer, etc.), detect a change in the state of an electrical variable, (e.g., a voltage, a circuit opened or closed by a magnet, etc.) or the spatial relationship to other objects (e.g., ultrasonic or laser distance sensors). In short, they are the microcontroller’s touch, sense of smell, eyes and ears.

Actuators:

these are the devices that “perform an action,” such as an electric motor, a servo motor, a relay, an LED that turns on or off, a solenoid valve that opens and closes. They function as the arms, legs, and fingers of the microcontroller.

Internet Of Things

“The Internet of Things (IoT) is a network of connected objects and devices (called “things”) equipped with sensors (and other technologies) that enable them to transmit and receive data, to and from other things and systems. In more general terms, the Internet of Things includes any object-or “thing”-that can be wirelessly connected to an Internet network. Today, however, IoT has taken on the more specific meaning of connected objects equipped with sensors, software and other technologies that enable them to transmit and receive data for the purpose of informing users or automating an action.”​

At Openvironment.com we use, if the project requires it, various wireless communication protocols and standards, from WiFi, to LoRa WAN (Long Range Wide Area Network), the Narrow Band (NB) of the cellular phone network, etc., often even using multiple technologies simultaneously (see for example the LoRa Wolf project) to transmit the data we are interested in. To display the data (or to also send executive commands to our devices) on a common Internet browser we use the Adafruit.io platform but, if requested by the customer, we are able to connect to other servers/platforms.

Our implementation process:

1) In the first step we make the circuit on a prototyping board (breadboard) as shown in the picture.

2) The second step is to program the microcontroller(s): at this stage it is possible to directly change the hardware connections between a) microcontroller and sensor(s) and b) microcontroller and actuator(s) due to the fact that the electrical connections are nothing more than small “flying” wires.

3) In the final stage most of the time we make the circuit final by drawing the PCB (Printed Circuit Board = Printed Circuit Board) where all the components are mounted and the “flying” leads are replaced by copper traces imprinted on the board.

The PCB allows for a physically robust product with durable and stable electrical contacts over time. It is in fact an electronic board with all the components needed to perform one or more functions where the heart of the system is the microcontroller with its connected sensors and actuators.

Final packaging

All of our products, if requested by the customer, are enclosed in high-quality enclosures/boxes with careful study of the power supply component.

IP standards:
All our devices are enclosed in special high-quality enclosures for electrical equipment with environmental protection standards ranging from IP55 up to IP68 (IP = Ingress Protection) . Please note that the first number relates to protection from solid particles while the second number relates to protection against access by liquids. For example, an IP 55 code for an electrical box means that (No. 5) it is protected against the ingress of dust (ingress of dust is not completely prevented, but it must not enter in a sufficient quantity to interfere with the satisfactory operation of the equipment and (No. 6) that it is protected against waves (test duration: 1 minute per square meter for at least 3 minutes, volume of water: 100 liters per minute, pressure: 100 kPa at a distance of 3 m). Wikipedia has the complete table.

Power supply:
Our “strategy” on power supply works on three different levels: 1) we try to choose microcontrollers that natively have the lowest possible power consumption, 2) during programming we try, if possible, to induce deep sleep during the idle phases of the microcontroller and any connected sensors/actuators, and 3) if possible we use solar panels to recharge batteries.

Our choices

As for microcontrollers, we have a preference for Espressif’s ESP32s because of their robust design, low power consumption, and built-in Bluetooth and WiFi. Specifically, we rely on M5Stack, which produces a number of devices based on the ESP32, some of which already have an LCD screen. Added to this there is a wide selection of sensors and actuators implemented on expansion modules designed specifically for their devices in order to achieve rapid hardware integration and simple programming of the devices.

Of course we often rely on Arduino boards, which integrate many different microcontrollers, each with its own unique features. Again, we try to choose compact models, such as the “Nano” or “Mini” series, with relatively low power consumptions.

 

When it comes to sensors and actuators we generally choose from time to time what best suits the specific project, depending both on the planned budget and the accuracy and quality of the data required. However, when it comes to instruments for measuring water chemical and physical parameters we have a clear preference for instrumentation manufactured by Atlas Scientific, while for precision distance measurements we rely on ultrasonic sensors from Maxbotix.