Author Topic: Measuring RPM with an Arduino  (Read 1447 times)

Samo

  • Full Member
  • ***
  • Posts: 171
    • View Profile
Measuring RPM with an Arduino
« on: July 14, 2017, 04:50:04 AM »
Here's the first post for an Arduino RPM sensor. The software and instructions provide Realtime and Average RPM using a Hall Effect Sensor or an Infrared Sensor. I've found infrared sensors work pretty well with a painted white dot or stick on reflective surface.

I'll post more as I finish it but the software and hardware seems to work pretty well for me at the moment.

Overview:



https://onenote.com/webapp/pages?token=dhiseQcQssyXXmHDU4u7mLWtQCZdMbvpJaxTKZyjJtd_8fCBoRMjmd7kcTjhjvhUJ-4U0Ce7wRgy2cL03LnDP9bYR_POsni60&id=636355803644158592

Software:

https://onenote.com/webapp/pages?token=LMPiH-U3DSxJxLXxYJxur0WyB0UXTJSkSoOVrzasZG_vfWnHya7RusSN8tVRqYVytzycctFlZR0HRStFwyeOb5yZlEhVFogA0&id=636355806109807414

Video
https://photos.app.goo.gl/noQyJZ27LezFVUhK2

The video isn't too good, got to get very close to the Sensor for a good measurement... which is hard with a hand held egg beater in a battery Drill!

Samo
« Last Edit: July 14, 2017, 08:14:12 AM by Samo »
Lister CS 12/2 & JKSON 10/1 Listeroid

highroad281

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Measuring RPM with an Arduino
« Reply #1 on: July 27, 2017, 06:43:12 PM »
Thanks for chronicling your projects Samo,  I'm curious to see how far you can take the instrumentation & automation.  Looking forward to the next installment!

Samo

  • Full Member
  • ***
  • Posts: 171
    • View Profile
Re: Measuring RPM with an Arduino
« Reply #2 on: August 15, 2017, 11:50:59 AM »
For your viewing pleasure :)

https://youtu.be/dnbves1f2K4

Here's a video of my Listeroid Genset with Arduino based governor control Mark 5 (or so). This version is using an Infra Red sensor to detect fylwheel RPM, then adjusts the Fuel Rack (via a fine tune servo) to maintain a constant RPM. For my engine that RPM is 717 (+-) and gives me 50hz from my alternator....

This differs from previous versions where I was sensing the Voltage and Hertz directly from the Alternator, this version only uses one sensor and some white dots on the flywheel, so it's a bit simpler to build, even with the display.

I'll get to writing this up and sharing the code in the next week or so...

cheers,
Samo

 
Lister CS 12/2 & JKSON 10/1 Listeroid

BruceM

  • Hero Member
  • *****
  • Posts: 2171
    • View Profile
Re: Measuring RPM with an Arduino
« Reply #3 on: August 15, 2017, 02:46:37 PM »
Great project, Samo! 
I will pass on a bit of good advice I got from George Breckenridge many years ago.  I was considering engine rpm sensing for safety (auto shutdown) and auto starting.  I was planning on optical.  He reminded me that the automotive industry tried and abandoned optical sensors in favor of inductive or hall effect (magnet) sensors because of long term reliability of optical sensors in an environment of oil vapors and dust/dirt. A sensor which is impervious to oils and dirt is preferred around engines.

Yours are readily accessible for regular cleaning so should be fine with cleaning as part of the regular oiling service schedule.

Your same hardware and software could also use hall effect or inductive sensors and be maintenance free. I use the Cherry hall effect based gear tooth sensor on my CS 6/1 Listeroid to sense the standard cast iron flywheel spokes passing by.  It has a small magnet built in next to the hall sensor so it can sence any passing ferrous material.  There are also inductive sensors.  For my neighbor's propane CS conversion spark ignition system I used hall effect sensors with a magnet epoxied to the flywheel (and another on the injection pump cam follower).   We also did use 4 magnets and a hall sensor on the hub for RPM sensing using a frequency to voltage IC to turn it to an analog signal.  As per your design, I found 4 per revolution is  a good workable minimum pulse rate. The hub is a convenient location and velocity is much lower and safer there should a magnet get knocked loose.  I used the flywheel for precision spark timing.

The hall sensors are my favorite because they are so cheap and reliable. Even in a brushless pump motor controller application, I've never yet had one fail. Even buried in oily dirt and gunk, they continue to work.




AdeV

  • Administrator
  • Sr. Member
  • *****
  • Posts: 437
    • View Profile
Re: Measuring RPM with an Arduino
« Reply #4 on: August 15, 2017, 07:15:45 PM »
The hall sensors are my favorite because they are so cheap and reliable. Even in a brushless pump motor controller application, I've never yet had one fail. Even buried in oily dirt and gunk, they continue to work.

Aha! I've had one fail! Admittedly, it was in a 200,000 mile car engine, which had obviously seen lots of vibration, heat, etc... I think for Lister(oid) use, they'll last more or less forever...
Cheers!
Ade.
--------------
1x Lister CS Start-o-Matic (complete, runs)
0x Lister JP4 :( - Sold to go in a canal boat.

Samo

  • Full Member
  • ***
  • Posts: 171
    • View Profile
Re: Measuring RPM with an Arduino
« Reply #5 on: August 15, 2017, 08:19:24 PM »
Thanks Bruce, I completely agree and I have made interchangeable sensors so that I can use a hall effect sensor. The Arduino setup works with both. However it was easier to install the IR version for this demo. I need to fix the sensing magnets so there is no chance they will become projectiles.
Lister CS 12/2 & JKSON 10/1 Listeroid

BruceM

  • Hero Member
  • *****
  • Posts: 2171
    • View Profile
Re: Measuring RPM with an Arduino
« Reply #6 on: August 15, 2017, 08:31:26 PM »
Your projects are very professional, Samo.  Your IR sensor version would also be useful for many other RPM sensing projects.

dieselspanner

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
Re: Measuring RPM with an Arduino
« Reply #7 on: August 15, 2017, 08:50:14 PM »
When my mate offered to build me a digital rev counter with a Hall effect switch we discussed where the pickup should be and managed to fit the magnets (4 x tiny 2mm neodymium boys at 90 degrees) in the collar that retains the camshaft. Using the the theory that the smaller diameter running at half engine speed would be less likely to spin them off and if they did the cover would slow them down a bit.

Using the existing studs I knocked up an adjustable mounting for the switch, all under the 'lid'

If anyone would like a photo sing out and I'll post up

 
Tighten 'til it strips, weld nut to chassis, peen stud, adjust with angle grinder.

Samo

  • Full Member
  • ***
  • Posts: 171
    • View Profile
Re: Measuring RPM with an Arduino
« Reply #8 on: August 15, 2017, 09:00:20 PM »
Hi Steff,

photo's always appreciated

Samo
Lister CS 12/2 & JKSON 10/1 Listeroid

dieselspanner

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
Re: Measuring RPM with an Arduino
« Reply #9 on: August 16, 2017, 04:48:20 PM »
It's nice to be appreciated, even if it's once removed!

This is as good as I get with photo's, I've discovered, all on my own, I can take a picture with my Kindle, email it to me, save it then re transmit.

Cheers stef
Tighten 'til it strips, weld nut to chassis, peen stud, adjust with angle grinder.