Proffieboard V2.2 deep sleep mode

I have made some measurement on my saber:
on with blade: 2200mA
on with only 5 led hilt: 150mA
off (with oled screen and BLE activated): 50mA
off after 5min => idle (oled screen and AV leds + BLE are OFF) : 17mA to 22mA

so it still draw 20mA in deep sleep mode and it will deplete my battery in a few days.

i surely have missed something…
any idea?

below is my config and my wiring

#ifdef CONFIG_TOP
#include "proffieboard_v2_config.h"
#define NUM_BLADES 4
#define NUM_BUTTONS 2
#define VOLUME 800
const unsigned int maxLedsPerStrip = 137;  // 132+5
#define CLASH_THRESHOLD_G 1.0
#define ENABLE_AUDIO
#define ENABLE_MOTION
#define ENABLE_WS2811
#define ENABLE_SD
#define ENABLE_SSD1306

#define ENABLE_SERIAL
#define IDLE_OFF_TIME 60*5*1000 //idle after 5min

// custom FETT263
#define COLOR_CHANGE_DIRECT
// #define DISABLE_DIAGNOSTIC_COMMANDS
#define FETT263_FORCE_PUSH
#define FETT263_LOCKUP_DELAY 200
#define MOTION_TIMEOUT 60 * 15 * 1000
#define FETT263_MULTI_PHASE
#endif

#ifdef CONFIG_PROP
#include "../props/saber_fett263_buttons.h"
#endif

#ifdef CONFIG_PRESETS
Preset presets[] = {
   { "Maul", "tracks/track4.wav",
    StylePtr<Layers<AudioFlicker<RotateColorsX<Variation,Red>,RotateColorsX<Variation,Rgb<128,0,0>>>,LockupTrL<Layers<AlphaL<AudioFlickerL<White>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,AlphaL<White,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,Int<10000>>>>,TrConcat<TrInstant,White,TrFade<400>>,TrConcat<TrInstant,White,TrFade<400>>,SaberBase::LOCKUP_NORMAL>,ResponsiveLightningBlockL<Strobe<White,AudioFlicker<White,Blue>,50,1>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>>,ResponsiveStabL<Orange,TrWipeIn<600>,TrWipe<600>>,ResponsiveBlastL<White,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>,Int<400>>,ResponsiveClashL<White,TrInstant,TrFade<400>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>,Int<20000>>,LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Mix<TwistAngle<>,Rgb<255,200,0>,DarkOrange>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,InOutTrL<TrWipe<300>,TrWipeIn<500>,Black>>>(),
    StylePtr<Layers<Red,InOutTrL<TrInstant,TrInstant,Pulsing<Black,Red,3000>>>>(),
    StyleNormalPtr<BLUE, BLUE, 300, 800>(),
    StylePtr<BLUE>(),
    "Maul"},
   { "TeensySF", "tracks/venus.wav",
    StylePtr<Layers<AudioFlicker<RotateColorsX<Variation,Red>,RotateColorsX<Variation,Rgb<128,0,0>>>,LockupTrL<Layers<AlphaL<AudioFlickerL<White>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,AlphaL<White,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,Int<10000>>>>,TrConcat<TrInstant,White,TrFade<400>>,TrConcat<TrInstant,White,TrFade<400>>,SaberBase::LOCKUP_NORMAL>,ResponsiveLightningBlockL<Strobe<White,AudioFlicker<White,Blue>,50,1>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>>,ResponsiveStabL<Orange,TrWipeIn<600>,TrWipe<600>>,ResponsiveBlastL<White,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>,Int<400>>,ResponsiveClashL<White,TrInstant,TrFade<400>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>,Int<20000>>,LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Mix<TwistAngle<>,Rgb<255,200,0>,DarkOrange>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,InOutTrL<TrWipe<300>,TrWipeIn<500>,Black>>>(),
    StyleNormalPtr<RED, RED, 300, 800>(),
    StyleNormalPtr<BLUE, BLUE, 300, 800>(),
    StylePtr<BLUE>(),
    "Sith red"},
};

struct AVRedLED {
    static constexpr float MaxAmps = 0.02;
    static constexpr float MaxVolts = 2.15;
    static constexpr float P2Amps = 0.01;
    static constexpr float P2Volts = 1.8;
    static constexpr float R = 100.0; // Resistor value
    static const int Red = 255;
    static const int Green = 0;
    static const int Blue = 0;
};
struct AVBlueLED {
    static constexpr float MaxAmps = 0.02;
    static constexpr float MaxVolts = 2.55;
    static constexpr float P2Amps = 0.01;
    static constexpr float P2Volts = 1.8;
    static constexpr float R = 100.0; // Resistor value
    static const int Red = 0;
    static const int Green = 0;
    static const int Blue = 255;
};
struct BT_CH3 {  // activation BLE on channel Blue
    static constexpr float MaxAmps = 1;
    static constexpr float MaxVolts = 1000;
    static constexpr float P2Amps = 0.0;
    static constexpr float P2Volts = 0.0;
    static constexpr float R = 0.0; // Resistor value
    static const int Red = 0;
    static const int Green = 0;
    static const int Blue = 255;
};

BladeConfig blades[] = {
    { 0, WS281XBladePtr<137, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(), //main blade
    SimpleBladePtr<AVRedLED, NoLED, NoLED, NoLED, bladePowerPin4, -1, -1, -1>(), // Led Power button
    SimpleBladePtr<AVBlueLED, NoLED, NoLED, NoLED, bladePowerPin5, -1, -1, -1>(), // Led Aux button
    SimpleBladePtr<BT_CH3, NoLED, NoLED, NoLED, bladePowerPin6, -1, -1, -1>(), // BLE activation on channel blue
    CONFIGARRAY(presets) },
};
#endif

#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
Button AuxButton(BUTTON_AUX, auxPin, "aux");
#endif

The OLED display would need to be disabled when you’re not using it to reach better standby time.
There is currently no code for doing that, and because the display would need to be re-initialized after loosing power, there is currently no way to have great standby time with an oled display.
Basically, we need to fix the code, but until then you need some way to cut the power. (Like, taking out the battery.)

That was what i have missed: i have assumed the OLED display was disable when there is nothing displayed !
But it is still on, just showing nothing.

Maybe i could use a free fet pad (Led 1 is unsued on my build) to cut off the display, but it could have some initialization failure…

I surely go for a “Pull-Off battery” method then :wink:
thank’s for the help

It’s something I’ve meant to work on for a while now but never got around to.
I should be able to make a “true” deep sleep mode for the V3 board though, which might make all of this easier.

You said that about the 2.2 :stuck_out_tongue:

Honestly though, I feel like it’s diminishing returns since the low power mode is already pretty reasonable.

I said something similar yes.
I’ve tried a couple of times to implement code that turns off the power to the SD card, which would improve standby time a lot. Unfortunately, my attempts are missing something and the result is that the card draws more power, and I have not yet been able to figure out why.

It’s also possible that the V3 deep-sleep will go the same way, we will see.