Main Menu

Low Power

Started by hakcenter, July 20, 2015, 11:14:28 AM

hakcenter

Well since I redid my whole radio / lbb box setup... I really didn't want to use the radio accessory power to power the little guy.

Just running on straight always on battery power from the upper cigarette lighter, but then I'm concerned on power usage.. not like it'll ever drain 2 batteries in its lifetime, but no sense in wasting power if you don't have to.

Enter low power stuff

So I nabbed a simple low power library that uses the watchdog to wakeup the arduino. Instead of an interrupt... which imho is a waste of a pin, and the code is never going to fault out and break.. pretty robust.

So the library is in the library thread, Arduino Libraries

In main includes

#include <LowPower.h>


Loop adjustment

void loop() {
  // Sleep
  unsigned int sleep = 0;



    // Freq Measure
    if (FreqMeasure.available()) {
      sleep = 0;
      [...]
    } else {
      sleep++;
    }
    if (sleep > 33000) {
      if (serial_out) { Serial.println("Going to sleep"); }
      delay(10);
      LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
      delay(10);
      if (serial_out) { Serial.println("Waking up"); }
      sleep = 0;
    }


else falls out to a 1ms delay, that counts up to 1second, if no frequency updates in a second, fall out to full sleep for 8 seconds, reset timer, and repeat.

Working pretty stout so far. I haven't measured draw but I'm expecting atleast 10mA less draw.
TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

Rx7man

I was wondering about the same thing... I was just going to see what I could do to kill the power to all the externals at least.. stepper driver, CAN, etc.

I think you can do a software reclock on the arduino and bring it down to a couple MHZ to reduce power... On a Mega that has a ton of extra digital IO's you could poll every second or whatever and if it's been powered off for X number of cycles, lower the clock speed.
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

me78569

Why not just run your power from a keyed power source?  you could use a relay if you wanted to I suppose.
2000 Dodge 2500 quad-cab 5.9 Cummins slt, homebuilt 47re revmax 3.5 messed with vb, Quad adr iquad, 4" tbe , pureflow 150 gph. he351ve in the works 100hp DFI inj

hakcenter

Waaaaaay to lazy for that, LOL

30-40mA is not even a real draw anyways.
TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

me78569

Got ya.  I ran mine on the same lead as my tuner ignition sense so it was easy.

Are you cycling the veins ever to clean them?
2000 Dodge 2500 quad-cab 5.9 Cummins slt, homebuilt 47re revmax 3.5 messed with vb, Quad adr iquad, 4" tbe , pureflow 150 gph. he351ve in the works 100hp DFI inj

hakcenter

Ya when the box is turning on it takes a whole second to send position, so it defaults to full open, then starts to close.
TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

me78569

Duh,


With no measure it will go wide open haha.  My mind is mush.
2000 Dodge 2500 quad-cab 5.9 Cummins slt, homebuilt 47re revmax 3.5 messed with vb, Quad adr iquad, 4" tbe , pureflow 150 gph. he351ve in the works 100hp DFI inj