Hello everyone. This is my first post.
I purchased a pair of Uno R3, pair of Due R3, a pair of Sparkfun Mini's, one Mega 2560 (R3?), one MKR with WiFi.
I have the following sensors I'd like to use:
MQ-135
MQ-7
MQ-2
And temperature & humidity DHT22 + AM23.
I bought the Due's thinking they would do the trick, but the moment I read to included paperwork it was very clear they couldn't be used (the sensors are 5 Volt output signal and the Due cannot be used with over 3.3 Volts). I bought the Uno's thinking they could handle half the sensors, but was told the current draw of that many sensors would destroy the boards. I bought the Mini's thinking I could use them instead, but was told the current draw was too high as well as the screens drawing even more, plus was told there aren't sufficient ports for all these sensors. I bought the Mega thinking it could finally get the job done but have again been told the current draw for 2 sensors as well as the displays (I have 1602's, 2004's) and display adapters is too high. I bought the LCD Adapter Converter Modules to reduce the number of ports needed, hoping it would draw less current but was told that they would just increase the current draw by pulling current for themselves larger than that if the screens, plus the screen current as well as the current draw of the multiple sensors.
How on earth do I use the multiple sensors, a screen (& should I use the analong converter?), on one board? Which of my boards should I use? I tried sending code to each board but except for the Due that cannot be used because it can't handle the 5 Volts the sensors, audio alarm, screen and analog converter requires, none of them had enough storage for all the code.
I need to get this done and working because my new home has been making me ill and it has to be the air (my water is through a sand, followed by activated charcoal, followed by reverse osmosis filters, ending by passing through high intensity UV light).
Which board should I use for this? I keep spending more and more on higher level boards but to no useful effect. They're all too limited and require my using multiple boards and multiple screens on multiple power supplies, meaning I'm forced to use extra electricity needlessly. One would think that if a board can be used as a controller with sensors that make a robotic car, they could do a much simpler job of measuring the air through multiple sensors...
Use a separate powersupply for Your thursty sensors. You don't know how to create the code but You say it is "a lot".???? How much memory do You need for all Your code?
Seems you just need to power the heaters of the gas sensors from a separate 5volt supply.
A 5volt/1Amp cellphone charger could be used for that.
Then any (5volt) Arduino will do.
A big mistake beginners make is trying to do it all at once.
Make a working setup with only ONE sensor, before you use another one and/or both.
Railroader, I'm already using a 12 Volt, 1 Ampere power supply but I could use my 12V 3A, 12V 4A or 12V 5A instead. But to run an analog screen device, screen, 115dB alarm, 4 sensors all at 5V I really can't understand why the boards claim that greater than 50mA will destroy the boards (and having seen the blue smoke of death I know it's correct). The code for the display is 3947 KB, each sensor is between 300KB and 8200KB. This is more space than most of the boards would allow.
Wawa - I'm not new to Arduino nor coding (Python, C++, Java all in my wheelhouse due to Bachelor of Science in Information Technology and Management 1998 [now called Computer Science... A Bachelor of Science in Computer Science sounds redundant anyhow] from Clark University). Single sensors work just fine. I want to run at least 4 sensors with 1 board and have the display rotate the sensor info for each sensor change every 8 seconds to display all of them one at a time. If I can find a way to get that done then I'll buy more sensors for the other boards so that I can run 1 in my living room, 1 in my kitchen, 1 in each of my 3 bedrooms, 1 in each of my 4 bathrooms (why my alarms are so loud, such that I may hear one on the far second floor from the opposite side of my first floor... But these alarms when in action draw a relatively large 5V current). Having already had 1 Uno give the blue smoke of death it certainly appears Arduino wasn't kidding about the 800mA (but some places they claim a 400mA and others a 900mA limit) maximum. If not for the maximum 3.3 Volt limit of the Due it would have been perfect. But the sensors all give a 5 Volt signal and I don't care to destroy either of my Due's.
The sensor code is large because I want the specific gas and volume of it displayed. But each of the multiple gasses requires a relatively large volume of code, then all combined along with the sensor function code makes them relatively enourmous (then multiplied by the number of sensors). Plus with so many of them there hasn't been sufficient space to install them all along with the display code and alarm code.
To complain in an way which seemingly attacks, rather than just ask for something specific (or if that specific has already been tried) is needless unpleasant behavior, Leo. Please be polite on at least a basic level.
Here is a Master of Science in Electronical design and Computer Science, 45 years in profession.
Read the specifications of the Arduinos first. Than You will not to see Indian signals raising to the sky.
Does every sensor nead its unic code? Can possibly one controller handle several sensors of the same type using an Array indexed by sensor number?
If 8200 kB is needed for a sensor, go for much more powerful controllers. Without knowing the entire Arduino family that size of memory sonds like way out of reach.
Maybe a well sized Pc is needed?
The code size is not multiplied by the number of sensors. For example, the Serial.println() function will be used a lot in the single-sensor example codes. But there's only one copy of Serial.println() loaded in memory so two sensors use much, much less than twice the amount of program memory.
OK, so it seems that you have each sensor and LCD screen working independently. Power is the major issue at the moment which is preventing you from plugging them all in at once. So you need a power supply with the right voltage and sufficient current to run all of them at once. Some of them may even be different voltages, which implies you need to convert some power voltages into others.
Pick the sensor or device with the highest power (voltage * current) requirement. What voltage is it?
Pick a power supply for that voltage, with lots of extra current capacity available. Like the glass-half-full problem, you want the accountant's answer: "The glass is twice as big as you needed to buy."
All other devices with the same voltage can be supplied from that supply.
If the answer to (1) was 5V, then connect the 5V pin on your Arduino to that power supply. If it was 7-12V, then connect that power supply to the Arduino's VIN. (volts, input)
So what's left over?
5a. 3.3V devices can be connected to the Arduino's 3.3V pin, so long as the total consumption of the 3.3V devices is under 200mA. If it's higher, then use a step-down voltage converter to change the higher voltage down to 3.3V.
5b. If the devices with higher voltage than the main power supply only require a small amount of power, then maybe a step-up converter can be used. If you need a lot of power, then maybe consider changing your answer to (1) or get a second power supply and connect the grounds.
Analog devices such as potentiometers or some pressure sensors should have the same voltage reference as the Arduino, so make sure they are powered from the Arduino power pin.
Now draw this all out again as a schematic. Start with the Arduino in the middle and run the various power rails around the various devices. Now we can start hooking up the data lines.
For data, first identify the devices that use 'bus' communications. I2C and SPI are the most common but there are others such as OneWire. I2C and SPI must be on specific pins on the Arduino. Reserve those pins for that bus. OneWire can use any pin. Hopefully all the buses are going to components that use the same voltage, otherwise you need voltage converters on the data lines.
Do you have any Serial devices? They should go to the hardware Serial but if there's only one and everything else fits on the UNO, then you can use SoftwareSerial on any pin. Voltage converters may be required, sometimes even the special RS232 voltages.
Then route the analog devices to analog inputs. If you run out of analog inputs, then it's easiest to switch to a 'bigger' Arduino. There are other ways around this with dedicated analog input chips which use the buses.
Then look at the remaining digital devices (probably your buttons and switches) and route them to digital pins and any remaining analog pins. If you run out of pins now, consider using shift registers or a larger Arduino.
Now you get to start building the hardware and writing the code.
i am very new in this Arduino Projects and recently made successfully by using Arduino uno r3 with dht22 sensor connected through esp8266-esp 01 and data retrieval through thingspeak. My thought is to use multiple of dht22 sensors (say 6 in number) and would i be able to use a single esp8266 esp01 wifi to connect UNO R3 and get the data in separate field from thingspeak.
I downloaded and fully read all of the available information for each board I own before buying them (it's why as I said, I knew the size of data was of issue).
I created and used the unique (what I take "unic" to have meant) code to enable the recognition and display of specific gasses sensed. Otherwise I receive an alarm but no ability to know if it sensed something immediately dangerous or not. If it sensed ethanol there wouldn't be that much concern depending on the volume as it would only make me immediately drunk (not ideal, but it's why our bodies make alcohol dehydrogenase, the lungs are a direct path to the blood). But if it's acetone or other harmful chemicals I would like to know. It took weeks of work, testing and retesting with each gas in different proportions to try and find the miniscule differences and have which gas and proportions displayed. I could easily cut it down to the standard code and just accept there is an alarm with no way to know what the specific cause is. Yes, many of the boards should absolutely be able to use multiple sensors at the same time. Otherwise there's no reason for having 53 digital and 15 analog pins on the board except to appear to be more capable then it would be.
I have multiple Gizmo 2's with Gizmo Explorer Boards which could be used, but finding data needed for the pins and coding has for years, been impossible. I also have multiple Raspberry Pi's (3B, 2B, B+ and 1 A+) and an Asus Tinker board. But while the Pi's & Tinker offer far, far more data storage, they're far to limited in pins for such use. My question was, which of my many Arduino boards I should use for as much (the Due would have been ideal if not for it's maximum of 3.3V signals while all of the sensors provide 5V signals... I'm shocked that even the $80 MKR 1000 WiFi unit can't do the job, based on no one saying it was the one of my boards to use).
MorganS,
Both the group of sensors and displays are all 5V, so except the draw of that many being too large for the multiple boards seems to be an enormous potential issue. I don't want to see the blue smoke of death again.
As I stated I have many 12V power supplies to choose from but the current limits of the board are the largest obstacle (especially the Due's which can't even be used for as much due to the 3.3V limit they have). There appears to be no benefit to using my 12V 5A power supply as the board would not be able to allow for a greater current draw as a result.
MQ-7: 150mA minimum draw (could perhaps pull much more, but if needed I can use my Fluke 88AV multimeter to measure the current draw so long as it doesn't cross above 400mA - It certainly seems it could based on what others claimed above)
MQ-2: 151mA to 220mA.
MQ-135: 150mA to 240mA
DHT11/AM2302: DHT11 claims 2.5mA, AM2302 claims 2.5mA to 50mA (but without measuring can't be certain).
Displays -
2004: 160mA
1602: 160mA
I2C analog adapter: 150mA to 200mA.
So that's 150 + 220 + 240 + 50 + 160 + 200 = 1.02A. Much too high for all of my boards as best I can tell from the literature. So eliminating the I2C analog adapter: 150 + 220 + 240 + 50 + 160 = 820mA... Still 20mA over the board's maximum allowed draw. Perhaps the screens & I2C adapters should be powered by another 5V source? Then 150 + 220 + 240 + 50 = 660mA. Well below the current limit for most of the boards (the Micro is out as a result, but has far too many I/O's anyhow).
Switching to a "bigger" board is no issue as I listed my devices and asked which to use for as much (the main question, which no one addressed nor answered). I haven't been able to test using the MKR 1000 WiFi has not been possible yet as I ordered it from Amazon 3 weeks ago and even though I have a Prime membership and they were in stock when ordered... But once it arrives, perhaps it's my best choice?
Don't know where you got all the numbers from, but most of them are wrong.
Take this on.
monkeyman_stones:
820mA... Still 20mA over the board's maximum allowed draw.
You might have read that an Uno can be powered with 7-12volt, and can supply 800mA.
Seems that the sales dudes have tricked you in believing that you can do both maximums at the same time.
In reality, you can only draw 100mA from an Uno on a 12volt supply.
I think you have to slow down, a lot.
Make a working setup with ONE sensor, before thinking 'more'.
Leo..
Wawa:
Don't know where you got all the numbers from, but most of them are wrong.
Take this on.You might have read that an Uno can be powered with 7-12volt, and can supply 800mA.
Seems that the sales dudes have tricked you in believing that you can do both maximums at the same time.
In reality, you can only draw 100mA from an Uno on a 12volt supply.
I think you have to slow down, a lot.
Make a working setup with ONE sensor, before thinking 'more'.
Leo..
Re-read post 4. To repeat, I have used each sensor individually. It's how I was able to measure the sensor responses to different gasses and developed the much too large code to enable reading exactly which gas is sensed and display that specific gas as the cause of the alert.
My quoted current draws are directly from multiple posts on this very forum, for example: MQ135 sensor output - Sensors - Arduino Forum
It was from your first post in this thread that had me attempt to establish the high current demand (on warm up, as you said) for each sensor.
You list a lot of detailed currents. That's good. Now what voltages are they? Some of those sensors I have seen in the past will require odd voltages like 6V.
Focus on getting a power supply for the 820mA (assuming those are all at 5V). That should not be hard. 5V 1000mA power supplies are plentiful. The Arduino - any Arduino - can read all the sensors if they are all powered from a suitable power supply.
MorganS,
As I thought I'd made pretty clear in previous responses everything except my power supplies is 5 Volts. In response #9 I said as much directly to you.
The sensor code is large because I want the specific gas and volume of it displayed
How are you measuring volume of your gas?
Have you written any code yet, and have you tried it?
Have you produced your code in stages?
If so, you should have individual working codes for each sensor.
Can you post one of those codes to show us how you are measuring the gas concentration and volume?
Have you got a basic block diagram of how you will connect the sensors to a controller, including power supplies?
What are you using as your display?
Please a COMPLETE hardware list and links to data/specs would be appreciated.
The maximum total current you can draw when the device is powered via external power supply is 800mA for the Due. If you consider 500 mA as a super safety threshold, connect 3 DUE boards, connect 2 boards thru Seria1 and Serial2 to the "main" board to communicate and dispatch your sensors and displays on the 3 boards so that you NEVER exceed 500 mA, providing all your thirsty sensor and displays are powered via an external power supply, use bidirectional logic level shifters for 5V logic signals, 2 resistors for 5V analog signals, and YOU ARE DONE.
Hi,
Looking at the controller boards, I would never draw more than 250mA through them, its not just component specs but PCB track dimensions that will also limit the amount of current.
Your current flows not just through the +5V tracks but it returns through the gnd tracks.
If you need more current for many sensors, use an external supply.
The Due's supply is different from most other Arduinos.
It has a switching (buck/stepdown) 5volt supply, that could deliver >=500mA without overheating.
Still limited to 500mA total on USB power.
3.3volt logic though.
Leo..
monkeyman_stones:
I bought the Due's thinking they would do the trick, but the moment I read to included paperwork it was very clear they couldn't be used (the sensors are 5 Volt and the Due cannot be used with over 3.3 Volts).
Too bad you stopped there without learning about voltage leveling at all. There are many ways to go between voltages from using voltage dividers clear up to using driver and buffer chips. Look into the uses of the 74HC4050 in Arduino projects and try not to quit the first time you think they won't do the job.
I bought the Uno's thinking they could handle half the sensors, but was told the current draw of that many sensors would destroy the boards.
I've see this pattern before. Buy something and then start to learn about it. Consumerism is not how to DIY.
Here is general knowledge: you can power devices from other sources than the controller. That's how there are videos of low end Arduinos running 8x8x8 RGB led cubes making rapidly changing color displays.
How on earth do I use the multiple sensors, etc etc etc?
That's what you should have asked before buying anything. You might have found out that you have a lot to learn and maybe should have bought a basic development board to work on learning each aspect of the goal.
The sensor code is large because I want the specific gas and volume of it displayed. But each of the multiple gasses requires a relatively large volume of code, then all combined along with the sensor function code makes them relatively enourmous (then multiplied by the number of sensors). Plus with so many of them there hasn't been sufficient space to install them all along with the display code and alarm code.
I don't know where you get your code or how tight your own code is but neither is a basis for what it really takes to do what you want.
There is a minimum amount of code to do a job and then there's how much more the long way around takes.
Half of what you state as true simply is not, and it is hurting you. Time to ditch a lot of your therefores and get yourself unstuck.