RPM Help.

Hi all. I was wondering if anyone could help with getting speed signal from a inductive type sensor. Do I need to remove the AC And Just use the DC using a rectifying diode or can I use the AC? I’m not sure how to write the code either. The trigger wheel has 14 teeth on it. Does this matter also? Any help would be great. Thank you.
Dave.

Don't you think you should tell us the exact type of sensor you're using? A wiring diagram of your current setup would help too.

Sorry I’m new to all this. Really trying to get my head in to it. I don’t have a setup at the moment. It’s a car ABS sensor. 2 wires. I’m assuming it’s giving out ac/dc. I had it plugged in to analog 0 and ground and did an analog.print just to see if it would pick it up, it did but obviously not how it should of done and at the rite speed. Thanks.

You will damage the analog input if you apply AC to it, or if you apply more than 5.5V (on a 5V Arduino).

A relatively safe circuit for experimenting with inductive sensors is shown below. Two 10K resistors "bias" the sensor output at 2.5V, and R3 helps to protect the analog input from overvoltage.
AC_sensor.png

Keep in mind that Serial.print is slow and limits the rate that you can collect analog data.

AC_sensor.png

Thanks. Im assuming by spinning the wheel that I’m creating an ac/dc voltage. So don’t put that in to analog? I think I’m in over my head here. Haha. How would I go about getting the rpm from this sensor? Cheers.

How would I go about getting the rpm from this sensor?

You could start by building the circuit in reply #3 and collect some data.

But before you do that, use your multimeter to measure the output voltage of the sensor. If you don't have a multimeter, now is the time to buy.

Nice. Yeh I have one. I’ll do some testing in the morning when I get in from work. Test the output voltage when spinning the wheel? How fast or does that not matter?

How fast or does that not matter?

Measure it and tell us what you discover.

Hi. Iv done some messing around with it. I set my multimeter to V a/c and got to 1volt spinning it fast. Checked the resistance, that was fluctuating a lot couldn’t get a good read on that. Does this sound correct? Thanks.

got to 1volt spinning it fast.

It should be safe then to connect to an Arduino, using the circuit in reply #3.

Thanks for the fast reply. How do I go about working out the RPM. Does it matter how many teeth it has on the trigger wheel? Have you ever thought about being paid to write code for the not so coding person like me? Haha.

If you are willing to pay someone to help, post on the Gigs & Collaborations section.

Otherwise, this is a hobby forum and most people enjoy learning how to deal with these challenges. Since none of us has your sensor, you will have to determine how it works and how to get sensible data from it.

The basic idea is to read the analog input, decide when some threshold has passed (count "peaks"), determine the time between peaks and convert that into revolutions per minute (with 14 peaks or teeth per revolution).

Thanks. I was just thinking I wouldn’t mind paying but I’d also like to learn. It would be good so I can teach my boy. He’s 9 but I’m pretty sure he will be teaching me soon. Ha. Would I have to clean the ac signal in to just a single dc spike to count the rotations?

Would I have to clean the ac signal in to just a single dc spike to count the rotations?

Probably not. Google "arduino read inductive sensor rpm" for lots of ideas.

Thanks very much. Appreciate your help. I’ll have a look tomorrow.

The accurate way is to count/time the pulses, not integrate them. Individual pulse size depends
on mechanical positioning/runout and temperature.

I don’t understand. I have what I have. The sensor is fixed as is the amaount of teeth. I’m unsure about how to write the code to read the rpm from an inductive signal. It will be spinning around 60,000rpm. Thanks.

Have you built the circuit shown in reply #3?
Have you googled "arduino inductive sensor rpm"?
Have you tried any code at all? If so, post it, using code tags, and tell us what you observed and learned.

It will be spinning around 60,000rpm

At that extreme rotational speed, hopefully the wheel is very carefully balanced and spinning in a steel jacketed vacuum chamber.

Hi. Yeh I did all that. I watched a guy using a pulse from a coil around a HT lead on a spark plug. Also watched somome do it with a infrared LED and pickup. U tried his code but he seems to be using an interrupt and can’t figure it out. I’m really struggling on the Code. Thanks.

I'm really struggling on the Code.

This would be a good time to read the "How to use this forum" sticky and follow the instructions.

Post the code, using code tags, explain what the code should do, and what it does instead.