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 https://github.com/CargoBikoMeter/HTCC-AB01-SDS011-Test

I need a working StepUpModule functionality, because in the PM Sensor project and the CO2-Minisensor project https://github.com/CargoBikoMeter/CO2-Minisensor the AB01/AB02 goes into deep sleep after the measurement.

Any ideas what I’m making wrong?

Hi @Adlerkiez-IoT,
actually you are not putting the board to sleep at all when using delay(5000); you are only delaying the execution of the code, so to put the board to sleep you need to call LoRaWAN.sleep(); take a look at my discussion with @peterm and the proposed fixes in the thread below and using those you will be able to actually put the board to deep sleep and save power properly, and resume the execution of the code exactly where you left off before going to sleep.

Hi, the sleep function is not my problem, this works in the final project (https://github.com/CargoBikoMeter/LoRaWAN-Solar-PM-Sensor). The main problem is, that I could not shut off the StepUpModul while the system is in deep sleep mode. In the schematic you can find the connections (but there with the AB02 board).

If I remove the two serial communication wires the shut off works, so I assume that there is now a problem with the serial communication via Heltec specific softserial (Basic) Library.

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.