Rebel without a cause, or how I became an Arduino fan

views 12:00 pm 0 Comments December 9, 2016

I have been interested in electronics as long as I can remember. The same goes for computing. I first made a tight connection between these two passions in 2009, when I got interested in the topic of microcontrollers. Of course, I already knew earlier that there were such single-chip u201clittle computersu201d that could do wonders while getting by with just a few kilobytes of memory, but up to then my programming projects had been applications for u201cbigu201d computers. Like most hobbyists, I started with the popular AVR family of microcontrollers and the Bascom language, more specifically with the excellent book u201cMikrokontrolery dla pu00f3u0142kuju0105cychu201d by Piotr Gu00f3recki, editor of u201cElektronika dla Wszystkichu201d, and the development board prepared for the book. I donu2019t know why, but Bascom itself seemed to me so simplified that it was almost complicated. I was eager to move on to something more professional as quickly as possible. After buying a microcontroller and building an LPT programmer, I felt temporarily satisfied 🙂 I wrote simple programs in C, sometimes romancing with assembly. After some time the programs became more complex and working on them was time-consuming. Of course I relied on libraries, even ones I wrote myself, but it was still a time-consuming task.

I was increasingly missing a solution that would let me get a just-invented circuit running in a flash. In the meantime I had heard something about Arduino, but it seemed to me that it was only of educational significance, and I had surely skipped that basic beginner stage already! 🙂 I mean, how is it u2014 it has an integrated programmer, some big thing, how on earth do you cram it into an enclosure, and the GUI is very sugary, oozing with Java. Besides, real tough guys etch their boards and program through LPT 🙂 I ignore the fact that a side effect of etching in caustic chemicals was indelible stains on clothes u2014 well, but in the end that is the proper path of specialists.

The above is about 3 liters of caustic, hot and bubbling chemicals.

Most likely this situation would have carried on if not for a chance event. About halfway through the year a friend of mine called me and asked me to help her acquaintance choose a solution for a simple actuator circuit. After the first conversation it turned out that it was to be based on Arduino. Reflexively, during that first call my thoughts were circling around the idea of persuading the acquaintance to give up Arduino, so that like a u201creal tough guyu201d he could etch a board and do it the proper way. This event, however, prompted me to revise my attitude towards this super-trendy and popular platform. I bought one UNO board for testing on a popular auction portal, which turned out to be very cheap and yet reasonably well made. Alright, time to program. Installing the Arduino environment u2014 or rather the IDE u2014 turned out to be exceptionally easy on both Linux and Windows. Interestingly, even the driver installation on Windows happens automatically. Here I actually expected trouble, remembering the problems with installing USB drivers on 64-bit Windows for a device I had earlier built based on some AVR. In the case of Arduino it went without problems. Alright, now the GUI. After starting it up, it turned out that the sluggishness of the environment was only illusory. And then came the moment for programming. I already had some pseudocode written in Notepad during a discussion about the algorithm, because I did not really know how to write it in Arduino. Ok, itu2019s like C, good for us. And then the libraries u2014 there are libraries for everything! Port control is one line, quite intuitive. I spent a whole five (5) minutes writing the software. Fifteen seconds of loading the firmware into the electronics and it WORKS! I connect diodes, relays u2014 this clicks, that beeps, and most importantly it works stably. I take out the oscilloscope and the meters u2014 a few dozen milliamps (I had not even thought about sleep mode). It is not super low (Dave Jones from EEVBLOG used to say that with milliamps, in todayu2019s times, you could fly to the Moon), but still frugal enough that a battery would last at least many hours.

After polishing, the project went to its owner and I was left with a head full of ideas about what to do with this so beautifully started acquaintance with Arduino 🙂 I decided to investigate the topic further. It turned out that I am not sentenced to the u201cbigu201d UNO on a credit-card-sized board. For the price of a four-pack of good beer I managed to buy an Arduino Leonardo Micro, which takes up less space than a pack of matches. Moreover, it turned out that programming in Arduino I am not at all sentenced to boards, because in a very simple way the Arduino bootloader can be flashed onto, say, an ATmega. Well, that was the peak of euphoria 🙂 Besides, commercial use of Arduino is also possible, and the project is open and free. I omit access to hundreds of libraries, which can be downloaded even from the Arduino IDE itself. The first bigger project in which I used my new acquaintances (two of them) along with the old pal Raspberry Pi is the Astro robot (in the photo below), but I will tell about it in another episode.

The moral of this story is u2014 you praise your own, but you donu2019t know the othersu2019 😉 What once required many hours of creation, now can be realized at a very low cost within minutes. Another matter is how this translates into repeatable quality, but for us hobbyists even a working prototype is enough of a joy.