Two micro processors and one eeprom?

Hello, I have a question. I have a arduino zero doign a lot of tasks such as logging, controllings lights, temperature and humidity sensors also monitoring low voltage and logging on the voltages too. I also have an LCD with a lot of controls on it for this. Basically a home automatited system that has ethernet and a webpage.

When I'm trying to view all the logs it takes long time to pull up the logs in the webpage. I cleaned up the code as much as I can and still take a long time to read the logs. So What I was thinking is adding a second processor with a Ethernet module just to read logs. So My question is can I use a second processor just to read logs from the same i2c eeprom?

Joseph

I believe that the I2C bus supports multiple masters. I've never used such a setup and I don't know if the Arduino library supports it without checking further.

It is unlikely that adding a second I2C master will improve the situation.

Would the first I2C master continue to log to the EEPROM during this process?

Are there other devices being accessed on the I2C bus whilst reading from the EEPROM?

I would look to see where the bottleneck is in the existing code before introducing another I2C master onto the bus.

The problem I have is that it takes a very long long time to read out all the voltages and current as well as current state of the light and fan switches. Plus all the logging going on. when that happens all of information for everything else get's jammed up and take a long time to catch up.

What I'm plan on doing it the main processor I have now Will only be just to write to the eeprom for the logging not reading at all and having a second processor just for reading the logs and havind a second ethernet module with a webpage by itself displaying all the logs that is all.

Could this be possible? Before I attemp anything I wanted to try in here and see what the community thinks about this crazy ideal.

More information please: what amount of data are you trying to move and in what time. Define a "very long time". What size packets are you using for the Ethernet? Small packets take more time.

1 Like

I'm trying to read the logs of what I'm storing in the short time. Voltages, current, status of buttons, temperature and humidty. I stoorage 72 hours worth of logs. There are a lot of logs to bring to the page itself. When trying to retrive the logs everything else stops from displaying on the webpage.

I do not care what the data is. Please answer - "what amount of data are you trying to move and in what time. Define a "very long time". What size packets are you using for the Ethernet?" For all I know that could be a few bytes or maybe a few mega bytes, I have no clue.

That is a subjective number no idea what it is an objective number would help.

I'm sorry I miss understook your question. I'm trying to read all the live values on the webpage also trying to read all the logs from past. I have it showing as multiple pages for the logs. I do not know about packet size. The eeprom is 2Mbit eeprom I have 4 of them on there. I'm trying to read the data from all 4.

Write a sketch that only reads the EEPROMs and displays (using the same code functionality as the problematic code) the data in the browser. If that gives you the expected speed you know that the the issue is in the combination of your sensor stuff and the display routines.

Be aware that 1MByte of data can take some time. Is this a local network (Arduino directly connected to PC), home network (Arduino connected to router) or a global network (Arduino -> router -> internet -> PC at the other side of the world)?

You did not give any description of hardware used; an Arduino Zero does not provide network functionality.

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.