Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/24/09 04:26
Read: times


 
#162726 - Tip for Speed sensor via External Interrupt
I'm having issues with a counting function for calculating speed pulse transitions.

I'm using a 74ls02 to fire an external edge trigger interrupt and a port pin to monitor the level of the switching transistor to count the pulses.

I'm using a timer0 with a 500ms window to count how many transitions occur and then will be translated to speed/rpm data. The problem now that I think of it, is that in the lower numbers, the time durations are sub seconds within that 500ms window and will just be recorded as zero since there is no such thing as a 1/2 a pulse. I need to update the display every 1 or less (1/2 second is optimal.

Here is my data tables:


Pulse Count (Hz)-MPH-KPH-Pulse Count/60 Seconds
2.20	1	1.61	0.0366666667
4.40	2	3.22	0.0733333333
6.60	3	4.83	0.1100000000
8.80	4	6.44	0.1466666667
11.00	5	8.05	0.1833333333
13.20	6	9.66	0.2200000000
15.40	7	11.27	0.2566666667
17.60	8	12.87	0.2933333333
19.80	9	14.48	0.3300000000
22.00	10	16.09	0.3666666667
24.20	11	17.70	0.4033333333
26.40	12	19.31	0.4400000000
28.60	13	20.92	0.4766666667
30.80	14	22.53	0.5133333333
33.00	15	24.14	0.5500000000
35.20	16	25.75	0.5866666667


 


I tried to pick up some info from the heart beat and speedometer thread, I don't think I found anything that I can use to solve my issue.

Any suggestions on how to properly parse the pulses with my timers? Would a counter be effective here instead of a timer?

I'm stuck and could use a fresh thought.



List of 49 messages in thread
TopicAuthorDate
Tip for Speed sensor via External Interrupt            01/01/70 00:00      
   Fresh thoughts.            01/01/70 00:00      
      Try measuring time instead of count for slow pulse trains            01/01/70 00:00      
         The highest frequency would be            01/01/70 00:00      
            Once more - think time instead of frequency            01/01/70 00:00      
            Rough estimation...            01/01/70 00:00      
         On the teatering edge......            01/01/70 00:00      
            Is that not good enough?            01/01/70 00:00      
               I was having issues with that.....            01/01/70 00:00      
                  Did you read this post?            01/01/70 00:00      
                     I think that's the bullseye, I was forgetting....            01/01/70 00:00      
                     Yes, and your solution is in my code...perfect!            01/01/70 00:00      
                        Happy that it works            01/01/70 00:00      
                           I'm using this model.....at least            01/01/70 00:00      
                           I'm using this model.....at least            01/01/70 00:00      
                           Looks like I was blind to the obvious.            01/01/70 00:00      
                              All depends on the input scale            01/01/70 00:00      
                                 That will be the next step.......            01/01/70 00:00      
                                 Per,            01/01/70 00:00      
                                    Would this work for a Random() Seeding?            01/01/70 00:00      
                                       Thermal noise from a diode            01/01/70 00:00      
                        Bisection.            01/01/70 00:00      
                           I was a bit hasty ...            01/01/70 00:00      
   PLL ?            01/01/70 00:00      
      Stability            01/01/70 00:00      
         Yes, for a car            01/01/70 00:00      
            Are you sure?            01/01/70 00:00      
               your math is correct            01/01/70 00:00      
                  Ok, can you please explain...            01/01/70 00:00      
                     Should be minute not seconds, typo            01/01/70 00:00      
                        Two questions...            01/01/70 00:00      
                           Yes, 3.3V is right and works correctly            01/01/70 00:00      
                              Have you read...            01/01/70 00:00      
                                 In more detail...            01/01/70 00:00      
                                 It would take forever to go through all the combos            01/01/70 00:00      
                                    This is no log function, ...            01/01/70 00:00      
                                       This is my solution, and almost there            01/01/70 00:00      
                              do you read datasheets???            01/01/70 00:00      
                                 Yes/No            01/01/70 00:00      
                                    better perfomance if ...            01/01/70 00:00      
         The PLL approach isn't that hopeless...            01/01/70 00:00      
   period measurement            01/01/70 00:00      
      Here is an image of what I think you mean?            01/01/70 00:00      
         what derivative do you use?            01/01/70 00:00      
            I'm using the NXP LPC936            01/01/70 00:00      
         Your drawing is still in the frequency domain            01/01/70 00:00      
            Yes, you're correct, and I undestand, connecting...            01/01/70 00:00      
            Where I'm at and software recap            01/01/70 00:00      
               more step-by-step            01/01/70 00:00      

Back to Subject List