2019-05-03, 05:09 PM
(2019-05-03, 04:37 PM)Saqqara Wrote: One fellow claims that by putting an aluminum plate between a non-contact sensor and a too-thick plastic tank wall he was able to increase sensitivity sufficiently for it to work.
https://www.robotshop.com/community/foru...or/27463/4
This is possibly a dumb question, but might there be a way to use some of these non-contact sensors in combination with resistors between them to vary resistance based on how many were lit up, maybe a variation on a divider circuit, so that they could be used with an ADC chip already implemented on Openplotter, or even a real analog gauge?
Since they are on/off the best option is to feed the signal to RPi and handle them there, I use a loop to add 1/4 for each of them that is triggered.
for (int j=0;j<num_sens;j++){
tanklevel += inc * (~(digitalRead(sensor_pin[j]))&1) ;
The code is found here on github. I display the value (float) as a value of 0-100% (numerically 0-1.0) using an analog dial on the SignalK instrument panel.
Messing around with Analog to digital converters are better left to signals that are continuous in nature, most common oil pressure, voltages, current etc.
My mantra is to keep it simple.
Ole
Ole W. Saastad
web : https://www.homelinux.no https://algol.homelinux.no
https://github.com/olewsaa/Yacht-computer
twitter : olewsaa
web : https://www.homelinux.no https://algol.homelinux.no
https://github.com/olewsaa/Yacht-computer
twitter : olewsaa