I recently purchased my first Sparkfun product - the ESP32 Thing. I managed to flash it with ESPHome and everything seems to work. Now, I want to take the next step in my ESPHome project - I want to attach a SenseAir S8 LP 5v CO2 sensor to it (full spec https://rmtplusstoragesenseair.blob.cor … PSP126.pdf). Later, I will also add a basic 3.3v display and have the three components powered by a battery.
Given the above goal, I would really appreciate it if you could please give some advice on what would be the strategically best approach to power all of this around ESP32 Thing. I would do the shopping at https://www.sparkfun.com.
Here are something in my mind:
Should I buy a LiPo battery, attach it to the ESP32 Thing and make ESP32 Thing as the main power source for the 5v sensor and 3.3v display? If so, which Sparkfun battery and Sparkfun product should I buy to convert ESP32 Thing’s 3.3v to 5v needed for the sensor? Or should I take a different approach and power all of the devices from a basic 5V power bank with three USB-A ports? Or perhaps there is a strategically better way?
There’s a couple of ways you could go about something like this.
- Power the Thing through the USB port with a 5 volt supply, power bank or computer and then pull 5 volts for your sensor from the Thing's VUSB pin.
- Use an external 5 volt supply for your sensor and power the Thing with it through the VUSB pin
- Power the Thing with a 3.7 volt lipo battery and then connect a 3.7 to 5.0 volt boost converter to the Thing's 3.3 volt output pin. The 3.3 volts would then be boosted up to 5 volts for your sensor.
I’m not sure if your project needs to be portable or battery powered, but if it doesn’t, A would be the easiest way to make this work.
If you do need it to be portable or battery powered, all three would work, but I’d go with option C and use a buck/boost converter like [COM-15208 to create 5 volts for your sensor. You can shut down that converter when you’re not needing to supply power to your sensor to save a bit of battery.](https://www.sparkfun.com/products/15208)
Thanks a lot for the quick and thorough response! Yes, I need the project to be portable and battery-powered so I would definitely like to go with Option C. Now, I must say that I am still pretty new to hardware projects, so this might sound like a dumb question, but I’ll ask anyways to be on the safe side. It is about the boost converter. My 5v sensor has GND/5V/TX/RX pins - as far as I understand I would definitely need a converter from Thing’s 3.3v to 5v for powering the sensor, but what about the TX/RX lines? Shouldn’t they be converted as well? I was looking at the SparkFun Logic Level Converter - Single Supply https://www.sparkfun.com/products/14765 since it seems that it converts both the power supply and TX/RX lines. But I might be mistaking. I would appreciate if you could please shed some light on what is the difference to Buck-Boost Converter and which one I should get.
Finally, which LiPo battery would you recommend? I would want something very stable and good (so that it would not get big in hot environments).
Yes, you do want to convert the RX and TX pins as well and the Logic Level Converter - Single Supply would be a great choice. I had forgotten that we carried that! Kills both birds with the same stone.
Alright, so I purchased Sparkfun Logic Level Converter - Single Supply.
Now, the VIN/VOUT from 3.3v to 5.v works fine - I can power the 5v sensor from my 3.3v ESP32 via the converter. That being said, the 3.3v ↔ 5v logic conversion does not work at all. I am 100% certain that it does not work because for a brief moment I bypassed the logic converter and connected directly the TX/RX pins from ESP32 Thing to the sensor and they could communicate to each other via UART. Now, when I put the 3.3v ↔ 5v logic converter in the middle, then the UART simply does not go through and ESP32 cannot talk to the sensor and vice versa. Image: https://www.dropbox.com/s/rrchj3xl3wk34 … y.png?dl=0