ESP8266
|
Raspberry Pi Pico
|
Do the microcontrollers have any capabilities or functions that are not available on the Raspberry Pi 4 or perhaps are superior to those on the Raspberry Pi 4?
Yes. For example Analog input.
In other words could a Raspberry Pi 4 be used instead of the microcontroller or is the Pi 4 missing certain controller capabilities and functions?
Yes a Pi can do most things that a microcontroller can do, but not all.
Perhaps the faster processor and larger RAM memory of the Pi 4 could be desirable in certain controller applications.
Yes and the Pi has a display and keyboard and lots of RAM and an infinite about of "disk" space, the full Linux OS etc. to allow you to mess with display input and interpret data.
The Raspberry Pi OS Linux operating system of the Raspberry Pi 4 has software overhead (daemons, processes, logging etc) that might delay its response as a control system.
This kind of answers the question. There are many process I/O applications that are not particularly time critical and a Raspberry Pi would work well. Time critical applications for example responding to interrupts to measure flow and sending pulses to control things like RF switches or LED lights may not work well when a multitasking operating system wanders off to do something else.
The next thing to consider is cost. A Pi 4 will cost about $70 a Pi 3 about $45. So the 5 microcontrollers I have spread around my backyard would be about $250 vs $20 for ESP8266s
Would the minimalist PiCore (Tiny Core Linux) operating system be more responsive or would it still have software overhead issues? (https://iotbytes.wordpress.com/picore-tiny-core-linux-on-raspberry-pi/) (http://www.tinycorelinux.net /ports.html)As soon as you create a multitasking operating system there may be these issues. There are real-time multitasking operating systems. They are built paying a lot of attention to interrupt timing and task switching timing. Examples QNX, FreeRTOS, VxWorks and perhaps even on the Raspberry Pi https://easychair.org/publications/open/VPzR.
The question I have is why would you want to. A distributed system where small cheap microcontrollers are spread about feeding data into a mainframe (Raspberry Pi) to me makes a lot of sense. Each microcontroller is doing a small thing and passing data back and forth. No need for an operating system that may have other things to do.
We started implementing process control this way in the late 60s. I worked on a system that used a PDP11 as the mainframe. Display data gather and command sending. In the field we had Intel 8080 based microcomputers with lots of process input and output measuring and controlling flow, temperature etc. The connection back to the PDP11 was via a high speed serial connection. Similar to what today we call Ethernet, but this was before Ethernet. Each 8080 box and GPIO was in a 19 inch rack.
Can you suggest free software tools and libraries for developing a ‘bare metal” operating system for the Raspberry Pi 4. It would be desirable to have libraries available to access the GPIO pins, USB port, and other systems on the Pi. The bare metal operating system might be faster and more responsive than Linux in a controller application. I found the following link as a starting point. https://isometimes.github.io/rpi4-osdev/
Sorry no. I worked with this back in the 60s through the 80s, see above. I helped develop the software for the above 8080 systems. Today there is so much off the shelf hardware and software that I would rather use the plug and play approach.
And, if working on the iron interests you then please go for it. Somebody has to write the software that controls our cars and aircraft. And lord knows the aircraft folks need the help.