I have a problem after switching off my 3.3V to 5V StepUpModul via GPIO5 pin and a P-MOSFET. The system hangs. If I disable the line digitalWrite(VStepUpPin, HIGH); the system is working without problems.
I used this StepUpModul in my PM-Sensor (https://opensensemap.org/explore/60c14256b2a183001cd39959 ) last year without any problems. But now I had to modify the SDS011 source code to change SoftwareSerial into softSerial from Heltec. Last year I had only removed the yield function in the SDS011 code.
How do you power your system? It might be that when switching you see a power sag that causes the system to hang, ensure use of a decent capacitor close to supply etc…
Without information on how things are connected it is hard to provide useful feedback. Could you draw a basic circuit diagram showing the components involved?
Power in via USB to the LDO in to the BlackBoxOfHeltec and then on to VDD.
You then pickup VDD, switch it via a MOSFET without any resistors to pullup/down and on to what appears to be a cheap Chinese boost circuit.
The electrical noise must rival a heavy rock band.
There is the Vext output that is under GPIO control all built in so the MOSFET seems a bit redundant.
I’d try the Vext to a fixed 5v boost (they tend to be a bit better than the adjustable ones). If not, then a MOSFET from the LiPo to the Boost and cut out all the middle circuitry.
Last year I tried to connect Vext directly to the StepUpModule, but 140 mA current was bit to much for the Vext output. And I inserted a 1 Ohm Resistor between VDD and the MOSFET in the CO2-Minisensor (that’s missing in the schematic above). Without that 1 Ohm Resistor LoRaWAN does not work properly.
Now I will try your recommendations with Vext again and a fixed boost converter. Thanks for your suggestions. I’m an hobbyist and not a professional hardware and software developer.