Tachometer design

Advert

Tachometer design

Home Forums Workshop Tools and Tooling Tachometer design

Viewing 25 posts - 26 through 50 (of 96 total)
  • Author
    Posts
  • #47545
    Steve Garnett
    Participant
      @stevegarnett62550

      I think that if Les can get the software sorted out, and there is the possibility to use different sorts of sensors relatively easily, that this thing may have legs. If you are to read from gear teeth directly, then some sort of variable reluctance snsor (as per the Feb 2009 article) input seems to be a good idea – although I can think of a slightly easier way to implement a suitable Schmitt trigger circuit than the one in the article, I think.

      Advert
      #47555
      Martin W
      Participant
        @martinw
        Hi
         
        The Schmitt trigger in the circuit supplied by Les is a quite a good solution as it uses a dedicated comparator IC with a low component count. The resistor between the output and 5V is required  as a pull up as the IC does not have one built in; this gives the designer more flexibility in the IC application. The rest of the component count is minimal while providing  an adjustable input level threshold Schmitt trigger circuit. My only concern is that the LM393 is a ‘Dual Comparator’ and the other half of the IC is not considered which leaves the inputs and output free. This can cause instability/oscillation in this half of the IC which has the potential to cause interference which could affect the accuracy of the overall circuit.
         
        Cheers
         
         
        Martin W
        #47557
        Steve Garnett
        Participant
          @stevegarnett62550
          Posted by Martin W on 19/01/2010 11:59:58:
          My only concern is that the LM393 is a ‘Dual Comparator’ and the other half of the IC is not considered which leaves the inputs and output free. This can cause instability/oscillation in this half of the IC which has the potential to cause interference which could affect the accuracy of the overall circuit.

          I must admit that I was assuming that a little bit of normal PCB layout would take care of the unused inputs satisfactorily, and yes, Les’s Schmitt looks fine – I can’t see any immediate  point in being able to adjust the hysteresis as well as the threshold, but that could be achieved easily anyway. To use a variable reluctance input will require some sort of gain/limiting amp before the Schmitt though, as the pickup’s output will vary a significant amount over the speed range being considered. Once again, easy to do, I think, and would make the tacho a whole lot easier to use with gears directly.

          #47566
          Les Jones 1
          Participant
            @lesjones1
            Hi Martin and Steve,
                                                The circuit in the picture is only the basics. I think in practice I would put a 5 volt regulator on the board. Also a sense resistor will be required for the hall effect gear tooth sensor that I will probably suggest using. (Allegro ATS642LSHN) This is a two wire device so the voltage across a resistor in series with it has to be sensed. I can not find a source of the thee wire version which would be easier to use. To order the three wire version from Farnell you have to pay the shipping cost from the USA which is high. I have chosen this family of devices as they are very tolerant of their spacing from the gear. As this project is planned for people without access to test equipment I did not want anything that is difficult to set up. I have not yet tested this gear tooth sensor. (I used a hall effect sensor that required a separate magnet on my mill.) One possible use for the spare comparator in the LM393 is to drive an LED so the user can see the led going on and off as the shaft is slowly rotated. On the original unit shown in the picture I used the other comparator as an an alternative input circuit with automatic threshold adjustment. The input signal goes through a high value resistor to the reference input of the comparator with a large value capacitor to ground. (A low pass filter.) Provided the input signal has about a 50% duty cycle the reference input sits at the average value of the input signal.
            I have avoided suggesting using variable reluctance transducers  as their output falls off at low speed. I did use one on my lathe but it required a fair bit of playing round with amplifying its signal and converting its output to clean pulses.  I now need to start designing the PCB And test the gear tooth sensor.  The software seems to be working OK so if anyone wants to play with it let me know and I will send you the source code and the hex file to program a PIC
            I hope we are not offending too many people talking electronics on this forum.

            Les.

            #47574
            Steve Garnett
            Participant
              @stevegarnett62550
              Posted by Les Jones 1 on 19/01/2010 16:50:49:

              I hope we are not offending too many people talking electronics on this forum.
               
              I rather get the impression that if there’s a good, usable result that’s cheap to build and flexible, and that they ultimately have access to it, they will forgive us!
               
              It’s also clear that you’ve given the transducer issue a good deal of thought and experimentation, and what you are proposing seems eminently sensible.
               
              Yes, it would be great to try it out – I think that I can borrow a PICkit 2 programmer… or I might even buy one – I was contemplating that anyway.
               
               
              #47575
              John Haine
              Participant
                @johnhaine32865
                Might be worth noting that the Mach 3 CNC software incorporates a tacho which is needed for screwcutting – it needs to know how fast the h/s is rotating to get the right feed rate; and also where the spindle is to start the cut in the right place.  This means the timing requirement is pretty tight.  It only needs one pulse per rev, so obviously takes the reciprocal of this time to get the speed.  So I’d think this approach is maybe the way to go, and it only needs a single slot sensor disc or a reflective mark on the spindle.  I made a simple sensor using an opto interrupter out of an old printer and an ali disc with one slot on the back of the spindle and it works a charm.  No need for any schmitt trigger or anything, just a 4k7 pull-up on the phototransistor collector.
                 
                Interestingly, it showed that the speeds on my Super 7 were all slightly faster in reality than shown on the plate on the lathe – 233 rpm instead of 210 for example.  Not significant for straight turning but sure b*******d the thread pitch until I realised what was happening!
                 
                John.
                #47576
                Billy Mills
                Participant
                  @billymills
                  HI Gentlemen.
                   
                  Have you considered the LM392? this has a comparitor and op-amp in an 8 pin pack. Many moons ago I used the pack as a Variable Reluctance transducer conditioner. The scheme is to use the opamp as a limiter in front of the schmidt comparitor. With mid level biasing through both amps and negative feedback from the schmidt to bias the op-amp you have very clean schmidt action action at almost the zero crosssing points.
                   
                  The schmidt + preamp combo is exactly the same concept in most scope “Auto Trigger”circuits, with no input it will output a low frequency squarewave. But with the faintest sniff it will quickly produce a nice 1:1 squarewave.  A transistor driven from the schmidt could light a led, with the led flashing slowly there is no input, at half brilliance things are normal.
                   
                  Commercial VR transducers normally have high inductance- many turns- and are often intended to work into a resistive load, above the XL=R frequency, the 6dB/octave rise is countered by the low pass action so the output is almost constant above the crossover RPM.
                   
                  Finally, if Henry Maudsley, John Harrison, Charles Babbage, Armstrong or Whitworth had electronic devices available then they would have used them to great effect. Engineering is about making better machines using whatever methods are available, if it is hydraulic, ropes or chains,steam,gas, sea waves, nuclear or  electrons it is still engineering and of interest to those who love engineering. 
                   
                   
                  #47578
                  David Clark 13
                  Participant
                    @davidclark13
                    Hi There
                    No problem with electronics.
                    Ok on this thread but for other projects, start a separate electronics thread.
                    regards David
                     
                    #47579
                    Les Jones 1
                    Participant
                      @lesjones1
                      Hi Steve,
                                       I have sent a message to you on this forums messaging system with my email address. If you reply with an email address I will send the files to you.
                      Les.
                      #47581
                      Les Jones 1
                      Participant
                        @lesjones1
                        Hi John,
                                         I do not know anything about Mach 3 software but it sounds like it is working a bit like the “Electronic Leadscrew” project. You should find it using Google etc.
                        I agree that slotted opto devices work very well without any signal conditioning. My lathe (A Chester DB10G also runs a little faster than the indicated speed.
                        Les.
                        #47582
                        John Rudd
                        Participant
                          @johnrudd16576
                          Les,
                           
                          I have pm’d you with a request.
                           
                          What compiler did you use to generate the hex file?
                           
                          Thanks for sharing
                           
                          regards
                           
                          John
                          #47583
                          Les Jones 1
                          Participant
                            @lesjones1
                            Hi Alan,
                                             I did use a variable reluctance transducer  on my lathe (Made from a coil removed from a low energy light bulb.) with a dual op amp to process the signals but it was not very reliable at very low speeds ( Less than about 50 RPM) I still think the hall effect sensor will be more of a “bolt on and work first time solution.)
                            Les.
                            #47585
                            Peter Tucker
                            Participant
                              @petertucker86088
                              Hi Les Jones 1,
                               
                              Do your tachometers need a relatively constant motor speed to work or could they be used as an ICE rev counter?
                               
                              Peter.
                              #47587
                              Les Jones 1
                              Participant
                                @lesjones1
                                Hi Peter,
                                                  Sorry but I do not know what an “ICE rev counter ” is. At speeds that give over about two pules per second there is averaging over a period of between half a second and a second. This may sound strange but to smooth out readings counts of the number of 0.4 us pulses from one of the timer modules in the PIC are counted until their number exceeds about 0.5 seconds worth. (500000/0.4 = 1250000 )  then the next tine a pulse occurs from the sensor on the spindle the number of  0.4 us pulses from the start of the timing period is   divided by the spindle pulses. This gives the average number of 0.4 us pulses per spindle pulse. This is to give a display update every half second where possible. If the pulses from the spindle have a time of more than half a second between them (120 RPM for one pulse per rev) then this is the update rate. I decided that if this time is more than 3 seconds (20 RPM with one pulse per rev) the display should show zero rather than display the last reading until the next pulse was seen.
                                I do not know if this answers your question.

                                Les

                                #47626
                                Peter Tucker
                                Participant
                                  @petertucker86088
                                  Hi Les,
                                   
                                  Sorry for my abbreviation ICE is internal combustion engine.  As these motors vary their speed I wondered if your tachometers would be able to display revs in a readable way.
                                   
                                  Peter.
                                  #47629
                                  Sub Mandrel
                                  Participant
                                    @submandrel
                                    Hi Les,
                                     
                                    Good luck!
                                     
                                    Personally I would rather see relevant electronic projects than reams of g-code or lone descriptions of how to use computer packages that are about 3-d modelling, not design or production.
                                     
                                    I have made a couple of very similar units, but I used an AVR – so it must be better than one made using a PIC eh?
                                     
                                    It may be of interest that I timed the delay between pulses and took the reciprocal to get rpm, rather than counting pulses. I assume that’s how you cope with the need to regularly update the display at low speeds. The one bit of cleverness was detecting sudden decelaration caused by back emf braking to spot the difference between a slow-down (which is more gradual) and a (rapid) stop.
                                     
                                    I use a hall effect switch, it gives a much cleaner logic-level signal than the ‘ratiometric’ sensors.
                                     
                                    I waved some details of this and a DRO at an earlier editor of ME, but he felt it was outside the publication’s range, due to the pcb issues and the need to have someone programme the micros (I would happily have done this for little more than cost).
                                     
                                    These days the PCB design as a suitable file to print out on transparency to make PCBs or (even on paper for the iron on method) could be posted here, as could code for programming micros. I would guess that AVR (or even PIC) based projects would be within the ability of 50% of MEW/ME readers – but I doubt that proportion of us could build a gold medal winner
                                     
                                    Neil

                                    Edited By Neil on 20/01/2010 20:13:37

                                    Edited By Neil on 20/01/2010 20:31:25

                                    #47632
                                    Les Jones 1
                                    Participant
                                      @lesjones1
                                      Hi Peter,
                                                       There is no reason why it should not be used for this purpose. If it was used to sense pulses from the ignition of a single cylinder four stroke engine it could not be set to read the speed correctly as there would be only one pulse every other revolution.  It would work with any two stroke engine and with any four stroke engine with any even number of cylinders up to 198 cylinders. I suspect an engine with that number of cylinders could not be built anyway. (I thought I would add that limitation as a joke.) Also it only reads up to 9999 RPM but it could be set to read the speed divided by ten. With a very small change to the firmware it could also be used on four stroke engines with odd numbers of cylinders.
                                      Les.
                                      #47636
                                      Steve Garnett
                                      Participant
                                        @stevegarnett62550
                                        Well, Les has sent the code (thanks Les) and I’ve ordered the programmer, which I was thinking of doing anyway, and this has finally swayed me. Even though I’m not one of the world’s natural programmers, I have colleagues who are, so whatever happens, I’ll manage somehow. One of them is into AVRs in a big way, and the other’s quite happy with PICs, but they’ve never fallen out about the differences, despite a bit of ragging along the lines of Neil’s…
                                         
                                        But I think that Alan and Neil’s comments about Engineers and what sort of computer-based projects should be in MEW are both right on the money, and it’s good to see that the present editor also seems to have quite an open mind about this – it all bodes quite well.
                                         
                                        There are several options available for the PCB and code, as Neil also mentions. It wouldn’t be difficult at all to arrange a ‘group buy’ of suitable PCBs, and that would work out pretty cheap for a reasonable quantity. The only snag I can see with downloading the code isn’t the code itself, but actually being able to program the PIC with it. Even though the PIC could potentially be coded on the board, you still need the right interface to do it, and for a single project, I could see people objecting to this – or simply not understanding what has to happen at all. 
                                         
                                        The usual option at this point is to offer to sell pre-programmed PICs at cost, or at least set up a network of people who are prepared to do this – or even (shock, horror) get Myhobbystore to stock them! What the heck, you could even make a kit of the whole thing. Anyway, I think that there are a lot of options to explore here, however you look at it.
                                        #47646
                                        Lawrie Alush-Jaggs
                                        Participant
                                          @lawriealush-jaggs50843
                                          One more response to Les Jones 1 on the question of non mechanical stuff.  Personally I enjoy the breadth of knowledge that is avalaible through this magazine and web site.  As long as we stay generally on topic – model engineers workshop – I’m happy.  At some point in the future the model engineers workshop is going to be dealing extensively with electronics rather than dabbling at the edges as is now the case.
                                           
                                          #47651
                                          David Clark 13
                                          Participant
                                            @davidclark13
                                            Hi Lawrie
                                            I doubt we will be doing extensive electronics work.
                                            Yes, some CNC and no more long cad series.
                                            regards David
                                             
                                            #47661
                                            Circlip
                                            Participant
                                              @circlip
                                              The only “Dealing” in future Lawrie is likely to be the application of built blocks rather than the “Kits of bits” we used to use. Thanks to S/m’s the pre requisite for construction is a microscope and a very fine tip on the old gas heated lump of copper.
                                               
                                                Regards  Ian.
                                               
                                              #47673
                                              Steve Garnett
                                              Participant
                                                @stevegarnett62550
                                                I’ll try and keep this at least partly on-topic…
                                                 
                                                From experience, I don’t think that SM’s quite as bad as you think it might be. We hand-assemble SM PCBs, and you can do a perfectly reasonable job of it with an ordinary head magnifier. Also, there are a few tools you can make that help the whole process somewhat, like a spring-loaded component holding device, and also you don’t need to use an old-style soldering iron either – you can make your own hot-air soldering gun that’s ideal for small SM projects very easily. You don’t use solder as such, but solder paste, and once you’ve got used to the process, it’s pretty easy to do.
                                                 
                                                But the whole world hasn’t gone SM – Les’s tachometer is entirely TH as it stands. Since there were complaints about unexplained abbreviations earlier, I should perhaps say that with PCBs (Printed Circuit Boards) there are three common varieties – SM (surface mount) TH (through-hole) and PTH (plated through-hole). The latter is what is generally used on double-sided boards, and provide a convenient means of getting a link from one side of the board to the other. But unless you are feeling pretty brave, you get these type of boards made for you. For people who make their own double-sided boards with non-plated holes, you have to solder wires to either side of the hole to achieve the same thing.
                                                 
                                                But as I said, for projects like the present one, this is all easy to build using ‘normal’ components. I seem to recall that back in the 60’s, people were uttering the same ‘it’s too small’ misgivings about even using discrete transistors (compared to building stuff with nice warm valves with their relatively huge bases and a 50 Watt soldering iron wasn’t out of place, and HT supplies to get your fingers all over), never mind anything smaller. What I’d like to know is whether, in 25 years’ time, people will be sitting in their garden sheds actually torturing silicon under a microscope!
                                                 
                                                #47677
                                                Roy
                                                Participant
                                                  @roy91521
                                                  Hi Les,  I too enjoy working with the PIC micro’s and use Proteus for Schematic and PCB capture. if you are willing i would be more than willing to offer my assistance with this project as i too have been looking to create a hall effect RPM meter for my lathe.
                                                   
                                                  Do you have or have you yet created the code for this project, if you have could i perhaps have a copy?
                                                  #47682
                                                  Gerald Weare
                                                  Participant
                                                    @geraldweare85524

                                                    Hi all,

                                                    Just noticed this thread, and unfortunately not able to thoroughly read all the items, but I though you might be interested in this.  I have uploaded some photos of two versions of a tachometer I built back in 2002, using essentially the same idea:  a PIC with a sensor and LED displays.  I intended to market the devices in several forms, but never did.  I built two prototype versions. This is the first one:

                                                     
                                                    This shows the tacho mounted in a large black box to the side of my Millrite mill, doing 533 RPM under VFD control.  The display is a set of 5 reasonably large LEDs,and the sensor can just be seen top right just above the wing nut.  Here is a closeup:

                                                    The sensor is a reflective all-in-one device with included Schmitt trigger, so interfaces directly to a PIC data input port.  The reflective element is the bottom part of the bright aluminium spindle pulley, which.  I covered approximately half of the circumference with matt black crepe self-adhesive tape, so we are getting one pulse per rev.

                                                     
                                                    This is the second prototype:
                                                     
                                                    It is much smaller.  The box is 2-2/8 x 1-3/8.  There are four pulses per rev in this case, given by four strips of crepe tape on the top of the MAXNC spindle pulley. Here is the inside of the box:
                                                     

                                                    The display is a stick of four 0.1″ LED digits.  These were bought in 1972 and are impossible to find today.  I did a design using the smallest available displays, and it would just fit in this box, along with the PIC, the regulator and the sensor.  The sensor is also reflective, but using separate LED and detector, but again one with a Schmitt trigger built-in.

                                                     
                                                    The real secret is the software in the PIC.  The algorithm is quite sophisticated.  The input from the detector (1 or 0) is sampled at at least four times the maximum input frequency.  It is then digitally filtered to provide smooth edge events.  Following that, the period between events, or events per period, is measured and used to determine if there is movement (for display blanking), and a further digital filter and scaling unit provides the measured speed in the desired units.  The unit self-adapts to measure the frequency at high RPMs and the period at low RPMs.  This provides a stable display with a reasonable response time and resolution.
                                                     
                                                    It turns out that you do not need many pulses per rev.  One is enough for the Millrite, though I used four on the MAXNC because there was more noise from ambient light and because the sensor is inferior.  Any more caused problems with the sampling rate, though it is a slow/old/small PIC (16F84).  However, you cannot just measure the period of each pulse; you do need some decent filtering, or the display tends to be garbage, jumping all over the place.  It is worse with more pulses per rev, because of the unevenness of the reflective areas (unless you want to use an expensive encoder-quality rotor instead of black tape).
                                                     
                                                    As a further project, I took the raw output from the sensor to a closed-loop motor control chip.  I would have liked to pre-process it in the PIC first, but not enough pins.  This worked well, giving full torque from the MAXNC motor down below 200 RPM.  Ideally, the PIC should control the motor directly.  I also fed it to my EMC2 CNC software to (eventually) provide closed-loop CNC speed control, but unfortunately it needs more work on the PC side before it can be useful.
                                                    #47687
                                                    KWIL
                                                    Participant
                                                      @kwil

                                                      This has all been very interesting so far but unless some one comes up with a practical project suitable for a more general application,  that is where it will stay. As far as many readers who have the practical skills but not the specific design skills that have been discussed will be concerned, their interest will just cease.

                                                    Viewing 25 posts - 26 through 50 (of 96 total)
                                                    • Please log in to reply to this topic. Registering is free and easy using the links on the menu at the top of this page.

                                                    Advert

                                                    Latest Replies

                                                    Viewing 25 topics - 1 through 25 (of 25 total)
                                                    Viewing 25 topics - 1 through 25 (of 25 total)

                                                    View full reply list.

                                                    Advert

                                                    Newsletter Sign-up