HTCC AB01 SDS011 test - system hangs after switching off StepUpModul

Hi,

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.

For testing the basic functionality without LoRa radio support I created the project GitHub - CargoBikoMeter/HTCC-AB01-SDS011-Test: Heltec Cubecell AB01 SDS011 Test

I need a working StepUpModule functionality, because in the PM Sensor project and the CO2-Minisensor project GitHub - CargoBikoMeter/CO2-Minisensor: code, documentation, and hardware design for the CO2-Minisensor with LoRaWAN support the AB01/AB02 goes into deep sleep after the measurement.

Any ideas what I’m making wrong?

I filed the question already in the Heltec forum HTCC AB01 SDS011 test - system hangs after switching off StepUpModul - CubeCell - Heltec Automation Technical Community, but currently there is no answer for a solution.

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…

Currently I use USB Power, but finally I will use a LiFePO4 battery with solar loader from LiFePO4wered/Solar1 from Silicognition LLC on Tindie.

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?

Yes, this is mandatory. In https://raw.githubusercontent.com/CargoBikoMeter/CO2-Minisensor/master/images/CO2-Minisensor--Schaltplan.svg you can find a similar system based on AB02 and and CO2 NDIR sensor, but the connections to the P-MOSFET and the StepUpModule are the same, only the GPIO pins are changed at the AB01 board.

This is a bit of a FrankenCircuit:

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.

Add that to the high Tx current spike and you come back to

I changed the schematic, now the StepUp module is powered by Vext. To prevent system hang after switching Vext off I inserted a detachInterrupt(_BoardRxPin) command short before. I included the current schematic into GitHub: HTCC-AB01-SDS011-Test/HTCC-AB01-SDS011-Test.svg at main · CargoBikoMeter/HTCC-AB01-SDS011-Test · GitHub
Now I will finally update my main PM-Sensor code in GitHub - CargoBikoMeter/LoRaWAN-Solar-PM-Sensor: LoRaWAN connected and solar powered particular matter sensor and try to power the AB01 by a LiFePO4 battery with the solar loader from Tindie.