Arduino Board Comparison - Mars Rover

    In a strange way, humanity is developing. Technological progress has so rapidly changed a person’s life that somehow we can’t imagine another life without cell phones, computers, laptops, digital photo frames and cameras. It seems all this has always been. And who invents and does all this? Do these engineers probably have a super brain? Do you know what? You yourself can try to do something electronic and amazing. It may be that you created a “product” and will not be sold in millions of copies, but you can actually surprise your acquaintances. If you are a little amateur radio fan, and are not afraid of the word soldering iron, and you have a little perseverance, you will succeed.

    Where to begin? Perhaps there are two interesting possibilities - this is the Arduino board or the Mars rover board. I’ll try to explain what it is.

    First of all, both boards were originally designed for electronic modeling - the creation of all kinds of electronic toys, robots, cars and other jokes. This is a kind of "electronic designers." With their help, you can learn the basics of circuitry and electronics and programming, or you can create real, useful, simple everyday automation devices. It is interesting that the circuits of these circuit boards are freely available, published by manufacturers on the Internet. There are also many examples of implemented “devices” for Arduino on the Internet.
    Fee Mars roverstill not so well known, but its authors themselves make robotic cars and all kinds of toys based on it. All source texts of the projects are also on their website in the public domain.

    This is the summary table we get:


    Further, perhaps, the comparison in the table will not work :-)
    Let's just look at some of the technical capabilities of these boards.

    Arduino Duemilanove board (ATmega168)


    * Power supply: + 5V
    * Number of digital inputs / outputs: 14
    * Number of analog inputs: 6
    * Permissible input / output current 40 mA
    * Flash memory capacity: 16 KB
    * SRAM capacity : 1 KB
    * EEPROM capacity: 512 bytes
    * Generator frequency: 16 MHz

    Mars rover board


    * Supply voltage: 2.5-4.6v (VCC)
    * Total user pins: 22
    * Of which increased power (for motors): 6
    * Maximum current of one pin is 25 mA
    * Maximum current of the "motor" pin is 250 mA
    * Input voltage per pin from -0.7 V to VCC + 0.7 V
    * Internal chip generator ~ 5MHz
    * Number of logic elements / triggers: 240
    * Flash memory capacity: 512x16 bits = 1024 bytes.

    A quick look at these characteristics of the parameters of the Mars rover board is somewhat surprising. In fact, the amount of flash memory is much smaller than that of the ATmega168, there is no SRAM at all. And what is the “number of logical elements / triggers”? And somehow they are few - only 240 ...

    Perhaps now we have reached the most important and fundamental difference between these boards. For an Arduino board, you need to write programs in a SI-like language. But for the Mars rover board you need to "draw electrical-circuit diagrams." Of course, you can use special equipment description languages ​​like Verilog or VHDL instead of circuits, but this does not change the essence. The project made for the board Mars rover is still a circuit design project.

    Perhaps those who started with programming microcontrollers will find all this quite difficult. There really is something to think about. In fact, typical programming in a language such as SI is a description of the sequential actions of the processor. In FPGA everything is wrong. Here it is required to describe many synchronous processes that run in parallel. This is a description of the transfer of data bits from register to register.

    I suggest looking at specific examples of the simplest projects. We will do the same thing, but on different boards: Arduino and Mars rover .
    For example, take the simple “Button” example posted on the Arduino website .
    In this example, the microcontroller periodically polls the status of one input line to which the button is connected. If the button is not pressed, then the value “zero” will be on the input line (the line is slightly pulled to the ground by a resistor). If the button is pressed, then there will be a supply voltage on the line, that is, “unit”. The microcontroller writes this value to the port and the connected LED lights up or goes out. In my opinion, this is a great example. Here's a look at its source:

    // constants won't change. They're used here to
    // set pin numbers:
    const int buttonPin = 2; // the number of the pushbutton pin
    const int ledPin = 13; // the number of the LED pin

    // variables will change:
    int buttonState = 0; // variable for reading the pushbutton status

    void setup () {
    // initialize the LED pin as an output:
    pinMode (ledPin, OUTPUT);
    // initialize the pushbutton pin as an input:
    pinMode (buttonPin, INPUT);

    void loop () {
    // read the state of the pushbutton value:
    buttonState = digitalRead (buttonPin);

    // check if the pushbutton is pressed.
    // if it is, the buttonState is HIGH:
    if (buttonState == HIGH) {
    // turn LED on:
    digitalWrite (ledPin, HIGH);
    else {
    // turn LED off:
    digitalWrite (ledPin, LOW);

    It can be seen from the program that the microcontroller reads from the port the value of the input where the button is connected and then writes one bit to another port to light the LED.

    Honestly, I don’t understand why the creators of this example did not write like this:

    void loop ()
    digitalWrite (ledPin, digitalRead (buttonPin));

    In my opinion, this is much clearer :-)
    You need to pay attention to the fact that since this program is executed by the microcontroller, of course, between the moments of polling the state of the button, time passes proportional to the number of microprocessor instructions for the entire loop () {...} cycle and its clock frequency.

    Now let's see how to do the same on the basis of the Mars rover board. We need to make a project outline. It will look something like this:


    In fact, in our circuit there is only one wire from the input, where the button is connected, to the output where the LED is connected. Of course there is still a logical element between them - “NOT”. He from the signal "zero" makes a "unit" and vice versa. This element is needed for the inverter, since the circuit board of the Mars rover is different from the one offered by Arduino . There, the button is connected to the power supply, and the second contact goes to the input of the ATmega168 and is pulled to the ground through a resistor. On the Mars rover board, it's the other way around. The button is connected to ground, and the second pin goes to the input of the chip and is pulled to the supply voltage through a weak resistor (Weak pull-up resistor). Because of this, the logic turns out to be the opposite and the “NOT” element is needed.

    Please note that such a project will "work" much faster than a program in Arduino . Here, the button is not interrogated programmatically, but is actually connected by a wire through the inverter from input to output. The propagation delay will be literally a few nanoseconds. Thus, potentially CPLD will be able to perform much faster functions than a microcontroller.

    And one more remark.
    Of course, large projects are not drawn in diagrams. This is how the same circuit might look, but written in the programming language of the Verilog hardware:

    module test (input wire key, output wire led);
    assign led =! key;

    Perhaps this button example will seem dumb to you. Indeed, the meaning in it is not very much. However, he clarifies the most important thing. When making a project for the Mars rover board, you install the necessary logical elements such as “AND”, “OR”, “NOT” into the project, as well as a trigger and connect them with wires. Altera QuartusII development environment will automatically place all the logic of your project inside the chip and connect the necessary elements with wires.

    In general, you can see so. Undoubtedly, both boards deserve attention. Something easier to do on the Arduino platform , something on the Mars rover platform . I think some ideas can be implemented on one board and not on another.

    I like the Mars rover more. It makes you think more and do amazing things with seemingly completely small resources. Be sure to visit this site and at least look at examples of already completed projects. There are descriptions, you can deflate the projects themselves and there are videos. The videos show how robotic cars work, how they are controlled with the help of remote controls, the cars react to light and leave the maze. And much more!

    Also popular now: