Choosing Arduino board for first-time project

I am new to microcontroller applications, and Arduino seems a good place to start. I am a retired EE, and while I've done work in analog electronics and higher level computer programming, including working with C, I have scant experience with microcontrollers. In addition to static research, I would like to engage in some live interaction in helping me choose a starting device, as I am not getting all my specific questions answered.

I have a real-world application I would be using this on. I will be modifying a modern washing machine, replacing the OEM electronics with my own design. This is so I can improve UX as well as eliminate some inherent bugs on this model.

I read that the recommended model for the beginner is the Uno, with boasts that it is so widely supported and documented. The idea of a replaceable chip is also appealing. Offhand it would appear that it would be simplest to just go with that device, however there are some concerns I would like to get cleared up.

Firstly, I will be using macos, with 10.13.6. With that said, and maybe this applies to all Arduinos in general, I have read of issues where some macos's will not interface with Arduino boards as they are not on their whitelist, mainly El Capitan. I have read of some hacks to get it to work, but I am not inclined to start hacking my OS in this way.

  1. Is this no longer an issue on later OS versions (such as High Sierra or later?)

  2. Would I be best off only using Arduina branded products to avoid issues like this?

  3. Should I only stick to Arduino-branded products to avoid this issue (and/or possibly other issues?)

Another concern I have is 14 digital I/O ports (as with Uno) might be a bit limiting in my project, necessitating multiplexing inputs, implementing DAC, or some other jiggery. So I was also looking at the Leonardo and Micro, which from what I can tell, have 20 digital I/O ports capability[1],.

  1. Would I be losing much in the way of support and documentation by choosing these boards?

  2. The Leonardo and Micro boast that their USB connection is recognized as a keyboard or mouse, is there an advantage to this? Would this help avoid issues created by non-whitelisting of products by macos?

Also, one last question, regarding supply voltage, it appears in the specs for these, the nominal supply voltage is 5V. However, I was reading somewhere (don't recall where now) that these boards can be powered off of 12V externally. Is that correct? 12V supply would be more convenient for me.

[1] It would appear that the only difference between the Uno and Leonardo is, where both devices have 20 I/O ports, and both devices have 6 analog input capability, with the Uno, the 6 analog ports are analog input only, leaving only 14 I/O ports capability, whereas with the Leonardo, they can be configured as digital I/O, giving a total of 20 possible digital I/O ports. Do I have that correct?

You have done a lot of research. Being an EE You are well fit for this project, You have surely considered the humidity in the environment. 5 volt is commonly in use as well as 3.3 volt but I assume that power consumption will not be an issue. Feeding those controllers by 5 volt wil reduce the power dissipation in the poor 5 volt canverter onboard.
Do You have a summary of the need for I/O? You menthed 14. What kind of sensors are You using, thinking about voltage levels as well as current/voltage need for the outputs?

KevinJones:
[1] It would appear that the only difference between the Uno and Leonardo is, where both devices have 20 I/O ports, and both devices have 6 analog input capability, with the Uno, the 6 analog ports are analog input only, leaving only 14 I/O ports capability, whereas with the Leonardo, they can be configured as digital I/O, giving a total of 20 possible digital I/O ports. Do I have that correct?

The UNO's analog input ports can be used also as digital input or output.

Note: A4/A5 are also configurable as an I2C port (like to a display). Naturally, if they're used for I2C they're unavailable for digital I/O.

  1. Can't really help with MacOS. Windows yeah, Linux somewhat, Max nope

2/3) No, clones are fine as well. Most just use an off the shelf USB to serial chip of which I doubt you have trouble with MaxOS. But again, know little about MacOS (at least after the switch to the OS X ecosystem).

But if you do go for a clone (and I do as well) it's nice if you make a donation. A large portion of the price of a real Arduino is used to improve Arduino.

Part 2:
A Uno has 20 digital IO. Analog in (ADC) is only an extra function of the A-pins :wink: Although like most Arduino's you should avoid pins 0 and 1 because they are also used for serial. Aka, don't know where you read that nonsense :wink:

But I'm not really a fan of the Uno form factor, I think a Nano (not one of the new an confusing Nano BLE etc) or a Pro Mini are way easier and are already perfectly fine for a final design. And they are dirt cheap. They use the same processor as a Uno (aka, same level of support) with the difference between the Nano and Pro Mini being that the Nano has USB where the Pro Mini needs that external at the benefit of being smaller and cheaper.

  1. Although their support is pretty fine, nothing can beat the support of the ATmega328p based boards.

  2. If you don't want you're washing machine to be connected to you're computer as a keyboard, no :wink:

  3. Yes, they have an onboard voltage regulator. But do note, when supplied from 12V they don't really have spare power for external devices. So one or two leds is fine, for more use an (extra) external (DCDC) converter.

I don't know anything about Apple PCs so, hopefully, someone else can respond to those questions.

From what you describe about the project I can't see any value in a Leonardo or Micro. The extra capabilities of their USB connection would be most useful if you wanted to control a PC.

If you need more I/O pins then IMHO a Mega is the obvious choice. It also has more program memory and SRAM. Clone versions of the Mega are not expensive, but (obviously) I don't know if they would work with a MAC. Also, buying a genuine Arduino helps to support Arduino development and this Forum.

You mention "so I can improve UX" which I presume is short-hand for "user experience". If so, you have not described how those improvements might manifest themselves. If, for example, you envisage creating a touch-screen control system there are some Arduino libraries for that but it would be a good idea to identify a specific model before deciding on an Arduino in case there are specific requirements for the display.

You can certainly power an Arduino from 12v but the circuits work at 5v and everything connected to the I/O pins must respect that. Also the I/O pins have very limited current capability (about 20mA and 40mA absolute max) and that may mean that you need extra circuits between the Arduino and the stuff it will be controlling.

Whatever Arduino board you choose I reckon this is a complex project and you should break it down into lots of small parts and learn each of the separately before trying to join things together.

...R

As a beginner I would say buy at least one genuine board and several cheaper clones. You can use the genuine board as a reference for when you encounter weird behaviour in the clones. Think of the clones as being expendable devices.

I would suggest that you skip the Uno stage completely as at some point in the project you'll almost certainly encounter low memory problems that can result in hours of frustration, disillusionment and consequent project abandonment. Something like the Mega2560 has more memory and hardware interfaces than you'll probably ever need for a washing machine and is compatible with most libraries.

Shields are mixed blessing. Many seem to be overpriced for what they contain. Often you will find smaller boards that have the same chips at a fraction of the price.

I very much appreciate the ample support provided by the community. Thanks very much. I think it would be simpler to respond to all the feedback in a single reply.

Railroader:
Feeding those controllers by 5 volt wil reduce the power dissipation in the poor 5 volt canverter onboard.

Point taken. I assume you know what you are talking about when you say "poor."

Railroader:
Do You have a summary of the need for I/O? You menthed 14. What kind of sensors are You using, thinking about voltage levels as well as current/voltage need for the outputs?

I don't have it nailed down yet, the device I choose will have a role in determining that. My ideal would be to use all digital input. In this case I would be using rotary encoders for all selector switches (typically 3 or 4 position each, so two inputs required for each x 5) for all user input. There is also a pressure transducer, if I go digital it could require 4 or more pins (but that would depend on how much resolution I really need, and what is available.) As far as voltage levels, I could pretty much choose what I want.

I need minimum of 6 outputs, which will be triggering MOSFETs, so the current and voltage levels are virtually inconsequential.

Obviously this is right at the limits of the Uno, and wouldn't leave me any room for any extras. However I could compromise and use pots for up to 3 of the selector switches, and an analog pressure transducer.

(etc)

Well that helps clear a lot up, thanks.

(etc)

I will just get an Arduino board then. Does it matter if it is purchased off the Arduino site, or Amazon or even Adafruit?

septillion:
Yes, they have an onboard voltage regulator. But do note, when supplied from 12V they don't really have spare power for external devices.

Give me an electronics lesson here, why would supplying from 12V reduce the power available for output, compared to supplying power with 5V?

Robin2:
Also the I/O pins have very limited current capability (about 20mA and 40mA absolute max)

I assume that is 20mA per pin, correct?

mikb55:
I would suggest that you skip the Uno stage completely as at some point in the project you'll almost certainly encounter low memory problems that can result in hours of frustration, disillusionment and consequent project abandonment. Something like the Mega2560 has more memory and hardware interfaces than you'll probably ever need for a washing machine and is compatible with most libraries.

I would say you are most likely correct. It would certainly allow me to breathe easier. I will probably just purchase a Uno to get my feet wet, get familiar with using the IDE, and go from there. The cost of the Uno is relatively small (even for Arduino,) and if I upgrade I can probably find a use for it elsewhere.

One advantage to using Uno is that it would allow me to program the chip, then remove it and place it in the main circuit board and have a more integrated solution.

My Mac has been used to program Arduinos since 2011 so I've gone through multiple versions of the O/S programming genuine Arduinos and Teensys. I've never had any issue with being able to get them to interact with the Mac. I'm currently on the same version of the OS as you are.

electronics tech since 9th grade. my advice comes from a different place, and goes in a different direction

the mini mega 2560 sells for chump change, and has the most of everything. 4 hardware serial ports, multiple ports for port manipulation, just on and on

If you always and only use mini mega 2560s, every board you have can be reprogrammed and swapped into any other project as a spare. you can stock up and use them for any project. you don't run out of RAM before you run out of ideas

generic advice: don't buy any module with 0 or 1 mounting screw hole. anything less than 2 and you get a board that shifts or swivels.

get a slab of phenolic or plexiglass as a physical breadboard. drill and tap from the bottom for mounting screws. insert screws from the back to act as studs. put a nylon nut on top to keep the pins clear of the substrate. physically stabilize your modules to reduce the number of times you accidentally yank a pin. use 2-56 & 4-40 coupler nuts to screw them down. big enough to allow installation and removal without tools

get a mini breadboard and glue it to the substrate. get a dual row header and set one up as +5 V and power. use another for I2C

do not power anything through the Arduino. power the arduino through the V IN pin. get a Mean Well brand switching power supply for a power source, or run it from a computer power supply

make long harnesses with a header for the module end. get it right and make a strain relief with RTV or hot glue. I label mine with a vinyl tape label maker, label facing away from the board, so everything gets attached to the right module facing the right way. when you harden up the project you just cut the leads down and connect to a header on the arduino.

KevinJones:
I assume that is 20mA per pin, correct?

Yes, but there are also other limits - I/O pins are in groups of 8 on separate Ports and there are also per-port limits. See the relevant Atmel datasheet.

...R

wildbill:
My Mac has been used to program Arduinos since 2011 so I've gone through multiple versions of the O/S programming genuine Arduinos and Teensys. I've never had any issue with being able to get them to interact with the Mac. I'm currently on the same version of the OS as you are.

Reassuring to know, thanks! Something I read indicated the problems may have been on some Chinese products where they used a different chip for USB.

Different to what?

The CH340 is pretty much the "standard" chip now, Chinese designed and made. :grinning:

OTOH, the attitude of FTDI, the maker of the "original" chips has made it such that their products are better avoided. :astonished:

Well, I just went ahead and ordered a mega 2560 from Arduino through Amazon, should be here in 2 days. Looking forward to getting started.

Thanks for all the useful input and helping me decide.

One thing that is a curiosity for me, the spec and others here recommend powering the board at 5V, however the spec says recommended input voltage range is 7V - 12V.

I am wondering why the input voltage range is so high, when Vin HI is VCC + 0.5.

It would be nice if I didn't have to use a dual supply.

I started with a starter kit from SparkFun - all the parts and instructions in one package and yes a UNO - but to me the cost was not a problem - NOTE!!!! - doing real time control with C/C++ is very different than standard C and will take some getting used to. And do things one at a time and get it working before moving on to the next step

KevinJones:

septillion:
Yes, they have an onboard voltage regulator. But do note, when supplied from 12V they don't really have spare power for external devices.

Give me an electronics lesson here, why would supplying from 12V reduce the power available for output, compared to supplying power with 5V?

Uuuuh, I should have thought about this a little longer. Assuming it is using a linear regulator, higher supply voltage results in more power dissipated from the regulator for a given current, thus lowering the maximum current drain on the device.

KevinJones:
One thing that is a curiosity for me, the spec and others here recommend powering the board at 5V, however the spec says recommended input voltage range is 7V - 12V.

If you have a regulated 5v power supply you can power the Mega directly through its 5v pin so that the onboard voltage regulator is not used.

...R

Robin2:
If you have a regulated 5v power supply you can power the Mega directly through its 5v pin so that the onboard voltage regulator is not used.

...R

Yes, I get that. My question had to do with why the input pins are recommended at 7V - 12V, with the minimum being 6V.

The 5v pin goes directly to the processor and bypasses the voltage regulator

The 7v to 12v uses the onboard regulator to produce 5v to the processor

The voltage regulator has a drop in it - so the 6v minimum is to make sure the output of the voltage regulator will be able to produce enough voltage for the processor to run properly -

KevinJones:
why the input pins are recommended at 7V - 12V,

There are no "pins" (plural) that are recommended for 7 to 12v. There is a single Vin pin that can be used to take power at that voltage and there is also the barrel jack.

...R

KevinJones:
Yes, I get that. My question had to do with why the input pins are recommended at 7V - 12V, with the minimum being 6V.

As Robin has said, this refers to one input pin - "Vin" (or "Raw" on other boards). Also described as the "Barrel jack" which connects to this via a diode.

This is a very sad memento of just how long ago the Arduino was devised. It was a time long ago before switchmode power supplies when many or most data appliances were powered by 9V transformers ("wall warts" or "plug packs") either AC or DC and had to have on-board regulators to produce 5 V.

Those early Arduino designs had a regulator on-board, but with virtually no heatsinking, it can barely power the microprocessor chip itself. Much more recent Arduino designs have a proper switchmode regulator on board but if we are talking about UNOs or Mega 2560s, it is best to completely ignore that useless regulator and provide properly regulated 5 V - to the "5V" pin.

What continues to mislead people is that the Arduino references for these older boards which mention powering from other than 5 V, have not been updated for many years to acknowledge the advent of switchmode power supplies - such as common "phone chargers" with capacity of 5 V at 2.1 Amps and more.