Best shields for Arduino Mega 2560

Hi Core-Electronics.
We want to buy an Arduino Mega 2560 R3 and team it up with the 2.8 TFT Touch Shield For Arduino W/Capacitive Touch from Adafruit. The issue however is we also want to use Wi-Fi and I’m not sure what Wi-Fi shield to use. It needs to be simple to drive using the Arduino libraries as it’s a school project. It’s not critical if it has an internal or external antenna. We also need to be able to shut it down to save battery either sleep or power chop.

I was going to use the Uno WiFi 2 but not sure if it has enough I/O as we need an additional 5 to 7 more I/O lines for other hardware, so we went for the Mega 2560 (just explaining why).

Let me know
Thanks
Ef

Hey Ef,

I’d recommend going for an Ethernet based system, if you’d prefer, as it will probably be easier to startup and use if that’s an option. Also the 2.8 TFT Touch Shield isn’t designed for the Arduino Mega and would require modification so instead you’d need to use a part with Arduino UNO capabilities. Also depending on what you’re using the project for it’s probably easiest to use a Raspberry Pi like a zero with wireless or something similar with an appropriate touch display as a substitute. If you can describe what the project has to do then I can better assist you to find some options. Have a great day!

Bryce
Core Electronics | Support

MEGA board with an integrated ESP8266. Search for “Mega with Wifi” for where to buy one. AU$47.95
Note: the ESP8266 is a reasonable processor all on its own. The code development becomes more complex by having to program both processors and get them to communicate with each other.

Anyway, just a thought.

Much cheaper option is a Raspberry Pi with built in Wifi and is compatible with the TFT screen. I have used this screen successfully on Pi Zero and Pi 3+. Down side is the GPIO pins on the Pi are not as robust as the Arduino and run on 3.3V.

Cheers

Bryce,
I thought the 2560 was compatible as it’s a 5V board or is there another incompatibility I’m not aware of?

James,
I get your comments on ESP8266 and I was worried about that too.

Bryce and James,
First some clarity as Bryce requested. The project is a box that sits on the front veranda which can be unlocked by couriers who deliver parcels. They use the tracking number of the delivery to unlock it through the TFT Capacitive touch display. They leave the parcel and it re-locks. The home owner then unlocks with their own PIN to retrieve it. It can accept multiple deliveries. It’s battery powered hence why we’re using Arduino. It has to be Wi-Fi so there’s no installation required (which is also why it needs to be battery powered).

Correct me if I’m wrong, but a Pi can’t be put into sleep mode so it’s not suitable for this application. They have a thing called the sleepy Pi but it takes the Pi 30 seconds to power up ready to run. We need to wake virtually instantly when the courier (or home owner) presses a button on the top of the box so the 30s is also a deal breaker. Am I right?

We need to use Wi-Fi to maintain portability so Ethernet won’t do (unfortunately… wish we could).

Questions:

  1. What if we use the Uno WiFi Rev 2 board and add the display/touch module on top. Are there libraries for the WiFi in this case that don’t get too difficult?
  2. I’m an embedded guy for years but new to Arduino. Once you add a shield, can you add more shields ie do they stack assuming there’s no clashing pins?

Regards
Ef

Hey Ef,

As per our discussion on the telephone your suggestion of the Uno Wifi Rev2 should be the most applicable option for this situation of using a display and having Wifi capacity as the pinout of the display doesn’t appear to match the Arduino Mega. Enjoy your day!

Thanks
Bryce
Core Electronics | Support

Hi Ef,

wrt to Raspberry Pi and sleep mode.
Pretty much not and the power it consumes makes, continuous battery operation unfeasible.

The Pi takes some time to start because it is essentially a Linux computer. If you do get it to shutdown it has to go through the usual Linux startup, hence the 30 seconds or so; which is useless in a real time environment.

The Arduino on the other hand is ideal for what you want. As an embedded system sleep to wake is very fast. Using ATMega328P chip alone you can develop a very low power, long battery life system. However the same cannot be said for the UNO & MEGA 2560 boards. Other chips on these boards consume too much power.

I had a lot of success using a Adafruit Feather HUZZAH ESP8266.

Program via Arduino IDE, put to sleep. fast turn on, similar ports to Arduino but 3.3V and WIFI built in.
Sleeping it used about 6mA. Not as good as ATMega328P chip but much better than the Pi.
Might be worth having a look.

Cheers
Jim

PS Thanks for describing what you project is, makes sense when you know how the micro will be used.
PPS btw the processor used in the Pi has a deep sleep state but this has not been implemented, just a little too difficult to achieve nicely and of no real benefit to the Pi Foundation. Considering the Pi is designed as a low cost, powerful educational tool.

Hi James,
Thanks. I agree. We bought the Uno WiFi Rev 2 board as it includes WiFi and the display shield will go on top. It makes things a lot simpler.

As you indicated, even if we sleep the micro, all the other hardware will still run. We could implement some power switching using a FET on the power lines on a breadboard, but that’s a pain.

I think there’s another way. The product will have a big red button which the courier will press when he/she arrives. Courier presses it and it energises a relay coil which switches power to the Arduino. The Arduino wakes up and the first instruction it executes is to activate a MOSFET to keep the coil energised after the courier releases the button. Once the Arduino finishes all it’s tasks a minute or two later, it de-energises the coil and everything powers down. This will give us zero shutdown current. For most apps it won’t work, but it will work with this one as there’s no need for the Arduino to be on unless a courier delivers or picks up a parcel or the owner needs to open it to get the parcels. Either way, they press the button.

I will check the sleep current of all the hardware before we proceed down this path but Is suspect there’s no way to shut down Wi-Fi and the display (teher may be…)
Cheers
Ef