Hi! I have a working project based in two arduinos Mega.
I want to know if my project can be upgrade to use only one controller, due to size, space and lack of memory
My current hardware and devices controlled of my working project is as following:
Arduino Mega 1: nextion Hmdi display , solid state relay 8ch 5v, RTC DS3231
Arduino Mega 2: Sim900 shield Tx2 RX2 comm, RTC3231, DHT22, Analog input 5v for voltage monitoring , current sensor a712, Tx3 RX3 to comm with other Arduino uno.
Both codes are very large to monitoring temperatures, send alerts, irrigation HDMI’s controller etc
Is recommend to put this both controllers into one ? Like a Due or giga ?
If it is possible what kind of considerations I have take with voltages input and outputs with a unique controller ?
Ok, so that's 2 pins for the display, 8 for the relays and 2 for the RTC. This doesn't seem to require a Mega, so perhaps you meant to say Uno.
That's 2 for the GSM card, 1 pin for the DHT. I assume you forgot you already mentioned the DS3231, that was on the first Arduino, so we will ignore that. 2 analog pins for voltage and current measurement.
So far, that's 17 pins, of which 2 are analog.
Did I miss anything?
If not, yes, this should fit a single Uno.
If you want to free up further pins, I would recommend a pcf8574 chip to control the relays. This will use same 2 pins as the RTC, freeing up 8 pins.
Both arduinos Mega#1 and Mega#2 are for different applications and are build in diferente cases
The Mega#1 monitoring temperatures and send alerts over SMS to alert low temperatures in a cherry orchard. Also monitoring if power black out and current used for the irrigation pump system. Also there is a Arduino uno to take some reading from orchard near from this Mega.
The Mega#2 was build for control irrigation and anti frozen water based control using a Nextion HMI, and relays to control valves for each orchard sectors
Each Mega are separated system and use codes and libraries to control devices connected.
If I put all this together I run out of memory due to GSM library and Nextion Library are huge.
Thank you for ir help !!