Shop OBEX P1 Docs P2 Docs Learn Events
Read RPM — Parallax Forums

Read RPM

P.BodinP.Bodin Posts: 6
edited 2006-06-08 17:24 in BASIC Stamp
Hello.
I’d like to measure the rpm on my boat engine in the easiest possible way.
Reading other posts it seems to be possible with the pulsin command. However, I don’t know how to wire things up. Could someone help me out? Or is there another better way to do this?
·
/P

Comments

  • ellizardellizard Posts: 106
    edited 2006-06-04 11:01
    HI, in the past I played with the diesel engine of my boat to try counting the revs

    The problem i encountered with a boat engine is:
    If it's a diesel engine, you could have an (1) revolutions sensor, or the rpm information is gathered trough the (2) alternator non rectified alternated waves of one phase.
    If it's a gas engine, your rev counter could be wired to the ignition coil.

    First case: if you have the rev counter connected to a revolutions sensor, it should be quite easy to clip to that sensor, and use it's pulses for the BS to count it and probably display or log (It must probably be conditioned to the imput specifics of the BS2).

    Second case: if the rev counter is connected to the alternator, after proper conditioning of the signal, you must divide the pulse result for the reduction ratio of the alternator pulley (the alternators on engines often get rotating at multiple of the speed of the engine) tough this method not being too precise due to belt slippage, not exactly round multiple e.g. 2.75 times, variations in the alternator fields etc.

    If a gas engine is concerned, beware of straigth connection, always use an optocoupler. also provide for torough shielding of the BS2 circuitry as well as proper filtering the supply being the electrical environment very noisy exactly like in a car.
    It's still an unfinished project (You know this is a hobby, we must also work sometimes)

    You're correct thinking of using pulsin command, but anyway it require a good math knowledge specifically adapted for Bs2 , and in that I was exstensively helped in the maths by gentle dr. Tracy Allen.

    I tryed to use the existing revs sensor, but it worked erratically (it was very old) and a new one was here in Italy otrageously priced (near 200 euros = 260 $).

    I tried also with the Melexis 90217 magnetic sensor, but due to the influence of the alternator and to the windings of the starter motor, the results was erratic too.

    After much try and change, I choice to make a brand new rev sensor using the Parallax QTI infrared sensor, but due to the harsh electrical and temperature environment in the engine room, instead of having to cope with amplification and filtering of the signals, I ended with a somewhat weird solution: near the flywheel there is the Ir emitter, the Ir receiver is in the BS2 PCB and is feed trough a length of optical fiber. the flywheel periphery was painted half with black opaque and half with white bright paint.

    Hope this has cleared some issues,
    if you need some more advice, expecially for wath relates to the math, pm me and I'll post the part of the project concerned with the rev counting.

    Best Regards
    Stefano Caruso

    P.S. my project is not limited to simply counts and display the revs of the engine, it has also an hour meter, oil pressure, water temperature, exaust temperature, with all the sounding alarms for abnormal parameters, as well as alarms for changing oil, filters etc.
    It's still an unfinished project (You know this is a hobby, and sometime I have to work also)

    Post Edited (ellizard) : 6/8/2006 4:57:29 PM GMT
  • FranklinFranklin Posts: 4,747
    edited 2006-06-05 18:16
    There was an article in a recent Nuts & Volts where they used a magnet on the crank pulley and a hall sensor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • P.BodinP.Bodin Posts: 6
    edited 2006-06-05 20:36
    Stefano,
    You seem to have a very interesting project going on. I’m trying to build something similar myself. At first I thought it would be quite simple. Reading around a bit made me understand that there are some problems. Especially with the electrical environment in a boat. You seem to have tried almost everything already and become an expert in this.
    ·
    My plan was to read resistive components like temperature and oil pressure directly on a BS2 pin. Things that include currents could be measured with an A/D converter. Can you see any monumental problems in this approach? I have tested a few things already and they work out fine. That is on my table with nice and stabile voltage. In the boat everything would probably be fried at once.
    ·
    I have actually ordered some Melexis 90217. I thought they would be the best way to measure the RPM. It worries me that you had so many problems with it. Would you think it is impossible? I could maybe use shielded cables and try to mount the 90217 far away from electrical fields?
    ·
    ·
    Best regards
    ·
    Patrik Bodin


  • Ken GraceyKen Gracey Posts: 7,387
    edited 2006-06-05 20:54
    Patrik,

    When I used the Melexis 90217 on my milling machine it was about two inches away from the mill's 2.0 HP 220VAC motor, which provided no interference. That could be because the mill is German-made and they have to comply with EMI shielding requirements for their CE certification. I found that the hall effect sensor needed to be quite close to the magnet (within a 1/4" distance). I've never tried this under the hood of an automobile, though.

    Ken Gracey
    Parallax, Inc.
  • ellizardellizard Posts: 106
    edited 2006-06-06 18:46
    HI Patrik

    Of course the choice is different between persons, and I agree with You that it's not so difficult to implement reading of the so called resistive sensors (oil pressure, temperature etc.).
    My project raised from the fact that my boat is very old ( a 35' Sparkman & Stephen design made in 1970) and also is engine is very old (1984 volvo penta MD11, 23 hp) and the electrical wiring as well as every sensor was working erratically, the engine is very basic, no return fuel line, no heat exchanger, no preheating), this posed me in front of a choice, refurbish and/or restore the existing wiring/sensors, or make them brand new from zero, as I mentioned in my previous post, the cost of spare parts here in Italy from Volvo is otrageously high, nothing reliable on the used spare parts market, so I went for making the sensors all new and different from the normal industry standards (I do not have the skill nor the tools of the industry for obtaining the same precision and reliability), for what concern the resistive sensors, i tried to measure the cooling water temperature with an LM35D (National Instruments 0 +100 °C) but the life of the device was short, not more than two-three months, I stil have to discover why, so now I am thinking to switch to termocouples, same thing for the temperature of the exaust, wich would raise if the cooling water pump stops working or if I forget to open the seacock. (I'm thinking to put a switch in the seacock handle, just to be on the safer
    side)
    For the oil pressure sensor, that is anyway a current device (i.e. a device in wich the relevant information is gathered trough current variations, I'm using an oil pressure sensor from a car engine, and it's working (though the span is not the same, so I'd made a sort of scaling), for the reading of wich I've used an ADC0831, but i'm not satisfied with this solution and I'll change. the problem is always the electrical noise that makes difficult to obtain a correct reading, I'm thinking to divide the circuit and have an ADC and an SX to read many times and average the results before sending to the Basic Stamp for the logging/display functions.

    Same thing for the current and voltage readings from the batteries (3 of 100 Ah in parallel for services + 1 of 70 Ah for cranking).
    Same thing for the solar panel and for the wind generator.
    For all of the ADC measures, I decided to put the ADC converter, close to measure point so I'll have digital signals going around in the wiring, (I'm thinking also to connect all the peripheral electronic with a bus like optical fiber, hard work).

    There is also a DS1603 Elapsed Time Counter Module from Dallas Semiconductor, for keeping the time of motor running, useful also to calculate when it's time to change oil, filters etc.
    The display is done with a MAX7219 (thanks MAXIM DALLAS for so nice and useful IC's) and 5 seven segments display and a few leds.

    This is in few words my boat related project.

    Problems encountered in passing from breadboard to real world: nothing exceptional, but some quibbly details, such for example the huge amount of current sinked by the starting motor (more than 100 Amps), the same with the windlass, they influenced the Melexis in a strange mood, it stayed almost deaf for minutes after cranking, (may be i got to have a deeper reading of the Melexis data sheet).

    Keep well filtered and stabilized the supply of the BS2 and all the other electronics, I did it with a two stage regulator, from battery voltage -> 9 volts -> 5 volts, using low drop voltage regulators and huge capacitors 2200uF and coils.

    Check also all the connections of the minus polarity troughout all the wiring.

    I've attached a file for counting revs and hours (trough DS1603) and display with MAX7219),
    all the maths was solved thanks to Dr. Tracy Allen that solved most of the trickiest problems).
    (the comments are in Italian language)
    For now I must leave, work is calling me.

    regards

    Stefano
  • P.BodinP.Bodin Posts: 6
    edited 2006-06-07 19:05
    Stefano,
    you are extremely helpful. Thank you very much. I will certainly use your advices in my project. As soon as I get something working (if I do) I’ll report back to you. Hope you don’t mind if I get back to you when I run deep into trouble wink.gif


    Best regards

    Patrik Bodin
  • ellizardellizard Posts: 106
    edited 2006-06-08 16:55
    HI Patrick

    I do not, me too learned things this way, for other things I'm sorry ca'nt disclose because is property of customers, but for this that is an hobby no problem to share.

    Two points:
    • In the program there are also sections of code not yet finished, do read well the comments (oops.... theyr'e in Italian ).
    • try to extraploate the constants and variables used for the rpm count (may be you learn some italian reading the comments?)
      • there are two subroutines to arrive from pulse duration to number of revolutions/minute (frequency divided by 60 seconds).
      • the math of this sub works in the order: obtain the duration of an half turn, obtain the reciprocal (don't ask me the figures, more exaustive informations you can have at this link: www.emesystems.com/BS2index.htm#math).
      (hope Emesys does not get upset, do'nt know exact galateo in this case)
      [noparse][[/noparse]list]
    • the other sub is similar but it extrapolate the rpm trough a more empirical formula given the minimum and maximum amount of pulsin for the span of rpm.

    This is almost all i recall, as you can see it is almost one year that I'm involved in completely different things (you know work.......)
    For the future, I'm gonna leave in Croatia for the summer, working on boats, with poor or no internet connection, so may be I'll respond to you delayed, but no problem at all to share informations with you and with the forum.

    Warmest encouragement to pass from prototipe to stable box, this has been my stronger effort, since and has greatly ralented the project.

    Do'nt be discouraged

    Regards
    Stefano

    Post Edited (ellizard) : 6/8/2006 5:01:54 PM GMT
  • ellizardellizard Posts: 106
    edited 2006-06-08 17:24
    Hi
    Ken Gracey said...
    When I used the Melexis 90217 on my milling machine it was about two inches away from the mill's 2.0 HP 220VAC motor, which provided no interference. That could be because the mill is German-made and they have to comply with EMI shielding requirements for their CE certification. I found that the hall effect sensor needed to be quite close to the magnet (within a 1/4" distance). I've never tried this under the hood of an automobile, though.

    Started thinking to this too because always read positive response to this method.

    Could be the different behaviour resides in the use of AC vs DC ?
    As I said in a previous post, the starting motor draws more than 100 Amps with surge of 300-400 Amps for millisecs, this somewhat cutted the sensitivity of the Melexis for minutes or sometimes till switched off-on, measured this behavior with scope, only the Melexis connected and charged with 10k, supply stable and not influenced by the surge, for reading the current I have a shunt 1 mv/A capable of 400 Amps cont.
    During the starting of the engine, the voltage figure sees an abrupt down to 7,5 - 8.0 volt for say 200 milisecs starting to rise ending to 10.5 - 11.0 volts on it's regime
    before engine starts on it's own, at wich it's difficult to say because the alternator starting to charge interferes, (too lazy to alter the wiring to make the alternator charge another battery)

    I did not try if supplying the Melexis after say half a second from ceasing of cranking ameliorate the situation or solves it completely, ........may be, it's due further investigation...........

    Regards,
    Stefano

    P.S. Give a slap on shoulder to Aristides and everybody at Parallax, go Ahead
Sign In or Register to comment.