Camera power on after board power on

I am using a P-MOS to control the camera power supply, but what happen is when I power up the hardware ,the camera is not powered at first.It required to pull the control pins high to conduct the P-MOS to power camera module.But when I do this ,OpenMV cannot detect the camera .It says “The image sensor is detached or failed to initialize!”.Is there any solution to it?

Your going to need to edit the firmware such that it waits to poll the camera until the camera is powered on. This isn’t really hard to do at all given our firmware.

that is a method.Is there a way to maintain the state of pin and reboot the system?

No, when the processor reboots everything is reset.

ohh ok,could you tell me which document to edit

Hi, to be clear, you built an adapter board between our camera module and the camera base to control power? Or, are you powering the whole unit (the base).

If the later then I can provide help support.

yeah,i am powering the whole unit

Okay, hmm, I guess the reset sequence is just messed up. Try holding reset low after the power is on.

how to hold the reset low?the reset of camera or the board?

Yep! That should ensure the power sequence happens after voltage is stable.

Yeah,when i set the reset down manually ,the openmv board can detect the camera module.But you say it can edit the firmware such that it waits to poll the camera until the camera is powered on,i want to ask where to edit the firmware so that I can power on the camera module in the very beginning.

when the gpio"P3" pull down ,the camera module would be powered on.So i want to know where to edit the firmware so that it can set “P3” pin to be a low output in the beginning.

P3 shouldn’t have anything to do with that.

As for what I mentioned previously, I thought you were doing something else. Don’t edit the firmware. The reason the camera wasn’t being detected was because the voltage rails weren’t stable… which kinda means the processor probably also wasn’t 100% stable too. So, keeping it in reset until the voltage is stable is the right thing to do.

ohh i forget to i said before,i was using a PMOS to control the camera power and P3 is the control pin and pull it down can power up the camera.When the camera power up in the first place ,everything just runs normal.So that is why i try to edit firmware to pull down P3 first.I think this is not very hard but i just don’t know where to edit.sorry that i wasn’t say things clear

Hi, just add a pull down resistor to the I/O pin.

I have tried this but it can’t cut off the power supply for camera in deepsleep mode if I do so.because the I/O pin turn high resistor state.

An external resistor?

A schematic of what you are doing would be helpful.

yeah…I have tried an external resistor that connect the control pin to GND.And the board did successfully detec the camera and seems work well.But when I go to deepsleep mode machine.deepsleep(),it just can’t cut off the power supply of camera.I add a PMOS just to lower the camera power consumption,can’t cut off the camera power supply seems against my first will.I check the stm32 datasheet and it says in deepsleep mode I/O turn high-impedance state and add an external resistor to GND just keep PMOS conduct.And I think edit the firmware to power up the camera on software become the only way.

Yeah… the next gen camera which we will announce next week fixes these issues. You can turn the main 3.3V regulator off internally on the board dropping the power down to 50uA.