Dec 16, 2018, 08:25 pm
Quote from: o3893347 on Dec 16, 2018, 07:45 pm
Are you recommending for 3 separate nanos, or would one have enough I/O for everything?
I would probably never recommend 3 Nanos where one could be used.
I understand of would often agree. however,
OP has 3 separate but nearly identical growing areas
he is Dirt Farming.
As the new farmer evolves He will want to add features, monitor other things. Control other things, etc.
Any alteration or modification offers a potential to loose the whole farm.
if he wants to add a 4th area, then he has a choice to risk all crops by taking his one out of service and making the sketch for the 4th perfect the first time.
if he wants to alter some water levels or patterns, he has to be perfect.
it he wants to expand to a second area, he will need to duplicate the whole control.
one NANO : $2.00 on Aliexpress, you get 5 of the TPIC595 for the same cost.
using 3 nano's would be more than 3 times the cost if one is doing one area.
if one expands to a second area, then you still have to get one microcontroller. and use a TPIC595 if you are going to use the same program.
as for the dirt farming part. once the OP tries aquaculture and sees how much faster plants grow, the complexity of adding fish will require a second microcontroller or re-writing the sketch to add the additional pumps and sensors. risk of system failure due to editing mistake pops up again.
if he wants to go to the flood and drain method, more work, again possible risk.
I agree that one MEGA could do the existing project.
One NANO and a TPIC595 adds a layer of complexity to the project and additional parts. more room for error.
for inputs, a CB4021B would offer more inputs, then of course, it is either a multiplexor or an ADC chip on a board with I2C or SPI, and more complexity and more chips and more cost.
while most projects should not be split, this particular area does offer advantages to splitting.
each of the three areas is identical so copy and paste is easy.
any one can be modified. individual units prevent complete system failures.
if a 4th is added, local or in another building, or the other side of the house, copy and paste and you are up and running with minimal parts.
lastly, for a noob, controlling a pump, reading a sensor and turning on a light is a great first project.
add shift registers and the project becomes complex and the work now becomes writing code and not farming.
if the OP was not a beginner, the complexity of one unit and multiple expansion chips would be a choice by the OP.
At this point, I feel the goal to get up and running with one NANO can be done in a weekend with a noob. a month; if you add in the shift registers, longer if they have no natural affinity for programming. That is LEARNING, not copy and past the work of others.