Engine Dyno and U3


Recommended Posts

Hi all.

Sorry if this is in the wrong place.

I am new to this and have some basic questions.  I am wanting to convert my engine dyno from mecanical read out to a display on the laptop. I have a U3 labjack and need to measure the load cell and RPM then display it on screen via a calculation to create a graph to show bhp of the engine. I was going to use DAQfactory and my U3. What is the best way  of measuring the rpm, a hall sensor,proximity switch or somthing else? I was thinking of 2 counts per rpm. Can the load cell be connected straight to the U3 or will the signal need boosting? if so how?

thank for any help

Mark

Link to comment
Share on other sites

The choice of rotation speed sensor is going to be impacted by your physical constraints, but any sort of encoder or sensor that gives you one or more pulses per revolution should be pretty easy to deal with.  If you find some of interest post links to technical details and we can take a look.

As for the load cell, to use one with the U3 you need an instrumentation amp such as the LJTick-InAmp:

http://forums.labjack.com/index.php?showtopic=4376

https://labjack.com/support/datasheets/accessories/ljtick-inamp/appendix-d

 

Link to comment
Share on other sites

I have read many of the threads on shaft rpm and are none the wiser as to what I realy need. I am wanting to start with the shaft RPM (one thing at a time) get it working then move to the load cell.  What is the best / easyest way of measuring the rpm, Inductive or hall efect sensor? I have found a inductive sensor on ebay and RScomponents (http://www.ebay.co.uk/itm/DC-5-35V-3P-Aviation-Connector-2mm-PNP-NO-Inductive-Proximity-Sensor-Switch-/191655561377?_trksid=p2141725.m3641.l6368)  or http://uk.rs-online.com/web/p/inductive-proximity-sensors/8193163/

Is one sutable for use with the U3  if so which one is best?

Bit more info. The engines will run from aprox 900 to 10000 rpm. the tooth disk will have 1 or 2 teeth per 1 rev. I dont have many restrictions on space or size.

thanks

Mark

Link to comment
Share on other sites

The Ebay sensor you linked looks interesting because it runs off of 5 volts which you can get from the U3.  It does not tell us how much supply current it needs, but I would think a sensor like this draws less than 50mA which is no problem for the U3 to provide from its VS terminals.  (Note:  The 200mA spec is likely the maximum current the PNP output switch can source.)

The output is PNP, rather than the preferred NPN, so you will need to add a 4.7k pull-down resistor:

https://labjack.com/support/app-notes/open-collector-signals

At 900 RPM you are only getting 15-30 pulses per second.  That might be enough to use a counter, but using a timer to measure the period of each pulse is a more likely solution:

http://forums.labjack.com/index.php?showtopic=1105

 

Link to comment
Share on other sites

  • 5 weeks later...

Hi.

I have read the info you sujested and havve come up with the attached program. My problem is I can get a signal from the proximity sencor on/off but cannot convert it to shaft RPM. What am I not doing? I dont realy understand the setup sheets or the programing.

I am using this proximity sencor,  http://www.ebay.co.uk/itm/281951674994?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

it will not work just from the labjack so it is powerd from a 9 volt battary, + terminal is connected to Vs on labjack. Neg to battery only and signal to FIO4

Many thanks

Mark

RPM-f.ctl

Link to comment
Share on other sites

You have some typos.

1) there is no "counter" channel, so line 7 of the Read sequence won't work.  Just delete that line.  You aren't reading a counter

2) rename the Read sequence to something else.  "Read" is a reserved word and might cause problems.

3) in startup you call config(), but you renamed the sequence Config_sequence so that never gets called.

4) your periodRaw and RPM channels, the ones you are stuffing values into using AddValue() should have a timing of 0, otherwise they will go and query the driver.  So, periodraw will end up with extra values that correspond to A to D channel 4 on the LabJack, while RPM will fill with somewhat random numbers between -1 and 1.

Link to comment
Share on other sites

I don't see any obvious in your CTL (but it might have extra stuff you don't need).  It looks like it is configuring a 32-bit period timer on FIO5.  If you don't need the PWM, perhaps get rid of that and just use the default clock configuration and just go with your 1 period measurement timer on FIO4.

If you have not already, you want to test your timer first using the test panel in LJControlPanel.

https://labjack.com/support/datasheets/u3/hardware-description/timers-counters/timer-mode-descriptions/period-measurement-32

In the test panel, I suggest just the following 2 changes to the defaults to enable your 1 input timer on FIO4:

# of Timers Enabled = 1

Timer 0 Mode = RISINGEDGES32

If that works with your signal, you can then go to "config defaults" in LJControlPanel and do these same settings and save them as the power-up default for your device.  Then power cycle the U3 so they take effect.  Now you don't need to do any configuration in DAQFactory ... just read the timer value.

Link to comment
Share on other sites

  • 1 year later...

HI. I have come back to this project and give it another go.  I got fedup with not understanding it or getting anywhere with it. 

This time i would like to start a fresh and do one step at a time. Setting up the RPM input. I am using the equipment as before. I have configerd my U3-HV to have 1 timer enabled.  with RISINGEDGES32.  48Mhz diviser of 48. is this correct or should it just be the 48Mhz? The graph on the RPM chanel page has a line on it that changes with pulses. I have a page with a variable value display that gives me a large value that gets lower with more pulses. How do i convert that value to a acurate RPM reading?

thanks Mark

Link to comment
Share on other sites

The counter is much faster than the timer.  Its chip based, where the timer is software based on a chip.  I believe the LabJack counter is 1 mhz, so can handle like 6000 teeth at 10,000 rpm.

Just make sure you wire the sensor correctly.  Its NPN, so not just a contact closure.  The LabJack folks can address how to properly wire an NPN input.

Link to comment
Share on other sites

10 ppr and 10000 rpm gives you about 1667 pulses per second, so you can use a counter or a timer.  See the following for an overview:

https://forums.labjack.com/index.php?showtopic=1105

First try them in the test panel in LJControlPanel.  I suggest you try out a simple hardware counter, and also try the 32-bit period input timer:

https://labjack.com/support/datasheets/u3/hardware-description/timers-counters

For an NPN signal you should be able to just connect to a DIO and GND as shown in Figure 2 here:

https://labjack.com/support/app-notes/open-collector-signals

 

Link to comment
Share on other sites

To get it to update every 0.25 seconds you need to read the input every 0.25 seconds.  If you are using the pulse counter timer instead of the period input counter, then you need to put this in the expression for the display:

(myChannel[0] - myChannel[1]) / (myChannel.time[0] - myChannel.time[1]) * 60

Make sure you use a 32 bit timer or use the counter.  If just a 16 bit, then you are going to have to deal with roll over every 40 seconds or so at 1667 pulses per second.  At 32 bit its more like every 30 days so as long as you reset the counter between runs you'll be fine.

Link to comment
Share on other sites

I have gone back to using a timer and i now have to convertion to rpm worked out as well by 60*1000000/timer_raw[0].  this is done in the properties of the veriable box. Would it be better done by adding a convertion. As later I will need to use the rpm value in a calculation for the graph.  

Link to comment
Share on other sites

thats working lovley now.  Thank you. next can I make it change to zero when no signal or it stops rotating?  Also whaen i was doing this last time i was writing sequences. I have had another lok at them but still cannot get it to work. Will i need to write sequences for the project to work (produce a 2 line graph with bhp and rpm) or can i do it the way i am going at the moment?

Link to comment
Share on other sites

I have tried if(Value == 0, 0, 60*1000000/Value) in the conversions and it seems to stop it from working at all. My rpm out put is reading the time period again I think ( very large No.) If I remove the if(value==0,0, and the last ) then it works ok again.  Have I put it in the right place ?

Link to comment
Share on other sites

Archived

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