Hello all
anyone can help with his experience in installing fuel level sensor for a fuel tank ?
there is the contactless level sensor but dont know if it will work with rpi - node red
What sensor are you using?
i am asking what kind of sensor should be used
My apologies, I misread your post.
That's a difficult question to answer because it's not so much what sensor can be used with the fuel tank, it's what sensor can your computer read? There are tens, if not hundreds of thousands of sensors you can pick from. If you're using just a Raspberry Pi, you have a few digital options. If you're using an ADC HAT with a Raspberry Pi, you have even more options because now you can read analog. If you have a universal input module that can read voltage, current or 4/20 signals and send the signal over something like RS232, MODBUS or ethernet, you have even more options of using industry standard sensors. That's the real question is what kind of sensor are you able to connect to?
If you're really trying to keep it cheap, you may want to invest in a Pi Pico for its analog inputs and use a basic analog rheostat based level sensor. If you want it simple, look for a contactless level sensor that has digital outputs for something like the Pi or Arduino. If you want programming simplicity, this sensor wires to the serial port through RS485 protocol to read the sensor over MODBUS which has nodes in Node-Red. There's several sensors like that as well. You could also get a reader that reads analog and transmits the data over serial.
Starting with the sensor is a very difficult place to start. It's much easier to start with the interface as that will narrow your field you can look at significantly. Once you have that field narrowed down, start thinking of what type of sensor you want to use like float based or contactless. Then narrow it down even more.
Make sense?
I am assuming you mean a fuel storage tank for a house - not a vehicle.
You could also use an ultrasonic sensor, like the HC-SR04 to measure distance to the surface of the fluid.
Then knowing the depth of the tank and its shape, you could work out the volume of liquid.
I think @BartButenaers has been working on a node to do the calculations.
And there's a node for doing just that:
yes i used this sensor before with water tank but with time it was damaged . so it will not work well with fuel tank
In my van I have a water tank over my wheel arch. So I needed something to determine the remaining water for a non-linear tank. I am using a standard 0-10psi pressure sensor. The sensor is attached to a brass pipe, leaving only the bottom cross section open. If water is filled-up/drained the air column gets compressed. This pressure I am reading. The output is an 0.5 to 4.5V signal. You put this signal into an ADS1115 analogue/digital converter. The ADS connects via I2C to your RPi and has a 16-Bit resolution. From here you can have the readings in Node Red. There is a ADS1115 Node (which I am using) put a function node behind it and to your voodoo. (Pressure sensor rd. 15USD, ADS1115 rd 5USD).
I did some experiments some time ago with this one:
I haven't installed it yet inside the fuel tank, so cannot tell you whether it has accurate measurements (e.g. by reflections inside the tank).
You might search this forum for other discussions about the same topic. For example in this discussion you can find some ideas from other users about their level sensors.
Bart
yes it makes sense too much .
if i want to use the Non-Contact Ultrasonic Fuel Level Sensor UL212-F , what equipment's should be installed with in order to connect it via my rpi .
have you used that sensor before ?
I'm using a JSNSR04T in the top bung of a household heating oil tank. Over a year and working fine so far.
I used PVC pipe fittings to mount the sensor and loosely seal it in to the tank, then a porthole connector to maintain the seal while getting connections through.
One day I'll be wealthy enough to fill the tank and calibrate the sensor for full...
According to the documentation I could find, that sensor is an resistance-mimicking sensor that is meant to replace typical automotive sensors. In order to use it, you would need something like an ADC setup with some added circuitry to read the voltage difference or have some kind of current sensor to read using the ADC. Nothing on the Pi will natively support that connection.
do you have any pictures of the installation and how did it is mounted ?
because i want to see the level remotely and there is rpi in the site connected to internet with node red installed thats why i am asking about sensors and what could be the perfect solution
That looks very interesting!
Well, I can try to remember tonight when I get home, but off the top of my head, I don't actually remember how I set it up. In thinking it through, I have the data signal going to an Arduino or ESP8266, then that feeds MQTT and picked up by NodeRed. I believe mine has a high/low output, with time/duration of one being the measurement. IE, longer high output means longer distance, which in turn, means tank level.
Yep. I'm going to make a vote for Rgrove's solution. That's probably going to be your easiest and quickest implementation without using an ADC and a 0-5V sensor or something similar. I found one in a few seconds on Amazon for sale. And it's a lot cheaper than the one you were already looking at.
Depending on how the implementation works, you shouldn't need any extra hardware. You may just be able to interface directly to the sensor in Node-Red using an appropriate node set to make it work. But with it interfacing directly to a Pi, the most you would need is a script external to Node-Red piping values either into a file or onto some kind of hook like MQTT or HTTP for Node-Red to pick up. It shouldn't be difficult at all.
Hi, i use FullUp https://fullup.io/ and i use the following flow - please change your e-mail, password and tank-id. The token ist stored in global.json - change it if it is nessesarry
[
{
"id":"611eaa48.5fc3c4",
"type":"inject",
"z":"f411c63.c69fc38",
"name":"FullUp Access Token erzeugen / 24 Std.",
"repeat":"86400",
"crontab":"",
"once":true,
"onceDelay":"30",
"topic":"FullUp Access Token erzeugen",
"payload":"",
"payloadType":"date",
"x":280,
"y":120,
"wires":[
[
"3d104579.bc7a2a"
]
]
},
{
"id":"7a0b52bb.fe6ecc",
"type":"inject",
"z":"f411c63.c69fc38",
"name":"FullUp Abfrage Regentonne / 10 Min.",
"props":[
{
"p":"payload"
},
{
"p":"topic",
"vt":"str"
}
],
"repeat":"600",
"crontab":"",
"once":true,
"onceDelay":"60",
"topic":"FullUp Abfrage Regentonne",
"payload":"",
"payloadType":"date",
"x":270,
"y":280,
"wires":[
[
"46515ef4.dabf"
]
]
},
{
"id":"46515ef4.dabf",
"type":"function",
"z":"f411c63.c69fc38",
"name":"Abfrage Regentonne",
"func":"var FullUp=global.get('FullUp') || {};\n\n//msg.payload = \"data to get\";\n//msg.headers = {};\n//msg.headers['Authorization'] = FullUp.token;\n//msg.headers['Content-Type'] = \"Application/json\";\n\n// Tank-ID der Regentonne\nmsg.payload = 'your-tank-id';\n//msg.payload['language'] = 'de';\n\n\nmsg.headers ={};\nmsg.headers={\n 'Accept':'application/json, text/plain, */*',\n 'Authorization': 'bearer '+FullUp.token,\n 'DNT': '1',\n 'Origin':'https://app.fullup.be',\n 'Referer':'https://app.fullup.be/'\n};\n\nreturn msg;\n\n\n",
"outputs":1,
"noerr":0,
"initialize":"",
"finalize":"",
"x":600,
"y":280,
"wires":[
[
"464a9a41.ee1254",
"1191807d.f98a9"
]
],
"info":"\"success\": true,\r\n \"result\": [\r\n \"your-tank-id\",\r\n \"your-tank-id\"\r\n ]\r\n}"
},
{
"id":"3d104579.bc7a2a",
"type":"function",
"z":"f411c63.c69fc38",
"name":"Abfrage FullUp Access Token",
"func":"msg.payload = \"data to post\";\nmsg.payload = {};\nmsg.payload['password'] = 'your-password';\nmsg.payload['email'] = 'your-access-email';\nmsg.payload['language'] = 'de';\nreturn msg;",
"outputs":1,
"noerr":0,
"initialize":"",
"finalize":"",
"x":620,
"y":120,
"wires":[
[
"3e53fc03.6d7944",
"1191807d.f98a9"
]
]
},
{
"id":"3e53fc03.6d7944",
"type":"http request",
"z":"f411c63.c69fc38",
"name":"Neuer FullUp Access Token",
"method":"POST",
"ret":"obj",
"paytoqs":"ignore",
"url":"https://api.fullup.be/auth/generate",
"tls":"",
"persist":false,
"proxy":"",
"authType":"",
"x":920,
"y":120,
"wires":[
[
"7f7ff4fd.45aafc"
]
]
},
{
"id":"464a9a41.ee1254",
"type":"http request",
"z":"f411c63.c69fc38",
"name":"Fullup Tanks abfragen",
"method":"GET",
"ret":"obj",
"paytoqs":"ignore",
"url":"https://api.fullup.be/tanks_public/{{{payload}}}",
"tls":"",
"persist":false,
"proxy":"",
"authType":"",
"x":900,
"y":280,
"wires":[
[
"1191807d.f98a9",
"cb4043fc.aec76",
"d2aa37cd3b7a8cde"
]
],
"info":"_public/:your-tank-id\your-tank-id"
},
{
"id":"7f7ff4fd.45aafc",
"type":"function",
"z":"f411c63.c69fc38",
"name":"FullUp Token speichern",
"func":"var FullUp=global.get('FullUp') || {};\n\nif (msg.statusCode === 200) {\n\n FullUp.token = msg.payload.result.token;\n FullUp.refresh_token = msg.payload.result.refresh_token;\n FullUp.token_expiration_date = msg.payload.result.token_expiration_date;\n FullUp.refresh_token_expiration_date = msg.payload.result.refresh_token_expiration_date;\n\n global.set('FullUp',FullUp);\n}\n\nreturn msg;",
"outputs":1,
"noerr":0,
"initialize":"",
"finalize":"",
"x":1210,
"y":120,
"wires":[
[
"1191807d.f98a9"
]
]
},
{
"id":"cb4043fc.aec76",
"type":"function",
"z":"f411c63.c69fc38",
"name":"Move Volume to msg.payload",
"func":"var tmsg = {payload:msg.payload.result.current_temperature};\nmsg.payload = msg.payload.result.current_volume;\ntmsg.topic = \"Regentonne_Temperatur\";\nmsg.topic = \"Regentonne_Liter\";\nreturn [msg,tmsg];\n\n",
"outputs":2,
"noerr":0,
"initialize":"",
"finalize":"",
"libs":[
],
"x":1230,
"y":280,
"wires":[
[
"30497b55.7c32b4",
"7a40312.01b3ed"
],
[
"bae9b305.a0976",
"7a40312.01b3ed"
]
]
},
{
"id":"30497b55.7c32b4",
"type":"ui_gauge",
"z":"f411c63.c69fc38",
"name":"Wasser",
"group":"af6bf752.d0f218",
"order":1,
"width":3,
"height":3,
"gtype":"wave",
"title":"Wasser",
"label":"Liter",
"format":"{{value}}",
"min":0,
"max":"350",
"colors":[
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1":"",
"seg2":"",
"className":"",
"x":1520,
"y":280,
"wires":[
]
},
{
"id":"bae9b305.a0976",
"type":"ui_gauge",
"z":"f411c63.c69fc38",
"name":"Temperatur",
"group":"af6bf752.d0f218",
"order":2,
"width":3,
"height":2,
"gtype":"gage",
"title":"Temperatur",
"label":"°C",
"format":"{{value | number:1}}",
"min":"-20",
"max":"50",
"colors":[
"#3553d5",
"#1aa835",
"#d0121b"
],
"seg1":"",
"seg2":"",
"x":1530,
"y":320,
"wires":[
]
},
{
"id":"af6bf752.d0f218",
"type":"ui_group",
"name":"Regentonne",
"tab":"244dc147.b1cd1e",
"order":2,
"disp":true,
"width":"6",
"collapse":false
},
{
"id":"244dc147.b1cd1e",
"type":"ui_tab",
"name":"Garten",
"icon":"fa-tree",
"order":20,
"disabled":false,
"hidden":false,
"info":"mdi"
}
]