Engine Timer

Post Reply
User avatar
jevermeister
Posts: 708
Joined: Wed Jul 20, 2011 8:56 am
Contact:

Engine Timer

Post by jevermeister »

Hi,

ok, here is a simple idea:

I always have the problem, that I forget the flight time, I mostly use my phone to set a countdown to remind me to land in order to NOT kill the LIPO.
The Low Voltage warning is useless for that.
The Powermeter needs to be calibrated to each and every Lipo.

My idea is to implement a timer that sums up the time the system is armed (motors are spinning), so after a given time (maybe a config.h parameter) the buzzer will beep while the system is armed.
This helps people with cheap TX Systems like me ;-)

I already coded it:

Code: Select all

  
static uint8_t warn_runtime = 0,runTimeOfMotors = 0;     
static long millis_old = 0;   

Code: Select all

  if ( millis_old <= millis() ){
    millis_old = millis()+1000;   //+1 second
    if(armed == 1){
    runTimeOfMotors++;
    }  }
  if (runTimeOfMotors >300){  //5min of flight =300s (could be a parameter or a gui variable too)
    warn_runtime = 1;             //activate buzzer
  }


instead of "armed" ore could think of using a throttle threshold (idle+2ß% or something)
I implemented it in buzzer.ino
as usual, this seems to be a good idea for ME but what do you guys think?
Especially with the current memory discussion raging on?

Is this a usefull feature that deserves to be in the shared trunk?

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: Engine Timer

Post by kos »

I mostly use my phone to set a countdown to remind me to land in order to NOT kill the LIPO.


https://www.google.fr/search?q=lipo+buzzer

User avatar
jevermeister
Posts: 708
Joined: Wed Jul 20, 2011 8:56 am
Contact:

Re: Engine Timer

Post by jevermeister »

This is the same principle used in the multiwii controller. The buzzer start to beep if the voltage is below a given threshold - we have three levels at the moment.
BUT
the LiPo voltage curve is not a good indicator for that. It is stable until a blink before the LiPo is discharged too much.

Everybody I know uses a countdown that is installed in his tx.

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: Engine Timer

Post by kos »

kos wrote:
I mostly use my phone to set a countdown to remind me to land in order to NOT kill the LIPO.


https://www.google.fr/search?q=lipo+buzzer



you need a countdown to be displayed on your groundstation or send via telemetry
you need the countdown to autostart
you need the countdown to be proportional to the drawn current


but this as nothing to do with NOT kill the LIPO .. i was mainly making fun of your requirement, i quoted this chosen part for a reason.

http://en.wikipedia.org/wiki/5_Whys

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Engine Timer

Post by Tommie »

I'd appreciate some kind of general purpose warning system. Any subsystem should be able to indicate an emergency (e.g. excessive I²C errors, voltage failure etc.), and other subsystems would be triggered to indicate this state (special LED blink sequence, telemetry warning, buzzer buzzing like made etc.).

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Engine Timer

Post by Alexinparis »

I think it's possible to tune the powermeter code for this need.
(for instance implementing a gas threshold with a fake and flat consumption)

User avatar
jevermeister
Posts: 708
Joined: Wed Jul 20, 2011 8:56 am
Contact:

Re: Engine Timer

Post by jevermeister »

Alexinparis wrote:I think it's possible to tune the powermeter code for this need.
(for instance implementing a gas threshold with a fake and flat consumption)

Good point!
I will take a look into that and report back.

Nils

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Engine Timer

Post by Hamburger »

Nils,
the 'uptime' counters for both armed and power-on are both there already.
What you need to add is the alarm threshold and the alarm.

User avatar
jevermeister
Posts: 708
Joined: Wed Jul 20, 2011 8:56 am
Contact:

Re: Engine Timer

Post by jevermeister »

Hamburger wrote:Nils,
the 'uptime' counters for both armed and power-on are both there already.
What you need to add is the alarm threshold and the alarm.


Damn,
I knew that I reinvented the wheel ;-)

So let's see where it is...

User avatar
jevermeister
Posts: 708
Joined: Wed Jul 20, 2011 8:56 am
Contact:

Re: Engine Timer

Post by jevermeister »

Did not find it :-/

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Engine Timer

Post by Hamburger »

got eclipse open, so from LCD.ino

Code: Select all

print_uptime(armedTime / 1000000);
print_uptime(millis() / 1000 );

ok?

Post Reply