+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Newbie level 2
    Points: 25, Level: 1

    Join Date
    Jan 2018
    Posts
    2
    Helped
    0 / 0
    Points
    25
    Level
    1

    IFC Engine- & enviroment analog sensordata to NME2000 bus through Teensy3.6 (marine a

    Hello,

    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 with 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 sensors values like oil pressure, engine coolant temperatur, rudder angle 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 liniar resistors of different kind like temperatur tank volume.
    Is it possible to design this universary like I can use a hall sensor which deliver a 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 kind of sensor voltage mode switches (DIP) "0- 5V / 0 - 12V" where I can choose 5V sensors or can switch to 12V sensors for each input separately.

    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!

    •   Alt12th January 2018, 21:58

      advertising

        
       

  2. #2
    Super Moderator
    Points: 50,819, Level: 55
    Achievements:
    7 years registered
    erikl's Avatar
    Join Date
    Sep 2008
    Location
    Germany
    Posts
    7,994
    Helped
    2596 / 2596
    Points
    50,819
    Level
    55

    Re: IFC Engine- & enviroment analog sensordata to NME2000 bus through Teensy3.6 (mari

    Quote Originally Posted by Lin4Fun View Post
    ... 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.
    In any case you'll need a clean 12V supply from your 12..14.4V source, I think. And you need it isolated.
    There's an isolated flyback (buck-boost) converter IC for this task.

    Down-scaling of signal values to 3.3V from this isolated 12V power supply can be done by resistor division or by an opAmp (if low output impedance is needed).



    •   Alt13th January 2018, 21:09

      advertising

        
       

  3. #3
    Super Moderator
    Points: 59,045, Level: 59
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    12,042
    Helped
    2790 / 2790
    Points
    59,045
    Level
    59

    Re: IFC Engine- & enviroment analog sensordata to NME2000 bus through Teensy3.6 (mari

    Hi,

    You say you want isolation.
    We only know that there is a power supply and a sensor input.
    If you want isolation between them, then I agree with Eric, that isolating the power supply is the better solution..because isolating the analog signal may introduce a lot of errors.

    Now your concern is to scale down the analog signal.
    If your input signal is 0...14.4V, then I recommend to scale down from 15V or even more.
    The resolution of 12V with 13 bits is 1.465mV
    14.4V--> 1.758mV
    15.0V --> 1.831mV
    Do you really care about the 366uV (loss of resolution)? ...at a stepsize of 1.5mV?
    I assume all other errors are higher than those 366uV.
    For sure the "pure DAC value" will differ a lot, but you need to compensate this with the divider ratio in any case.
    ******

    On the other hand you speak about input voltage range of 0...3.3V.
    This "3.3V value" makes me assume that (very unprecise) VCC is used as ADC_reference voltage.
    If so then we talk about at least 10% uncertainty of the ADC value.
    10% of 12V is 1.2V
    ...but before you worried about 366uV --> using VCC as voltage referenc may drop accuracy performance by a factor of 3200!

    ****
    Voltage regulator, 7812:
    I don't know how you want to use it, since it needs an input voltage of at least 15V to operate correctly (I don't know the exact value. Read the datasheet)...as you correctly mentioned.
    I don't see where you have "at least 15V"
    Also I don't see where 12V are used. Maybe for the sensors?

    Look for "LDO" for less voltage drop regulators. But they still need higher input voltage than output voltage.
    The next better, but more expensive, solution are SEPIC or Push_pull switching regulators. They are able to generate regulated output voltage with input voltages higher or lower than the output voltage.

    If you use a 78xx regulator, then you need one with a lower output voltage, like 7809, to get a stable, regulated output.
    ****

    Universal input:
    In most cases - I assume - a resolution of 2mV should be good enough. Then you may use a universal 15V input for 5V signals.
    ****

    Potentiometer:
    I don't remember that I ever used a potentiometer with an ADC / microcontroller system.
    It's far more precise, stable, better for automated calibration, part saving, cheaper.....to use software and microcontroller_inside_EEPROM for signal conditioning.

    Klaus
    Please don´t contact me via PM, because there is no time to respond to them. Thank you.



    •   Alt15th January 2018, 09:02

      advertising

        
       

  4. #4
    Newbie level 2
    Points: 25, Level: 1

    Join Date
    Jan 2018
    Posts
    2
    Helped
    0 / 0
    Points
    25
    Level
    1

    Re: IFC Engine- & enviroment analog sensordata to NME2000 bus through Teensy3.6 (mari

    Hello Klaus,

    thank you for your reply. Some thing I'd like to mention.

    Quote Originally Posted by KlausST View Post
    Hi,

    You say you want isolation.
    We only know that there is a power supply and a sensor input.
    If you want isolation between them, then I agree with Eric, that isolating the power supply is the better solution..because isolating the analog signal may introduce a lot of errors.
    This device shell be used in the marine enviroment as I wrote in the post and mentioned in the thread header. The NMEA2000 bus or more the protocol was created by the National Marine Electronic Association. It is the same kind of CAN bus type (modified) like you find in all modern cars.

    Since I don't want to do this just for my self and would like to give it also to friends and others which like to get their old engines and marine sensors shown on their new MultiFunctionDisplay.

    Now your concern is to scale down the analog signal.
    If your input signal is 0...14.4V, then I recommend to scale down from 15V or even more.
    The resolution of 12V with 13 bits is 1.465mV
    14.4V--> 1.758mV
    15.0V --> 1.831mV
    Do you really care about the 366uV (loss of resolution)? ...at a stepsize of 1.5mV?
    I assume all other errors are higher than those 366uV.
    For sure the "pure DAC value" will differ a lot, but you need to compensate this with the divider ratio in any case.
    ******
    The 13 bit is the resolution of the analog inputs of the Teensy's which I was writing about. I think any Teensy or arduino will just burn away using 12v at the analog inputs as you can use here just % v max in some cases. I did worte this:
    The Teensy 3.6 have 3.3 v analog inputs with 13 bit usable resulution.
    Like in most 12 V based car / boat systems you have the 12 V from your battery and the approx. 14,4 V from the generator. Which resutls in that we don have 15 V available. To keep the 12/14,4V is neccessary to be able to use the analog gauges as well.

    ...but before you worried about 366uV --> using VCC as voltage referenc may drop accuracy performance by a factor of 3200!
    I am not sure where you got that from?

    Voltage regulator, 7812:
    I don't know how you want to use it, since it needs an input voltage of at least 15V to operate correctly (I don't know the exact value. Read the datasheet)...as you correctly mentioned.
    I don't see where you have "at least 15V"
    Also I don't see where 12V are used. Maybe for the sensors?
    Yes I thought to use easily a 7812 to get the difference between 12 V and 14.4 V away. 12 Volt because due to older gauges which still shell be functional. 14.4 are 120% of 12 V. This is a huge difference, isn't it? I wrote
    ...but the most Voltage regulators I could find needs always 15V minimum as input voltage.
    Look for "LDO" for less voltage drop regulators. But they still need higher input voltage than output voltage.
    The next better, but more expensive, solution are SEPIC or Push_pull switching regulators. They are able to generate regulated output voltage with input voltages higher or lower than the output voltage.
    Thank you for this, thas is an usefull information for me!

    If you use a 78xx regulator, then you need one with a lower output voltage, like 7809, to get a stable, regulated output.
    ****
    '
    Same as above. I need to use the 12 V or the sensors which are already in place to be able to use the old analog gauges as well.


    Potentiometer:
    I don't remember that I ever used a potentiometer with an ADC / microcontroller system.
    It's far more precise, stable, better for automated calibration, part saving, cheaper.....to use software and microcontroller_inside_EEPROM for signal conditioning.

    Klaus
    If you want to use this in a couple of boat's where already all sensors are in place and you don't want to change the sensors or solder around on the board, how can you than adjust the voltage devider if not by potentiometers?

    Klaus, for me it looks like my post wasn't intelligent enough for you and you didn't had the time to read carefully enough what I wrote. That you pointed me to the LDO's is may something I can use. But the rest you answered I think do not have a lot todo with my questions. I did posted the same text in three other forum and I got a complete different kind of answers.

    It is a long time ago that I last worked with electronics ( about 20 years ago) but what is the meening of this forum if it is not alowed to post questions which are not based on a complete finished design.

    Thank you and have nice week!



--[[ ]]--