Gareth Waymark

Why You Should Not Use Arduino

31 July, 21

Category: electronics

Like a lot a people who are getting into electronics I got started with an Arduino. It wasn’t long after I started with the Arduino Uno that I went down the rabbit hole.

My journey into electronics started with Arduino and Raspberry Pi and has ended up with me going to university to study Electronic Engineering. I have seen with my own eyes how other students reach for an Arduino for their university projects. It’s like assembling an Ikea wardrobe and calling yourself a cabinet maker. At some point they are going to have to learn to code on bare metal (a term used to describe writing software at a register level). Arduino doesn’t expose any of this to you.

The Arduino ecosystem is an open-source hardware/software platform for microcontrollers. On my way down the rabbit hole I quickly discovered how little I knew about the microcontroller I was “programming”. The amazing thing about the Arduino architecture is the how it makes it easy for any hobbyist to cobble together a simple project and see quick results. Unfortunately this means that some people may gain a false sense of understanding of actual embedded hardware/software.

A good example of this was during my 2nd year at university. We were programming little line following robots as part of our microcontroller unit. We had to program a PIC16 (a microcontroller from Microchip) in C, interacting directly with the hardware. Some of the students couldn’t understand why there wasn’t a delay function, like the one in Arduino. Well guess what? There isn’t one. You need to go and configure one of the hardware timers and write your own delay function. “What’s a timer” they asked. Frustratingly we had covered timers in the previous lecture if I remember correctly.

If you are not interested in learning about low level embedded software and just want a quick way of producing a project then Arduino is definitely for you. The learning curve is less but there is still enough to keep you satisfied. But, if you a thinking of getting into embedded software in any serious way then stay well away from Arduino. You simply won’t get the exposure you need to learn about the hardware.

You can actually still use the Arduino hardware and write your own software but you would need to be able to program the ATMEGA328P MCU (if you’re using an Uno) yourself via the ICSP (In Circuit Serial Programming) pin header that is included on the board. This would mean you cannot use the Arduino IDE any more but you can always re-flash the Arduino Bootloader again (in a way it is the bootloader that makes it an Arduino). The Uno board is based on the Atmel ATMEGA328P microcontroller. There is also another microcontroller on the board that controls the USB interface and programs the ATMEGA328P when you flash it using the Arduino IDE. The ICSP allows you to re-flash and debug the ATMEGA328P directly, bypassing the USB part which requires the Arduino bootloader.

If you didn’t understand much of the previous paragraph but want to learn more, pack your bags because this rabbit hole is a long one.

#100daystooffload