Can we connect 8051 to Arduino uno

Microcontroller architectures for the Internet of Things using the Arduino as an example

The Arduino / Genuino open source platform consists of a whole range of different performance data and form factors. This article would like to illustrate this and why Arduino is particularly suitable as a platform for the Internet of Things.

The special thing about microcontroller boards like Arduino or Beaglebone is the amount of available analog and digital inputs and outputs to which sensors and actuators can be connected. On the other hand, the size of the Arduino program memory (32KByte) and the RAM seems modest. A Raspberry Pi is a completely different caliber. However, the number of available I / O inputs and outputs on the Pi is measly, which is why it needs appropriate extensions for electronic applications, such as the Gertboard. The intended purpose of the Raspberry Pi is less in microcontroller applications, but mainly as a cheap multimedia computer. That is why its inventors did not design the Raspberry Pi as open source hardware.

Arduino for DíY followers

Compared to the powerful Beaglebone, most Arduino boards appear rather narrow-chested. Still, we focus on the Arduino family. A look at Amazon or eBay is enough to see that Arduino is the most popular microcontroller platform. But who and what is behind this platform?

When Massimo Banzi, David Cuartielles, Tom Igoe, Gianluca Martino, and David Mellis completed the first Arduino board in 2005, the goal was to develop an affordable hardware solution. The target group were the students of the Interaction Design Institute in Ivrea, Italy. A simple microcontroller system was created based on microprocessors from Atmel. The special thing about it was the availability of Arduino as an open source solution. In order to provide a suitable IDE for less IT company students, the Arduino team used the Processing IDE as a basis. Processing is a programming language or development environment developed on the basis of Java for the implementation of creative artistic design ideas. In a sense, Arduino and Processing are brothers in spirit.

There are now numerous companies within the maker movement that develop Arduino-compatible hardware and sell it worldwide. Shenzen, in particular, is a stronghold for corresponding low-cost products. Arduino boards are available there for just a few euros. Anyone who sifts through Aliexpress or eBay will be overwhelmed by offers. The board costs less than delivery.

Interior

The picture above shows the typical components of an Arduino.

In addition to analog pins, Arduino boards have numerous digital pins, a subset of which can handle PWM (Pulse Width Modulation). PWM means that a 1 is only present at the output for a specified time per cycle, the so-called duty cycle, otherwise a 0. By shortening or lengthening these duty cycles, LEDs can be dimmed, for example. Roughly speaking, the brightness of the LED then corresponds to the mean value of the output signal.

The heart of the Arduino is an Atmel processor, usually an ATmega328 or ATmega168 clocked at 16 MHz. The program memory typically has a size of 16 KBytes, while the data memory is designed with KBytes. Sounds like little, it is. But since the main task of an Arduino is to measure, control and regulate, this restriction is of little consequence. Compared to the most successful microcontroller, the Intel 8051, the Arduino equipment is almost unimaginably lavish. In addition, there are other classes of Arduino boards with strong deviations from these performance data upwards and downwards. More on that in a moment.

Up the shield

It should be noted that the popular Arduino / Genuino Uno uses a 5V supply voltage instead of 3.3V. However, this does not apply to all Arduino variants. This fact is important when using shields, for example. These are inexpensive boards with additional functionality that you put piggyback on an Arduino.

Sensor shields for connecting sensors, motor shields for controlling electric motors, communication shields for providing Ethernet, WiFi, Bluetooth, Zigbee connections, and display shields for connecting touchscreens are widespread.

Since most shields pass the inputs and outputs of the Arduino board through to so-called pin headers (rows of connections for inserting connecting wires), the inputs and outputs that are still available can be used despite the shield.

The ICSP header shown (ICSP = In-Circuit Serial Programming) is also used to connect "programmers". For our purposes, however, this option is of less interest.

A good connection

A USB port allows the board to be connected to a computer. Power can be supplied via the USB interface or via a separate power supply. In the latter case, the USB connection is only used for serial communication. If you use the Arduino IDE, you specify the board used and the USB interface and you can start programming so-called sketches. There are also numerous other options for implementing Arduino programs, from C / C ++ to Python, which we will get to know as part of the series.

The Arduino extended family

Arduino is designed as an open source hardware platform, which is why there are countless Arduino variants today. Companies like Adafruit, SparkFun, Sainsmart or Seeedstudio are worth mentioning - the three "e" are not caused by any button bruises. Their replicas are mostly content with building boards that are compatible with existing original boards.

Let's get to the original boards: In addition to the Arduino Uno, the Mega (with significantly more inputs and outputs than the Uno), the Due (more powerful than the Uno and with 3.3V supply voltage), the Yun ( also has a powerful processor and an integrated embedded Linux including communication modules).

Downwards there are Arduino Nano / Micro (very small form factor, but fewer interfaces) and Lilypad (for integration in clothing with so-called wearables).

And there is one more thing

The Esp8266 (Esp = Espruino) should also be mentioned at this point. This is a very inexpensive board that was originally intended to connect an Arduino to Wifi networks, but can also be operated "standalone" as a microcontroller board with Arduino IDE support. The synonym "nodemcu" is often used in this context.

One more thing

We come to the British representative of the Arduino cousins, the teensy. The teensy's performance ratings are inversely proportional to its tiny size. Here the data of the teensy 3.2 whet your appetite:

  • 32 bit ARM Cortex-M4 72 MHz CPU (M4 = DSP extensions)
  • 256K Flash Memory, 64K RAM, 2K EEPROM
  • 21 high-resolution analog inputs (13 bits usable, 16 bit hardware)
  • 34 digital I / O pins (5V tolerance to digital inputs and outputs)
  • 12 PWM output pins
  • 7 timers for time intervals and delays, in contrast to the Arduino separate from the PWM
  • USB with dedicated DMA memory transfers
  • 3 UARTs (serial ports)
  • SPI, I2C, I2S, CAN bus, IR modulator
  • I2S (for the output of high quality audio signals)
  • Real time clock
  • 4 general DMA channels (separate from USB)
  • Touch sensor inputs

Like the nodemcu, this is not an Arduino according to the Italian purity law, but the Teensyduino software can also be used to program the teensy with the Arduino IDE. The underlying hardware platform therefore remains transparent for the developer.

Conclusion and outlook

The Arduino platform thus offers a wide range of boards, shields and other components. This can be used to build laser harps, 3D printers, robots and drones. And one of the particular strengths of Arduino boards is their excellent support for sensors and actuators.

In other words: Arduino is made for IoT applications.

Before we can really get started, however, we first need to refresh our knowledge of electrical circuits and the underlying physical laws. That is the subject of my next post.

Michael Stal

Dr. Michael Stal has been working full-time as an expert for software architectures and middleware for distributed systems at Corporate Technology at Siemens AG since 1991. The main focus of his work are concepts, i.e. patterns, building blocks and methods to create large, complex system and software architectures efficiently and with high quality.

Read CV »