Simple rev counter


Recommended Posts

I would like to measure the revolutions per minute of an engine on a test rig. All vital signs will be data logged and displayed in a DAQFactory screen as well as ordinary analogue gauges in case of computer failure (there is a lot of vibration!). Currently the analogue rev counter is a Faria Tachometer that uses the pulses from an alternator to drive it. Brcause the engine does not have an alternator, Faria make a signal generator that can be driven by the engine taking the place of the alternator signal. The signal generator has two wires either of which can be the signal and earth, the generator runs at half engine speed and gives approximately 8 pulses per one engine revolution. I do not know what form the pulses take as I do not have an oscilloscope. The engine is a low revving one with maximum revs of 2,600 per minute. The revolution display will not be transitory because the engine will spend some time in each rev' band so the counter display does not need to refresh any more often than once a second. All I really need to know is what rpm the engine is doing.

The system is a LabJack UE9 Pro with another board with loads more connections plugged into the side with CB37 printed on it. I am currently running eight TypeJ thermocouples plugged into the AI side of the CB37 board. I am a total novice to this and it has taken me some time and advice from yourselves and your excellent forum to get the thermocouples working but this rev counter has defeated me totally. I am embarrassed to say that most of the application guides etc are far too technical for me to understand. I desperately need some help with this - I think it must be really simple to solve but I am such a newbie to this I need telling where to put the wires even. I have seen other posts on this subject and tried to apply the method to my application but nothing happened! Probably because I didn't put the wires in the right place. I would really like to understand what I am doing but I need a result as my boss is getting annoyed with me for taking so long! The quicker you can post, the more likely I can keep my job! I love DAQ Factory by the way, I just wish I knew what I was doing!

Link to comment
Share on other sites

Well, the first step is to simplify. Ignore the thermocouples and see if you can get just one pulse reading. I'd start by trying one of the sample documents that the application guide includes. You should be able to get a reading. If not, there may be signal condition issues. For example, your pulse may not be big enough, or go low enough, for the LabJack to detect.

I'd start with the LJGuideSamples\BasicCounter.ctl sample. I believe the inputs go into FIO0 and Gnd for this one (or maybe its FIO4, sorry, I've forgotten, but I think the sample tells you). Note that this is simply going to count up. Its not going to give you RPM, but first things first. Once you get it to count up correctly, its pretty easy to calc the RPM.

Link to comment
Share on other sites

That's a great start oh mighty Guru, many thanks - whilst I am looking at that, can you help with another little problem I have? I'm sure it's a simple fix but I can't figure it. I am reading three pressures on the same engine using three separate pressure senders that are usually used to drive electric car-type gauges. They vary electrical resistance in relation to pressure and have no resistance at zero pressure, the resistance rises in proportion to increasing pressure. My problem is when I put 5V down the line and read the resulting signal on one of the AI connections it reads 5V (of course) and my screen gauge wants to deflect towards maximum. What I would like to do is invert the signal in some way so when it is reading 5V (or zero pressure) the screen gauge effectively reads opposite and zero. As the pressure rises and the voltage falls I would like the needle to deflect and move towards maximum. I'm sure I could work out an expression or conversion to make the gauge show the pressure I am after but can I invert the signal in the way I want? Please say yes!

Link to comment
Share on other sites

Thanks for your help but how/where do I find "LJGuideSamples\BasicCounter.ctl sample."? I coldn't find any samples in the downloaded documents or on your or LabJack's websites.

I tried plugging the signal generator into Gnd and both F100 and F104. I presume I have to tell it where to look by putting in that channel number on the "Main" tab in CHANNELS? It won't let me put in FIO0 or F100 it says it has to be a whole number so I tried entering 100 and 102 etc as the channel but nothing showed on the "Table" tab. The problem is I really do not know what I am doing - I can follow a step by step instruction but I am not fortunate enough to be able to figure it all out for myself even if pointed in the right direction! Sorry for being such a dunce at this!

To get the thermocouples to work I was advised to change from 8bit to 16bit (not that I know what that has done mind you). Since then I have got great thermocouple readings - well happy, but can't get a squeak out of the tacho signal generator. Is the change to 16bit affecting it - does it affect everything because I used to get something out of the signal generator just in one of the ordinary analogue inputs until i changed to 16bit. If I open a new document and create a channel just to try the signal generator it is different to what I used to get before the change to 16bit.

Thanks in advance, I know I am being a real donut!

Link to comment
Share on other sites

I believe if you are measuring resistance you need to setup a voltage divider. Depending on which side of the divider you put sensor, the signal will either be reversed or normal. Anyhow, to reverse a signal, just do 5-Value in the conversion. This will cause 5V to read 0 and 0V to read 5. Then you can add math around it.

As for the counter samples, they are in a subdirectory of the root DAQFactory (DAQFactoryExpress) directory. The gain setting should not affect the counters.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.