Hello, I used to use Mega 2560R3 and Uno. Is there a Nano version of the Mega 2560 Rev3 which has lots of I/O? I also need bluetooth functionality and I2C.
Since the Nano footprint is only 0.6" wide pin to pin, and the Mega 2560 IC itself is roughly 0.550" wide without the pins, and since the Nano footprint has 30 pins total, of which 22 are available for I/O, the sum of your requirements is not possible to meet in a Nano footprint.
There is a Mega2560 Pro Mini which is about 2" long by 1.5" wide (about the same size as 3 Nanos side to side), but it is not breadboard friendly. It couldn't possibly be and still bring out all its I/O in such a limited space.
Thanks. I guess I was a bit greedy then
If the original Nano is sufficient but I want bluetooth communication, should I go for the Nano Every + a Bluetooth module such as HC-05, Nano 33 BLE, Nano ESP32 or the Nano 33 IoT?
Haven't the foggiest. I've never had the need for Bluetooth so I've never paid any attention to which boards have and which don't.
Another concern is when the Giga R1 Wifi and UNO R4 WiFi came out, I immediately bought them to replace the Mega 2560 R3 and UNO R3. However, I found that they are not compatible with some libraries and sample programs found on the internet. Then I read that these two new boards are using different family (non-ATmega) of microcontrollers which could cause software compatibility issues. If I switch to the Nano family, will I have the same problem? It seems that the Nano and Nano Every may be safer since they use ATMega microntroller but they don’t come with a Wifi function.
I think you already know the answer to that question. In fact, it sounds like you've already experienced the answer.
So the Arduino company and community have not found a way to make new boards with new microcontrollers fully compatible (software wise) with those developed for the older UNO and Mega2560 R3? Is the Arduino company just let it me and go on with new products that may not be compatible with older software?
There’s no true “Nano-sized” version of the Mega 2560 because the ATmega2560 chip needs too many pins to fit a Nano layout, but there are good alternatives. The Arduino Mega Pro Mini (or Mega Pro Embed) from RobotDyn is the closest thing — it’s much smaller than a standard Mega and has almost all the same I/O. If you want built-in Bluetooth and I2C in a compact form, boards like the ESP32 are even better: they’re small, have plenty of GPIO, built-in Bluetooth/Wi-Fi, hardware I2C, and far more processing power.
Thanks. I just checked the product page of the Arduino Mega Pro Mini and Mega Pro Embed. They sound good if I don’t use Bluetooth functionality. In the case of the ESP32, do I need to worry about software compatibility issue I mentioned since it does not use any of the ATmega chips?
It might help if you describe your requirements. Size, number of pins, ...
If you dont have enough digital IO you can consider shiftregisters or I2C/SPI port expanders. For analogue inputs you can use analogue multiplexers. This will make your design bigger.
If you're after something that is breadboard friendly there is e.g.
the Bobweeny (see Cross Roads Electronics). It has 32 I/O pins
This company also designed a breadboard friendly 2560; not sure if it's for sale (see Mega 2560 barebone - #13 by CrossRoads).
Although the owner crossroads passed away it's my understanding that the family did continue the business.
Neither of those has integrated bluetooth.
Size should be as small as possible. Not sure about the number of pins if I use it for multiple future projects. That is why I asked if there is a Nano version of the Mega 2560 R3.
For the current project, even a Nano is sufficient. Supposing that I choose the Nano Every to avoid software compatibility issue mentioned in Post#5, which bluetooth product and brand do you recommend for 1 master and 2 slaves wireless communications?
To name a few
- Arduino Pro Mini 328 - 5V/16MHz - SparkFun Electronics is smaller than Nano. Available in 3.3V and 5B versions.
- Even smaller is https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html. Note that this is a 3.3V device.
You might still run into compatibility issues with certain libraries when using the Nano Every; it highly depends on the fact if the library bypasses the hardware abstraction layer. But you can easily test by compiling your code for the intended processor / board.
I have insufficient knowledge about Bluetooth.
You need to check all aspects of compatibility with the Every…
Technical Specifications
This board is based on the ATMega4809 microcontroller.
-
Clock: 20MHz
-
Flash: 48KB
-
SRAM: 6KB
-
EEPROM: 256byte
-
Voltages: 5V USB in, 6-21V DC VIN, 5V Operating Voltage
So it is not like if the Every is running an ATmega controller (4809 in this case), it would be fully compatible with all the libraries and codes that work for the Nano with Atmega328? If so, to play safe, it is better to get the Nano even it is a bit outdated?
No. It is a very different beast.
There is a very good book from Tom Almy called "Far Inside The Arduino: Nano Every Supplement" He covers comprehensibly all the things you can do with it.
You can get the code from his examples here
Better still buy the book.
This is how you can test compatibility of libraries.
- Install the board package for the board of interest (e.g. the Nano Every).
- Install the libraries that you need for the hardware that you are going to use.
- Compile examples of the libraries for the board of interest. If it compiles it will work. If it does not compile, find another library that provides the same functionality.
- Repeat for all libraries.
You do not need to have the hardware to run the above tests.
As I recall, when I did wired master-slave communication about a year ago, it worked when I was using UNO R3 or Mega 2560 R3. However, as soon as I switched to either UNO R4 or Giga R1 Wifi, communication stopped working. There was no compilation error. Just send and receive did not work. When I switched back to UNO R3 or Mega 2560 R3, it worked again. There was no change in code. I am concerned that if I use something newer than the original Nano, this sort of things may happen again.
Something you might have on your radar: Classic Bluetooth and Bluetooth Low energy (BLE) are also two different beasts - being the first much more easy to deal with in my opinion. However, most of the newer boards are coming only with BLE. As you mentioned HC-05 (classic bluetooth), you might carefully choose the board.
I have a Nano 33 IoT (v1) and it works only with BLE.
Does your Nano 33 IoT work well in single master-multiple slaves communication via BLE? It looks like most people on the internet use HC-05 but I have seen HC-06, HC-07, etc. Which is better? Also, what brand? I don’t see major brands carrying these HC modules.
I found this topic of yours: Connecting Giga R1 to Uno R4 via I2C. That does not seem to indicate a library problem.
I can't do much about your worries. There might be two other boards that can be of interest if you ever want to use your boards as a HID (keyboard/mouse)
- Pro Micro - 5V/16MHz - SparkFun Electronics; available in 3.3V and 5V.
- Arduino Micro with Headers | Compact USB Dev Board — Arduino Official Store; a few millimeters longer than the Nano.
Both have a free serial port; communication with the PC is done over the USB interface of the 32U4 microcontroller and not by using an additional IC like the Nano, Uno and Mega do.
