-->
اعلان

General information about Arduino

General information about Arduino

    General information about Arduino

    As a professional microcontroller programmer, I do not consider the Arduino controllers to be a good element for developing complex systems. But I fully appreciated the simplicity of developing projects in this system, the ease of learning, writing programs, and the convenience of using ready-made hardware modules.
    Introduction
    There are a large number of programming lessons in the Arduino system on the Internet. Most of them are reduced to primitive programs that perform sequential actions from other people's functions.

    Immediately striking that the programs are written extremely unprofessional.
    • Signals of hardware devices connected to the controller are not well processed. For example, the simplest elements are buttons. There is a rattle of buttons, they can be connected with long wires that are sensitive to interference. In a reliable system, it is necessary to apply digital filtering of signals from buttons or dry contact sensors. Typically, the lesson examples simply read the state of the button signals.
    • Reliable microcontroller programs require cyclical resetting of variables and data integrity monitoring.
    • A good microcontroller programming style implies structured programming. These are not formal words. As you know, you can write beautiful, structural programs in assembly language, but you can pile it up in C ++.
    • Probably the most important thing is multitasking. In almost all the lessons - the sequential actions of the program. We looked at the state of the button, then lit the LED, called for some incomprehensible function ... The result is achieved simply, but the result is also defective.
    If you take, for example, my controller program for a refrigerator on the Peltier element . How to do it on this principle? How to perform all necessary actions using simple sequential operations? This program is written in assembler PIC controller. It performs many parallel operations:
    • With a period of 10 ms polls three buttons, provides digital filtering of the signals of the buttons, eliminating bounce.
    • Every 2 ms regenerates data of seven-segment LED indicators and LEDs.
    • Generates control signals and reads data from two DS18B20 temperature sensors with 1-wire interface. It is necessary to generate a new read or write bit for each sensor every 100 µs.
    • Every 100 µs reads analog values ​​of the output current, output voltage, supply voltage.
    • Averages the values ​​of the output current and voltage for 10 ms, calculates the power on the Peltier element .
    • A complex system of regulators is constantly working:
      • stabilization of current, voltage, power on the Peltier element;
      • PID (proportional integral differential) temperature controller.
    • Protected functions, data integrity checks are processed.
    • Provides read and write internal EEPROM.
    • And, of course, the overall management of the system, the logic of work.
    All these operations must be performed cyclically with different periods of cycles. And nothing can be omitted or suspended. Such a program is impossible to implement a simple sequence of actions.
    So, I'm going to pay attention to the above problems in my programming lessons Arduino, I'm going to teach practical programming . Programming Arduino controllers that work with real objects.
    At the same time, I focus my lessons on non-professional programmers , on people who want to learn how to program controllers.
    Despite the frightening expressions - digital filtering, multitasking, it is much easier than it seems. It is just necessary to strictly handle all possible situations, not to turn a blind eye to them.
    Rather, it will be programming lessons and electronics , because using microcontrollers without additional hardware does not make sense. Something they have to manage.
    In each lesson I will strive to create a complete module that can be used in future projects. The ideal option is to create a similarity of the operating system, which uses drivers (functions) of all external hardware. I managed to create such a system on PIC controllers to control complex filling equipment . It includes an environment for performing parallel tasks and drivers for working with stepper motors , sensors, buttons, a display, etc. I hope it will turn out on the Arduino.

    General information about Arduino.
    Arduino (Arduino) is the name of hardware and software for creating simple electronic systems of automation and robotics. The system has a completely open architecture and is aimed at non-professional users.
    The software part of Arduino consists of an integrated software environment (IDE), which allows you to write, compile programs, and load them into hardware.
    The hardware is electronic boards with a microcontroller, related elements (power stabilizer, quartz resonator, blocking capacitors, etc.), a port for communication with a personal computer, connectors for input-output signals, etc.
    Due to the simplicity of device development, the Arduino system has become extremely widespread. In one Yandex, there are up to 150 thousand “Arduino” requests per month. Despite the simplicity of developing projects using Arduino, quite complex systems can be created, especially after the advent of high-performance controller options.
    Arduino boards use Atmel AVR microcontrollers with a bootloader embedded in them. With the help of the loader, the program is written to the microcontroller from a personal computer without the use of hardware programmers.

    For programming, Arduino uses the language C / C ++, with some features.
    There are a huge number of clones of the Arduino hardware. Most of them are full analogues of Arduino brand, often not inferior in quality.

    Unknown
    @Posted by
    writer and blogger, founder of AZ Tronics .

    Post a Comment