Home › Forums › Microcontrollers › PIC Microcontroller › RPM sensing using hall effect sensor
- This topic has 5 replies, 3 voices, and was last updated 7 years, 8 months ago by Ligo George.
-
AuthorPosts
-
March 20, 2015 at 8:21 pm #11093YashParticipant
Hello guys,
I am using pic 16f877a for measuring rpm of a motor, it uses an this hall effect sensor link. Problem I am having that this seller is not providing any documentation for this sensor, it has an analog pin as well as an digital pin which is one confusion.
If sensor is giving digital o/p at every time it comes near a magnet then how will I measure its rpm. I am using Mikro C for coding and I also have other buttons as inputs so if I loop for long period then I might miss the button press.
thanks in advance.
March 20, 2015 at 9:06 pm #11094Ligo GeorgeKeymasterHello, you can use the INTERRUPT or COUNTER module of PIC Microcontroller for that.
March 23, 2015 at 10:59 pm #11111YashParticipantI am using PIC16F877A with 8MHz external oscillator. And coding in MicroC
Idea is to measure the pules produce by the sensor for 1 sec and then multiply the value with 60 hence the RPM which I will display on LCD.
Please tell me if my method is right and how to implement it. As I want to show rpm on lcd so I would like it be slow enough so that rpm readings are stable.
I have no experience in timers if you can give me a basic code to get started with, then I can play with it and find my way to solution ?
Thank You.
March 24, 2015 at 1:02 pm #11112Ligo GeorgeKeymasterUsing Interrupt with PIC Microcontroller – MikroC
Please read the datasheet of PIC 16F877A microcontroller… there you can find the procedure to use timer / counter module.
June 29, 2015 at 12:34 pm #11532sandeepParticipantHi Ligo,
First of all, i would like to thank you for such a worthy platform to share ideas. i wish electrosome to be a big success.on my side, i have decided to buy the required electronic components from electrosome from now on.
As far as speed control of dc motor using pwm module of pic16f877a on ur site is working good. i could control speed of a 5v motor. and actually i need to control the 24v dc motor, is uln2803 driver and a 24v dc relay with the 24v supply is sufficient or do v have to use triac application in it???
Regards
N.SandeepJune 30, 2015 at 9:04 pm #11533Ligo GeorgeKeymasterYes, you can use ULN2803 for that. No need of additional components.
Please open a new topic for asking your doubts. Don’t post it on others topic.
-
AuthorPosts
- You must be logged in to reply to this topic.