The Case For Arduino In “Real Engineering”

For over ten years, Arduino has held onto its popularity as “that small dev-board aimed to get both artists and electronics enthusiasts excited about physical computing.” Along the way, it’s found a corner in college courses, one-off burning man rigs, and countless projects that have landed here. Without a doubt, the Arduino has a cushy home among hobbyists, but it also lives elsewhere. Arduino lives in engineering design labs as consumer products move from feature iterations into user testing. It’s in the chem labs when scientists need to get some sensor data into their pc in a pinch. Despite the frowns we’ll see when someone blinks an LED with an Arduino and puts it into a project box, Arduino is here to stay. I thought I’d dig a little bit deeper into why both artists and engineers keep revisiting this board so much.

Arduino, do we actually love to hate it?

do-we-love-arduinoIt’s not unusual for the seasoned engineers to cast some glares towards the latest Arduino-based cat-feeding Kickstarter, shamelessly hiding the actual Arduino board inside that 3D-printed enclosure. Hasty? Sure. Crude, or unpolished? Certainly. Worth selling? Well, that depends on the standards of the consumer. Nevertheless, those exact same critical engineers might also be kicking around ideas for their next Burning Man Persistence-of-Vision LED display–and guess what? It’s got an Arduino for brains! What may seem like hypocrisy is actually perfectly reasonable. In both cases, each designer is using Arduino for what it does best: abstracting away the gritty details so that designs can happen quickly. How? The magic (or not) of hardware abstraction.

Meet HAL, the Hardware-Abstraction Layer

In a world where “we just want to get things blinking,” Arduino has a few nifty out-of-the-box features that get us up-and-running quickly. Sure, development tools are cross-platform. Sure, programming happens over a convenient usb interface. None of these features, however, can rival Arduino’s greatest strength, the Hardware Abstraction Layer (HAL).

HAL is nothing new in the embedded world, but simply having one can make a world of difference, one that can enable both the artist and the embedded engineer to achieve the same end goal of both quickly and programmatically interacting with the physical world through a microcontroller. In Arduino, the HAL is nothing more than the collection of classes and function calls that overlay on top of the C++ programming language and, in a sense, “turn it into the Arduino programming language” (I know, there is no Arduino Language). If you’re curious as to how these functions are implemented, take a peek at the AVR directory in Arduino’s source code.

With a hardware abstraction layer, we don’t need to know the details about how our program’s function calls translate to various peripherals available on the Uno’s ATMEGA328p chip. We don’t need to know how data was received when Serial.available() is true. We don’t “need to know” if Wire.begin() is using 7-bit addressing or 10-bit addressing for slave devices. The copious amounts of setup needed to make these high-level calls possible is already taken care of for us through the HAL. The result? We save time reading the chip’s datasheet, writing helper functions to enable chip features, and learning about unique characteristics and quirks of our microcontroller if we’re just trying to perform some simple interaction with the physical world.

Cross-Platform Compatibility

Teensy 3.2 keeps form factor but adds hardware features
Teensy 3.2 keeps form factor but adds on-chip hardware features compared to 3.1

There are some cases where the HAL starts to break down. Maybe the microcontroller doesn’t have the necessary hardware to simultaneously drive 16 servos while polling a serial port and decoding serial data. In some cases, we can solve this issue by switching Arduino platforms. Maybe we actually do need three serial ports instead of one (Teensy 3.2). Maybe we do need pulse-width-modulation (PWM) capability on every pin (Due). Because of the hardware abstraction layer, the rest of the source code can remain mostly unchanged although we may be switching chip architectures and even compilers in the process! Of course, in an environment where developing code for the target platform does matter, it doesn’t make sense to go to such efforts to write the general-purpose code that we see in Arduino, or even use Arduino in the first place if it doesn’t have the necessary features needed for the target end-goal. Nevertheless, for producing an end-to-end solution where “the outcome matters but the road to getting there does not,” writing Arduino code saves time if the target hardware needs to change before getting to that end goal.

HAL’s drawbacks

arduino-serial-buffer-sizeOf course, there’s also a price to pay for such nice things like speedy development-time using the HAL, and sometimes switching platforms won’t fix the problem. First off, reading the Arduino programming language documentation doesn’t tell us anything about the limitations of the hardware it’s running on. What happens, let’s say, if the Serial data keeps arriving but we don’t read it with until hundreds of bytes have been sent across? What happens if we do need to talk to an I2C device that mandates 10-bit addressing? Without reading the original source code, we don’t know the answers to these questions. Second, if we choose to use the functions given to us through the HAL, we’re limited by their implementation, that is, of course, unless we want to change the source code of the core libraries. It turns out that the Serial class implements a 64-byte ring buffer to hold onto the most recently received serial data. Is 64 bytes big enough for our application? Unless we change the core library source code, we’ll have to use their implementation.

Both of the limitations above involve understanding how the original HAL works and than changing it by changing the Arduino core library source code. Despite that freedom, most people don’t customize it! This odd fact is a testament to how well the core libraries were written to suit the needs of their target audience (artists) and, hence, Arduino garnered a large audience of users.

Pros of Bare-Metalspeak

digitalWrite takes a whopping 52-55 cycles to change pin direction! [image source]
digitalWrite takes a whopping 52-55 cycles to change pin direction! [image source]
Are there benefits to invoking the hardware directly? Absolutely. A few curious inquirers before us have measured the max pin-toggling frequency with digitalWrite to be on the order of ~100 KHz while manipulating the hardware directly results in a pin-toggling frequency of about 2 MHz, about 20 times faster. That said, is invoking the hardware directly worth it? Depends, but in many cases where tight timing isn’t a big deal and where the goal of a functional end-to-end system matters more than “how we got there,” then probably not! Of course, there are cases when tight timing does matter and an Arduino won’t make the cut, but in that case, it’s a job for the embedded engineer.

Use the HAL, Luke!

To achieve an end-to-end solution where the process of “how we got there” matters not, Arduino shines for many simple scenarios. Keep in mind that while the HAL keeps us from knowing too many details about our microcontroller that we’d otherwise find in the datasheet, I don’t proclaim that everyone throw out their datasheets from here on out. I am, however, a proponent of “knowing no more than you need to know to get the job done well.” If I’m trying to log some sensor data to a PC, and I discover I’ll be saving a few days reading a datasheet and configuring an SPI port because someone already wrote SPI.begin(), I’ll take an Arduino, please.

If you’ve rolled up your sleeves and pulled out an Arduino as your first option at work, we’d love to hear what uses you’ve come up with beyond the occasional side-project. Let us know in the comments below.

160 thoughts on “The Case For Arduino In “Real Engineering”

  1. I don’t consider the Arduino Libraries as a HAL. To me the Arduino Libraries are one layer above HAL i.e. a high level HAL intended for ‘fast prototyping’ akin to mbed. Libraries such as the STM32Cube, STM32 Standard Peripheral Library, TivaWare SDK, Kinetis SDK are ‘true’ HALs.

    In Embedded Systems HALs are usually written in C (not C++) and offer a high degree of low level control over the hardware..much higher than what Arduino or Mbed libs offer. User manuals for HALs are usually as long as a microcontroller’s reference manual. They contains structures and functions that control almost every little bit of functionality available in the microcontroller/SOC. In some circles they are called ‘Middleware’ because the expectation is that the user will write their own libraries an abstraction layer ‘above’ the HAL libraries.

    With the 8-bit AVR cores, register level (baremetal) coding is so easy that a ‘higher’ level fast prototyping HAL such as the Arduino Libs can be based directly on it (baremetal coding) without having to use an intermediary ‘Middleware’ HAL.

    For ARM cores it seems to be much harder to do this. For example, most mbed libs seem to be based on the HALs provided by Freescale, ST, NXP e.t.c.

      1. Yep missed CMSIS. The Core CMSIS is a HAL as it allows the user to control core CPU/NVIC/Systick Timer. Other CMSIS extension libraries such as DSP and RTOS, while very useful in some instances, don’t qualify as HAL per se. Another HAL is Atmel’s ASF.

      1. That’s going at least two levels too far. The Arduino port I/O is mainly macros. I used to design product test fixtures using an automated test system that was based on a 286 PC running DOS. Its “hardware abstraction layer” also consisted of a bunch of macros that translated commands that looked something like x = MeasureDcVolts(pin_number) into setting the appropriate multiplexers up to feed the voltmeter and read its result. It was “easy”, as long as you didn’t try using two instruments that needed the same multiplexer, a situation that using the macros wouldn’t give you any clue about. By hiding the underlying hardware, they removed a level of understanding that the test designer needed in order to design test fixtures effectively. After troubleshooting one such project, I abandoned the macros entirely and started doing it the ACTUAL easy way, which was to set up the multiplexers myself and read the voltmeter output directly. But just as with Arduino tools, the macros provided a gentle learning curve for doing the most basic things.

  2. The case for arduino in ‘real engineering’ is about the same as the case for bottle rockets in deep space. Its great at what it claims to be, an introduction to microcontroller programming with that high layer of abstraction its known for. It was my first introduction to microcontrollers and after I felt comfortable with it the jump to programming the 328p itself was fairly pain-free , at a tenth of the cost of an UNO to boot.

    1. Disagree. Manufacturing/ device validation. Is a type of engineering. Arduino can be invaluable when building a test fixture.Simply because of how quickly you can build a test fixture.

      Doing simple things like flipping relays, activating servos, operating I2C sense devices, and other really simple well documented applications make building a test harness really quick and easy.

      Don’t forget “engineering” is not just “product design”

    2. We use them by the truck-load at the Arecibo Observatory. We often have to whip out solutions in a matter of hours or days. We use them to control scientific instrumentation. And yes, if we had months to develop a project, we might develop our own solution (and have repeatedly in our history), but when time is money, going with a “dev board” in the obvious solution. If an Arduino Pro (our favorite variant to use) runs ~$20USD, that’s less than an hour of pay. If using an Arduino saves us an hour, that cost outlay was well spent.

      The other reason we use them is the form-factor (although, fuck that stupid offset). There are enough variants, and the “HAL” is cross-device enough that we can be fairly certain that in 5-10 yrs, if we need to replace the existing Arduino board, we can easily drop in a compatible board, regardless of whether it actually has an ATMega328p, or an MSP430, or whatever the currently vogue chip is. We’ve already done this. There was a piece of HW that was deployed using an Arduino Duemilanove in late 2009, was recently redeployed with an Arduino Pro.

  3. I never understand why folks seem to hate Arduino so much, calling it “cheating” or “lazy”. A group of people wrote a series of libraries, macros, and bootloaders that make it REALLY easy to program a microcontroller. Big whoop. Engineering doesn’t need to be hard 100% of the time – anything that gets the job done faster and easier within spec is pure gold. Calling Arduino “cheating” or “lazy” would be like calling someone who programs in C a cheater or a sloth because they COULD be writing code in ASM and because they AREN’T writing their code in ASM, they don’t understand the limitations of the chip….yata yata yata…you get the point.

    It’s a tool. Sometimes a particular tool is well suited to a job, other times it is not.

          1. Exactly. Client suddenly needs something to keep their USB HIDs running even when the main system power cycles? No problem, I’ll just head on down to my local electronics store and buy a USB-host board and have that solution ready for them by tomorrow morning. Oh dear, on-site techs accidentally shorted the power rails and fried the board? All good, said electronics store has a branch right around the corner, I’ll be uploading my firmware onto a replacement board within 15 minutes. I develop systems that sell in excess of $15,000 each, a $70 Freetronics board isn’t an issue when you’re in a crisis and the nearest retailer is only 2 blocks away.

      1. The quote that always will stay with me is that from my first mentor, 27 years ago…

        “A great engineer will do for a quarter what a mediocre (at best) engineer takes a dollar to do. If we had to have an arduino to do what duct tape did on the Apollo mission…

        Just sayin…and I have a follow up…

        1. I’m unaware how duct tape was engineered for actual use in the Apollo program. Perhaps it was two bit engineer who created one filter for the command module, and another for the LEM, and eight bits engineers coming up with the hack used to keep the crew alive.

          1. You know you don’t actually need to buy the whole damn blue board, right? Just the 328, a crystal and a few passives. Using arduino simply means using the bootloader and libraries.

    1. My only real problem with Arduino is when your project reaches the limit and you can’t tell why you are failing. The time saved in prototyping can get easily get wiped away trying to debug an issue buried under “middleware”.

      1. An Arduino isn’t magic. Ultimately it’s only an 8-bit Atmel part on a dev board (excepting the 32-bit versions of course).

        At some point in a project you have to decide whether you need an 8-bit, 16-bit or 32-bit controller chip. I don’t like to be blunt, but if you can’t tell why you’re failing, perhaps your real failure is to realize you needed a more powerful microcontroller to begin with.

        1. Agreed. As is not realizing there’s an Atmega16u2 there to be used as well. Throwing better hardware at the problem is only one solution, sometimes you just need to better understand the hardware you have.

        2. I don’t think you understood my point. Hardware specs are well documented and easy to reference.
          You can choose an Arduino that meets your hardware specs but the “middleware” brings a seperate set of limitations that aren’t as well documented. Then the ease of use of the same library that helped you before obfuscates the problem.

    2. -“A group of people wrote a series of libraries, macros, and bootloaders that make it REALLY easy to program a microcontroller. ”

      It’s already really easy to program AVRs. You don’t need any of the bootloaders and libraries to get started. The learning curve isn’t steep at all, and there are plenty of help and code references available for anything you might imagine.

      The point of the Arduino is to obfuscate all that behind a “helper” library, which pretends to help you so you would keep shelling out $20 over and over again every time you need a microcontroller for some trivial task.

      You have to ask yourself, Is it really that hard to understand the concept of writing to a register – so that your beginner just absolutely needs digitalwrite() – or is it just unnecessary spoonfeeding?

      1. The concept of writing to a register is easy. The concepts of ports, addresses, and buses are pretty easy. The problem is, even as someone who understands all those concepts, I don’t know how to implement digitalWrite() for an AVR in C. It’s not the concept that makes it hard, its the details. Simple stuff. What’s port address? What keyword is used to write to a port? It’s the details that keep us casual micro guys (who don’t typically use such features for business applications) from achieving much.

        And if you have a tutorial that shows how to write to a port on an AVR, I’d be glad to take a look. Most tutorials or code samples I find online about such subject basically present ‘magic code’ with ‘magic numbers’ with no or just plain bad explanations of why it works. That’s no better for learning than using the Arduino library.

          1. Bits…not bit. Registers not register. set in or out direction. Set pull up or not. Hi or Lo value. Disable or enable ADC. If the port has special features to enable or disable them. SPI, i2c, I was once bitten by not realizing the JTAG port was enabled by default on one microcontroller. Some pins are affected by both global and local registers. Once you have all of them set up, AVR still gives you two distinct methods of twiddling a pin. Gotta know which one to use and why.

          2. Unless you’re using one of the ADC pins – and I’m not sure it’s obvious to new Arduino users that you even can do that – it’s literally just setting a bit in a register. There is no seperate pull-up enable on AVRs; you enable pull-ups on an input pin by setting the pin high in output mode, either with digitalWrite or by setting the appropriate bit. Setting input/output mode is a separate operation both in the Arduino API (pinMode) and in hardware (you have to set a bit in another register).

            What’s more, the price of letting the Arduino libraries do the work for you is that digitalWrite is really slow. Slow enough that anything remotely timing-sensitive tends to break, causing confusion to users.

      2. No it’s not hard to work with AVR’s without the Arduino library. But it is much more intimidating to the beginner who doesn’t know where to start anyways. Tell someone new to this that they need to create a bitmask and then perform a bitwise AND with a port and store it in a port to turn off an LED, and they will run away. Tell someone to do “digitalWrite(13, LOW)” and they will cringe for all of half a second before understanding things. There is no looking up port register maps, pull up resistor register maps, or any of that fancy jazz. It is simple as can be.

        Now, should folks move away from the comforts of Arduino after a time? Probably yes. They will find that the Arduino libraries are often inefficient and do a lot more than is actually needed, slowing down the code and taking up memory which can be treasured in certain applications. But for folks who need a really simple device, by all means! Use Arduino! The code is easy to read, fast to write, and usually does a pretty good job for simple tasks.

        And as far as folks shelling out $20 over and over again – unless you are making your own microcontroller boards in mass, you are going to struggle to find a better deal that some of the clones you find on Amazon and Ebay.

        1. It’s only intimidating because we keep telling people it’s difficult.

          The concept of bitmasks, bitwise AND etc. is absolutely trivial. If you’re trying to teach people how to program microcontrollers, you’re doing them a MASSIVE disservice by not teaching them fundamental binary logic.

          What the Arduino does is simply obfuscate things, so as to NOT teach anyone anything about microcontrollers, so they would just keep buying Arduinos for the most trivial of tasks.

          1. I have to agree, while I am a hobbyist I did have formal training and learned first the math, then the circuits, next Assembly and later C/C++. It is invaluable to learn each piece. I liken it to a brick wall with bricks missing to do otherwise.

            Later faced with ports, bits, registers, timing, cycles and libraries I can at least grasp where I have gone wrong after some study and understand the documentation enough to either perform the fix or frame a question that has a hope of being answered.

            Also this post and all the comments have made for a great read. What an awesome community of engineers and enthusiasts!

          2. “or frame a question that has a hope of being answered.”

            The lack of basic understanding is painfully apparent when you deal with people from the less developed countries who have recently been presented with Arduinos as a teaching tool in engineering studies, which results in the people learning nothing. Places like India, Pakistan, some of the more developed African countries…

            Aside for the language barriers, you just get total gibberish from them. It’s a great idea, “jumpstarting” kids to microcontrollers, but when you don’t have the basic education in place, and you make things “easy” by offering an obfuscation layer on top of the hardware, they often develop pretty weird ideas about what things are and what they mean, and how they should behave.

            It’s basically cargo cult programming/developing, and when things don’t work they have absolutely no idea why things their ADC is returning random values. (trying to measure an AC voltage)

      3. There’s a huge availability of complete modules suitable for leaving in a project that definitely cost less than $20 – if you don’t mind slowboating from china you can get a complete board with uC, regulator, and GPIO broken out to handy solderable pins for less than $2 (which is less than i can even buy the uC for in small quantities) – all you have to bring is a cheap FTDI cable, and you can program it with exactly the same libraries and toolchains you’re already familiar with.

      4. The huge number of people who have picked up microcontroller development via Arduino – or those who just used it for that one project they needed and don’t care to learn more – would seem to be evidence contrary to your theory. Abstractions like Arduino _do_ make it much easier for people to get started; you’re speaking from the perspective of someone to whom all the tough stuff is already familiar. Standing at that high point, it’s easy to say that the climb looks easy.

        1. What makes an Arduino easy is not the abstraction layer, because you still have a learning curve up to its methods and idiosyncrasies – just as much as you’d have for programming the AVR properly.

          What makes Arduino “easy” is that it comes in a pre-built format with press-on “shields” for common tasks, and pre-made code you can just copy & paste, so you don’t actually have to learn anything or know anything. It’s not actually very different from LEGO Mindstorms in that respect – you just plug in the motor to the control unit, flash the program over and you have a line following robot, or a plant watering system, or a halloween prop that waves its arm.

          It’s a completely different ballgame, and it’s no use pretending that most people who buy Arduinos are “picking up microcontroller development”. Some of them might, but the Arduino environment isn’t helping them.

    3. I agree with you 100%!
      The Arduino at it’s core is an Atmel Microprocessor and Atmel chips are acceptable for use in products. Just because it’s easier to develop programs for the Arduino what with the Arduino API/IDE doesn’t make the Atmel chip any less powerful or legitimate.

  4. It’s not that an Arduino is cheating, it’s just that if you are prepared to take the training wheels off there’s just so much better out there. Not just performance but things like real debugging, breakpoints, etc.

    1. @0xfred
      Your phrasing–specifically the use of “training wheels”–carries an implicit value statement. Saying it like that actually isn’t any different from calling it cheating: you’re still framing it as a crutch for people who can’t handle the ~*serious tools.*~

      Even if this is something you actually believe it’s really neckbeardy to say, like you’re appointing yourself high arbiter of what is and isn’t Real Engineering.

      This is totally ignoring that you can’t possibly know what is or isn’t better without knowing the details of an individual project. Need something cheap? Then use what you have. Need a quick prototype? Then use what you know, or your best friend knows. Making something you’ll need to be able to “sell” to a really dumb and non-technical manager on? Use what has the coolest buzzwords. Just tinkering? Then who gives a shit.

      1. The arduino is ‘training wheels’ not because it is a crutch but because it is a stepping stone to using more ~*serious tools*~. Is it easier, quicker and more user friendly to use in a tinkering scenario? Absolutely. Would you use it in a commercial product when the alternatives are 20 times cheaper? Doubtful. Engineering has financial concerns at its core, tinkering isn’t ‘real engineering’ in that sense.

        1. In low volume projects, engineering time is the expense, not the Arduino. I don’t understand the whole argument that Arduino is Good or Bad. It’s a tool. It might be the right tool for a project or not, but different projects have different constraints.

      2. The analogy of training wheels is actually, that we (parents) put training wheels on small childrens’ bikes because they don’t want them to fall over and hurt themselves.

        They’re not actually a learning aid. Training wheels actually prevent kids from learning to ride a bike by preventing the bike from tipping, which prevents the kid from steering it correctly. They only start to learn how to actually ride a bike when the training wheels come off.

        That’s what the Arduino essentially does for embedded systems. It’s not a cheat, it’s not helping you – it’s a system designed to keep you buying Arduinos, because you don’t know how to program a microcontroller any other way.

        1. Funny story, after failing several attempts to ride a bike correctly as a small child, and frustrated over my older brothers bike superiority, I taught myself the way most kids do. Positioned myself on top of a steep hill and held on for dear life. I wish I could do the same for micros.

          1. Been there, done that. There is no reason why you can’t do the same for micro. Mind you I dared myself to do this just to see what my limits are. It is like setting myself up for failure…

            This was my HaD project for 2014.
            My first time to use a Chinese PCB place, first time to assemble fine pitch of this size, first time to use a new way of assembling SMT by hand, first time to use ARM chip, new tool chain, port RTOS to it, write my own drivers, on the first proto version of a new design that I designed from scratch without using a development board.

        2. You are assuming the point is to learn how to ride a bike. If the point is to get from point A to point B, and you don’t know how to ride a bike, the training wheels will get you there faster than walking, and faster than learning how to ride a bike.

          If in the long term, you decide that you need to travel often, then learning to ride a bike might be worth it.

          1. Actually, if we were to talk literally about training wheels of a bike, no, they would not get you anywhere in a hurry because you’ll just trip over them trying to take a turn at speed. You’d probably hurt yourself if you tried, and for all the trouble it is, you would probably walk faster.

            They’re meant for introducing bicycles to small children who are still too clumsy to stay upright – not as a means of transportation.

            In a similiar fashion, Arduinos are an introduction to microcontrollers at best. People use Arduinos for things that don’t actually need microcontrollers in the first place – such as simple LED blinkers or a PWM signal source for a motor – and for things that do need microcontrollers, an Arduino is just a hinderance.

        3. I like car analogies, so here we go:

          Arduino is like having an Automatic Transmission vs a manual transmission

          To go further:

          Arduino is like a modern car with automatic transmission, electric start, auto-climate control, backup camera, traction control, stability control, etc

          Other methods of embedded programming range from an 80s manual transmission car without the backup cameras, traction control, ESC and such (You still have some help of libraries, but you have to know how to deal with low traction and how to clutch and shift. With some models, you may need to know quirks like how to set the choke to get started on a cold day) to Bare Metal programming being lke a Model T:

          An individual can extract the maximum of performance out of a Model T because the can set the spark advance manually for changing conditions. the basic concepts of spark advance and air fuel mixture aren’t difficult to understand, but some people just don’t want to learn all that stuff.

          Those of us that have grown up working on cars understand that a lot of systems have been added primarily for emissions control purposes and there is a lot of potential to be unlocked by tweaking things like timing advance, A/F ration and other factors.

          Also, I would argue that it is not the Arduino ecosystem that is designed to keep you buying; Its the man sited like Sparkfun and Adafruit that design tutorials around products they carry. Short of reusing the Arduino trademark, you can easily download the CAD design files and make exact duplicate dev boards or even extend the board capabilities. The Arduino forums are generally pretty active and sometimes scratch the surface a bit. Unfortunately, most beginners searching for tutorials will get to the well produced ones at the big sites designed to make those sited $$. It’s no different that buying a Ford and reading the owners manual that tells you to get Motorcraft oil, filters, parts, washer fluid, etc from your Genuine Ford service center, or taking you new car to someone to change the oil and they give you a sticker to change it again in 3000 miles (most cars have had a 5000-7500 mile+ OCI for decades).

          Arduino is a means to and ends. For experienced uC developers, it probably seems inefficient and obfuscated, but that doesn’t make it wrong, just different. I love tuning cares and motorbikes and love driving them in a well tuned state even more, but when it’s the middle of January and snowing heavily, I just want to get in the car, turn the key and pick up my kid from school without worrying about the details.

  5. I don’t view the arduino as cheating or lazy, but I do believe that it hides some necessary complexity from the developer. It gives people the false impression that they know what their microcontroller is doing underneath when they’ve maybe never even read the datasheet.

    When they need to eke the last drop of performance (speed or program density) from a microcontroller, will they feel comfortable ditching the arduino libraries and manipulating the registers directly? Or maybe using the bit manipulation engine on a Freescale Kinetis microcontroller? What about manually messing with the MCG on the Teensy 3.2 and changing the clock frequency using the FLL instead of the PLL? Or using and understanding the various low power modes available on most microcontrollers? Will they ever experience the joy of writing their very own linker script??? (Okay, maybe joy isn’t the right word)

    I think the arduino is great for getting into microcontrollers, but my opinion is that people need to ditch it if they decide to pursue microcontrollers as more than a just a hobby. Could you imagine if we started finding arduinos in cars, airplanes, or spacecraft? At least to me, that doesn’t inspire confidence.

    Maybe I’m weird, but I actually enjoyed cobbling together a programmer and learning about the process of using a microcontroller in a system from the ground up. For me, using an Arduino would take all the fun out of it.

    1. > “I don’t view the arduino as cheating or lazy, but I do believe that it hides some necessary complexity from the developer.”

      It hides complexity. Whether the specific complexity it hides is necessary or not depends on the project.

      if you are ever in the situation where you are trying to “eke the last drop of performance” out of an Arduino, you should never have chosen the Arduino in the 1st place.

      I certainly wouldn’t be happy if an Arduino was being used on my car. But I wouldn’t freak out if it was controlling my swimming pool’s pump.

    2. I’m on the same page here. I recognize that the Arduino has done a lot for the hacking community by introducing microcontrollers and embedded computing to people who never would have done anything with it otherwise.
      I learnt how to use the ATmegs168 before it was Arduino, so I recognize all that you have no idea what the Arduino does. I made a project once (a rotational display) where I could not use the built-in functions, because they were to slow. However, by using an Arduino, we managed to get it working in less than two weeks (like sending wireless data with one of these NRF-modules (don’t remeber the name)).
      The danger with Arduino as I see it, is that if you have only know how to use a hammer, you will use it to try and solve every problem, even when a screwdriver would be better. The worst example of this that I have seen is someone who had too few pins on his Arduino, so he built an I2C IO-expander using a second arduino. I have done something similar myself, because I didn’t know better.
      Bottom line: If you’re new to the field, use an Arduino to ge started, but ditch it if you are going to do anything more advanced that it cannot handle. I will not use Arduino myself, beacuse I feel that I passed that level.

  6. Well, I started out on PICs, using Mikroelectronicas compilers and libraries. After discovering their libraries for things like I2C had infinite loops in them, so if the slave device failed or wasnt present, the processor hung, or the libraries didnt include all the options, e.g. slave mode, and were closed source and couldnt be modified, I went down the route of rolling my own HALs.

    Never looked back, theres something to be said for knowing exactly how something works.

    I do agree there is a role for Arduinos though, either for beginners or just speed of iteration. One word though :- Debug!

  7. The case for arduino in ‘real engineering’ is about the same as the case for bottle rockets in deep space. Its great at what it claims to be, an introduction to microcontroller programming with that high layer of abstraction its known for. It was my first introduction to microcontrollers and after I felt comfortable with it the jump to programming the 328p itself was fairly pain-free , at a tenth of the cost of an UNO to boot.

  8. Arguing about whether or not using an Arduino is “engineering” completely misses the point. Engineering is about producing specified results, within certain constraints of time, money, power, reliability, etc. The components, tools, materials, processes, assemblies, tests, they’re all factors.

    If there’s a need for a small CPU to control a dozen or so IO pins, some with PWM, none above a certain frequency, communicate via USB to a host computer, it has to be done within a $20 per unit budget, and you can’t spend more than a few hundred dollars on development, then an Arduino might be a great choice. If you’re trying to build a motor controller that makes a plastic Santa wave from your Burning Man trailer, Arduino might be a good choice. If you’re building 10,000 copies of waving plastic Santas to sell at Home Depots around the country, you’ll have a different budget, different requirements about manufacturing processes, different requirements about code quality, different price points per unit, and an Arduino is likely no longer appropriate.

    An Arduino is nothing more than a sophisticated component. It’s not a litmus test of an engineer.

  9. The case for any engineering decision is one of trade offs.

    None were presented.

    Use a case study, that would help in CLEARLY identifying the trade offs of using an Arduino product vs any other tool.

    In general:

    Am I going to make 1 of these or many?

    How much time do I have to complete this task?

    Do I have a target cost for this project?

    If the questions above do not enter into your mind then ask yourself if you are a Real Engineer(TM).

  10. Anything that can help me get to market faster is a candidate for use in all projects!
    Was able to use a banana pi board in place of a 15K development board for co development purposes!
    Did not go in the final product, but enabled use to get there within 6months and since the hardware was late (5months into the project, we were still a success.

    Also, for Arduino, look at the Embrio IDE. Things are getting even better.

    1. I have performed FMECA analysis (and a lot of other analyses as well) for computers developed from scratch for satellite control (the large ones launched as primary payloads, not small cubesats). I still consider myself a real engineer, even though I am no longer a hardware designer in the aerospace business.

      For many purposes, an Arduino is just what you need. In a lot of cases, performance is not really important. Sometimes the RE cost is not important.

      The main problem that I see with using COTS Arduino boards in commercial products is the difficulty of being certain that the quality is sufficient. It’s difficult to claim control of BOM changes and parts sourcing.

      For production test equipment manufactured in a total quantity of 3 that only does some simple sequencing, why would you waste money on developing your own hardware and spending more time than necessary on the software? You need to consider the cost and TTM, no one wants to pay you for a beautiful solution if it’s not needed.

      I just don’t get why some choices should be banned because they are simple.


    2. Most of the large companies I worked for have preferred vendors. Some even when as far as auditing the vendors and doing a lot of quality analysis before approving components. I have been through that trying to get new power supply modules for our program from our preferred vendor which at the time wasn’t certified for power supply.

      Some places are also very concerned about bringing in “Open Source” code base until they spend time reading and understanding the licenses. For the amount of jumping around hoops, I am better off doing the regular process flow to drop down the schematic for Arduino assuming that’s 100% fits my requirement which is highly unlikely.

  11. I’ve used the Arduino in a few “real” engineering projects, but not many.

    I wouldn’t ever use it on a product that shipped, but I will use them occasionally when building machines that are necessary to make our final products. Putting a ton of “polish” into a machine that a customer never sees and that is built and maintained by professional engineers doesn’t always make a lot of sense, so it’s fair game.

    I’ve found them to be somewhat useful for various forms of low speed data logging, when I just need to get something onto a serial port. I’ve also found them possible replacements for a PLC under some circumstances.

    To give a real life example, I used one in an epoxy curing autoclave, which is done in high pressure with inert gas. There were interlocks on the door, a pressure sensor, a thermocouple, a bunch of solonoid valves, a PID loop, and a few timers. It could have been done with a PLC, but I’ve found state machines to be difficult to write on most PLCs and they are relatively easy in C.

    I’ve also used them in a bunch of single use purpose built testing rigs. (“test this part for 900 cycles and 300 hours”). Once the test is over, you never use the rig again, so putting a lot of time into a “real” engineered solution is wasteful.

    There is something to be said for having a collection of signal conditioning boards that can be used to adapt the DIO to/from 120v, inductive solenoid loads, etc and the AIO to RTDs, 4-40ma, 0-5V, 0-10V, etc. And then just just putting them together, running the test, and taking them all back apart for re-use on the next special purpose test.

    It doesn’t (usually) make sense to do a full engineering design for a test that will only be run once.

      1. A good way of putting it. Although my first arduino project used meccano rather than lego. The main sacrifice that you make using the arduino environment is speed. But it’s plenty fast enough for most things that run at human speed: button clicks and key presses.

  12. We love to hate it.
    I personally don’t hate Arduino persee. it has it’s advantages and it has it’s quirks and yea sometimes the code isn’t great.
    Arduino got me into embedded. but I was the kind of person that looks at chips and googles them. found out that programming in C enables lot’s and is faster than arduino generated code.
    but that is just me. My opinion is that Arduino is a great prototyping platform to work idea’s out, And if you want to go for performance reliability … rewrite it in C.

  13. Smells like yet another advertisement for Arduino to me…

    All the “real engineers” I know use stuff from HP/Agilent/(ugh)Keysight, Lecroy and or NI tied up to labview or heck, even a version of BASIC that was made to do lab and engineering type stuff either using off the shelf drivers or roll their own. I don’t even think 9/10ths of them know what an arduino is.

    Kids that got engineering degrees in last few years that have start up business selling you electronics toys probably use arduinos for engineering, but real labs with “real” money to throw around, not so much. and when I say “real” money, you aren’t even close to understanding how many zeros I mean….

  14. I have a lot of respect for real Engineers. Real Engineers get things done.

    Real Engineers wouldn’t waste their time posting such asinine comments. But, self-aggrandizing, curve-riding, coupon books, whose sole purpose is to increase profitability by using well-known functional blocks(whether hardware, or software) would.

    Just because you have a bigger toolbox doesn’t mean you are a better Engineer; but it might mean that you are a bigger tool.

    1. Not suggesting labview is the best thing out there. It’s just the standard for whatever reason. I like raw code myself, not dicking with “drawing” a process tree or whatever. But saying arduino is for real engineers is like saying screw drivers are for real mechanics – to me it’s DUH. Anything can be used to get data in and out of a PC or toggle some I/O for process control, but there are tools out there that do that already and have been around a long time that people in the field already know and love (or have to suffer with because their hands are tied to what the rules and regulations say they must use).

      But arduino doesn’t really strike me as the best thing to use either. If I were joe-blow start-up and only had $30 to spend on my DAQ, well ardunio doesn’t sound as bad, as long as it can sample at the rate I need….

      But If I need to do 2Gs/S and have an external trigger and marker functions and do a bunch of real time math, I’d better be looking for a loan and fast. And if I already own a stack of said equipment, I’d probably just go ahead and use it for logging the current draw of my blinky circuit, seeing how I already know how to use it and have the drivers and everything already rather than dicking with programing an arduino and fighting weird pin arrangements and all that.

      And I wasn’t trying to get into a “my lab is bigger than your lab” pissing match. I’m just saying the vast majority of engineers are probably already working in someone’s deep pockets, and some of us have the deepest pockets of all, so from my view, arduino isn’t even considered by anyone I know unless they are a “fresh meat” engineer and they want to do some simple process control where accuracy, resolution and calibration wouldn’t be a factor, but again, if you have big dollar tools already lying around, you’d probably just use them.

      1. You overlooked the obvious point…

        Standard, low end PCs come with features that are excessive when compared to the use of a word processor. But, people still buy them for that sole purpose. Why? Because, due to economies of scale, its the device with the lowest cost.

        Does this make it the best suited device? Probably not. But for very small production runs, its probably going to be much cheaper to use a 2 dollar clone than it is to design your own solution and have it produced at an all-in-one fabrication outfit.

        You couldn’t buy the parts for 2 bucks, much less assemble them by hand.

  15. This post was just begging for an AVR debate… why HaD?

    Can we clear something up here though please? No one seems to actually define what part of Arduino they are complaining / defending…

    Programming an Arduino is worthless to debate one way or the other. It’s fast and easy, and by the time you start requiring the more complex tools and functions, you should be able to through some AVR specific code in and use it instead of the built in functions. Just because the Arduino tools include functions does not mean that you HAVE to use them, and does not mean that those who want to learn won’t actually look into how they work and learn a little more. It has it’s purpose. Let’s leave it alone.

    Arduino hardware is a little different, and I will take part in that debate.
    I am terribly against using pre-made Arduino boards in consumer products. It’s the epitome of laziness, and shows no interest or desire in improving your product… now if you have taken the time to develop your own product specific board, you can put any components you want on it… note that I said components… even with a custom board, sticking pre-made modules on the board as if it were a lego mindstorm robot should be frowned upon.
    If you build your product and slab an AVR on it that happens to be programmed as if it were an Arduino… no one would ever know, and you would have saved yourself a few $$$ on every product. Your welcome.

    1. “I am terribly against using pre-made Arduino boards in consumer products.”

      Why? How is it any different than a CPU manufacturer incorporating third-party, gpu blocks or memory blocks, into a processor?

      I can hear the argument bubbling, “Yeah, but why include a whole Arduino when your only using a few pins?” Well, why do I need four, six, or eight 4.0GHz cores with a fantastic number of GPU cores, when all I do is work with MSOffice?

      At least with the Arduino in a consumer product, we can get additional utility out of our purchase by disassembling the many products which are eventually broken.

      1. Because MSOffice is a huge resource hog that runs slow on anything but.

        For the general argument – it’s you who keeps buying the overpowered computers when you actually don’t need them. You can’t excuse someone else’s stupidity with your own.

        1. You overlooked the obvious point…

          Standard, low end PCs come with features that are excessive when compared to the use of a word processor. But, people still buy them for that sole purpose. Why? Because, due to economies of scale, its the most suitable with the lowest cost.

          Does this make it the best suited device? Probably not. But for very small production runs, its probably going to be much cheaper to use a 2 dollar clone than it is to design your own solution and have it produced at an all-in-one fabrication outfit.

          You couldn’t buy the parts for 2 bucks, much less assemble them by hand.

          1. No. You overlooked the obvious.

            The “standard low end PCs” isn’t even the cheapest most suitable option. You could buy a small wall-wart plug computer like a SheevaPlug for about a fifth of the cost of a “real PC” if all you ever needed to do was some word processing. Or, a $100 tablet computer and a bluetooth keyboard. We don’t necessarily need to buy a “PC”.

            The fundamental problem here is that most of the time, people aren’t rational. They do what -seems- easiest, cheapest, and best simply because it’s there, and then refuse to change their opinions about it afterwards because the possibility that they might have made a bad choice gives them cognitive dissonance. This is being exploited by the businesses who simply like to sell you stuff, whether or not you need it.

            So the “standard PC” is completely overloaded and over-engineered for the tasks required of it. The major reason why it “needs” to be so fast is because the software side is so bloaty that the user experience would be shit on a lesser machine – again, only made that way since the resources are there.

      2. The difference is that at the heart of every Arduino board is a chip that’s designed to be easy for manufacturers to integrate into their products, and the boards are just a thin wrapper that turns it from something manufacturers can use into something that you can easily prototype and experiment with. If you’re building a product, why would you choose the prototyping-oriented option over the manufacturing-oriented one? You’re just causing yourself more work – it makes your product bigger and constrains what shape it can be, if you have to design a custom board it’s a pain to add the right header layout to interface with the Arduino’s oddball one, you have to worry about the connectors working loose and causing customer support issues, and so on.

    2. What is the problem with using pre-made Arduino boards? Makes it more likely that you will pass EMC testing, and it will reduce your TTM and NRE costs. I’d say that it depends on the quantity, just do a quick NRE + qty*RE for both options, consider your risks with both and make an informed decision.

      As I stated above, my main issue with using pre-made Arduino boards is quality control, not engineering beauty.

      1. If you are concern with EMC, you wouldn’t just throw random modules into a product.
        Remember that a connector is a huge discontinuity, so I would only do that if I have to. This is what I would do.
        – good ground to signal ratio. You want to minimize the current loops area of high speed signal by having their return path near by.
        – serial (or other form of) termination. If you have undershoot/overshoot that’s excess energy ends up in emission.
        – power filtering, decoupling at connectors.

        Let’s say Arduino is at the trainee Engineer level and I don’t expect that type of design to pass regulatory test.

  16. So, as a extreme beginner, I’ve found that ditching the arduino hardware and throwing the IDE onto an ATMEGA to be pretty easy so I can program in a familiar setting. Its way cheaper to buy the chip than the full arduino. The tasks that I use it for are really low power, meaning even the ATMEGA 328 is plenty for it so the argument against it on how much it slows the MCU doesn’t really apply to me. I’m really grateful that something like the arduino exists to make the entry into microcontrollers a bit easier for a guy like myself.

    You EE guys blow me away with what you can accomplish, it keeps me coming back to HAD to see what crazy thing someone has made.

    1. Next thing you’ll notice: it’s not hard to program the chip directly without the Arduino bootloader or the IDE because what you’re probably doing is just toggling pins in a sequenc.

      You don’t need an “environment” for it – you can program AVRs in Notepad for all anyone cares, and it’s actually not any harder. Whipping up your own set-bit-clear-bit macros is a five minute job, which you can then just copy & paste over to the next project.

      In which case, you’ll notice that the Arduino was a $25 waste of time, and without the libraries you get full control of the hardware timers, which makes doing things like controlling multiple servos much much easier.

  17. “[scoffing tone] Who needs an Arduino to blink a few LEDs and read a couple inputs? I could do that with a 50 cent microcontroller.”

    True, but not everyone is making an egg timer. Do I feel like devoting a month of my time to writing a bunch of SD card filesystem code from scratch, followed by my own implementation of TCP/IP and SSL? And then pore through dozens of pages of register descriptions to eventually create and debug some code to access a complex IMU sensor? And then just maybe get to my actual application?

    Some of you might say yes. But for short-run or one-off projects, the existing libraries make a lot of sense. We can share the hard work and put a lot of eyes and testing on all the groundwork code.

    I write bare metal code for different types of microcontrollers, and I make libraries for Arduino (not just use them). I can use avr-gcc so even the Windows-only AVR Studio isn’t a blocker. But, strangely, that doesn’t somehow take away the appreciation I have for the hundreds of people who make quick jobs easier through access to common hardware and common libraries.

    You could try to make your own ecosystem of libraries to share, abstraction, some functions for commonly-used features like ADC and PWM interfacing. And maybe you could make it cross-platform too instead of locking in to Windows. You know what you’d eventually have? Arduino.

    1. Even big ARM microcontroller companies distributes Elm Chan’s FatFS library for SD card or flash memory stuff

      And if you need SSL, you probably start with a MCU with AES crypto and then just use the lwip library

      Yea use existing libraries, sure, these are not Arduino libraries though.

      I bet everybody who says “Arduino != Engineering” would agree that it doesn’t take a month to put these bits together and make a HTTPS capable SD card web server that reads a IMU over I2C or SPI.

      If you want to “get to my actual application” faster, try stuff like .NETMF, like… you can probably just copy C# code meant for x86 over and it will still work

      1. So you’re going to pick a 32-bit microcontroller with loads of flash and SRAM to do a job that only needs a lowly 28-pin 8-bit MCU, because it has libraries available? When are you going to take the training wheels off? :)

  18. Arduino has opened the door for many people into the world of electronic design, It may not be popular among people with advanced knowledge of EE but lets face it the Arduino was never aimed at these types of people. If someone can make a product that solves a problem and saves people money that uses an arduino, Why sholdn’t they? We have too many EE snobs if you can do it better with another controller at a cheaper price, Do it and if consumers agree with you you’ll make a fortune, Thats capitalism. These sorts of arguments remind me of windows vs mac vs linux. Yes linux is open, Yes windows is more compatible and Yes Mac (used to be better for graphics), Everyone has their own opinions. Fanboys are gonna love and haters are gonna hate but if your happy to use/exclude I won’t judge you, If your product works, does what it says it will I’m sure your customers will love it.

    1. The Arduino wouldn’t be a problem if it wasn’t sold and hyped as a sort of panacea, which people end up using instead of learning proper techniques and knowledge.

      There’s a schitsophrenic approach to the problem with the advocates in saying that it’s a “learning tool”, and when countered with the fact that it stops people from learning anything, they flip over to “it’s just meant for getting things done”, which is just a duck-tape approach to electronics.

  19. My Arduino issue is what is happening to young programming talent. I have for the past few months been interviewing college graduates and if I give them a task with a micro that doesn’t have much example code available…they FAIL. Its easy to say that all Arduino represents is a Abstraction Layer, but there is also a huge community sharing info and helping to solve problems. I agree that it may reduce the learning curve of getting involved, but I feel its hurting the college graduates as they are going these same routes.

    I’ll borrow from another comment: Removing the training wheels allowed me to learn to ride a bike. It’s not that riding with them wasn’t actually riding, but it limited my experiences and capability.

    Sure we try to grab the best tool in the toolbox when setting out to complete a task…and if its something simple I can see the reason to grab one. It’s that first discovery phase that is not happening and leaving a knowledge gap out there.

    1. So, what you are saying is that it has expanded the pool of programmers to the point that it includes a lot of people who aren’t very good at it. It’s gotten so easy to whip up something on the Arduino that people can cut-and-paste something together.

      Very true. I shudder whenever there’s a post on the Arduino programming boards whose title is “need help to combine two codes”. Makes me want to kick some twerp who has no clue what he is doing. But mostly I manage to suppress the urge.

    2. As read Josh’s comment the Arduino is a trigger. In the event the applicants fail the task th he givrs the. On failure is the education they are paying for. Additional and respectfully they may not be “that young programming talent” in the event their failure is do their not paying attention to the chosen career beyond what the instructors are showing them Not that I blame the kids because many adult if not most adults are ignorant what’s going on elsewhere in their profession outside their little segment of it. Take away the Arduino away it would be something else that will reveal deficiencies.

  20. I’ll bite…

    I think most of the disdain for Arduino based solutions by engineers come from fear for obsolescence. Generally engineers, both software and hardware really are just one-trick ponies who by chance, during their susceptible years learned some engineering paradigm because that was the trick at that time. Now, with these perishable attributes and an inability to reach a similar skill-level in newer paradigms, most engineers tend to get protective of their little knowledge island.
    This is the main reason why the myth exists that software engineers after a certain age are obsolete. This is true for most, but there are many who actually are flexible enough to get with the times.

    The backlash against the Arduino paradigm by engineers is nothing more than an attempt to keep a new concept out of their areas of operation because it is a threat. Their specific island must remain esoteric and hard to do and these abstractions in technology ruin this, forcing engineers to either be flexible or become obsolete.

    Oil… meet fire!

    1. I don’t do Arduino and go hard mode. You won’t know your own limits and learn new things if you always take the easy way out. Whether it is for personal stuff or work when I do a project, I don’t do short cuts. I try to read up on datasheets/app notes all I can. I do my design up front, use spread sheets to calculate thing and do my simulation. When I do my own project, I jump directly to PCB for the prototype and treating it as if it is ready for production.

      My bosses know me to be the type that can pick up new skills on the run and often assign “high risk” projects to me. I get lots of freedom for getting things on time.

      1. I can relate to this point. Recently joined an embedded engineering team where everyone has minimum 20 years experience in the field (PICs, ST, TI tools). Got some simple projects of my own, got an Arduino out cause I only needed to toggle some pins and read an ADC. I was told to re-write everything for an STM32F4 cause no one in the office wanted to bother to learn how to work with Arduino so it could not be maintained in the future if needed. Luckily found ST’s Nucleo boards as a substitute.

    2. @voxnulla, I hope you’re just trolling. Or else … I just hope someone with such thinking will never be involved in making some critical hardware/software, like automotive, airplane, electric plant or some industry like that. You’d probably just buy Arduino from Aliexpress, stuff it with code dowloaded from Github and say that people who spent more time on that task are obsolete and closed to modern concepts.

      1. Or else what? I admit I over acted the argument, but only citing mission critical life-or-death scenarios as an argument in the matter simply is the other extreme side of the coin here.
        Surely you can agree that the truth will not be either extremes but somewhere in the middle. A fairly simply concept that used to simply follow from reason.

        Ow, and don’t assume to much, you might hurt yourself.

        1. You don’t want the github-arduino-aliexpress route in your toaster either, because it’s unreliable and insecure.

          Remember the case of the Eye-Fi cards that were easily hackable because the developers went the easy way and simply stuffed Linux and a whole web server in the SoC running in the card? You want that in everything?

          1. Again lots of goalposts find themselves shifted…

            I think that if hobbyists can build CNC machines with ATMEL silicon and Arduino liberaries that run for hours on end, a toaster will not be a problem really.

            Speaking about toasters.. For a kitchen appliance that is really simple, how come current toasters are often so shoddy? Surely the EE of that brand knows better!

            Surely 99% of the cases where a SoC is mindlessly loaded with the first off-the-shelf Linux or RTOS distro, it is done in products that actually have been engineered without anything Arduino related. Poor security practices are apparently not mended by doing it the EE way!

            The range of Arduino boards, from 8 bit up to 32 bit arm, with or without networking and what not, is not the main source of unreliability and insecurity.. that fault lies mainly with software and hardware engineers who may but probably did not use an Arduino… not that it would have made a difference.

          2. The discussion has technically moved beyond Ardunos themselves at this point.

            The point was that you don’t want the sort of engineering and engineers that just throw something in because it’s quick and gets the job done. Throwing in an Arduino with code copied from github is just an example of this kind of bad practice.

            And 99% of the cases where a Linux distro has been mindlessly throw in are due to the fact that the developer is developing the system on a PC, and since they’re lazy and inexperienced and unqualified (read: cheap), they’re doing something like writing shell scripts or PHP with Apache and databases, stuff they barely learned at school and stuff that shouldn’t come near an embedded system that can’t be updated.

            And when it comes time to port the functionality to the actual device, instead of re-implementing what they have developed – because the software isn’t exactly portable – they simply copy the development environment as-is onto the device. That’s what happened with the Eye-Fi card – there were even some housekeeping scripts left over in the filesystem, which ultimately enabled the break-in.

          3. And the last point parallels with what happens with Arduinos and engineering.

            The Arduino is a prototyping environment, which you use to hack something together to see if it works. You’re then supposed to re-implement what works on a more appropriate piece of hardware, but because your “Arduino-engineer” is incompetent and cannot actually do that, they simply specify the Arduino into the actual product.

            It’s like cobbling together a mechanical linkage out of LEGOs, and since you can’t be bothered to figure out how to actually manufacture the same linkage or source it elsewhere, you put LEGOs in your actual product.

            To attempt to sell this kind of bad engineering as “efficiency” is just kidding yourself.

    3. More than a grain of truth in this. I grouched when they put generics in Java, and I’m grouching again because lambdas have now been jammed into the language.

      It takes effort for an old dog to learn new tricks.If I were a glassblower or a blacksmith, I’d have mastered the craft by now. But because I program, every year I am having to learn new stuff just to keep up.

    4. If you’d like to keep a job in engineering that requires that you specialize, diversify, or both.

      You paint a pretty broad brush that engineers are really just one-trick ponies.

      If the one-trick happens to be to design the lowest-cost BOM or fastest time to market, or least defects in manufacturing in high-volume, or RF PCB layout then you’ll probably have plenty of work. Take a look at the job boards.

      By all means, keep on using it as your one-trick(TM.)

      Look forward to hearing about how your product compliance testing goes at UL and FCC.

      1. I use a pretty broad brush by stating that most humans are in fact one-trick ponies. Because this is simply true.

        I don’t know if you know or remember, but similar cat-fights broke out between through hole oriented EE’s and SMD EE’s back in the day. Citing quality, security, stability and the “right way to do it”. It is all just protecting their little niche/island.

        This whole UL/FCC argument is also nuts. Using a dev board as a tool does not mean it’s part of a mass produced product anyway. Do you ship an digital 100mHz oscilloscope with every alarm-clock you would sell?

    1. But if you sell me a product that consisted of a Uno and a shield, and a competitor sells a product that does it on one board, I would always pick the competitor, and most likely I’ll save money and get better performance.

      1. That’s a bit shifting the goalposts. The question at hand is whether Arduino’esqe boards have a place in EE, not if they are to replace commercial electronics.
        I say it is a tool for hobby and EE alike. Being snobby about it only stems forth from hatred against anything that might actually make other peoples lives easier.. It often is just that.

        1. Time and time again you see people who have a problem they face while using an Arduino because of Arduino’s limitations, yet they refuse to upgrade. Instead of upgrading, they instead consider the project unfeasible, an opportunity missed.

          Also, if Arduinos based on the 8 bit AVR architecture disappeared, companies like Adafruit wouldn’t bother putting level shifters on all their breakout boards, which I hope translates into slightly better economic efficiency, smaller board sizes, and better power efficiency. To some people, every fraction of a penny and microamp counts.

          At least the Unos, but I don’t see anybody putting in effort to phase them out. Yea, they are adding new 32 bit products, but without using them to their full potential, nobody has a reason to use the 32 bit MCUs.

          We want people to realize there are tools that could be just as easy to use as Arduino, if they just tried them. And then eventually we can phase out the Arduino versions that are holding people back.

          And if 32 bit MCUs get more popular, maybe a decent J-Link equivalent wouldn’t cost $300

          1. “Arduino versions that are holding people back.”
            This and other things could potentially be one of the most idiotic arguments I have recently had the misfortune to read.. What an utterly desperate attempt at… whatever you are trying to do..

    2. This is the same for us at a research university. We primarily use Teensy 3.x boards to collect experimental data and control various experimental apparatuses. As chemical engineers, we don’t need (or have the time or money) to learn what others call “real” engineering to do our research. The arduino platform allows us to quickly adapt to changing research needs without spending (sometimes obscenely) large amounts of money for traditional data collection hardware. For more complex projects, we hire undergraduate EEs to generate PCB files, work with surface mount components, and update/refurbish older setups.

  21. Okay, 27 years worth of engineering experience, here is my take…

    #1 on the list. Is your product going to possibly hurt someone, maim them, make them have PTSD, cause a fire, and so on…

    It is called liability. If a lawyer gets involved, you will be screwed. Why? Well, engineers make good money, but guess who makes REALLY good money?

    A lawyer with an engineering degree. If you use anything and I mean anything that gets sold to the public, you can and most likely will be sued. Don’t believe me?

    Google “talcum powder lawsuits”. Uhh…yeah… (in my best office space voice…go to youtube and type in ‘best of lumbergh’)

    Using a compiler and a language like C and passing it into Microlab and programming a PIC sounds like a great idea. EXCEPT, you are leaving it up to a compiler. The compiler company isn’t going to be sued, and even if they are, they are not part of the “cast deep cast well” policy in lawsuits.

    Wait wut? Well, I have had more than my share of ready to ship code, that won’t stand up to ESD, RFI, EMI and other things. Look at the whole VW thing. If I make a fridge that uses a micro and I can do a brown out situation that leads to the fridge doing stupid shit, like shutting down completely that requires a service call…well…

    Lawyers will be all over this.

    I had a blazing 1998 Fujitsu laptop running WIN 98. By the time the class actions got done, I got not only my original money back, but made some monies…lol…NOT!

    If you dont code as close to the core as possible, you will be sued. We have a bunch of ‘Miltons’ walking down the hall talking to themselves saying 10001011011010010001000111 and their ‘minions’ saying’ things like BSR, BRD, JIBS, and so on…

    Arduinos are great! Do they meet cost? Nope? Do the meet liability? Nope. Are they Open Source? Yep, so nope and so on…

    1. You’ll have liability whether you write your own code or steal a competitor’s design or copy one straight from app notes. Always do your due diligence and use best engineering practices. If you ended up in court, you can show that you have done all the right things even though bad things happens.

    2. Liability is why risk assessments and insurance exist. As long as you are informed, honest, and have a competent assessor, they will tell you if your coverage hedges against the risks of thus type of inclusion in a given product. Then you will know; but, getting closer to the metal and further from known risk, usually equates to LARGER OOP legal expenses.

  22. Would you design a product or even a semi-serious project with a Radio Shack 100 in One electronics trainer, or a Connectix kit or a Little Bits? Of course not. But how many of us got started on some such product? My 12yo nephew has been playing with Arduinos for about a year now, has already learned to pry the Atmel processor out of the board and wire it into a project, and he’s lately made some noise about better performance. Maybe he will continue to study electronics and move on to serious dev boards or microcontrollers. Maybe he won’t. For now he has a better understanding of electronics in general, coding, and driving motors than I did at his age. Data sheets and toolchains aren’t generally approachable for the typical pre-teen. The Arduino does what it’s meant to.

    1. Wait, he’s already stripped a board of its processor and now he’s harping about need better performance? Yeah… you may have given birth to an engineer. He’s going to be doing some crazy things on his road to the top. Have you gotten him a Propeller 2 yet?

    2. More power to him; he’s got me beat…

      I admit that the real power of the Arduino/clone hardware is that it makes experimentation accessible. But, I do not understand why that makes these products any less palatable to EEs. If you only need the functionality already present in the design, why not copy the circuit, delete the through holes, map/route the traces where you want them, and not waste so much time trying to reinvent the wheel to suit your specific purpose?

      My guess: Extra entries in your project log and billable hours.

  23. What is the engineering cost of writing my own USB Bootloader?
    How many hours do I have to spend to set up a tool chain?
    If I want to handle USB devices, or read an SD card, or draw on a TFT display, how long is that going to take me to build, code, debug, etc.?
    If I use some third-party library with some part from Alibaba, how much time will it take me to get it to work?
    Arduino (and Teensy, etc.) are often a good engineering solution because they reduce the engineering cost of getting the device DONE. If you are doing a one-off for a client, for yourself, for a particular task, then you are probably going to save a lot of money using Arduino and Arduino-compatible systems simply for the code you don’t have to write, the interface electronics you don’t have to design, and all the time you don’t spend debugging that part of your project.
    Certainly, it isn’t the solution to everything. Those manufacturing large numbers of units will probably find it economical to roll-their-own and trim the costs way down. Even then, prototyping on Arduino and taking advantage of open-source libraries to get the project off the ground still has major advantages.

  24. I ‘m wondering where you draw the “Arduino” line. To me, Arduino is a set of software tools and a microcontroller with the most basic circuitry needed – power supply and a clock. So maybe you don’t want to see a $30 official Arduino board in a “real” product. Would you be terribly bothered if the engineer put an Atmel ATmega328 into his custom PCB and included a serial programming header? What if they used the Arduino application as an IDE to write the firmware and upload it to that custom PCB? Now is it an Arduino? How about if they still use the Arduino libraries but use make to compile the code with the gcc compiler and avrdude to upload it? Now is it an Arduino? Because what you get with the Arduino libraries (no, I’m not calling them an HAL), is code that’s been used enough to be stable. Engineering is the art of judging how best to solve a problem, which includes when it’s best to use existing designs, and when you need to design something new. All this discussion about “real” engineering is nonsense.

    When an Atmel rep tried selling me AVR controllers in the late 90s (when by the way I was already an engineer), I balked because there would be a bit of a learning curve, and at the time, Microchip was the reigning king in small-footprint micros. That has changed drastically due to the developers of Arduino. Arduino isn’t “training wheels” – it’s a way to get into AVR microcontrollers (and now, others) without having to start at the read-modify-write level of setting outputs. By the time you start running into the limitations, you can dive into lower-level code. And because you’re already comfortable with the build environment and the basics, you’re not trying to learn how to juggle and ride a unicycle at the same time.

  25. I hate the ‘kids have it so easy these days’ mindset that seems to pop up around Arduino. Today’s new kids didn’t hand-punch their TCP/IP requests in COBOL or whatever bare-metal badge-of-honor crap you had to slog through in your engineering degree. Your predecessors in engineering were probably looking down their noses at you for having fancy transistors and integrated circuits and Heathkit kits when you did your electronics learning. Technology changes and we have to accept that sometimes the new generation has it “easier” starting out.

    On the topic of Arduino in engineering, of course you wouldn’t be likely to ship a whole arduino in a product unless it met your needs. In my work I’ve seen Arduino and Rasberry Pi used as parts of low-volume test fixtures, where the off-the-shelf nature and easy programming make it easy to build a few dozen test fixtures and have spare parts on hand overnight-delivery instead of custom-building controller boards. If the test is simple enough the engineering cost strictly dominates the time cost of spinning a custom board.

    The whole thing can be put together by a software team with no EE support. For me as an EE that’s a great thing since it keeps me from having to support a custom-rolled board and lets me focus on end-product instead of fixture maintenance.

  26. Arduino tech is cool. Just don’t have a use for it at this time. I personally need something that has a high refresh rate, can keep up with data transfer, is easy to integrate into a high end chip such as archs with FPGA, x86, MIPS or ARM.

    I don’t like the unpopular puffins meme-tics,. but in the case. The the only proper AVR application I’m interested in is testing and using is for testing NOS vacuum tubes for micro-tube tech.

    UTracer is a mashing example project.

    Or monitoring Fermentation levels in beer.

    Unless I need to refurbish my mom/dad’s washing machine and drying OR hack a Toaster oven for re-flow, I see little or no use in data collection and applied Physics tests. I have little to no reasons to apply Arduino for “Real Engineering”.

    I would not mind using several AVR’s for controlling lighting, moisture sensors or basic physical security projects.Arduino. Beyond that *shrug*. What?

  27. I have had to fix a sufficient number of “products” containing Arduinos that I will never ever use them in a product that ships. The simple reason for this is that the Arduino platform heavily relies on the single most failure-prone component in modern electronic systems: the connector. All of those header pins that connect an Arduino with one or more shields are just bad connections waiting to happen. And believe me they will happen, and they are a nightmare to track down.

    I can whip out a pcb pretty quickly; simple ones in less time than it will take me to hook up an Arduino to whatever custom prototype that I want to control, so I’m better off going down that route, anyways. Regardless of that, I have made it a practice to pin out unused pins on my PCBs, so I usually have a choice of convenient boards on hand that I can easily modify to meet my prototyping needs.

    I’m usually choosing my micros carefully based on the on-chip peripherals, too, so being constrained by the chips available on an Arduino also is a minus for me.

    As an educational tool, they are pretty good, but even then they cause problems. I’ve had to deal with more than one engineer fresh out of school who has no idea how to proceed without an Arduino. Is that a failing of their school? Of course, but with budgets being cut back all over the place, I saw over the course of my grad school and post doc more and more courses relying on Arduinos to fill the lab equipment gap.

  28. I started using Arduino towards the end of my Ph.D five years ago, and almost immediately wished that I had known about it sooner as it would have really helped me during those dark days! Having done two years of C++ during my undergraduate. Physics degree, and using C++ a fair bit during the Ph.D programming MRI scanners, I would consider myself an intermediate programmer, but despite I really welcomed the simple workflow offered by Arduino. Yes there are limitations, but it doesn’t take much searching to find out about them (or even test for example digital write vs port manipulation with a scope), the source code can be explored, and AVR calls can be made rather than Arduino.

    Since then I have used the Arduino codebase as a base for many projects, most of which i prototyped with an uno and then moved on to a custom PCB. I think this is a pragmatic approach, keeping the benefits of arduino for the code, and moving to a more application specific, robust form factor. In fact today in a few hours one of my designs will go into an MRI scanner – its a flow controller for fluid being pumped around that is scanned, a phantom. For the moment the Arduino codebase works well, in fact the core setdirtyunctions are probably far more tested than some AVR code I would write. The community libraries are a boon, and great for fast development. For a commercial product they may not be suitable for licensing reasons (GPL for example requiring source code to be released), but it’s not hard to roll your own.

    Major drawback is the IDE, but there’s Visual Studio or Atmel Studio and Visual Micro. Also, for something quick and dirty (i.e. custom blink to test hardware) it’s quite handy. Other gripe is the way libraries are structured, but once again using something more advanced like visual studio gets around that and allows a workflow that is more suited to version control systems.

    As an aside,w programming an MRI scanner is very high level hardware abstraction. The vendors provide mixed support and don’t always tell you how the hardware works (which you’re meant to be controlling!). In comparison Arduino isn’t so bad. In fact learning about Arduino, and subsequently microcontrollers in general actually helped me understand the MRI hardware software interface better!

  29. I mostly use bare ATMega ICs, flashed with the arduino bootloader.
    This allows me to do quick and dirty development, to get from idea to working prototype (we all know the brickwalls in-between).
    If I’m then serious about the project and think it needs better code, I can just redo my code in AVR-C. It’s easier for me to port the code afterwards and then I also know what’s going to be required in terms of hardware and libraries.

  30. I myself am making an Arduino-compatible ARM-based PLC for industrial control using one of the same Freescale K20 series of chips as the Teensy. The main goal is to have an ultra-reliable PLC by using CAN bus, since it has no master/slave like RS485, so if one controller fails the rest of the system can keep communicating with each other.

    I know Mauswerks is making a Teensy-based interface to talk between the CAN bus of his BMW 3 series’ body control module and the CAN bus of a Lexus hybrid’s gearbox which he’s repurposing to convert the BMW to electric.

    The AVR-based Arduino chips don’t really have the horsepower to do many advanced tasks and there are cheaper equivalent solutions for end products, but the Teensy’s K20 system-on-chip is designed for embedded controls and isn’t that expensive for small product runs.

  31. Thinking a lot about this, I think my root problem with Arduino is it’s needless fragmentation – why could they not have just done it in C or C++ with some nicely made Arduino libraries / includes / templates / examples that did the hard stuff for you, why reinvent the wheel with a new language (or new dialect perhaps)?

    Far from being a helpful lowering of the barrier, it’s moving the barrier up the road and putting a lower one where it used to be.

    I can’t find the link now but there was an excellent article a while back about how fragmentation is hurting open source, and I feel this applies to coding too – if people learned coding in C or C++ _through_ Ardunio because that was the easiest to get started with, they’d be able to move to other platforms much more easily. If they learn to code in Arduino they can’t go and start tinkering with Linux without re-learning a load of stuff, pointlessly.

    Also, ref “knowing no more than you need to know to get the job done well” – you don’t know how well you’ve done it until some hidden function comes back to bite you in the arse 6 months down the line. That’s fine for your rapid-prototyped artisan smoothie drone kickstarter but when you start building that shit into anything safety-critical you need to know what all the code does and what happens when it doesn’t.

  32. I am not an EE, but I am an engineer. I have used arduinos in the pilot plant when I needed something that would work very quickly that I couldn’t get off the shelf in the time or at the price that I needed. I have made simple controllers for tank temperature all the way to a cobbled together simulated moving bed chromatography test rig. I use arduinos for this because I just need the device to work, it can be super ugly and kludged together and no one will ever care.

  33. Arduino is great for low cost equipments. In my bakery I developed a Modified Atmosphere Packing Machine and a Bread Fermentation Chamber. The first one is used tu increase bread’s shelf life by extracting the air, replacing it with CO2 and sealing the plastic bag. The second one is used to keep the dough at 30oC and 80% humidity during the fermentation process. In both cases, Arduino (Nano) is the “brain” but there’s a myriad of sensors and actuators on the backstage. Long live Arduino ;-)

  34. Do yourselves a favor and read the scope of these standards / requirements / trace-ability documents.

    EN/UL60730-1 including all Annexes
    UL60335-1 including all Annexes.
    Class B and Class C software libraries.

    If you are tasked with designing a product that falls under one of these categories, carefully consider the design of your product.

    Here is my OneTrick(TM):

    How many of the RealEngineering(TM) Arduino projects have you designed and completed followed a design specification including a risk assessment. If the answer is “There is never a spec.” then no, you’re not doing Real Engineering(TM.)

    Good luck to you all in your endeavors and learning.

    For “Just get it done quickly, to hell with reliability, etc.) I guess I don’t understand why PSoC’s aren’t more popular with the Arduino crowd. They are a microcontroller core and FPGA and you can write high and low level code for both, or use a HAL, the compiler is free, devkits are $4, etc.

    1. PSoC is beyond the understanding for that herd. Arduino is all about user lock-in with their crippled “language”, crippled IDE and mess. It is a system for noobs designed by noobs.

      From a non-Arduino user point of view, I was excited about the PSoC4. I got the $4 dongle ad even some chips they were promoting at $1. I read the datasheet and try to play with the IDE. There are some disappointments on the peripherals and their IDE doesn’t support 3rd party SWD debugger other than their own SWD debugger. The amount of logic is equivalent to the old PAL chips and not even close to a CPLD.

      Then the promotion ended and their regular price went back up to what other CM0+ chips cost. So the price advantage is gone. I would more likely to use some other CM0 or CM0+ chips as I am not afraid to jump to a completely different vendor depending on how closely match a uP I need for a project. CPLD’s are cheap and have lots of resources and I have no problem using any of the offering on the market if I need that too.

  35. I’m an EE and I love using the Arduino system for building test fixtures and prototyping new ideas.

    I’ve used them to drive an ADC on a very low noise data acquisition module before we had any of the other parts built up to plug them into. It took an afternoon and I went from untested modules to characterizing their noise profile because I didn’t have to muck about with setting up all the registers and understanding the internals of the architecture just to get it to talk to the computer and the ADC.

    It’s great to be able to pull out a few bits of hardware and get something functional within an afternoon that you can take and refine and refactor as needed in the final project. Sometimes having a demonstration that your idea works the way you think it should is enough to make the project successful or not.

    Does Ardunio belong in EE? Absolutely. Like others said, its a tool and it’s up to the engineer to use it where it makes sense.

  36. Using a development board+custom shield stack in a product can seem like a great time and money saver up until you realize that to a close approximation, 100% of electronics failures are interconnect failures.

  37. Wow what a diverse discussion! The Arduino is very much like the original IBM PC. The PC was a bunch of off the shelf chips with an Intel 8088 processor. IBM only expected to sell a few hundred thousand and all “real” computing would be done on a mainframe. The software applications for personal use exploded; the internet made information available so now anyone can use a computer for many different things.
    The Arduino is very similar. It will evolve into better, faster, easier to use controllers.
    Many final products for specific devices will still need custom circuit boards, more miniaturization, and optimized code to function well. If you look at medical devices; I certainly wouldn’t want an Arduino in a pacemaker. But if an engineer can develop prototypes with an Arduino research and development could test more ideas faster and at a lower cost everyone wins. R&D can be very expensive and take a long time; the Arduino is ONE tool that can help.

  38. The lack of timing stability in Arduino has screwed so many students, and left them with crummy projects. Plenty of people who have come through my lab think they can get out an arduino and do some bit-banging to drive the sensor-du-jour, a line scan camera or something.

    But, just doing a busy-wait pin toggle, the waveform jitters on an Arduino. As Josh points out, there are sometimes massive overheads for simple operations, too.

    It is also kind of infuriating that the Arudino has gone down this path of having so few hardware resources. The basic (but expensive) mbed has dedicated PWM pin (which they don’t call “Analog”), and dedicated I2C and SPI.

    1. You CAN bit-bang accurately on an Arduino – you just have to write to the ports directly rather than using the port I/O macros. Just because you have tools that make it easy to do things poorly doesn’t mean you have to use them.

  39. For what it’s worth, I don’t write much code in C when I have the option to use a framework. Why? Because the framework prevents me from re-writing the same low level code a thousand times. It’s not about being lazy, it’s about being efficient. The time it takes me to use a framework is far less than it would be if I started out trying to do the same thing with C.

    The same thing can apply to microcontrollers and hardware. I don’t actually use the arduino very much, but I have used it in a few places where an 8bit micro was sufficient. Even then, I don’t tend to just go with the arduino language. That datasheet that no one wants to read seems to have some rather easy to use example code that can be dropped directly into the arduino IDE. You get the best of both worlds in that case. Direct access to the hardware and some of that code is written for you.

    Those that complain about timing requirements, really should read the sections of the datasheet regarding the timer resources. You’ll be limited to not using some arduino functions that rely on exclusive access to the timer, but if you’re handling the timers directly, you probably don’t need those functions anyway.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.