Could you correct my current calculations and see if I understand it correctly? Trying to see if I can connect all sensors and not damaging anything

Hello, everyone! I'm trying to move past the stage of just following a tutorial and start understanding more about circuits. For my current project, I want to use an ESP32 and some sensors, and upload the measurements with wi-fi to a database, and I've tried reading datasheets and checking stuff like, will I get enough current or could I fry my components? That's why I wanted to ask online if you could verify what I did and give me any comments or suggestions… Here is the diagram I tried to make: https://i.imgur.com/r49l4fW.jpeg I want use one MQ135, one MQ137 and a DHT22. To simplify the calculations for now I assume I use two MQ135, using this datasheet: https://www.olimex.com/Products/Components/Sensors/Gas/SNS-MQ135/resources/SNS-MQ135.pdf First of all, the MQ sensors have a heater that needs 5V to work, so for that I would use the "Vin" pin in the ESP32, which, if I understand correctly, is connected like this: USB (I'll have it plugged to my computer) -> Vin (so it also has 5V) -> regulator that drops it to the 3.3V the ESP uses. Is that correct? Or will I not actually be able to feed the heaters what the need? As for the current, I found that the Vcc is capable of outputting 500 mA max, and in the datasheets I couldn't find how much the heaters need but they say they consume "<800mW", so that 800/5=160mA, but I want to use two (MQ135 and MQ137) so that's 320 mA. I also found that the wifi chip uses 400 mA (in peak times), so **does that mean I can't even use one sensor?** I still need to take into account the amps used by the actual sensors. The datasheet says sensing resistance=30-200 kOhm (let's say 30k). If I add a 20 kOhm resistance for the voltage divider, I have 50 kOhm, so that is V=I*R => I=5/50 = 0,1 mA, and I have two sensors so 0,2 mA in total (I'm okay here because it's very low). For the readings, a pin can only have up to 40 mA, and 1200 mA in total for all pins. But also pins handle 3.3V, so I can't have more than that. However if I understand correctly, I'm not using any pins for output, I'm only using them for input and that means current doesn't flow through them (because they have high impedance). Is my reasoning wrong? Another question I have is: in the MQ datasheet it says the heater resistance is 33 Ohm. If I calculate 5/33 I get 151 mA (I=V/R). But if the consumption is less than 800mW, if I do I=P/V=800/5 = 160 mA, shouldn't I get a closer value? And last one: the sensor I have doesn't come with a module so it has those 6 pins, and their distance is larger than 0.1 inches so I couldn't solder that into a prototyping pcb (those that have a lot of holes) and it also wouldn't fit in a breadboard. how can i connect it in a more graceful way? I'd appreciate any comments. Thank you! submitted by /u/twaw09 [link] [comments]
Take Your Experience to the Next Level
NewDownload our mobile app for a faster and better experience.
Comments
0U
Join the discussion
Sign in to leave a comment