Arduino or Raspberry Pi for Dummies

Thread Starter

Cabezonbd

Joined Apr 18, 2021
4
Hello,

I am a retired engineer who wasn’t around when Arduino or Raspberry Pi became popular. Does anyone have a suggestion of how to start to learn about these devices and their applications? We are currently in the US but hope to return to our sailboat in Panama. I find myself wishing for products that could do this or that ( like monitor things on board like electrical pump cycles, or switch relays for certain purposes based on different sensors, etc) and think those two platforms could be set up to do some of those things. I am not opposed to buying “learning kits” to better understand their operation by hands on experiences.
 

Ya’akov

Joined Jan 27, 2019
9,079
Hello,

I am a retired engineer who wasn’t around when Arduino or Raspberry Pi became popular. Does anyone have a suggestion of how to start to learn about these devices and their applications? We are currently in the US but hope to return to our sailboat in Panama. I find myself wishing for products that could do this or that ( like monitor things on board like electrical pump cycles, or switch relays for certain purposes based on different sensors, etc) and think those two platforms could be set up to do some of those things. I am not opposed to buying “learning kits” to better understand their operation by hands on experiences.
Welcome to AAC!
If you don't mind spending a bit of money, I would suggest buying a kit from https://www.sparkfun.com or https://www.adafruit.com based on an Arduino. Once you get some experience you will find there are a lot of options that are not Arduino boards but work in the Arduino ecosystem and offer various advantages.

The learning part is easier with strictly Arduino boards though based on resources. Then you can look at quite a range of stuff. Either of the companies above have very good options.
 

Ya’akov

Joined Jan 27, 2019
9,079
I neglected to mention that Raspberry Pi is a different thing, not interchangeable with Arduino but still very useful. Given what you say you want to do, I would definitely start with the Arduino and then look at the RPi when you want something more computationally intensive.
 

bassbindevil

Joined Jan 23, 2014
824
The Pi is pretty much a "real" computer, complete with graphics output over HDMI and USB ports for peripherals; you could hide one inside an old PC case, boot Raspbian and use it as an office computer or web server or media player. It does have exposed GPIO pins for interfacing with hardware, but you run the risk of destroying a $10 to $40 board if you make a mistake.
Arduinos are just a microcontroller on a board with support components to connect up power and a serial interface. The following is based on those I've actually used, all of which came from eBay or Banggood, not "real" Arduinos.
The Pro Mini requires an external serial adapter to go from USB (or regular RS232) to logic level serial; an FTDI USB-to-serial adapter happens to perfectly match the connector pins on the Pro Mini.
The microprocessor in the Pro Micro has built-in USB, which can make it trickier to use, but it does make it ideal for making things custom USB input devices (like for vehicle simulators).
The Nano has a USB-to-serial chip on board, CH340C on the ones I've bought, it might be the best choice to start with. The physical pinouts aren't the same between Arduino versions, but they are labeled the same, so it's possible to develop your program on a Nano then run it on the Pro Mini.
Other things can be programmed with Arduino software. The Digispark is just a little Attiny85 8 pin micro on a board that plugs directly into a USB port. It obviously has limited I/O, but it's small and cheap. And there's the ESP family, which have WiFi and are therefore popular for IOT stuff; there's the "ESP8266 Witty Cloud" which includes an LDR (light sensor), RGB LED, USB-to-serial, and 3 pushbuttons, all on a couple of stacked boards that just about fit in a matchbox, less than $4 US when I got one last year. Plug that into a laptop and you can get started with Arduino anywhere.
Another ESP32 thing that caught my eye was this, which includes a plastic case, and Bluetooth as well as Wifi:
https://www.banggood.com/M5Stack-AT...o-LED-Blockly-Programmable-Kit-p-1645120.html
Arduinos can do wired or wireless communications by adding appropriate modules; the MySensors software library can be used to create a network of sensors and actuators.
https://www.mysensors.org/
Openenergymonitor would be useful if you're trying to run on solar and wind:
https://guide.openenergymonitor.org/technical/resources/
For the ESP family, Tasmota helps monitor or control things from your phone, but it can also integrate with more elaborate home control systems (as can Mysensors and Openenergymonitor).
https://tasmota.github.io/docs/
 
Last edited:
Look at the Labview community edition: https://lavag.org/topic/21550-labview-2020-community-edition-on-raspberry-3-b-v12/

Labview is the defacto standard for controlling instrumentation which I have used since it's inception. I have not used it where the executable can run on the PI, not the development system. You can easily turn their vi's (Virtual instruments) into a web page without the need for a web server.

The "language" is visual. You connect "programs" with "wires". Parallel programming is easy. Fundamentally, you need to know about the error cluster. If there is an error in a previous vi, subsequent vi's should not execute until the error handler
 

dendad

Joined Feb 20, 2016
4,452
@Yaakov is right I in my opinion. The Arduino is a good starting point and is quite capable of real applications, as driving 3D printers for example.
And as @bassbindevil notes, the ESP family of boards are great too.
Then, One of the sites I tend to plug is https://randomnerdtutorials.com/ as they cover all the above very well. Have a look at their site and see what you think.
They have great tutorials with ongoing posts. Ebooks are available for purchase or you can just look at the individual postings.
Enjoy your playing with these neat boards.
 

dl324

Joined Mar 30, 2015
16,846
Welcome to AAC!
Does anyone have a suggestion of how to start to learn about these devices and their applications?
Just buy one and start writing some code. That's what I did. I didn't start using an ARM based SBC until a company called NTC had a Kickstarter project for a $9 computer (single core 1GHz ARM, 512MB memory, 4GB FLASH, WiFi/Bluetooth networking). I chose to start with it because I was late to the Raspberry Pi wave and the $9 price was very attractive. Unfortunately they went out of business within a couple years, so I had to port my code to Raspberry Pi.

You didn't say what engineering field you were in, but most should have included a programming class. Arduino uses C/C++ and most of the heavy lifting (libraries) has been done. With Raspberry Pi, you can use any language supported by Raspian (Debian).

Arduino's are easier to interface to 5V logic, Pi has 3.3V I/O's.
 

SamR

Joined Mar 19, 2019
5,031
Arduino is open source which means lots of clones and software that are cheap or free. A simple starter set for Arduino with a board and components is cheap in comparison to Raspberry Pi. It will be enough to keep you busy for a while and by then you will know what you might need to continue exploring. Will also suggest having a basic multimeter.
1619314505472.png

To go with a starter kit this is my favorite little book by a well known author. There are lots of books at every level of ability, but this is a great starter. Even cheaper Used in Very Good condition (like new).
1619314156728.png

Have fun and Welcome to AAC!
 

dendad

Joined Feb 20, 2016
4,452
One "gotya" that may apply, if you use a Mac computer, make sure the Arduino does NOT use the CH340 USB to serial chip as the Macs do not play well with them.
The PL2303 and FT232 are ok.
And all are ok for Windows.
 

Thread Starter

Cabezonbd

Joined Apr 18, 2021
4
Welcome to AAC!

Just buy one and start writing some code. That's what I did. I didn't start using an ARM based SBC until a company called NTC had a Kickstarter project for a $9 computer (single core 1GHz ARM, 512MB memory, 4GB FLASH, WiFi/Bluetooth networking). I chose to start with it because I was late to the Raspberry Pi wave and the $9 price was very attractive. Unfortunately they went out of business within a couple years, so I had to port my code to Raspberry Pi.

You didn't say what engineering field you were in, but most should have included a programming class. Arduino uses C/C++ and most of the heavy lifting (libraries) has been done. With Raspberry Pi, you can use any language supported by Raspian (Debian).

Arduino's are easier to interface to 5V logic, Pi has 3.3V I/O's.
I am a retired electronic engineer. My programming is from way back as in FORTRAN. I also dabbled a bit with assembly language really only as small test routines to check large system operations.
My need/ application will be more from a need to control charging of 4 different lifepo4 batteries. Pretty simple I imagine really only controlling 5 charging sources Based on load usage and discharge levels of the 4 batteries. We are still in the states but will return to our sailboat hopefully by august in Panama. I plan a redesign and configuration of the charging and load system on the boat as well as an upgrade to the lifepo4 batteries In 4 different locations on the boat. I visualize this as not too complex, but there will be a sizable investment in the batteries and 12 volt charging systems.
 

SamR

Joined Mar 19, 2019
5,031
Arduino is the development board for the Atmel AT AVR chips. That means it has all the needed peripherals for power voltage regulation, communications, A/D and D/A conversions, clock, and I/O termination points. Once you have learned what is needed by the Atmel chips the next step is to design using the Atmel as the microcontroller without all the development boards overhead. My prior programming was back in the late 60s and early 70s with Fortran and PL1. Arduino uses a language remarkably similar to C and many want to say it uses C. However, there are differences, and you could say it is a subset of C since it closely resembles it. It was quite easy to learn for me. Once you learn the basics, you will discover that the Atmel microprocessor will do quite a lot that is not apparent at first go.
 

Ya’akov

Joined Jan 27, 2019
9,079
One "gotya" that may apply, if you use a Mac computer, make sure the Arduino does NOT use the CH340 USB to serial chip as the Macs do not play well with them.
The PL2303 and FT232 are ok.
And all are ok for Windows.
I've had very good success with CP2102 based converters on Big Sur. I also find that old Prolific based boards work on my Mac but not on Windows 10. But I am currently happy with the CP2102 option.
 

dendad

Joined Feb 20, 2016
4,452
Yes, the CP2102 versions work ok on the Mac. I could not remember the number.
I ordered 10 x Arduino Nanos with FT232 chips on Ebay and got CH340 boards instead. Just one of the risks of Ebay. I had to revert to a Windows laptop to use them :(
As for the CH340 chips, I've given up trying to reliably use them on the Mac after numerous version downloads and crashes.
There were fake FT232 chips around and the Windows driver detected them and bricked 'em I believe.
 

Ya’akov

Joined Jan 27, 2019
9,079
Yes, the CP2102 versions work ok on the Mac. I could not remember the number.
I ordered 10 x Arduino Nanos with FT232 chips on Ebay and got CH340 boards instead. Just one of the risks of Ebay. I had to revert to a Windows laptop to use them :(
As for the CH340 chips, I've given up trying to reliably use them on the Mac after numerous version downloads and crashes.
There were fake FT232 chips around and the Windows driver detected them and bricked 'em I believe.
There was a problem with the fakes but this was a real one that simply got too old for Windows 10 to be friends with. It still operates perfectly under MacOS.
 
A kit like "ELEGOO Mega 2560 Project The Most Complete Ultimate Starter Kit w/ TUTORIAL Compatible with Arduino IDE (AMAZON)"
seems to be the best solution. Don't forget to take shielding twisted pairs if you want to do some experience in a noisy boat.
 
@Cabezonbd really do look at Labview Community Edition. The excutables created in Windoze may also run on the Arduino and the PI. Getting a web page with zero effort and without a web server is pretty powerful and tempting. I saw this functionality 10+ years ago. Labview is the deFacto standard for data acquisition, you just don't get real-time.
 

Thread Starter

Cabezonbd

Joined Apr 18, 2021
4
Thank you, I do recall hearing about Lab View in my career, just never had any connection to it. I will look into it. I did order the Arduino kit and program I g book suggested to get my feet wet. Thank you to all and Sam R for the specific suggestion.
 

GetDeviceInfo

Joined Jun 7, 2009
2,192
@Cabezonbd really do look at Labview Community Edition. The excutables created in Windoze may also run on the Arduino and the PI. Getting a web page with zero effort and without a web server is pretty powerful and tempting. I saw this functionality 10+ years ago. Labview is the deFacto standard for data acquisition, you just don't get real-time.
I’m downloading it now. I had used Labview for a couple of years, years ago, and this has me very interested.
 

MrSalts

Joined Apr 2, 2020
2,767
The raspberry pi seems to be "too much" of a computer for many peoples' comfort. If you have done PC- controlled systems (or, better, Unix or Linux controlled devices - then run with a Raspberry Pi. Especially if you've set up web servers and any server-side applications - the Pi can do it all. Multiple cores, web interfaces, hdmi displays, terabyte SD cards and thumb drives, keyboard, mouse, wifi. You can also connect to Internet, write code on the Pi,

If, on the other hand, you want to do essential one device, a few sensors, some LED indicators or a small OLED display then Arduino is your best bet. You'll need a computer to write the code and upload to your Arduino (you could use a Pi to write the code for Arduino. Some Arduino have wifi or Bluetooth but not quite as straightforward to get it running as a pi.
 
I’m downloading it now. I had used Labview for a couple of years, years ago, and this has me very interested.
It doesn't seem like NI has their act together for the community edition.

Report back as to what PI you got it to run on. It might end up being a PI in your face?

It was a very strange language to learn at it's inception especially with no decent tutorials. At that point they wanted you to take courses.
 
Top