Deep Sleep

I think I made progress of a sort. I’m not sure what I did differently to illicit this result but I’m now getting 3.3v measured between LED6 and 3.3v pads. However, whenever I have the negative lead of the BT909 connected to LED6, the speaker plays a constant tone and the saber is unresponsive to button presses or gestures. Moving the negative lead to the negative battery terminal makes the saber responsive again with no constant tone but, of course, the BT909 stays on at all times in this condition.

I could use some more help on this one.

Is anyone able to provide additional support here? I’m at a loss.

I’m at a bit of a loss. Here’s the checklist for what it needs, at least. I’m sure you’ve done all this but it can’t hurt.

  • #define ENABLE_SERIAL and #define IDLE_OFF_TIME 60 * 10 * 1000 in config_top
  • StylePtr<Blue>(), as the second blade style in each preset
  • SimpleBladePtr<CH3LED, NoLED, NoLED, NoLED, bladePowerPin6, -1, -1, -1>(), as the second blade in the config
  • BT voltage to 3.3, BT negative to LED 6, TX on proffie to RX on BT, and RX on Proffie to TX on BT. Obviously make sure you’re using the new pins as they’ve changed locations from 2.2 to 3.9.

@profezzorn is it possible that there is a better style to use than StylePtr<Blue>(),cause that’s the only thing I can think of considering it works when his primary blade is on. @Upquark maybe post your entire config file here?

That’s all I got.

Thanks for the checklist. I went through everything and confirmed each one is correct. I’m beginning to suspect this is one only @profezzorn can answer unless there’s something obviously wrong with my config. See full config below.

// ProffieOS7 Config File
#ifdef CONFIG_TOP
#include "proffieboard_v3_config.h"
#define NUM_BLADES 2
#define NUM_BUTTONS 1
const unsigned int maxLedsPerStrip = 144;
#define EXTRA_COLOR_BUFFER_SPACE 70
#define VOLUME 2000
#define CLASH_THRESHOLD_G 1.5
#define AUDIO_CLASH_SUPPRESSION_LEVEL 4
#define PROFFIEOS_ACCELEROMETER_RANGE 16
#define PROFFIEOS_MOTION_FREQUENCY 1600
#define ENABLE_AUDIO
#define ENABLE_MOTION
#define ENABLE_WS2811
#define ENABLE_SD
#define KILL_OLD_PLAYERS
#define MOTION_TIMEOUT 60 * 5 * 1000
#define IDLE_OFF_TIME 60 * 5 * 1000
#define DISABLE_BASIC_PARSER_STYLES
#define DISABLE_DIAGNOSTIC_COMMANDS
#define ENABLE_ALL_EDIT_OPTIONS
#define SAVE_PRESET
#define DISABLE_TALKIE
#define NO_REPEAT_RANDOM
#define ENABLE_SERIAL
#define FETT263_EDIT_SETTINGS_MENU
#define FETT263_SPECIAL_ABILITIES
#define FETT263_CLASH_STRENGTH_SOUND
#define FETT263_MAX_CLASH 16
#define FETT263_SPIN_MODE
#define FETT263_SAY_BATTERY_PERCENT
#define FETT263_USE_BC_MELT_STAB
#define FETT263_LOCKUP_DELAY 500
#define FETT263_BM_CLASH_DETECT 6
#define FETT263_SWING_ON_SPEED 500
#define FETT263_SWING_ON
#define FETT263_SWING_ON_NO_BM
#define FETT263_THRUST_ON
#define FETT263_THRUST_ON_NO_BM
#define FETT263_TWIST_OFF
#define FETT263_FORCE_PUSH_ALWAYS_ON
#define FETT263_FORCE_PUSH_LENGTH 10
#endif

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



#ifdef CONFIG_PRESETS

Preset presets[] = {
{ "Protostar;common", "common/tracks/venus.wav",
	StylePtr<Layers<

  //Base Fett263 Dark Orange Audioflicker
  AudioFlicker<RotateColorsX<Variation,DarkOrange>,RotateColorsX<Variation,Rgb<128,34,0>>>,
  
  //Unstable Orange-Red Audioflicker Swing Effect
  AlphaL<AudioFlicker<BrownNoiseFlicker<RotateColorsX<Variation,OrangeRed>,Black,300>,RotateColorsX<Variation,Orange>>,SwingSpeed<285>>,
  
  //Fett263 Bright Ripple Hard Swing
  AlphaL<Stripes<2000,-3250,RotateColorsX<Variation,Orange>,RotateColorsX<Variation,Rgb<60,36,0>>,Pulsing<RotateColorsX<Variation,Rgb<30,17,0>>,Black,800>>,Scale<IsLessThan<SwingSpeed<675>,Int<13600>>,Scale<SwingSpeed<675>,Int<-19300>,Int<32768>>,Int<0>>>,
  
  //Fett263 Bright Sparking Emitter Flare
  AlphaL<RotateColorsX<Variation,Rgb16<65535,52226,0>>,SmoothStep<Scale<SlowNoise<Int<2500>>,Int<1500>,Int<4500>>,Int<-6000>>>,
  
  //Fett263 Responsive Intensity Lockup
  LockupTrL<AlphaMixL<Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>,BrownNoiseFlickerL<RgbArg<LOCKUP_COLOR_ARG,White>,Int<200>>,StripesX<Int<1800>,Scale<NoisySoundLevel,Int<-3500>,Int<-5000>>,Mix<Int<6425>,Black,RgbArg<LOCKUP_COLOR_ARG,White>>,RgbArg<LOCKUP_COLOR_ARG,White>,Mix<Int<12850>,Black,RgbArg<LOCKUP_COLOR_ARG,White>>>>,
  TrConcat<TrExtend<50,TrInstant>,Mix<IsLessThan<ClashImpactF<>,Int<26000>>,RgbArg<LOCKUP_COLOR_ARG,White>,AlphaL<RgbArg<LOCKUP_COLOR_ARG,White>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>,Scale<ClashImpactF<>,Int<20000>,Int<60000>>>>>,TrExtend<3000,TrFade<300>>,AlphaL<AudioFlicker<RgbArg<LOCKUP_COLOR_ARG,White>,Mix<Int<10280>,Black,RgbArg<LOCKUP_COLOR_ARG,White>>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>,Int<13000>>>,TrFade<3000>>,
  TrConcat<TrInstant,RgbArg<LOCKUP_COLOR_ARG,White>,TrFade<1950>>,SaberBase::LOCKUP_NORMAL>,
  
  //Fett263 Responsive Lightning Block
  ResponsiveLightningBlockL<Strobe<RgbArg<LB_COLOR_ARG,White>,AudioFlicker<RgbArg<LB_COLOR_ARG,White>,Blue>,50,1>,TrConcat<TrInstant,AlphaL<RgbArg<LB_COLOR_ARG,White>,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<RgbArg<LB_COLOR_ARG,White>,Int<16000>>,30>,TrSmoothFade<600>>>,
  
  //Responsive Stab
  ResponsiveStabL<AudioFlickerL<RgbArg<STAB_COLOR_ARG,Yellow>>,TrWipeInX<Percentage<WavLen<EFFECT_STAB>,50>>,TrFadeX<Percentage<WavLen<EFFECT_STAB>,50>>>,
  
  //Fett263 Multi-blast, blaster reflect cycles through different responsive effects
  EffectSequence<EFFECT_BLAST,ResponsiveBlastL<RgbArg<BLAST_COLOR_ARG,White>,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>,Int<400>>,LocalizedClashL<RgbArg<BLAST_COLOR_ARG,White>,80,30,EFFECT_BLAST>,ResponsiveBlastWaveL<RgbArg<BLAST_COLOR_ARG,White>,Scale<SwingSpeed<400>,Int<500>,Int<200>>,Scale<SwingSpeed<400>,Int<100>,Int<400>>>,BlastL<RgbArg<BLAST_COLOR_ARG,White>,200,200>,ResponsiveBlastFadeL<RgbArg<BLAST_COLOR_ARG,White>,Scale<SwingSpeed<400>,Int<6000>,Int<12000>>,Scale<SwingSpeed<400>,Int<400>,Int<100>>>,ResponsiveBlastL<RgbArg<BLAST_COLOR_ARG,White>,Scale<SwingSpeed<400>,Int<400>,Int<100>>,Scale<SwingSpeed<400>,Int<200>,Int<100>>,Scale<SwingSpeed<400>,Int<400>,Int<200>>>>,
  
  //Fett263 Real Clash
  Mix<IsLessThan<ClashImpactF<>,Int<26000>>,TransitionEffectL<TrConcat<TrInstant,AlphaL<RgbArg<CLASH_COLOR_ARG,Rgb<255,187,108>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>,Scale<ClashImpactF<>,Int<12000>,Int<60000>>>>,TrFadeX<Scale<ClashImpactF<>,Int<200>,Int<400>>>>,EFFECT_CLASH>,TransitionEffectL<TrWaveX<RgbArg<CLASH_COLOR_ARG,Rgb<255,187,108>>,Scale<ClashImpactF<>,Int<100>,Int<400>>,Int<100>,Scale<ClashImpactF<>,Int<100>,Int<400>>,Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>>,EFFECT_CLASH>>,
  
  //Fett263 White Unstable Ignition Effect
  TransitionEffectL<TrConcat<TrInstant,Stripes<3000,-2500,White,RandomPerLEDFlicker<Rgb<60,60,60>,Black>,BrownNoiseFlicker<White,Rgb<30,30,30>,200>,RandomPerLEDFlicker<Rgb<80,80,80>,Rgb<30,30,30>>>,TrFade<2400>>,EFFECT_IGNITION>,
  
  //Bright Retraction Effect
  TransitionEffectL<TrConcat<TrFadeX<WavLen<EFFECT_RETRACTION>>,AudioFlickerL<RotateColorsX<Variation,Rgb16<65535,52226,0>>>,TrInstant>,EFFECT_RETRACTION>,

  //Fett263 Intensity Drag
  LockupTrL<AlphaL<RandomPerLEDFlickerL<RgbArg<DRAG_COLOR_ARG,White>>,SmoothStep<IntArg<DRAG_SIZE_ARG,27500>,Int<5000>>>,TrConcat<TrExtend<4000,TrWipeIn<200>>,AlphaL<BrownNoiseFlickerL<RgbArg<DRAG_COLOR_ARG,White>,Int<300>>,SmoothStep<IntArg<DRAG_SIZE_ARG,29250>,Int<5000>>>,TrFade<4000>>,TrFade<300>,SaberBase::LOCKUP_DRAG>,
  
  //Fett263 Responsive Intensity Melt
  LockupTrL<AlphaL<Remap<Scale<RampF,Int<65536>,Int<0>>,StaticFire<Mix<TwistAngle<>,OrangeRed,DarkOrange>,Mix<TwistAngle<>,OrangeRed,Orange>,0,3,5,3000,10>>,SmoothStep<IntArg<MELT_SIZE_ARG,26000>,Int<6000>>>,TrConcat<TrWipeIn<100>,AlphaL<Red,SmoothStep<Int<29000>,Int<8000>>>,TrExtend<2000,TrFade<300>>,AlphaL<Mix<TwistAngle<>,Red,Orange>,SmoothStep<Int<29000>,Int<8000>>>,TrFade<3000>>,TrFade<250>,SaberBase::LOCKUP_MELT>,
  
  //Fett263 Power Save, if using his prop file hold Aux and click PWR while ON (pointing up) to dim blade in 25% increments.
  EffectSequence<EFFECT_POWERSAVE,AlphaL<Black,Int<8192>>,AlphaL<Black,Int<16384>>,AlphaL<Black,Int<24576>>,AlphaL<Black,Int<0>>>,

  //Fett263 Dual Mode White Spark Tip Ignition and Retraction - Hold above horizontal for fast ignition or below horizontal for slow ignition.
  InOutTrL<TrJoin<TrWipeX<Scale<IsLessThan<BladeAngle<>,Int<16000>>,Percentage<WavLen<EFFECT_IGNITION>,5>,Percentage<WavLen<EFFECT_IGNITION>,50>>>,TrWaveX<White,Scale<IsLessThan<BladeAngle<>,Int<16000>>,Percentage<WavLen<EFFECT_IGNITION>,15>,Percentage<WavLen<EFFECT_IGNITION>,75>>,Int<400>,Scale<IsLessThan<BladeAngle<>,Int<16000>>,Percentage<WavLen<EFFECT_IGNITION>,5>,Percentage<WavLen<EFFECT_IGNITION>,50>>,Int<0>>>,TrJoin<TrWipeInX<WavLen<EFFECT_RETRACTION>>,TrWaveX<White,Percentage<WavLen<EFFECT_RETRACTION>,200>,Int<400>,WavLen<EFFECT_RETRACTION>,Int<32768>>>>,
  
  //Fett263 optional/alternate Passive Battery Monitor: on boot (1st line) or font change (2nd line) you will get a visual indicator at the emitter of your current battery level. This also works without a blade if you have a lit emitter or blade plug. Green is Full, Red is Low (the color will blend from Green to Red as the battery is depleted), the indicator will fade out after 3000 ms and not display again until powered down and back up or fonts change.
  //TransitionEffectL<TrConcat<TrDelay<1500>,Black,TrFade<1000>,AlphaL<Mix<BatteryLevel,Red,Green>,Bump<Int<0>,Int<6000>>>,TrFade<3000>>,EFFECT_BOOT>,
  //TransitionEffectL<TrConcat<TrInstant,AlphaL<Mix<BatteryLevel,Red,Green>,Bump<Int<0>,Int<6000>>>,TrFade<3000>>,EFFECT_NEWFONT>,
  
  //Fett263 On-Demand Battery Level: if using Fett263's prop file Hold AUX and click PWR while OFF, the battery level is represented by the location on the blade; tip = full, hilt = low and color; green = full, yellow = half, red = low
  TransitionEffectL<TrConcat<TrInstant,AlphaL<Mix<BatteryLevel,Red,Green>,Bump<BatteryLevel,Int<10000>>>,TrDelay<2000>,AlphaL<Mix<BatteryLevel,Red,Green>,Bump<BatteryLevel,Int<10000>>>,TrFade<1000>>,EFFECT_BATTERY_LEVEL>,
  
  //Audio responsive charge-up preon effect
  TransitionEffectL<TrConcat<TrInstant,AlphaL<Mix<Trigger<EFFECT_PREON,Percentage<WavLen<EFFECT_PREON>,33>,Percentage<WavLen<EFFECT_PREON>,34>,Percentage<WavLen<EFFECT_PREON>,33>>,StyleFire<Gradient<RotateColorsX<Variation,Rgb16<65535,11439,0>>,RotateColorsX<Variation,Orange>,RotateColorsX<Variation,DarkOrange>,RotateColorsX<Variation,Rgb16<65535,52226,0>>>,RotateColorsX<Variation,Rgb<60,30,0>>,0,1,FireConfig<0,2000,5>,FireConfig<0,2000,5>,FireConfig<0,2000,5>,FireConfig<0,2000,5>>,RandomPerLEDFlicker<RotateColorsX<Variation,Orange>,RotateColorsX<Variation,Rgb16<14386,7000,0>>>,BrownNoiseFlicker<Black,RotateColorsX<Variation,Orange>,100>>,SmoothStep<Scale<NoisySoundLevel,Int<-1000>,Int<25000>>,Int<-4000>>>,TrDelayX<WavLen<EFFECT_PREON>>>,EFFECT_PREON>,
  
  //Ripple-Out Preon Effect
  TransitionEffectL<TrConcat<TrDelayX<Percentage<WavLen<EFFECT_PREON>,65>>,TransitionLoopL<TrWaveX<RotateColorsX<Variation,Rgb16<65535,52226,0>>,Int<115>,Int<375>,Int<250>,Int<0>>>,TrDelayX<Percentage<WavLen<EFFECT_PREON>,35>>>,EFFECT_PREON>
  >>(), 
  
  StylePtr<Blue>(),
    
  "protostar"},

};

BladeConfig blades[] = {
 { 0, WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(), 
 SimpleBladePtr<CH3LED, NoLED, NoLED, NoLED, bladePowerPin6, -1, -1, -1>(),
 CONFIGARRAY(presets) },
};
#endif

#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
#endif

 /* Generated with Fett263 Config Helper v3.10 */

I don’t see anything wrong with the config.
Also…

This is really weird. The only difference between “LED6” and “BATT-” is that LED6 turns on and off and BATT- doesn’t. These crashes are happening with no changes in configuration, right?

One possible reason might be high resistance/cold solder joints maybe…

Correct! Just changing the location of the negative lead makes this happen.

I’ve double checked my solder joints and even tried resoldering but no luck.

What kind of capacitor did you add?

I didn’t have any SMD caps that were the right value so I just used a standard electrolytic (yes I got the polarity correct). It’s a 47uF 50v cap.

Hmm, I’m not enough of an EE to know if using an electrolyte makes a difference or not. Maybe try a larger cap? (220uF or something?)

Don’t have anything like that handy. I decided to just order some 100uF 0805 caps from Digikey. I’ll stack two if one isn’t enough. I’ll let you know in a few days if it works. Wish me luck.

Just got my tracking info from DigiKey and it’s going to be a little while before I get those caps…

In the meantime, any update on progress with deep sleep implementation @profezzorn? Anything I can do to help?

Where are you located @Upquark? I would be happy to send a couple your way.

I’m located near Portland, OR. Feel free to DM me! Thank you!

I can report that after receiving and installing a proper 0805 100uF to the board, the BT909 module is now “sleeping” as expected. This is with the positive lead connected to the 3.3v pad and negative to LED6. After 5min (per my config) it goes into idle and the module is no longer present on the scan list, indicating it is off. It resumes functionality after waking up the saber.

While this is a marked success and I deeply appreciate everyone’s help getting this working, I still feel strongly that deep sleep should be properly implemented to avoid this workaround. @profezzorn, has there been any forward momentum over the last couple weeks?

I’m afraid not. Starting a new job takes time and energy. It’s on my todo list to work on, but the todo list is getting somewhat length so I’m not sure when I’ll get to it I’m afraid.

With the greatest respect, I don’t feel it’s anyone’s place to “…feel strongly…” about anything in ProffieOS that they don’t like. Fredrik and others have created an incredible system spending countless hours of their time completely unpaid, and then made the results available to all of us for free. The code is readily available. If you want to copy it and spend a lifetime learning C++ to write deep sleep into it yourself, you are free to do so. Maybe it was just worded badly, but your post reads as if you feel that the author(s) of ProffieOS aren’t working hard enough. Such phrasing might be OK to Microsoft who get paid, but I don’t think it’s appropriate in respect of a fan-driven free product like ProffieOS.
Hope you don’t mind my mentioning it.