I need to measure alot of different frequencies at the same time (up to 48) How?


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1

    Default I need to measure alot of different frequencies at the same time (up to 48) How?

    I have been working around the PIC chips for quite some time. Built many different products. This one though I am not sure how to do or where to start.

    I can have up to 48 frequencies I need to measure. The rising edges will pretty much never be at the same time.

    I can't find a chip that has that many CCP/Input captures, so I would guess I will have slave chips measuring and then reporting to the master chip.

    So with that in mind, assume I pick a slave chip that has four CCP pins so I end up with 12 slaves. Can I really measure effectively four different frequencies that don't have the leading edges in line? Or Do I end up with 48 slaves talking to one master?

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default Re: I need to measure alot of different frequencies at the same time (up to 48) How?

    Hi,
    I'm not suggesting that I've got a solution but several questions pops up while reading your post....
    What frequencies are we talking about, to what kind of resolution do you need to measure and how often does it have to update the measurement for each input?

    If the frequencies are low(ish) and you can live with fairly low update rate you might be able to use pulsin or count and measure one input at the time. Although I've never personally used the CCP module in capture mode to measure frequency I see no reason for it not work on multiple channels - even though the signals aren't in sync. However, a chip with many CCP modules will usually be big so you may be pissing away alot of space and features by picking that instead of the smallest device with one (or more CCP modules).

    But again, what kind of frequemcy, resolution and update rate are we talking about?

    /Henrik.

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: I need to measure alot of different frequencies at the same time (up to 48) How?

    This is an agriculture application. I am going to measure seed population. The seed rate (population) is dictated by two variables; seed plate count and rpm. Seed plate count is how many seeds are dropped per revolution. This can vary from 12 to 120 seeds revolution and the rpm can vary from 12 to 80 rpm.

    So a minimum frequency is 2.4hz and maximum is 160hz.

    There are a couple things to keep in mind. Sometimes there is a 'skip' this is when a seed doesn't get into the seed plate and consequently not dropped into the ground. I need to detect the skips. I also need to be able to report population atleast every tenth of a second when the population frequency allows it.

    There are a couple of ag manufacturers that already do this. I just need to figure out how. The one 'Seed monitor' I have on my test bench is completely potted so I can't take it apart and learn anything.

    I am thinking I use smaller slave chips with a DtoA and CCP pin. The CCP measures the frequency and then I give an analogue out. The master then measures the 0-5v signal to record the population.

    Another thought is using a PIC with many CCP pins but I just don't know how that will work due to the leading edge of each input not being aligned.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default Re: I need to measure alot of different frequencies at the same time (up to 48) How?

    Hi,
    Hmm, OK, so at the lowest frequency, how wide is the pulse comming from the "seed slot sensor"? Ie, what's the dutycycle ratio and are the slots equally wide on a 12 slot disc as they are on a 160 slot disc? (I suspect they aren't...)

    I mean, you're obviously not going to measure frequency since the gate time would have to be long to get the resolution. You're going to have to measure pulsewidth and convert that to frequency, which I suspect is what intended anyway, but if the seed slots in the discs are different you're going to have to either cater for that or measure both the slot and the "space". Ie a full period.

    I'm not sure why you're worried about the leading edges not being aligned. I don't see the problem.

    Another aproach could be to use a timer and the interrupt on change feature. When ever an input changes state grab the timer value and calculate the difference from last state change for the pin in question.

    Just thinking out loud....

    /Henrik.

  5. #5
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: I need to measure alot of different frequencies at the same time (up to 48) How?

    I thought that on a seed drill all of the disks rotated at the same speed and the spread rate was a simple calculation involving the number of slots and rpm. This would mean that only one disk needs to be monitored to calculate the spread rate. The complication is detecting missed seeds for which each disk has to have a detector. So the question is what form does the existing detector take does it count seeds or missed seeds? I would have thought the latter and if that is the case then the application becomes easier.

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: I need to measure alot of different frequencies at the same time (up to 48) How?

    You can do it that way if you don't want accurate information. When a bag of corn seed costs over $300 (that is a 50 lb bag) you can't take anything for granted and every row is monitored. Plus with my electric planter drives I vary population on a row by row basis so it gets pretty important then too.

    www.electricplanter.com

    The sensor detects each seed passing through the seed tube after is falls from the seed plate on its way to the ground.

    Quote Originally Posted by EarlyBird2 View Post
    I thought that on a seed drill all of the disks rotated at the same speed and the spread rate was a simple calculation involving the number of slots and rpm. This would mean that only one disk needs to be monitored to calculate the spread rate. The complication is detecting missed seeds for which each disk has to have a detector. So the question is what form does the existing detector take does it count seeds or missed seeds? I would have thought the latter and if that is the case then the application becomes easier.

Similar Threads

  1. How to Measure 2 or more digital inputs a the same time
    By longpole001 in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 29th April 2013, 02:23
  2. how to measure RPM and SPEED at the same time
    By teeeeee in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th July 2012, 08:34
  3. Measure time in mS between two pulses
    By Fredrick in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 7th March 2011, 07:20
  4. CCP1 and CCP2 to measure 2 frequencies together
    By bobonapoletano in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 28th December 2005, 07:34
  5. Using Different Xtal Frequencies
    By bobsimpson in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th July 2003, 21:36

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts