I am trying to use a solar charging lipo battery to supply power to a ESP32 Cam but I am confused with how to power the ESP32 Cam to work??? Before I burnt out something, I guess it’s prudent to ask for some gurus’ advice here.
A 6V solar panel is connected to CN3791 and charging a 3.7v lipo. A load (to be ESP32 Cam) is to be connected to the CN3791 as output.
The ESP32 cam has 5V and 3.3V VCC. How should I connect the ESP32? I tested the output of the Lipo, it was 3.9V. I assume connecting to 5V VCC will not get the ESP32 Cam to work? What will happen if I connect to 3.3V VCC?
Some googling suggested ESP32 cam best to work with 5V. Unfortunately, my little project is remote and no power point available. Solar powered is the only route.
Some recommended using Step-Up Boost Converter Module which I don’t have. Does logic level shifter work the same?
Would it be possible to grab some links to the CN3791 you are using?
The 3v3 pin passes straight to the ESP32’s power supply and at maximum charge (4.2V) will fry the microcontroller.
The 5v pin passes through a linear regulator (AMS1117-3.3 from the schematic), with a 4.3V minimum input for a constant supply.
The ESP32CAM is a standalone device that can be powered from either 5V or 3.3v. A step-up booster can be used to step the voltage from the LiPo up to the 5v needed to power the ESP32CAM. When you need to program the ESP32CAM to do whatever is required, you will connect it to a programming device which will connect to the PC via USB. That’s when you need to consider the logic level (as distinct from the power source) for the ESP32CAM. The logic level must be 3.3v.
A programmer specifically designed for ESP32 will be 3.3V. Others will be switchable, or 5V only. If it’s 5V only then you would use a logic level converter. If you choose an appropriate 3.3V programmer for the ESP32CAM you don’t have to worry about logic level conversion.
Thank you for your advice! Appreciate it.
These Step down or up regulators I think are crucial for amatuer like me not to pop MCUs! I just popped a 3.3V RGB recently. LOL.
I probably will get a 5V step up regulator because ‘Google’ said 5V works better for ESP32 Cam? From the CN3791 output to 5V step up regulator (2 wires - Vin/GND), and Vout to 5V at the ESP32 cam? No GND to ESP32 cam?
Below is the CN3791 I have. Thanks again. Regards.
I suppose the logic level converter is to convert the power from the mcu to match the working voltage of a device, i.e. a sensor that connected to the mcu, correct?
To power the ESP32 cam properly from a power source, i.e. Lipo, I should be using a step up/down regulator as what Liam mentioned above. Hence, the logic level converter is not the right tool for my purpose in this case?
No. The logic level converter has nothing to do with the power. It is required to convert the logic level used for one device (such as a sensor) with the logic level used by another device. The power supply to the devices is a separate issue. For instance, your CAM can be powered by 5V, but it uses a logic level of 3.3V. A motor controller that you could use to pan and tilt the camera might work with a power supply of 12V (motors often require a voltage like that) but uses a logic level of 5V. If you wanted to control that motor from the CAM32 you would need a logic level converter to convert the 3.3V logic of the CAM to the 5V logic of the motor controller. Or, a sensor that you use to detect motion and trigger the camera might work with a power supply of 5V and a logic level of 5V. You would need a logic level converter to convert the sensor logic at 5V to the CAM logic at 3.3V. Or, the sensor might use a logic level of 3.3V, so you wouldn’t need a logic level converter.
ummm…sorry amateur trying to understand this a bit better here.
example of the motor, input voltage is 12V, but the motor understand/respond to the command in 3.3V from the mcu (esp32)? Do we call it as output voltage when motor and mcu talking to each other? Thanks.
I probably will get both to try out. Could be interesting to compare too!
With regards to GND, the JST connection has 2 wires (Red+ and Black-), am I correct to wire up as such to GND all?
Red+ to regulator Vin.
Black- to -ve at a breadboard, from the breadboard, 1 cable to regulator GND and another cable to ESP32 cam GND.
Regulator Vout (assuming 3.3v) to ESP32 Cam VCC 3.3v
No. The motor responds to 12v (for example). That’s the motor power, and it’s the only thing the motor handles. The motor driver responds to logic level signals, which could be 3.3V or 5V (in some cases, it responds to a wide range of voltages). That’s the driver logic level. The driver controls the 12V to the motor, to adjust the motor speed, so it’s connected to 12V. It probably uses that 12V to supply whatever power its internal logic needs - this usually happens within the driver and you usually don’t need to consider it. The controller (the MCU) uses 3.3V logic (for example) to signal the driver. That’s the controller logic level, and in this case it matches the driver logic level (minimum 3.3V) so no level converter is needed. The MCU might be driven from 5V or 3.3V, or, in the case of the Arduino, from 9V. That’s the controller (MCU) power.
If the driver didn’t generate its logic supply from the motor power supply, that would be a third power supply. So you might have a 24V supply for the motor, a 5V supply for the motor driver logic, and a 3.3V supply for the MCU! But the only voltage that has to be compatible is the logic level between the MCU and the driver.
Your setup won’t be nearly as complex as that, but if you understand the MCU/Driver/Motor case then you should be able to work out how yours will look.
Got part way through writing my response when Jeff put his in - hopefully this can add to his excellent response
A motor isn’t the best example since there are only 2 wires to power and control it by turning those two off and on quickly (and reversing them).
This is a very very big over simplification - consider 2 types of ‘electrical signals’:
Power - Needs lots of constant current(DC) so the wires will be thicker i.e. turning your lights on
Signals - this doesn’t need much power so it can use thin wires, but it has to change quickly to send the signal to something
When two devices talk (signals) to each other the voltages need to match, these are called logic levels…
and you can change them with a logic level converter. BUT logic level converters arent able to ‘transmit’ much current because of their design, but can switch fast enough to transmit most signals.
That first one has a minimum input of 4V, which is greater than your battery will be supplying. The second one is a boost converter and cannot supply 3.3V. The last one will supply only 5V.
So the best apparent choice is the third one - 2.5V~15V to 3.3V. In your case, that would be 3.7V~4.2V to 3.3V. The rated maximum current is 600mA, but that is not continuous. Core recommends a 2A supply for the camera: that is probably based on reports that the camera is very sensitive to a poor power supply. However user reports suggest that about 380mA is likely the maximum current draw, so 600mA would likely be adequate. One problem with your arrangement is that the minimum headroom for the power module is just 0.4V (3.3V output for a 3.7V input) and that is only sufficient if the device is ‘Ultra LDO’ and is specifically designed for use with LiPo batteries, and even then might not be able to produce maximum power at minimum headroom. You would need to confirm that minimum headroom with the supplier.
If that regulator is not suitable then a boost device such as your fourth example feeding the 5V input of the camera would be needed, and you would have to wear the reduced efficiency of the two regulators.
A controlled current device is used with LEDs, and is not relevant to your application.