On “Not using an Arduino”

djsfantasi

Joined Apr 11, 2010
9,237
I think I understand why you would think that way. I do a lot of non-PLC programming too, so I have one foot in each frame of mind.

How often in the development of your software
Scratch that...
How often in the use of paid, "stable release" software from a reputable source other than yourself (ex: MS Office), are you met with a weird error or an unresponsive window?
For me, pretty often. At least once per week. If I went a whole year with no hiccups I would consider simulation theory in earnest.
Now imagine if any of these events could result in death, maiming, or the loss of millions of dollars.
Once in a year would be too often.

The instruction sets in a PLC are simple and have predictable, stable behavior. Decades of experience have gone into making them as safe and reliable as possible. There are reasons behind the way things are done, and most of them are documented on a plant floor somewhere in blood.

Sorry if you've heard that mantra before. I feel like I might be banging a drum that's banged too often, but that might just be because I hang out on PLC forums too. Just trying to explain the PLC mindset because you said you have zero understanding of it.
I’m also prejudiced in that regard. I once wrote an entire search subsystem for a proprietary hierarchical database, including searching a free-form field. It took me 72 hours and ran bug-free for 10 years.

So my experience is if you know what you’re doing, are careful and control your own interfaces, you should expect to write bug-free code.

But your explanations of coding for the PLC are excellent and I’ve learned from them.
 

geekoftheweek

Joined Oct 6, 2013
1,429
I know my original "not Arduino" was simply due to the price of the physical board. I didn't know what a micrcocontroller even was at the time, but after a little research on the Arduinos and Parallax stuff I saw at Radio Shack while looking for a connector to fix an audio cable it didn't take long. I had some experience with programming so learning something new in that respect was a welcome challenge. I ended up getting started with PICs before I figured out what was at the heart of Arduinos. I still haven't tried any Atmel micros as PICs have been able to do everything I wanted.
 

Thread Starter

Ya’akov

Joined Jan 27, 2019
10,246
I know my original "not Arduino" was simply due to the price of the physical board
I think you touch on a very important point here. At that time, evaluation/development boards were not the target of the end users effort, the MCU on the board was. The boards were intended to allow an engineer to evaluate the applicability of a part—an MCU, a sensor, a peripheral, &c—to a particular product, not to have the board be used in the deliverable.

For this reason, dev boards were not usually particularly cheap (though some companies, like TI, seemed to have a strategy to sell them as loss leaders to promote the subject device]. Some were outright pricey. But for those cases where the cost was in a reasonable range, it did attract hobbyists who would target the board as the device rather than the bare chip on it.

That was the root of the Arduino. Things have changed in the Arduino ecosystem world to the point that dev board is an odd anachronism. It is now, thanks to the "Duinoverse", the exception rather than the rule for someone to use a dev board to test out an MCU, sensor, or the like.

Instead the dev boards are components, as are the BoB (breakout boards) which have also sprouted necessary passives and even things like voltage regulators and indicators to make these microsubsystems which mostly get used as-is, never making it to bespoke board as the end product.

This is not to say no one using the Ardunio ecosystem is not targeting the barre chips, intending to move the hardware to a single board at the end. This is not uncommon but it is a very small portion of the total number of the various boards sold into the Duinoverse. (e.g: ATTinyXX, ATMegaXX, ESP32-x surface mount modules, &c)

So while the idea that a dev board is the target component is the normative case in the Duinoverse, the opposite is true in the work of professional engineering. In fact, I don't know of a dev board that has made it into a product in this realm as a component, and while it may exist, I can't provide an example¹.

So taking PIC as a case, since you mention it, compare a PIC dev board with an Atmel dev board in real world terms. The EV10K72A (which Microchip calls the "Curiosity Nano Evaluation Kit") is a PIC24F evaluation board not unlike the Arduino Nano in form factor and on-board hardware².

But it is produced in far smaller numbers for a far smaller audience than the Arduino Nano and particularly the many clones of the Arduino board which, while regularly referred to as a dev board surely should be called an MCU board or something of the sort, since any development done targets applying the whole board, and so there is no distinction between the deliverable at the end of the process and the board used in development of that deliverable.

Here we have Mouser's listing for the EV10K72A which sells for $21.31. Newark has it for exactly the same price. An engineer wanting to develop for the PIC24FJ64GU205, or something in the family, will be looking at something around $2.15 each in small run production quantities and even less for higher volumes. So $20 to become familiar with the product is almost literally nothing.

Contrast the hobbyist, or inventor-cum-engineer who isn't from a background where the disciplines, arts, and crafts of the professional design engineer are part of the normal equipment for product development. The idea that a dev board is actually a component of the ultimate product rather than a tool for design/development is rather compelling. Such a person seeing a price tag of ~20 bucks a pop is not going to be smiling.


1662980765870.png

So then let's look at the world our citizen of the Duinoverse inhabits. For sake of example, we'll take AliExpress as the counterpart for Mouser, et al, in the "real" world of engineering. First, interestingly, we find no clones (or at least no admitted clones) of the EV10K72A but a listing that is available is selling a version using the similarly priced PIC32CMMC00 for a staggering $55 plus shipping. Clearly the people who are frequenting AliExpress are not going to consider the board as viable.

1662980517696.png
In addition, Duinoverse inhabitants begin with some assumptions. Among these is that the target device is going to be supported by the Arduino ecosystem including its IDEs, libraries, and programmers. This itself makes the PIC other-worldly but even if we ignore this show stopper and assume it could be worked around, the cost for what looks like the equivalent of an Arduino Nano clone is mind blowing. A typical listing for such a board has it for $2.45 with $1.75 shipping which will reduce as a portion of the unit cast as the quantity increases.

1662980706293.png
This makes even single piece purchases $4.20, more than the single unit cost of the PIC itself but given the small numbers that are involved in the Duinoverse the add-on cost appears insignificant. So the average browser on AliExpress looking for an MCU to work with is going to see (albeit with naïveté, but sincerely nonetheless) nearly $60 for a PIC and under $5 for an "Arduino".

Your first foray into the world of hobbyist microcontrollers was into a state of affairs beginning to be shaped by the Arduino zeitgeist but not yet in its sway. In fact, the BASIC Stamp can be seen as an early attempt to create an Arduino-like experience for hobbyists and engineers not versed in the black arts of the unvarnished embedded world. The Stamp (looking so primitive in retrospect, yet very innovative in its time) and the arcane and very odd Propeller which had a lot of interesting capabilities but was its own world isolated from everyday experience, were competitive with the Arduino (boards) when Arduino (organization's output) was all that Arduino (ecosystem) meant.

But it could never stay that way. The Duinoverse arose from a confluence of the AVR MCU and it's cheap and cheerful nature, the open source aspect of it all, which ensured it would be extended by users who cared about it, and the prodigious output of the electronics development and manufacturing behemoth centered around Shenzhen. These thing might not have been clear at the time but in retrospect the Duinoverse appears an inevitability.

The reflexive nature of the Duinoverse, where cause and effect liberally trade places and can't be pinned down, makes the impetus of expansion, refinement, and accessibility of that world massive. There is no doubt that it has changed everything about embedded development for the overwhelming majority of people now participating. There are certainly areas of MCU-related development almost unthinkably large in magnitude, yet small in number of instances, that have nothing to do with the Duinoverse—alternatively eschewing it by circumstance and by intention.

But in the world where the "Arduino" is a tool, wielded with skill and finesse, or like a hammer driving screws, it is effectively "all you need" to do some amazingly useful work when the numbers involved are not industrial in nature. This, while the tools suited to the industrial scale work are quite unsuited to the core Duinoverse activity.

It would be interesting for you to have encountered the Arduino for the first time in the current conditions. I suspect the outcome would have been different. Even in the case where small PICs are very useful (a sort of DIY ASIC to control a device too simple for a CPU-level effort but too complex for discrete components), that same thing now looks a lot simpler to the Duionoverser done with an ATTiny13A or 85 than jumping out to a situationally unfriendly odd new world.
__
1. This is not ignoring the modules like the ESP-xx(xx) offerings that include castellated pads to allow direct use as an SMD. These are used quite frequently, but often purely as a way to get WiFi connectivity, ignoring the native capability of the device as an MCU in its own right. Still, the ESP-xx(xx) dev board uses the module but adds things like USB TTL⇆UART connectors and chip, voltage regulation, indicators, and other things. So the Duinoverse uses the board, the other world uses the module.

2. An important difference is that the PIC board includes a hardware debugger. This would almost certainly be lost on the overwhelming majority of Duinoversers who likely don't even know what a debugger does. Just like most autodidact programmers don't use debuggers, the average Duinoverse denizen could probably not explain what a hardware debugger is, never mind why or how to use one. Most debugging is done with print statements, and so such an added value isn't one for those who have as much use for it as they do for a JTAG connector.
 

Attachments

geekoftheweek

Joined Oct 6, 2013
1,429
@Ya'akov I did end up ordering a few PIC evaluation boards in the beginning to use to get started curiously enough. Had I known then what I do now about Arduino I probably would have picked up a few kits from Radio Shack and got busy learning.

Evaluation boards are a good choice for learning, and general tinkering, but like you said they aren't good for a final product. I wasn't wanting to spend $20 - $50 on every project when a $2 - $5 PIC could get the job done.
 

nsaspook

Joined Aug 27, 2009
16,330
PIC dev boards just like the "Arduino" dev boards are stepping stones for professional systems. I used several PIC dev boards running the same base software using the Harmony PLIB framework common to PIC32 controllers as the hardware platforms for a custom board with a PIC32MK MJC in a much PCB smaller package with just the parts I needed with industrial quality components for the ADC vref and accelerometer in addition to the normal set of serial, SPI, can-fd, analog and other I/O capabilities.

PXL_20220912_171557608.jpg
https://forum.allaboutcircuits.com/threads/pic32mk-mc-qei-example.150351/post-1618239

https://www.murata.com/en-us/products/sensor/accel/overview/lineup/sca3300
https://www.mouser.com/datasheet/2/256/MAX6126-1515782.pdf

PXL_20220912_162926725.jpgPXL_20220912_163145977.jpg
 
Last edited:
Top