Shop OBEX P1 Docs P2 Docs Learn Events
Tachometer with BS2 Homework board — Parallax Forums

Tachometer with BS2 Homework board

ottootto Posts: 5
edited 2006-07-10 21:33 in BASIC Stamp
I just recieved a BASIC Stamp at work and am trying to figure out how to wire it up to be used as a tachometer for measuring the RPM of our airplane props.· I have it wired up with a capacitor and a photoresistor and have the code written that measures the time it takes to charge the capacitor (which is directly affected by the change in resistance).· This is printed out to the screen in the debug window when I run the code, but what I would like to do ultimately is somehow store the data(sampled every millisecond) every 1 second and use my equations to convert the data to RPM.· I would like for all the measured data to be stored somewhere and be accessable(like in a text document maybe), but also would like to have each second's worth of data used to compute an RPM and read it out to the screen so that i have a continuous reading of RPM.· The prop will be spinning at about 10,000 RPM.· Like I said though, I am new to the BASIC Stamp and don't really know the language, so if anyone has done this before or knows how it could be done, I am open to any help.· Thanks.

The propellers we are using are all the same for now and have two blades, but the equations for conversion should be able to be simply altered if we ever switched to a 3 blade prop. I will try to better explain exactly what I am doing also so we can be on the same page, so here goes. I will rig up the circuit so that a light will be positioned over the photoresistor. When the light intensity increases on the photoresistor, its resistance decreases, this will make the capacitor charge faster. As each blade swings in front of the light, a shadow will go over the photoresistor. This will decrease the light intensity and cause the resistance to increase, causing the capacitor to take more time to charge. So the data being read out is the capacitor charge time and it will look like a bunch of 1's with higher numbers every time a shadow passes by. I will take the number of spikes every second (higher numbers from the shadow) and use something like this equation to solve for the RPM:
······························· RPM = (# of spikes/sec)*(rev/# of spikes)*(60 sec/min)

Comments

  • FranklinFranklin Posts: 4,747
    edited 2006-07-05 15:28
    If you have the value printing in the debug window you can write a program on the PC that will do the rest for you (store, compute and display)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-07-05 15:53
    otto,

    ·· I'm not sure if you will get the speed you want doing things that way.· There was an article using a BASIC Stamp to monitor the speeds of two R/C Plane engines to keep them running at the same speed.· I don't recall the link off the top of my head, but you should be able to find it via Google.· The PBASIC COUNT command is used for RPM in this application.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • bennettdanbennettdan Posts: 614
    edited 2006-07-05 16:35
    I had a simular project I built for my Uncle to measure his boat motor. I use the matched Infrared LED and Infrared Phototransistor at radioshack the Catalog #: 276-142. I used the count instruction like Chris suggested. Also if you use Infrared it will have less interference from overhead lights. No cap needed just input the photoresistor to the stamp through a resistor.
  • ottootto Posts: 5
    edited 2006-07-05 18:42
    so how exactly would I wire it on my board? like i said, i have no experience with this thing so any help with the code and wiring would be much appreciated. Thanks for the help.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-07-05 19:07
    otto,

    ·· First you need the circuit...A simple Opto circuit is attached.· Basically you would need to choose R1 according to the current for the IR LED.· Q1 is a standard NPN Photo-transistor.· In these circuits it is common to sheild the emitter and sensor so that they only see forward and the light would reflect off the target and return.· Again, you can use the PBASIC COUNT instruction to read the RPMs.· I hope this helps.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • bennettdanbennettdan Posts: 614
    edited 2006-07-06 19:07
    I used a curcuit just like the one Chris supplied with my units from radioshack and I uses a 220 ohm resistor for R1. If you dont know the Inrared LED is connected to R1 and Q1 is the Phototransistor connected to the 10k.
  • farmallfanfarmallfan Posts: 1
    edited 2006-07-07 21:11
    otto,

    I'm working on a tachometer project as well...but mine is for an antique tractor. Max RPM on that is something like 1400...just a little slower than your application wink.gif. In any case, I found a good article on this website that details using a hall effect sensor to drive a tachometer. Maybe it's helpful...

    http://www.parallax.com/html_pages/robotics/machining/RPM_display.asp

    - David
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-07-08 06:18
    David -

    Just curious, what model letter/year I-H Farmall are you restoring? I have a partially restored, but fully functional 1965 M-F 3165 which is the same as a 165 but with a shuttle-shifter. This is not mine, but is quite similar:
    http://www.mainetractors.com/massey_ferguson_165/massey_ferguson_165_images.htm

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Rob311Rob311 Posts: 83
    edited 2006-07-09 03:17
    Otto,
    I had a similar project. Got the rpms of my airplane prop, and if it droped to 0 then it deployed a parachute. it was cool, oddly the most difficult part was the testing, i couldnt get my aircraft to stall in the air =)

    I used a hall effect sensor, i was worried about the effect the direction that my aircraft flew (relitive to the sun) would effect an optical sensor.

    I also used the hall effect sensor b.c there is a website (previously mentioned) that had all the wireing and the code.

    Im curious as to how you mounted the optical sensor on your prop? posible to get photos?

    ~Rob
  • FranklinFranklin Posts: 4,747
    edited 2006-07-10 21:33
    Rob311, what happened if you forgot to turn off the power when you landed?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
Sign In or Register to comment.