Shop OBEX P1 Docs P2 Docs Learn Events
Question regarding Basic Stamp II and creating a simple tachometer — Parallax Forums

Question regarding Basic Stamp II and creating a simple tachometer

xkadetxkadet Posts: 4
edited 2013-01-16 16:28 in BASIC Stamp
I like building things myself and that includes a CNC gantry Mill I've completed recently. I'd like to add a tachometer to the spindle so I can adjust the rpms with my variable speed controller. Is there a project description including schematic and code anywhere that can get me started? I'm fairly handy with electronics, but not and EE, so I'd probavbly need some specifics about the sensor ciircuit and interfacng the LCD readout. I think using a reflected IR sensor or a hall effect would do the trick and I only need a rpm update every couple seconds. However, I do need up to 30,000rpm capability. Has anyone published a project like this or is there info available where I can piece such a thing together? I'd like to use the BS2 since I know more about programming it than some of the others.

Thanks in advance for any help on this.

Keith

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-01-16 12:21
    Keep in mind that the BS2 can only read the tachometer pulse rate when it's not doing anything else. If all you want to do is display the current speed on an LCD, that's not too hard. You'd count the number of pulses for a short period of time like 500ms or 250ms, then convert to RPM and send to the LCD which should take a few milliseconds. Then you'd go back and count pulses again. You could use a longer period for counting, but you might find the every few seconds update rate annoying as you're trying to adjust the spindle speed. You'd use a COUNT statement to count pulses and a SEROUT statement to send data to the serial LCD.
  • xkadetxkadet Posts: 4
    edited 2013-01-16 14:26
    Thanks. I read some other threads that also discussed this single-tasking aspect. I think if I could update the speed within a second or two, that would be enough. I can probably play with the parameters and tighten it up as much as possible before things start breaking down.

    I found a section on "TACHOMETER" in one of the parallax text books on process control. This section should be some help. It depends if I have enough background to go out of the box and apply it to my specific application. However, it has given me a lot to chew on for the time being. Once I get a plan of attack I'll probably be back on the forum asking for more advice. Thanks for your help. I do appreciate it.

    Keith
  • Ken GraceyKen Gracey Posts: 7,387
    edited 2013-01-16 16:03
    Here's an example: http://www.parallax.com/Default.aspx?tabid=420

    Ken Gracey
  • xkadetxkadet Posts: 4
    edited 2013-01-16 16:23
    Thanks for the link. This looks perfect because it also includes picts for modifying the mill for the magnet mounting, etc. It even includes the display connection and all that I need, I think. Thanks for the Link, again! Great Forum!

    Keith
  • xkadetxkadet Posts: 4
    edited 2013-01-16 16:27
    Hey, Thanks garyg, this additional information will help me understand what I'm doing with the programming. With more than one program it's much easier for me to see how the programs work. This is great! Thanks again, all.
    Keith
  • garyggaryg Posts: 420
    edited 2013-01-16 16:28
    This is my BS2 program for building of my tach.
    I used a photo transistor and white duct tape to register the counts.
    I also used a 555 one-shot timer to eliminate false triggers.
    For the light source, I used my 500 watt shop light pointed at the duct tape.

    I hope this help you in some manner.
Sign In or Register to comment.