I am working on a DIY project to interface a lot of signals to a NMEA2000 bus to be able to controle an older analog engine and other sensors through a new multi function display.
To do so I am using Arduino / Teensy microcontroller together with a NMEA2K library. I started to design the PCB with EagleCAD and face now a couple of challenges.
The Teensy 3.6 have 3.3 v analog inputs with 13 bit usable resulution. To read the sensor like oil pressure engine coolant temperatur and so on I need to interface the 0-12 VDC (0-14.4 VDC max during battery loading) down to 0-3.3V DC.
I know that this could be simply done by resistor voltage deviders but I want to seperate the 12 V part from the controller. Liniar optocouplers?
Also is the difference between 12v and 14.4v 20% which will be also a huge difference in the value getting from the sensors.
So may question is how can I seperate the sensor 12V (14.4V) and shift them down to 3.3V max? How can I handle the 20% of extra voltage to get always the same accuracy. Thought to use here a voltage regulater like LM7812 to garanti to have always the same voltage provided for the sensors but the most Voltage regulators I could find needs always 15V minimum as input voltage.
Most sensors are hall sensors and resistors of different kind like temperatur tank volume. Is it possible to design this universary like I can use a hall sensor which deliver as sensing value 0.5V to 4.5V as well could use a sensor with sensing value from 0-12V on same input without need to make any hardware change or adjusting any potetiometers? It would be ok to have some "Sensor mode switches (DIP)" where I can choose 5V sensors or can switch to 12V sensors.
So which parts are here possible to use for the analog input part and how could this be designed (schematic).
Every idea is welcome and thanks a lot!