My son is attempting to automate and monitor a curing station I built involving 24 DHT22's that are being used to monitor temp and humidity in 24 different locations. We are using a Mega, however it is bogging the system down like a computer that locks up. It doesn't do that with just a few sensors, but we cant even get 12 of them to function without bogging the system down. Is there a secret we are overlooking when attempting to monitor multiple locations at the same time? I am only needing to take a reading from each sensor every 15 minutes, so we have a window to work with, but this project is driving my son crazy. The code he has written "checks out" per se. in the self-check feature. Should we NOT be trying to monitor 24 locations at the same time? I'm no Arduino pro, but it acts like an old computer trying to boot with a new operating system that has requirements that exceed the old computers RAM. But I wouldn't think the DHT22's could possible be a drag in the pipeline, however if I knew the answer I wouldn't be here. It may have nothing to do with what I'm describing.
Anyway, this is about the only way I know how to describe what's been going on. Any help or suggestions would be greatly appreciated!
-The Happy One
Maybe get your son to post his code and his specifications and expectations.
Meanwhile, have some of these: \n\n\n\n\n\n\n\n
They're free.
Without seeing the code we can only guess.
Are you reading all the sensors in one go or are you "time division multiplexing" them -- reading one, going off and doing other things, coming back and reading the next, going off and doing other things again and so on?
How often do you update the sensors? It's likely not necessary to do so every time loop() executes, for example.
Without seeing the code it's just guesswork.
If possible, posting a wiring, or a principal drawing, wouldn't hurt.
I notice that one of the examples from Adafruit's DHT library has a comment that the sensor takes about 250mS to get a temperature or humidity reading, which is fairly slow. Twenty-four sensors would take a total of twelve seconds at that rate, not bad if you spread it out across a fifteen minute window, but very slow if done all at once.
Those sensors produce new values every 2 seconds. I don't know how long it takes to read one, 250 ms sounds like a very long time. Also I don't see an obvious reason you can not read 24 sensors one after another, other than indeed the time it takes to do so.
More problematic I would expect be the long wires. I mean, they must be quite long if you have 24 sensors in 24 distinct locations. Long wires may cause problems of their own.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.