newbee looking for advice on micro-controller to buy, Raspberry Pi/Arduino/etc

Thread Starter

JackPollack

Joined Feb 29, 2016
28
Im new to working with the current micro-controllers/micro-PCs, I have worked with PIC controllers years ago. I would rather not waste time on researching each product’s specifications as there are quite a few, and I probably have a big learning curve ahead of me as far as using/programming one of these devices so I would like to focus on that.

I think my project is pretty simple and probably the perfect project to get started with one of these devices.
I'm thinking I probably need a Raspberry Pi or Arduino (open to other suggestions) but not sure which one, or which model would be best suited for this project without paying for other features that are not needed.

These are most of my requirements:

- Able to connect to my network (wired preferred)
- Able to ping a device on my network
- Don’t think I need it to act as a web server, but just to be able to accept and output TCP/IP
- Wall wart powered (low power consumption as it will be running 24/7)
- Probably the least sophisticated that meets my needs
- Low cost but if $25 item is somehow better than $4 that would be ok

The Project:

- What I want to be able to do is to communicate with it over a custom port via telnet
- Have it authenticate me with user/password (not completely necessary to be secure as what it is reporting if it were hacked is inconsequential)
- On successful login by me to ping a device on my network
- Transmit over TCP/IP if ping was successful or not

Any reconditions would be appreciated.
 

Irving

Joined Jan 30, 2016
3,843
If physically wired then a Pi or a similar clone is about the only route, but then you have all the Linux baggage which may or may not help... Price and power consumption are cons...

If wireless, then ESP32 board is << cheaper, lower power consumption (easy sleep regime) and more direct programming, with on-board FreeRTOS environment for simple multitasking.

I use one to ping and reset various devices on my network via simple IP-controlled remote switches.
 

Irving

Joined Jan 30, 2016
3,843

Thread Starter

JackPollack

Joined Feb 29, 2016
28
Thanks for your help.

Going to order one today, but I going away for a few weeks so wont have a chance for hands on until I return, but your links give me some vacation reading (my wife will be thrilled!).

My C/C++ is not great. Ive done a lot of VB/.net, JavaScript, PHP, etc.
I've written C programs but mostly modifying existing code. Fortunately I think this project is pretty simple and I already see that there is a library for ping and telnet
 

Thread Starter

JackPollack

Joined Feb 29, 2016
28
quick question:
since Im not doing any IO I assume I dont need any type of development board, just a USB cable and I assume the software is free. so the only thing I need to order is the chip.
 

Ya’akov

Joined Jan 27, 2019
9,069
If physically wired then a Pi or a similar clone is about the only route, but then you have all the Linux baggage which may or may not help... Price and power consumption are cons...

If wireless, then ESP32 board is << cheaper, lower power consumption (easy sleep regime) and more direct programming, with on-board FreeRTOS environment for simple multitasking.

I use one to ping and reset various devices on my network via simple IP-controlled remote switches.
The Teensy 4.1 has on-board Ethernet, a jack kit is available cheap.
 

djsfantasi

Joined Apr 11, 2010
9,156
If physically wired then a Pi or a similar clone is about the only route, but then you have all the Linux baggage which may or may not help... Price and power consumption are cons...

If wireless, then ESP32 board is << cheaper, lower power consumption (easy sleep regime) and more direct programming, with on-board FreeRTOS environment for simple multitasking.

I use one to ping and reset various devices on my network via simple IP-controlled remote switches.
Wrong…

An Arduino can also communicate over a hard-wired TCP/IP network. You just need the Ethernet shield. I do this the time.
 

Irving

Joined Jan 30, 2016
3,843
Wrong…

An Arduino can also communicate over a hard-wired TCP/IP network. You just need the Ethernet shield. I do this the time.
The TS is looking for low cost and low power consumption... A $30 shield on top of an Arduino for a performance-limited platform makes little sense to me...
The Teensy 4.1 has on-board Ethernet, a jack kit is available cheap.
True, but a Teensy4.1 + jack is $50+ last time I looked...
 

djsfantasi

Joined Apr 11, 2010
9,156
Depending on your source for the RPi, and Arduino, the RPi is more expensive than an Arduino Uno plus W5100 Ethernet 2 Shield. First, $30 for an Ethernet shield is ridiculous! (are you familiar with the Arduino market?)

The latter Arduino + shield solution can be had for $13; is your Pi less?
 

Irving

Joined Jan 30, 2016
3,843
I am familiar, though I've stopped using Arduino Uno as its too underpowered and has too little memory for recent projects; almost everything I've done in the last 2 or 3 years uses an ESP32 (or STM32).

The best price I can find for an UNO R3 + Ethernet shield on a US Site is $23, though they are more expensive here in the UK.

I'm not advocating a Pi... too much baggage the TS doesn't need. My recommendation was an ESP32, and you can pick up a DevKit1 clone for around $7.
 

djsfantasi

Joined Apr 11, 2010
9,156
I am familiar, though I've stopped using Arduino Uno as its too underpowered and has too little memory for recent projects; almost everything I've done in the last 2 or 3 years uses an ESP32 (or STM32).

The best price I can find for an UNO R3 + Ethernet shield on a US Site is $23, though they are more expensive here in the UK.

I'm not advocating a Pi... too much baggage the TS doesn't need. My recommendation was an ESP32, and you can pick up a DevKit1 clone for around $7.
You can pick up an Arduino clone for around $8.00. And a W5100 based Arduino compatible Ethernet card for around $5.00.

Personally, for noobies, I recommend the Arduino because it is easier to learn, has better availability of hardware, software libraries and software.

However, I’m not familiar with what you use, but I could code an Arduino to use μA of power and doubt the TS application would find the Arduino underpowered. But, I admit that’s possible.

Using an Arduino Mega, I have written a run-time sketch for a proprietary language that controls animatronic figures, including recognizing when people are present and using UDP to collaborate and synchronize between multiple animatronics. I think that’s a fairly complex application that the Arduino can perform in 300 bytes or less. Just over the UNO’s memory. Check my profile for details.

update: minor changes before any comments.
 

click_here

Joined Sep 22, 2020
548
I also usually recommend Arduino for people getting into programming "fresh", but because you are doing socket programming (not simple IO, UART, ...) the Pi is a better tool for the job and definately the one that I'd recommend.

Having access to Linux is a massive advantage with this sort of thing - There are many examples of Linux socket/client programs out there.

Also, you can write the program in Python, which can cut down the development time significantly.
 

trebla

Joined Jun 29, 2019
542
If only simple TCP/IP task is needed at low power consumption then almost any PIC18 chip with ENC28J60 module will work well. But for beginners is better Arduno (UNO for example) plus ethernet shield. Both PIC18 and Arduino can run even simple web server.
 

Ya’akov

Joined Jan 27, 2019
9,069
The TS is looking for low cost and low power consumption... A $30 shield on top of an Arduino for a performance-limited platform makes little sense to me...

True, but a Teensy4.1 + jack is $50+ last time I looked...
More like 30, but not 3.
 
The TS is looking for low cost and low power consumption... A $30 shield on top of an Arduino for a performance-limited platform makes little sense to me...

True, but a Teensy4.1 + jack is $50+ last time I looked...
I also usually recommend Arduino for people getting into programming "fresh", but because you are doing socket programming (not simple IO, UART, ...) the Pi is a better tool for the job and definately the one that I'd recommend.

Having access to Linux is a massive advantage with this sort of thing - There are many examples of Linux socket/client programs out there.

Also, you can write the program in Python, which can cut down the development time significantly.
The Pi is a proper computer: this is a radical difference from the other options which are all micro-processors. A Pi 0 W has all the hardware you need (the USB port can act as a physical TCP/IP link) and is scarcely expensive. It may be overkill... but running a proper OS (Linux) means multitasking, Wifi, internet access, HDMI screen support etc. is all built in, plus it is its own development environment and you can use just about any programming language you care to mention.

The more your project grows (over time) the better the Pi will look compared to other options. If all you will ever want to do is what you have currently specified then the solutions proposed above (about which I know little) will work fine, I'm sure.
 

Irving

Joined Jan 30, 2016
3,843
The ESP32 can be programmed through the Arduino IDE and all the examples are there. If starting from scratch there's no real difference in basic programming between an Uno and the ESP32.

If you need more functionality then the onboard FreeRTOS gives you all you need in an easy to use, lightweight package: multitasking, synchronisation, memory management, stacks, ringbuffers, core-affinity, etc. And with 2 * 160 or 240MHz cores to play with you won't be short of performance.

IMHO it's the best bang for buck going...

And if you must program in Python you can do that too...
 
Last edited:

Ya’akov

Joined Jan 27, 2019
9,069
The Pi is a proper computer: this is a radical difference from the other options which are all micro-processors. A Pi 0 W has all the hardware you need (the USB port can act as a physical TCP/IP link) and is scarcely expensive. It may be overkill... but running a proper OS (Linux) means multitasking, Wifi, internet access, HDMI screen support etc. is all built in, plus it is its own development environment and you can use just about any programming language you care to mention.

The more your project grows (over time) the better the Pi will look compared to other options. If all you will ever want to do is what you have currently specified then the solutions proposed above (about which I know little) will work fine, I'm sure.
The RPi peripherals are desktop computing oriented. Compared to something like the Teensy, it is completely unsuited to the sorts of applications for which the Teensy was designed. These are not interchangeable. There is no unqualified advantage to a “proper computer”, nor is the overhead of a complete OS always needed or wanted.

When you need an MCU, you don’t need something like the RPi. When you need an RPi, an MCU won’t work.

Rarely are they actually interchangeable if the engineering is done properly.

[EDIT: typo correction]
 
Last edited:

click_here

Joined Sep 22, 2020
548
Here is another advantage of the Pi - You don't have to use Raspbian (remember that Linux is a lot of different operating systems, not just one...), you can use an OS which is tailored for what you need.

One that pops to mind is "Windows IoT Core".

I can't believe that people are saying that using an OS is a disadvantage when making an IoT client.
 

Ya’akov

Joined Jan 27, 2019
9,069
Im new to working with the current micro-controllers/micro-PCs, I have worked with PIC controllers years ago. I would rather not waste time on researching each product’s specifications as there are quite a few, and I probably have a big learning curve ahead of me as far as using/programming one of these devices so I would like to focus on that.

I think my project is pretty simple and probably the perfect project to get started with one of these devices.
I'm thinking I probably need a Raspberry Pi or Arduino (open to other suggestions) but not sure which one, or which model would be best suited for this project without paying for other features that are not needed.

These are most of my requirements:

- Able to connect to my network (wired preferred)
- Able to ping a device on my network
- Don’t think I need it to act as a web server, but just to be able to accept and output TCP/IP
- Wall wart powered (low power consumption as it will be running 24/7)
- Probably the least sophisticated that meets my needs
- Low cost but if $25 item is somehow better than $4 that would be ok

The Project:

- What I want to be able to do is to communicate with it over a custom port via telnet
- Have it authenticate me with user/password (not completely necessary to be secure as what it is reporting if it were hacked is inconsequential)
- On successful login by me to ping a device on my network
- Transmit over TCP/IP if ping was successful or not

Any reconditions would be appreciated.
If this is a one-off, the RPi Zero W with an Ethernet dongle and a simple shell script and a few utilities can do everything you want. If you plan on replicating it, you can choose a much simpler device.

Your requirements can be answered with a much simpler device, but if you want to do something quick, the RPi Zero W will work just fine but the fact that it runs a full OS is no particular advantage and the peripheral hardware (HDMI, multiple USB, etc.) is not really an advantage.

If you want to learn about how to make efficient IoT devices, and optimal technology, there are other routes.
 
Top