Re: New Low Fuel Alarm Sensor
Quote:
Originally Posted by
n85ae
There's a bunch of essentially the same sensor on Amazon [...] I believe they are all the same, just sold by different vendors.
I don't mean to start an argument, but that's bit like saying an Arduino is the same as a PIC, or an MSP430, or an ESP32. Similar shape and broadly similar operating principle doesn't make them the same. Shenzhen alone is awash in electronics manufacturers, let alone the rest of China.
I'm comfortable giving this sensor a try, as both examples I purchased (separately) have worked reliably in my bench tests.
Quote:
I may end up doing a two sensor, with mini Arduino with high/low, and a comparator logic for determining a fault condition. This way if for example you had a continuous high on one, and low on the other it could be flagged as a fault condition.
So - LED/ON - Low fuel. LED/OFF have fuel. LED/Blinking - Fault condition.
Or maybe use a tricolor LED, and make it Green=good, Red=low fuel, blinking amber = fault.
Something like this...
Yes, that would certainly work. Without diagramming it, I suspect an analog comparator, some logic gates and an oscillator could do that without needing any software. If you use an Arduino (or any μC), be sure to have some means of heartbeat/watchdog monitor. They all lock up sooner or later, and if it happens with the green light on...
Be sure to test your sensors on the tank. Mine are sensitive to position and don't work if they're too close to an edge or corner.
Modern aircraft designs using a "dark cockpit" concept would prefer your first indication option: when all is well, there are no lights illuminated. I would consider swapping the On and Blinking indications. It's more important that the low fuel indication get your attention than the fault condition. That said, this is experimental aviation!
Re: New Low Fuel Alarm Sensor
Too late now, argument on!
Actually, not trying to be antagonistic, but Arduino is a good choice for this, here is why.
Arduino, IS a microcontroller (depending on which one, it's an ATmega variant, you can do this simple circuit
with an ATmega8 (if you want the simplest one). I have programmed the ATmega chips with AVR Studio, and have an
Chip Programmer for them. BUT it's a waste of time to do that for this. Arduino can be programmed from a PC right
off the USB port, just with a cable.
Doing these sensors doesn't actually need a microcontroller just to turn on an LED, but since they are essentially junk at
this price point/source I don't really trust them, and was just thinking of alternate ways to use them with more confidence.
if you don't worry about trying to look at the actual level, and just use the sensors as high/low detectors, it's very easy.
An Arduino to do this is $6-7 which is cheap. The circuit to do this, is just the sensors, which can be wired pretty
much directly to the Arduino, connecting power, and the output led. Then the rest is about a dozen lines of code.
I've never had an Arduino "lock up", but I have made stupid logic errors when programming them that look like that ...
Regards,
Jeff
Adafruit Trinket - Mini Microcontroller - 3.3V Logic [MicroUSB] ID: 1500 - $6.95 : Adafruit Industries, Unique & fun DIY electronics and kits
Quote:
Originally Posted by
Eric Page
I don't mean to start an argument, but that's bit like saying an Arduino is the same as a PIC, or an MSP430, or an ESP32. Similar shape and broadly similar operating principle doesn't make them the same. Shenzhen alone is awash in electronics manufacturers, let alone the rest of China.
Re: New Low Fuel Alarm Sensor
I agree with Eric concerning the watchdog. On an Arduino it is built in and very simple to implement. Below is how simple it is. I do think the Arduinos are pretty robust. I've got them running my CNC milling machine conversion, my 3d printer, and other stuff too. They have never failed me even running for days, or in the case of my sump pit water detector (Arduino Nano based), it has been running for about 6 years now.
Minimum code for watchdog:
#include <arv/wdt.h> //the library for the watchdog timer
void setup(){
wdt_enable(WDTO_4S); //enable watchdog timer with 4 second timeout
}
void loop(){
//Your main code here to do whatever
wdt_reset(); //resets the watchdog timer each time through the main program loop
}
Re: New Low Fuel Alarm Sensor
Wow. In all my years working with Arduinos, I never noticed that they have a watchdog function. I have a Teensy 4 based EMS in my panel and will implement that the next time I am in the code.
Re: New Low Fuel Alarm Sensor
The amazing thing about the Forum, is the amount of overthinking that goes into turning on a light :)
More amazing is - Arduino's, because you can do simply things simply. The time required to do things
with microcontrollers before they came along, was horrible. Now people can just make things, simply,
and they work.
Jeff
5 Attachment(s)
Re: New Low Fuel Alarm Sensor
If anyone is still following this saga, I finally got back to it this morning and assembled revision 2. Everything works as intended, so I'm calling it done.
There are still two versions. One is for EFIS-equipped aircraft: it provides 12V to its output during normal operation and pulls its output to ground in a low fuel alarm condition. The other is for non-EFIS-equipped aircraft: it flashes an LED during a low fuel alarm condition. Both have press-to-test capability if installed as shown on the schematics.
For either version, you'll need a DS1603NF ultrasonic liquid sensor. They're available for <$30 from numerous vendors on Amazon, eBay or AliExpress (search links). See the first post in this thread, above, where I discuss sensor position on the header tank.
For EFIS-Equipped Aircraft
Attachment 27518
Schematic/Wiring Diagram: Attachment 27521
Circuit Board: https://oshpark.com/shared_projects/sGUSk5Rn (click Actions > Order Board)
Components: https://www.digikey.com/short/p0t3pqw3 (link opens a populated shopping cart)
Momentary Pushbutton Switches: https://www.digikey.com/short/4tv9dz
For Non-EFIS-Equipped Aircraft
Attachment 27519
Schematic/Wiring Diagram: Attachment 27522
Circuit Board: https://oshpark.com/shared_projects/21g619xZ (click Actions > Order Board)
Components: https://www.digikey.com/short/9nm2m4ww (link opens a populated shopping cart)
Latching Pushbutton Switches: https://www.digikey.com/short/4tf58w
LED Bezels: https://www.digikey.com/short/4tfbjb
The two slots in the end of both circuit boards are for a small zip tie to strain-relieve the wires. Put the wires through a short length of shrink tube, solder the wires to the board, slide the shrink tube up near the solder joints and shrink it, then use a small zip tie around the wire bundle and through the slots. This works best with the head of the zip tie on the back of the board.
The new LED that I bought for the non-EFIS version is much brighter than the illuminated switch I tried before. It will be easily visible in sunlight, especially if mounted in front of the pilot. This photo doesn't do it justice.
Attachment 27520
Due to ordering minimums I have a few extra boards of each type, which I'm happy to give away. They're fully assembled and the non-EFIS boards will include the bright red LED and a chrome mounting bezel.
If you'd like one, please send me a private message indicating which type you need and your address, and I'll put one in the mail. First come, first served. You'll still need to buy the ultrasonic sensor and a pushbutton switch (see links above).
I'll post here again when they're gone.
Re: New Low Fuel Alarm Sensor
All of the non-EFIS boards are spoken for. As of this posting, I have 3 EFIS interface boards remaining.
Re: New Low Fuel Alarm Sensor
All of the remaining EFIS interface boards have gone to new homes.
Please see the links in Post #36, above, to purchase blank circuit boards and components to assemble either type of interface.
Re: New Low Fuel Alarm Sensor
Any of these installed in a flying airplane? PIREP?