Project for an Autonomous Sailing Boat

  • I founded some trouble with the deepSleep mode.
    To understand I wrote this small test program :

    "use strict";
    const lowsys = require("lowsys");
    const SECOND = 1000;
    const pingDuration  =  2 * SECOND;
    const awakeDuration = 10 * SECOND;
    const sleepDuration = 30 * SECOND;
    setInterval(function() {
    }, pingDuration);
    setTimeout(function() {
       console.log('going in deepSleep for ' + sleepDuration + 'msec');
    }, awakeDuration);

    The result :

    lowsync monitor --restart
    --- User program's output: ---
    going in deepSleep for 30000msec
    *** The connection has been lost. We will retry connecting to the microcontroller. In the meantime, please check your connection ***
    *** The connection to the microcontroller has been re-established ***
    going in deepSleep for 30000msec
    --- Program exited. ---
    1. the sleep action seems to works only once and after the program exited
    2. in deep sleep mode the power consumption is 7mA (the data sheet show 10𝜇A with RTC+ULP and 2.5𝜇A with RTC only )
      NB : I measure the power consumption with a CurrentRanger, powering directly the WROVER with 3.3V and able to mesure very low currents.

  • I don't understand the power consumption : 7mA

    on WROVER I red the special usage of GPIO12 with internal resistors, and the need to desactive it with


    In fact I use this board for my tests.
    I accept the possible impact of the 2 resistors EN+RST but a simple calculus for a 10kΩ resistor: 3.3V/10kΩ = 0.33mA = 330𝜇A.
    To obtain 7mA we need a large number of resistors ! Are they all actived ?


  • Regarding deep sleep: Looks like the problem is the lowsync monitor. I do not think that will be improved soon. I think it is OK if the monitor stops during deep sleep. But, yes, it is weird that the first time it reconnects, the second time it does not. I will put it on the long term fix list.

    Regarding power consumption in deep sleep:

    Yes we can optimize with rtc_gpio_isolate, but I think that is it. lowsys.deepSleep disables Wifi and file system, then calls esp_deep_sleep. Not much more we can do.

    As this has nothing to do with low.js, maybe you want to ask in the espressif board about power consumption?

  • @neoniousTR For the monitor impact, you are right.
    If I build with auto-start and don't use lowsync monitor, I can observe with a small test program, the power consumption and an external LED activity.
    The sleep period and the automatic restart works well.

  • @neoniousTR Did you tried deepsleep mode on Neonious One ?

  • No but I do not expect it to be better. Many more chips.

    You measured the power usage of the whole module. So the USB2UART chip is also measured. Did you check how much power that chip uses?


  • @neoniousTR nothing is connected on the USB port of the board. Only 3.3v input pin and ground from external LDO.
    Tomorrow I will write a test program with Arduino IDE to compare with the same board and same power

  • The USB2UART chip draws power no matter whether USB is connected or not.

  • @neoniousTR
    With my flashing board, if I press the power button off. The deep sleep consumption is now 1800𝜇A.
    I did not found schematic of this board also I don't know where the circuit is opened.

    Do you know if the 2 external resistances in // with EN and GPIO0 buttons can be suppressed in production environment ?

  • Oh so you had another board still connected via USB or direkt on UART?

    Well good to hear you are lower.

    EN/GPIO resistances are AFAIK not needed. But flashing will not work anymore.

  • @neoniousTR
    For the moment I stay with this dev-board.
    When I will works on final PCB, I will think on resistances, flash mode...

    Actually my main "Brain" is running on ESP32-WROVER/lowjs, communication via HTTP with my "Second" board ESP32-WROOM/C++ where are connected sensors and actuators via SPI+I2C+GPIOS+Serial.

    These HTTP communication is easy for me because I develop the Brain part on my Mac.

    In the final version, no HTTP/WIFI/BT for too high power consumption, also I developed a communication via Serial. It is not very stable in various conditions where the processors are rebooted or awaked. I will suppress it.

    These last days I tested a communication via I2C. The "Brain" is master and "Second" slave.
    On "Brain" I used the lows/I2C library at 400000 Hz.
    On "Second" I used the Arduino/gutierrezps/ESP32_I2C_Slave library with a small modification on CRC8 algorithm because there is no standard Slave version.
    It works well and it will replace the Serial communication.

    In the final version no Wifi/BLE radio will be used also a question :

    How is it possible to run lowjs without radio module on ESP32 ?
    eth.enabled is settings ? and BT ?
    like lowsys/deepSleep a new lightSleep ?

    a lightSleep, if it works, can be useful because it its possible to activate/desactivate dynamically and save a lot of energy in my project.

  • You need to set wifi.enabled = false, then Wifi is off.

    Bluetooth is always deactivated with low.js, we did not implement Bluetooth yet, we would need a sponsor for that..

    Light sleep is also not possible yet..

Log in to reply