element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Test & Tools
  • Technologies
  • More
Test & Tools
Forum Speed Sensor filter or signal conditioner needed
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Test & Tools to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 13 replies
  • Subscribers 360 subscribers
  • Views 2254 views
  • Users 0 members are here
  • tachometer
  • microprocessor
  • microcontrollers
  • pic10f
  • speed
  • sensor
  • pic
Related

Speed Sensor filter or signal conditioner needed

Catwell
Catwell over 14 years ago
I want to clean up the pulses from a gear tooth speed sensor in the presence of incredible amounts of noise.


Currently the device senses 1 pulse per revolution. Maximum RPM is 3000. One main issue I have, is at lower speeds, say 1-100 rpm, the returned results are not accurate. At those speeds the pulses are too long and the sensor is reporting more of them during the contact incident. The PC then translates that as a higher RPM.
 

Filtered, accurate, RPM reports across the range of motion is important. What are some options I could try?
 

One option I was planning to try, is to condition the signal by sending it through a PIC 10F. So every pulse(s) received by the PIC will be changed to a single pulse, if certain conditions are met. And noise would also be filtered. But I think a microcontroller is overkill. I would like a IC solution, like a Schmitt trigger or op-amp.
 

Thoughts?

 
Cabe
  • Sign in to reply
  • Cancel
  • michaelkellett
    michaelkellett over 14 years ago

    Hello Cabe,

     

    You really need to say a bit more about the noise and the pulse widths but I'll stick my neck out and suggest that you won't get a good result without digital signal processing at very low rpm. The kind of thing that springs to mind is a sort of digital phase locked lopp which allows you to exploit the fact that you have a good idea when the next pulse edge should arrive. In reasonable numbers you can buy an ARM for £0.50 so you can get a lot of processing power for way less than the cost of the sensor.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Jorge_Garcia
    Jorge_Garcia over 14 years ago

    Hi Cabe,

     

    If the sensor is giving out more pulses at low speeds then I think the problem lies with the sensor. Just like in computers junk in= junk out if the data from the sensor isn't reliable then no amount of processing will give you a useable result.

     

    Now let's do some quick numbers, you mentioned max speed is 3000 RPM, since you get one pulse per revolution then you have a square wave frequency of approximately 50Hz tops.

     

    If the square wave is getting mangled by noise, then a simple comparator circuit should take care of it. By setting the threshold of the comparator appropriately you should be able to get accurate counts.

     

    Again if the sensor is not accurate or reliable then there's really nothing you can do except get a better sensor.

     

    hth,

    Jorge Garcia

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 14 years ago

    One tooth per rev isn't a gear. The sensor you linked is specifically designed for gears and has automatic sensitivity and threshold adjustment circuitry. Not surprising it tries to find the rest of the teeth it was expecting in the noise.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Catwell
    Catwell over 14 years ago in reply to Former Member

    Frootbat,

     

    My concept was to use the gear sensor to detect a single setscrew on a plastic ring (which I made). I like the phase lock-loop idea, do you have some links to more info about creating one? Think I could get away with a PIC 10F222?

     

    Cabe

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Catwell
    Catwell over 14 years ago in reply to Jorge_Garcia

    Jorge,

     

    After closer inspection, the problem is in the CAM software I am using. The sensor works properly, it is sending the proper pulses. But at low speeds the pulse width is enormous, and the software doesn't know what to do with it. A singnal conditioner is needed. I could use a uC; when a pulse in detected, no matter how long, it sends a clean 1-5us pulse. Then the software will not be confused. I should address this before adressing the noise.

     

    Your reply made me take a look at what is coming out of the sensor on an o-scope. Thanks.

     

    Cabe

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Jorge_Garcia
    Jorge_Garcia over 14 years ago in reply to Catwell

    Hi Cabe,

     

    I'm glad to hear it's not the sensor, now we have something we can work with. I have to assume you don't want to get in between the CAM software and the signal it's receiving, maybe using a Python Script, such a solution would have the advantage that their would be no investment in hardware.

     

    I took a brief look at the spec sheet for the PIC 10F222, and it doesn't seem to have an input capture module if it did you'd be golden. However since we're dealing with low frequencies (about 50 Hz max) you could poll the input at maybe 150 or 200Hz and you could capture the pulses reliably. you would then program the PIC to output the desired pulse on a low-high transition.

     

    Let me know if this sounds feasible.

     

    Best Regards,

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett over 14 years ago in reply to Catwell

    Hello Cabe,

     

    That PIC10F222 is kind of weedy to do a digital PLL without a lot of work. Unless you are going to build a lot of these things then choose a processor you can code in C and that has some decent timers.

    PIC10F222 100 off £0.40 (23 bytes RAM 1k code, 2MIPS)

    STM32F100C4T6B 100 off £1.44 (4k RAM, 16k Code, 24 MIPS)

    So if you are building 100 you save £100 by using the PIC and increase the software development time by (I guess wildly) at least 2 days.

    If your numbers are different or you can't cope with the bigger package you may need to use something tiny - if you go with the ARM let me know and I might be able to make DPLL suggestions.

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jvdberg@ieee.org
    jvdberg@ieee.org over 14 years ago
    image
    Hi Cabe,
     
    What could be the problem is that the signal from the detector has an unknown DC value.
    At high speed an AC coupled amplifier can be used to clamp the signal at the supply voltage.
    At low speed the time between the up going flange and the down going flange could be so long that you can see significant droop within the pulse. At high gain this will make the circuit sensitive for noise.
    In extreme cases the up going flange and the down going flange can be counted as separate pulses.
    To overcome this problem, the signal from the sensor should not be amplified until clamped at the supply voltage.
    The signal must be compared with a voltage half way between the logic values.
    You can use one of the schematics attached. The simple schematic at the top will force the signal around zero Volt. For a single supply voltage the ground must be replaced by half the supply voltage.
    The schematic at the bottom might need some explanation.
    C7 will be charged to the maximum positive value of the signal.
    C8 will be charged to the maximum negative value of the signal.
    These capacitors will hold this value for a long time. (more than 10 minutes)
    Behind the buffers voltage divider R12 R13 will make a voltage half way between those values. The input signal is compared with this value in IC6. If the input voltage is a logic high, C7 can discharge via D2 R14 if the voltage at C7 is too high.
    If the input voltage is a logic low, C8 can discharge via D42 R15 if the voltage at C7 is too high.
    If the input voltage is a logic high, C8 will hold its value.
    If the input voltage is a logic low, C7 will hold its value.
    If the circuit cannot follow variations in the DC value of the signal, select an other value for R14 and R15.
    For the preamplifier the circuit provides a DC feedback signal. This allows you to make a preamplifier with a high AC gain and a low DC gain.
     
    IC5 must be a FET input opamp.
    A low pass in front of these circuits filter might reduce the noise.
    The pin numbers 9, 10, 12 and 13 on the schematic are not correct! Pin 10 and 12 are the + inputs; pin 9 and 13 the - inputs.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Catwell
    Catwell over 14 years ago in reply to jvdberg@ieee.org

    JVberg,
    Thank you for the elaborate example. Did you design that circuit in multisim or spice? If so can you post the file. I would like to give your model some tests.
    The machine will be run for a long time, days even. Will the second circuit handle such a work load? Also, it will be receiving between 1 pulse per minute to 3000 pulses per minute. I just want to know if your model could handle this type of load.
    Cabe

    JVberg,

     

     

    Thank you for the elaborate example. Did you design that circuit in multisim or spice? If so can you post the file. I would like to give your model some tests.

     

     

    The machine will be run for a long time, days even. Will the second circuit handle such a work load? Also, it will be receiving between 1 pulse per minute to 3000 pulses per minute. I just want to know if your model could handle this type of load.

     

     

    Cabe

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jvdberg@ieee.org
    jvdberg@ieee.org over 14 years ago in reply to Catwell

    Cabe,

     

    I designed this circuit years ago for a project where a radio transmitter was modulated with audio and 50 Baud data.

    (A system like RDS but without a data carrier.)

    The audio-signal had frequencies below 50 Hz filtered out. The data signal was filtered to prevent clicing sounds in the audio. The data signal had a much lower amplitude than the audio signal. A multi stage active low pass filter was used to separate the data signal from the audio.

    This circuit worked very well to make a readable data signal from the filtered data.

     

    I do not have spice or multisim files. The problems when simulating this circuit will be to define an input signal. The input signal will be the data-signal, the noise-signal and an undefined very low frequency DC signal.

     

    For your application you could use a single stage 100 Hz active low pass filter to remove some noise and use the second schematic.

    The best way to check will be to compare the input and output signals with an oscilloscope. If you have a 3 channel oscilloscope you can monitor the feedback signal as well and see how close this voltage is to the input signal during the pulse at different speeds.

    A resistor between the output and the feedback will give some hysteresis, to prevent multiple pulses at the transitions.

    But dont make more hysteresis than necessary.

     

    For 1 pulse per minute the first schematic needs much larger capacitors and some time to stabilize.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube