Analog frequency from Motorcycle battery conversion to PWM ( for driving LED )


Firstly i have to say i try to find answer but i cant. If anyone have links to answer my question please just send it.

Basic idea: My idea is to monitor any kind of reference point that should tell me how rpm. have motor on my motorcycle ( cca 2000 - 9000rpm ). Then i wanna translate / converse this signal equaly on brightness of one or more LED lights. Low RMP = low brightness high RPM. ( over 8000RPM. ) = 100% brightness. I think LEDs should be driven by logic level MOSFET.

I measure battery on my motorcycle with runing motor using my ocilloscope. I found out that there is voltage ripple as alternator is working. I used AC measuring to see ripple separated from DC of battery. On byttery i really see ripple equal RPM - attached pictures AC measurment on motorcycle battery lower frequency 1800-2000 RPM. higher 8000-9000RPM.

Now i need to find how to use this signal to drive MOSFET with PWM.

It should be arduino or any analog circuit ( i just think it should be easyier with arduino but i shoul be wrong im newb )

Also maybe it should be different reference point. Maybe… Maybe magnethic sensor near alternator?! Just anything noninvasive.

Thank you for answers.

You should pick a cleaner signal from your spark ignition circuit.

I'd rather use a 555 as a monostable with 6.7ms time constant, triggered by your AC signal to drive the LED. That should output a 100% PWM at 9000rpm and 22% PWM at 2000rpm

monostable tutorial
555 timer tutorial

Beware that perceived led intensity can be very misleading, it changes a lot with the viewing angle and ambient light.


Thank you for typ.

As first step today i will chceck if i could get spark ignition signal.

If yes... Isnt there risk of incorrect function of motor? I think your soulution will drain minimal energy but as newb i am littlebit paranoid heh...

Second step will be learning more about circuits you suggested ( if i get to spark ignition signal noninvasive ).

Just to be sure... By " spark ignition circuit " you mean direct volatage on spark ignition cable directly connected to spark plug as i get it... Not some engine control unit signal...

For other members: For now i dont know how i will continue with this project. Original question is still actual till i get more info to decide.

Well I was thinking at the low-level voltage circuit, not the high voltage spark signal. But if you are unsure, don't do it.

A least invasive method would be to sense motor's vibration with a piezo

Piezo? Isnt better specialized vibration sensor? Also i think trehes so much moving parts that signal will be maybe even worse than battery signal... There i see relatively clear waves / rise and drop... And what about some coil wired around ignition cable? It should maybe generate signal as electricity flows uder it?!? I tested it but maybe its bad theory or it need littlebit more than just coil from jumper cable...


So for now i cant really find any noninvasive ref. point.

Only way i see is to use signal from battery or some sensor for: vibrations, magnethic field or sound. ( or any other )

As i see frequency changes on battery i think its a good ref. point. I just dont know if signal is strong inaf for arduino to work with it... I just need to measure frequency of pulses on battery not voltage (voltage is almost same ) but frequency change inaf ( i think ) and translate Hz of pulses to PWM 0-225.

I also have to say that little inperfections in this case does not matter. Partly incorrect readings causing incorrect % of LED brightnes should look good... As some nice noise....

I just try to say i dont need so precise translation from Hz to PWM maybe... Maybe some noise there will be even nicer than smooth transition...

I see you have an oscilloscope, so you can either make coils around cables or use a piezo from a buzzer like this attached with tape near engine/exhaust and check with an oscilloscope their output voltage/frequency, see if they match or are in direct relation with rpm.

The pulses shown in your first photo (200rpm - 10mV 8ms period pulses) are likely from the alternator. If the alternator isn't clutched and spins all the time, the best point for your reference voltage pulses could be its output, before being rectified by the charge controller.

That could be a little invasive since you probably need to take it out and open its junction box to connect a wire, but it's not such a risky thing.

Just for accuracy:

Peak to peak is cca. 200mV

Frequency is cca. 125Hz to 666,666Hz ( this makes me laught because of my nick... i did not expect that :smiley: )

Someone correct me if im wrong...