The Dual Processor Lifestyle In Arduino Projects

One of the features of most microcontrollers is that they allow easy access to connected peripherals like sensors and actuators.  This allows fast, accurate, and inexpensive operation. However some recent Arduino boards use microcontrollers that  obfuscate the underlying hardware interfaces. A look into the Arduino Library for these parts show that they are calling vendor provided, proprietary code rather than programming “to the metal”. This has obvious performance and functionality concerns, although the faster processor speeds does mitigate this somewhat.

A good solution is to have a dual microcontroller setup. A powerful microcontroller does the communication functions (typically WiFi or Bluetooth) and a lesser microcontroller is used for connection to peripherals. The latter doesn’t need much speed. Arduino already uses ESP32 microcontrollers as radios in dual microcontroller designs.

Perhaps the best choice is the Nano 33 IoT which pairs the ESP32 with a SAMD21 in a reasonably low cost board. Sadly, the ESP32 paired with an even simpler ATmega4809 in the Uno WiFi Rev2  is ridiculously overpriced. While the new Uno R4 WiFi might seem to make sense, the Renesas RA4M1 microcontroller  is particularly opaque  and has performance issues. 

An Example From The Past

I’ve utilized dual processor solutions, with a low performance processor for peripherals and a high performance “CPU” in designs since the 1970s. In my last job before retirement I did product development as well as having to design the corresponding manufacturing test fixture. The product used a very small ARM-based microcontroller. The manufacturer’s evaluation board was used for early development.  But then a problem came up with the manufacturing fixture.

We used Linux-based computers in manufacturing, connecting to a  networked digital meter to measure various signals to be within specifications as well as to do calibration. But there was an issue in that we had some sensors on the test fixture that returned their measurements as a PWM signal where both the pulse width and period were significant. The digital meter just couldn’t handle it. But it’s trivial for a timer in a microcontroller! So I took one of the evaluation boards and had it make the measurements in the tester. The Linux computer then read the results over a standard RS232 interface.