Shop OBEX P1 Docs P2 Docs Learn Events
Tach Signal (Digital Tach Project) — Parallax Forums

Tach Signal (Digital Tach Project)

Cole LoganCole Logan Posts: 196
edited 2009-09-14 04:12 in Propeller 1
I've been working on making a digital tach for my motorcycle. The circuit I'm using on my bike is basically reading off the negative side of the coil and using a zener diode to clip the voltage. I know that the coil fire once per revolution of the crank.
negative side of tach coil -- 440 ohm -- T -- 1k -- ohm prop pin
                                         l
                                    5.1 zener
                                         l
                                    ground




My first test was to just read how many pulse were occurring in a second. The problem with this is that it took to long to update the display and it wasn't very accurate. I then tried to short the time to a tenth of a second so that it would up date the display faster but know it reads so few pulse and the resoultion is 600 rpm which is to large. My next solution was to measure the pulse width. i haven't had much time to play around with it but with a quick test. It looks like the on time is to short when you get above 3000rpm. I could use the off time but it seems to fluctuate a lot. My next test will be to try and avarage it out to see if I can get it to be more consistent.

The other problem that I am having is that my computer isn't working at home so I have to right my program at work the I can test it on my bike when I get home. but this means that if there is a problem with the code or if I have another idea I have to wait a whole day to try it out. So I was wondering if anybody had an idea on how to improve or a different approach I'm all ears. I've attached the code that I'm using. It has both the reading the number of pulse and measuring of the pulse width in it.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1986 Chevy EL Camino·· No prop yet

1984 Suzukie GS1100GK No prop yet

Post Edited (Cole Logan) : 9/14/2009 1:40:55 AM GMT

Comments

  • TimmooreTimmoore Posts: 1,031
    edited 2009-09-14 01:55
    This might get you a better high measurement - I used a different mode, This counts when input is low but you can invert the counter and logic

        ctrmode := constant(%01100 << 26) + VexPin          ' set counter mode
    
    



    I start the counter while its high - so its not counting. Then wait for the pin to low, then wait for the pin to go high, then read phsa.
    Now the counter value doesn't have any spin delays as part of it.
  • yarisboyyarisboy Posts: 245
    edited 2009-09-14 04:12
    I worked up a solution for this on the BS2. I added pulsin high and pulsin low to get a number for the total period. I haven't ported the application over to the Propeller yet but a bunch of objects are in OBEX that mimic the BS2 basics. It will be much easier on the Propeller because you have a much higher integer overflow limit. Doing it on the BS2 took a lot of figuring to keep the whole application accurate within the confines of 16 bits. My documented code is in finished projects under industrial tachometer.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    MOORE'S LAW: The capabilities of electronics shall double every 18 months.
    cloyd's corollary: Hardware is easy, software is hard.
Sign In or Register to comment.