Jump to content

Engine monitoring system

Recommended Posts



I am an absolute newbie to PLC design, I have worked on systems using plc on a troubleshooting fault repairs level, but nothing more than wiring faults etc so I am sounding out the feasibility of me even being able to set this up by myself, and if what I am trying to do is possible with this range of products. . I am wanting to set up a Data logging and monitoring system for a project engine, At this stage I will be only using it for monitoring purposes, I may in the future use it to control some simple out puts, fault indicator light or a shutdown circuit, rather like a very basic engine ECM. 


My reasons for going down this route is as my target engine is antique by today’s standards there is no direct option for an aftermarket system which does not involve many $1000's (which are mostly targeted to petrol engine complete control, mine is diesel), and I want to be able to monitor up to 15 channels of information, which is a lot of gauges to look at simultaneously, which is my only other option.  


I am currently looking at using a vision 130 with an appropriate analog I/O module to use as the basis of my system.


The following is the sensors I would like to monitor,


2 x timing sensors, 2 wire magnetic pick up, I am assuming these are classed as digital inputs? on/off as the sensor picks up the timing indicator.


7 x pressure sensors, anolog? three wire 8 volt supply style.


4 x temp sensors, thermocouples?, 2 x 0-120C*, 2 x 800C*


Am I on the right track? Is this something I will be able to work through and program myself?


I am use to OEM style 2 and 3 wire sensors are these compatible with this style of PLC or will I need a more industrial style of sensor?


Thanks in advance, Ben

Link to comment
Share on other sites

  • MVP 2014

We find that Unitronics is a very good platform for people to learn PLC programming.  Just take your time and look at the many examples provided with Visilogic (in the "Help" menu).


The PLC is designed for industrial sensors, with 24VDC supply.  However you may be able to get it working with some clever wiring.  For digital sensors I would try to use NPN wiring, so you can decouple the sensor supply voltage from the PLC supply voltage.  However you will need to keep the 0V common across all supplies.  If you are experimenting it may be worhtwhile to get some interface relays to save you damaging the PLC while you are experimenting.  Ditto for the analogue signals, get at least one external isolator, so you can figure out the signal before trinyg to connect direct to the PLC.


If you don't have one, get a good quality mutimeter.


Just a couple of comments:


  • Mag pickup - this would be a "high speed" input.  Sometimes these need power, sometimes they are "self energising".  I am not sure how to determine this, other than go back to first principles and do some testing with a multimeter or oscilloscope of you have one.
  • Pressure - 8V supply, you would need to figure this out.  Put the 0V in common with the 24V PLC supply.  is the output 0...8V also?  This will be fine for a 0...10V input, you just won't get full range.  If you have a particularly unusual signal type you can purchase programmable external analogue signal convertors.
  • Temp Sensors - hopefully they are thermocouples.  If they are they should give a mV output that varies with temperature, and can be measured with a good quality multimeter.  The tricky part will be identifying the type (J, K, T, N, etc).  If you can measure the mV at a particular temperature you may be able to cross-reference.  They could also be PTC or NTC devices, and with them the resistance of the device changes with changing temperature.  You can also measure this with a mutimeter, on resistance mode.  There are various types of PTC and NTC devices, and not all are standardised.  Some common standards are PT100 and PT1000.  These are linear, and directly supported from Unitronics.  However in low-cost applications, it is common to use other devices that are not linear and don't comply with any type of standard response curve.  In that case it is probably less hassle to replace them with a thermocouple or PT100 - just ensure you get the right probe for he job, particularly on the 800degree location.


I hope these comments help.

Link to comment
Share on other sites

Thank you for your reply. I have been looking into the sensors more and have found the following.


Speed sensors, are as you say, both powered and passive, I can use either depending on what is easiest to use. I can easily find a powered 3 wire running approx. 0-1000 Hz at high idle at the signal wire. 


0v common on PLC lingo would be the earth in a 12-24v sys I am assuming, just different terminology?


I can get analog sensors that are 5v supply, a mistake I had made in my first post, .5v @-40*C to 4.46v @120*C for standard temps with similar values for the analog pressure sensors.  


I also have digital sensors that a 8v supply, the signal is in duty cycle, PWM 10-90% and can be used for pressure and temp. A bonus is there is a exhaust temp sensor that will read to 850*C in the same style.


It would be good to keep them all at the 8v supply digital style for ease of design, but are these "digital" sensors a digital input referred to as an input on a V130 plc? does the PLC read the duty cycle on/off time as a NPN input or is it something else?


I must admit that the difference in terminology between manufacturers and even industries is rather frustrating!


If all my inputs are a frequency input am I better off going with another model of PLC as I cant see one with very many frequency inputs?


Thanks again, cheers Ben.

Link to comment
Share on other sites

  • MVP 2023

0V is the common of the DC power supply.  The world referring to this as "earth" confuses me, so don't feel alone.  I consider "earth" and "ground" to be the same thing, although in the US we always call it ground.  Unless, of course, you ground your negative on the DC supply.  Then it's earth :)


Try really hard to find sensors that will accept 24VDC power, regardless of the output type.  Interfacing 24V PLC inputs to a device that's powered by 8V is just going to cause problems.  You're going to wind up building a circuit to do this.  It would be helpful if you told us the exact model of sensor you want to use; otherwise we're just guessing at how to interface with it.


Most models of Unitronics will accept two frequency inputs.  If it turns out that all 13 of your sensors generate a frequency then you'll either have to build a circuit for each that converts the PWM to a voltage or go elsewhere and use a PLC that has HSC input modules.  Either way, the 8VDC is going to be tricky.


Joe T.

Link to comment
Share on other sites

G'day Joe,


I am hearing what you are saying about the use of 24volt sensors, I have considered the use of a industrial style sensor but in my experience they just are either not reliable or not cost effective in the application I would like to use them in, the cost to buy one industrial style sensor that is going to be able to live in the engine bay of a truck is a huge chunk of my budget. We have heavy equipment at work with industrial plc controls and the applicable 24v basic switch/sensor input and they fail far more regularly due to heat vibration and green death than any of the other OEM style sensors I would prefer to use. It also appears that Industrial sensors that would suit I would be paying a premium for, on a range of accuracy that I just do not need.


The main sensors I would be looking to use are OEM  CAT or Cummins supplied. Info is fairly short in supply and I have a small number of parts that I have enough info on to be able to use in regards to duty cycle and mV outputs through their range.


From what I can tell it looks as though I will need to build some circuitry of some description no matter what I do, its whether or not I can do an interface that converts it all to a signal a PLC can use or do the whole lot from scratch like an Arduino based thing which in my short amount of research may be even further out of my range of understanding.   



Link to comment
Share on other sites

  • MVP 2014

Over all, I can see the challenges here, and as you say it's a case of which ever way you turn there are complications.


Just a comment on the sensors that output an analogue value via duty ratio, you won't pick this up with a high-speed digital input - as the frequency will be constant.  Once again we get back to custom interfacing, and you should be able to interface a duty-ratio signal to an analogue input.  You may need to add an RC circuit to smooth out the PWM and give a stable analogue reading.  Since the sensor is chopping an 8V signal between 10% and 90% duty ratio, you should expect an analogue voltage between 0.8V and 7.2V.  A 0...10V input can read this.


Your 0.5 ... 4.46V temperature sensor can go directly into the 0...10V analogue input, and you can scale the internal value accordingly.  The IO-AI8 has 12 or 14-bit resolution, so you can still get reasonable resolution with the reduced voltage swing.


On the speed sensor, 3-wire is definitely simplest.  If you can't get one that operates on 24V, go for an NPN one (ie, one that switches between signal wire and ground).  With that type of sensor you should be able to supply the sensor with one voltage (eg 12V) and connect it to a PLC running on a different voltage (eg 24V).  You can't do this with a PNP sensor (one that switches between the signal wire and Positive supply).


I see no problem using analogue sensors with a 5V or 8V supply.  You just need the relevant DC-DC convertors to generate those supply voltages from your truck supply.  As discussed above, just connect the 0V/Earth/ground/chassis together so everything shares a common reference point.  Use a "star" arrangement on the 0V/GND to ensure each device and power supply only has a single ground point.  This is necessary to avoid ground loops, which will amplify noise and disturbances on the system.


I would also use a 24V-24V  DC-DC convertor on the PLC, as automotive electrical systems can swing well beyond the 24V +/- 10% required by the PLC.


Based on the discussion above, I think you have a reasonable chance of getting those sensors to work on the V130, with some relatively simple custom interface wiring and provision of the correct power supplies.  The advantage of using a PLC instead of a microcontroller is significant when it comes to simplicity of programming and interfacing.


To suggest another alternative:


A step in between using the PLC on one hand and an Arduino on the other is to look for a CAN J1939 input block, that directly accepts the type of signals you are using.  There are modules designed to do what you are attempting, that is retrofit digital instrumentation to an existing engine.  You would need the V100-17-CAN module for the V130, and it should be easier to get the J1939 working on the V130 than it would be to program an Arduino from scatch (famous last words...).  I have dabbled in J1939 and know of others who have gone deeper.

Link to comment
Share on other sites

  • MVP 2014

I probably over-simplified on connecting NPN signals of devices with different supply voltages.  Note the V130-33-TR20 states the following voltage ranges for the NPN high-speed input:


20.4-28.8VDC for Logic ‘0’

0-3VDC for Logic ‘1


A sensor powered from 8V is not going to generate this voltage range.


As a result, either a 24V sensor is needed or use an interface relay, which would need to be a high-speed solid-state type, or an optocoupler.

Link to comment
Share on other sites

  • MVP 2023

I think Simon went to the same school of hacking that I did.  All his comments about interfacing with 8V sensors are true, but I don't usually recommend this approach on the forum because I don't know if the person asking the question knows how to use a soldering iron.  If you build a circuit by twisting the wires together and wrapping them with electrical tape I will virtually smack you upside the head.  


If you are really comfortable with an iron, a voltmeter, and an oscilloscope you can do this, and it won't be that hard.  An 8V power supply can be built relatively easily and as Simon described a cap and a resistor matched to the PWM frequency will make a nice little voltage producer.  Then you can use a couple of ATC8 modules to read your data.  The values on the picture below may or may not work; it's just something I found:




Industrial sensors are not built to the vibration specification that OEM sensors are. As soon as you mentioned CAT and Cummins sensors I understood what you were trying to do and why.


A comment on Simon's last post - an NPN sensor is also known as an "open collector" sensor.  Google this to gain some understanding.  If you tie the output of the sensor to +24V with a 2.2K pullup resistor you can generate the signal you need for the PLC by connecting the junction of the sensor output and the resistor to the PLC input.  The signal will be inverted.  If you use a DI16 module you can wire it to accept NPN inputs, in which case the pullup resistor is supplied for you.


A "self-engergizing" mag sensor has two wires and is a coil wrapped around a magnet.  You can tell by looking at it.  It generates an AC signal of increasing frequency and voltage.  The top end can be as high as 50Vpp - you'll need a separate conditioner if you want to connect this to a PLC - KEP makes one called the AMP1.  You're probably better off using a DC proximity sensor.


If you want to post an electrical design we can review it for you- I do have an electrical engineering degree and I'm not afraid to use it.


Joe T. 

  • Upvote 1
Link to comment
Share on other sites

Hi, Thank you for the help so far, it has put me onto a few things, I am a diesel fitter by trade but after 10 years of breakdown repairs I have a very sound appreciation for quality wiring work! most of our breakdowns now failure wise are hydraulic or electrical / electronic in nature so I have had a thorough crash course in things beyond my understanding. I also don't even carry auto crimp terminals unless its a Deutsch style crimp, they just cause more problems than they solve. Definitely no twisting wires! 


Any way after much research (Google) I have found these http://www.robotshop.com/content/PDF/datasheet-de-swadj3.pdf


Which should solve the problem of supply? there are switching buck regulators on eBay for $2 but I don't think I would trust those on a $500 PLC.  I would still like some sort of fusing in the supply to ensure the PLC is protected. I would think current draw on any of the sensors I would be using will be minimal, a 5amp fuse usually supplies power to the entire controller on our equipment, running 20 odd sensors.


After some experimentation I have found that the 8v sensors also put out a voltage as well as a duty cycle reading, ie 1v to 7.2v through its range, I will check to see if the current draw is acceptable on them this week.


I am also sure that the speed sensors are a straight 24v supply on the 3 wire types and the 2 wire create the signal though the magnetic field "doover" on the end as it reads the chopper wheel. also will check and report back.  


Joe can you elaborate more on this?


"A comment on Simon's last post - an NPN sensor is also known as an "open collector" sensor.  Google this to gain some understanding.  If you tie the output of the sensor to +24V with a 2.2K pullup resistor you can generate the signal you need for the PLC by connecting the junction of the sensor output and the resistor to the PLC input.  The signal will be inverted.  If you use a DI16 module you can wire it to accept NPN inputs, in which case the pullup resistor is supplied for you."


I think I have come across this on proximity switches where they are three wire sensors and the pull up resistor must be internal? I haven't got my head around this yet. My googling has turned up yet more terminology that is conflicting... pull up/ load? ...(earth and ground stuff). I will need to sit down and study more. Have you got a schematic of this showing how it works?


Next project....


I have decided to build a data logger monitor as well for testing hydraulic systems, this setup will utilisestandard 24v 4-20mA transducers 6-8 in total depending on what interface, I am considering a v570 for this as I would like to be able to see more at once and perhaps have real time graphs to help pick up where the erratic hyd function is. there is also an option for a flow meter in the future too. I have a smallish 24v battery available to use as the power supply and a regulator to charge DC-DC to ensure consistent power supply.


My idea is to have the battery supply and transducers in one box/enclosure with test hoses running back to it, this can stay on the machine deck some where secure, and have a cable set to a second box for the PLC so it can be read from the cab somewhere out of the heat noise and dust. As long as I use quality cable can you see any issues with this Idea?


Cheers Ben.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...