Hi,

I am currently building, or rather modifying my quadcopter to fly autonomously (If you wanna know why, I actually don't have a particular reason, just simply for fun), I programmed most of the stuff already and everything works really well, but now I want to implement a "low voltage failsafe mode".

For that purpose, I would like to measure the voltage on the JST-XH balance plug via a low voltage alarm device, and send a hardware interrupt to my flight controller when the voltage reaches some critical value (lets say 3.3V per indivual cell). Since my flight controller cannot measure these voltages by itself, I have to do it this way.

I already have a low voltage alarm that connects to the balance plug (with a piezo buzzer and individual LEDs for each cell), and I think, I could solder some wire to the buzzer, and use that as a hardware interrupt output, (ofc I would calculate the appropriate current and voltage output and design a fitting circuit to provide that).

My question is, has anyone already done such a thing, or maybe does anyone know whether such a device exists premade? I did not find any on HobbyKing or anywhere else, and since this is a DIY community, I thought that I should ask you guys ;D

I am looking forward to hearing from you,

Lukas

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • I am pretty sure you do not know what a hardware interrupt is, and significant tasks one would be used in so please just refrain from asking for it, because it makes your question look less thought-thru :)

    I think I you wish a digital signal that registers low cell battery voltage, and alerts you.

    Are you aware of the "power module" ?   yes, it operates at package voltage, and you can set alarm at a calculate cell voltage.

    Is there any particular reason to why you wish to monitor each cell ? - unless flying with very bad packs (that should not be in the air in the first place) there is no drawback with configuring low-voltage setting to a calculated cell-voltage, you won't set it as low as 3.0v/cell anyway, and if you set it to anything reasonable like 3.55v/cell or more(depending on vehicle) - then no decent battery pack will have one cell under 3v while the others are that much higher anyway.

    For individual cell monitoring you can use graupner HoTT  equipment (supports max/min/current data per cell) or external MAVlink proxy that injects cell voltage (supported by mavlink)

    Could you explain why you think you need it ? - I am a sucker for telemetry and redundancy, but I don't see a point with it even I have it.  (not flying bad packs)

    • I have had two instances where a single cell went bad on me in flight. I thought these pack were airworthy prior to launch. The first time was a Multirotor and I did get a low voltage warning via the PM. Since I was not expecting this so early in flight, the aircraft was in a part of its auto mission where a forced landing would have resulted in a total loss. I had to push it further, and hope that the voltage calibration was incorrect. Shortly after the copter lost power and crashed.
      The second time was an FPV equipped fixed wing. Since the previous experience I use a voltage alarm on the balance port and tape the FPV microphone next to the beeper. The beeper went off when a single cell reached 3.5v, even though the other 2 cells where at 4.0v. Total pack voltage was 11.5 which is about half capacity, but in reality I was almost empty. I had sufficient warning to RTL safely. Honestly this time I was flying with an old battery, but I feel much more secure doing this on a fixed wing than a copter, depending on the mission.
      • After countless packs over years, (this year alone my company went thru 22 packs that are rutinely replaced) I can "guarantee" that that big difference do not appear during one flight, whithout seeing a deviant voltage after previous flights.  Cell that go bad does so over time.  Of course, If you have a pack that had been unused for months, this may maybe happen after all.   So the other solution - and the reliable one, is to regularly test internal resistance of the pack/cells  (one bad cell shows bad Rint just fine in any *S1P packs anyway  - it's only if packs are more than 1P this can get tricky.)

    • Actually, I know exactly what a hardware interrupt is, atleast I know what is refered to as a hardware interrupt in Germany. I guess you want me to differentiate between maskable and non-maskable interrupts, but in all German-speaking areas both are generally called a "hardware interrupt", because that is what they are, interrupts caused by external hardware, and that describes exactly what I want. I figured out that English-speaking areas use the term "hardware interrupt" specifically for NMIs, I apologize for the confusion.

      To further specify what I want exactly: I want a external device, such as a low voltage alarm, to submit a IRQ to the CPU of my flight controller (which in fact is a real CPU, running in RT). Since an IRQ is simply a higher-than-ground voltage on a specific pin, I guess that connecting the buzzer output to such a pin would do the trick, with some modification to the circuit, ofc.

      • IRQ is used for very time critical functions only, such function as what you describe, may as well be in a 1Hz loop.

        Why involve CPU at all, if all you want is to sound a buzzer ?

        • I do not want to hear the buzzer, all I want to do is to handle a interrupt so that the multicopter automatically lands when the battery goes flat. Since this happens exactly ONCE, it is counterintuitive to check the voltage every period, or even every 1 second, therefore, I want to build a device, that submits an interrupt as soon as one cell reaches a critical voltage level, whether that is 3.3V or 3.5V is totally unimportant.

          • Ok. please realize that NO developer here will even consider using an hardware interrupt for this, doing so would be just so wrong, it's unspeakable :)  - so please don't get hung up in IRQ's :) 

            you say you want to build a device, it's easy.

            you have already an voltage sensing pin on APM power module.

            You disconnect it and feed it to your own voltage sensing circuit, a simple Arduino Micro would do  - usually - you would send the output that represents Vbatt, let's say it represents 16V , then you could sense the individual cell voltages, in case any deviating cell voltage (over a predefined percentage/or mV threshold) - your microcontroller would replace the Vbatt with a voltage that represents not the pack voltage, but the lowest cell voltage.  for example 3v , for 2 seconds.

            This would make your autopilot properly respond to low batery - and - you would get logged the lowest battery cell voltage. 

            If you prefer analog electronics, you could do that with a quad comparator (for 4Cell) - and just pull down the battery sensing pin from APM power module.  

  • I had the same idea here: https://github.com/diydrones/ardupilot/issues/1093
    It never got any traction in the community.
This reply was deleted.

Activity