Go Down

Topic: Choosing Arduino board for first-time project (Read 717 times) previous topic - next topic

KevinJones

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?

Railroader

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?

Use Your knowledge. If that's not enough, look for education.
Having knowledge, think outside the box to gain more of it. Only trains run like the train, on the rails. The rest run between the rails.

dougp

[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.
Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!

septillion

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 ;) 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 ;)

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 ;)

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.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

Robin2

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
Two or three hours spent thinking and reading documentation solves most programming problems.

mikb55

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.

KevinJones

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.

Quote from: 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."

Quote from: 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.

Quote from: dougp, septillion
The UNO's analog input ports can be used also as digital input or output.
(etc)

Well that helps clear a lot up, thanks.

Quote from: septillion, Robin2, mikb55
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.
(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?

Quote from: 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?

Quote from: 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?

Quote from: 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.



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.

Geek Emeritus

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.
All PMs will be deleted unopened due to arrogant argumentative pot stirring Malfoys.
 If you have not read "How to use this forum - please read", in particular: "7. If you are posting code or error messages, use "code" tags":  expect rude responses

Robin2

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
Two or three hours spent thinking and reading documentation solves most programming problems.

KevinJones

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.

Paul__B

Different to what?

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

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

KevinJones

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.

saildude

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

Quote from: KevinJones
Quote from: 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.

Go Up