Go Down

Topic: RPM Help.  (Read 1 time) previous topic - next topic

DaveBlackpool

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.

pylon

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.

DaveBlackpool

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. 

jremington

#3
Nov 07, 2017, 07:16 pm Last Edit: Nov 07, 2017, 07:19 pm by jremington
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.


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

DaveBlackpool

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. 

jremington

#5
Nov 07, 2017, 07:52 pm Last Edit: Nov 07, 2017, 07:53 pm by jremington
Quote
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.

DaveBlackpool

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?

jremington

Quote
How fast or does that not matter?
Measure it and tell us what you discover.

DaveBlackpool

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. 

jremington

Quote
got to 1volt spinning it fast.
It should be safe then to connect to an Arduino, using the circuit in reply #3.

DaveBlackpool

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.

jremington

#11
Nov 08, 2017, 05:40 pm Last Edit: Nov 08, 2017, 05:41 pm by jremington
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).

DaveBlackpool

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?

jremington

#13
Nov 08, 2017, 06:12 pm Last Edit: Nov 08, 2017, 06:13 pm by jremington
Quote
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.

DaveBlackpool

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

Go Up