News:

we are back up and running again!

Main Menu

Reading the RPM

Started by AdeV, May 27, 2010, 04:37:24 PM

Previous topic - Next topic

AdeV

These evening has mainly been about reading the RPM off my Lister, via an Arduino MCU. This is just a quick write-up for now, I will fill in some more details tomorrow.

Here's the setup (click each picture for a bigger version):



The hall sensor (the little black blob) is currently simply wedged into that piece of wood which is standing next to the engine. The magnet was sourced from a hard-disk, and is still sitting in it's carrier. There's another magnet on the back of the carrier, which is sticking the whole assembly to the flywheel. It's all terribly Heath Robinson, but it works :)



Here we have the analogue readout and the Arduino (actually a Boarduino) on its little breadboard. The Arduino can output an "analogue" signal via PWM. This goes into a potentiometer, and through this rather lovely 100uA meter. The pot is adjusted to give full-scale-deflection @ 1000rpm, which conveniently gives me a x100 RPM gauge :) It's not quite perfectly linear, unfortunately, I may need to do some jiggling in the code.




Finally, we have the User Interface Mk 0.001 (pre-Alpha). It's just a cobbled up set of readouts at the moment, with an option to re-set the peak RPMs.




Once the engine is running, I tuned the governer spring to read as close to 650rpm as possible. This took about 2 minutes:


As you can see from the peak readout, the spring is not the fastest-reacting thing in the west; I shut the rack off until the revs dropped to around 200, then let the governer bring the rpms back up. It overshot quite a long way; although with no load on the engine, that's possibly not too big an issue:




Finally, for now, here's the analogue gauge in action:




I'll post up code & other goodies tomorrow, when I'm less knackered & hungry...
Cheers!
Ade.
--------------
Lister CS 6/1 with ST5
Lister JP4 looking for a purpose...
Looking for a Changfa in my life...

WGB

Now that is pretty cool!
Good work.

Crumpite

Nice setup, nice pictures !

Those Arduino's are cute little baby things (as my wife would say..  :)

I've got a couple myself, just waiting to be hooked up to my 6/1.
That is, if I ever get all of the pipeing done !

Keep up the good work,
Crumpite

AdeV

Thanks chaps :)

One thing that's been bothering me, I never saw anything between 643.89rpm and 651.04rpm... turns out that's the difference between 91 ticks and 90 ticks (respectively) of my clock between interrupts.

Looks like I need to find a better clock... that's obviously the approximate number of milliseconds between magnet senses. The Arduino should be able to give me a reading to the nearest 4th microsecond. More tomorrow...
Cheers!
Ade.
--------------
Lister CS 6/1 with ST5
Lister JP4 looking for a purpose...
Looking for a Changfa in my life...

RogerAS

Hmm,

All the HD magnets I've ever seen have two poles. One lateral half will be north and the other side will be south. Could this be messing with your accuracy? I mean it might be picking up the field change as another rev.

R

AdeV

Quote from: RogerAS on July 16, 2010, 04:18:53 PM
Hmm,

All the HD magnets I've ever seen have two poles. One lateral half will be north and the other side will be south. Could this be messing with your accuracy? I mean it might be picking up the field change as another rev.

R

I hadn't realised I'd not updated here, doh!

The problem was I was using milliseconds, which didn't give enough resolution at the typical 600-650rpm. With help from the Arduino forum, I changed it to use microseconds, and now it's much more accurate. I was having a problem with the magnet triggering twice, but moving the sensor a little further out sorted that; my next task was to build a little perspex disc with a smaller magnet embedded in it, which would slip onto the crankshaft & look a bit tidier than what's there now. I've bought the plastic, the magnets took a while to show up & meantime, other events took over which have kept me away from the engine these last few months...

I hope to be back on the case soon.... probably September, the rate things are going.
Cheers!
Ade.
--------------
Lister CS 6/1 with ST5
Lister JP4 looking for a purpose...
Looking for a Changfa in my life...

mike90045

I've found some really good magnets in the brush assembly of SonicCare toothbrushes.   The handle piece just has coils in it, and the brush end has a pair of magnets.

You current magnet may be too large, it covers quite a large angle of rotation, a smaller one may give better results.

Will you still need a Hz meter, are you feeding AC to house, or rectifying for DC battery charging?