Help with a project, getting RPM from a belt system.

Hey everyone. I just got a great deal, a mastercraft drill press for $45 on kijiji, however, the hacker on me can't rest at that.

This drill press, like most I imagine, uses two pulleys with various diameters and a rubber belt to adjust the speed.

What I want to do is somehow read the RPM off of the pulley that is driving the drill bit.

I figured something that might work is setting up a light sensor or something and putting a white dot on the bottom on the pulley, or something similar to that. it kind of needs to be on the bottom since it can't be in the way of adjusting the belt. Another thing is maybe a wheel and motor that touches the pulley and the arduino reads how fast it is going or something?

I'm not really sure how I could do this, in terms of ease of setting it up and durability. I imagine the motor thing could shake loose so some optical solution would be best but aside from that I got nothing. I have read a fans RPM with IR leds but this pulley has no gaps in it, and I would need an LED on top.

So what is a good solution to this? Here's a picture of the pulleys, the drill bit one, the one I need to read, is in the foreground.

hmm maybe a color sensor or something like that would work.

Since the pulley is aluminium and shiny, put a black spot on it and detect the null with a photo transistor. You will probably need an LED to illuminate it when the housing is closed. You may also need to shroud the photo transistor to ensure it only "sees" light reflected from the pulley. I have done this in the past by putting the photo transistor inside some black heat-shrink tubing.

Just google "Arduino Phototransistor"

You could use a hall effect sensor and a magnet stuck to the wheel as well. That should give you a rough idea of the speed as well as the reflected light.

sirch:
Since the pulley is aluminium and shiny, put a black spot on it and detect the null with a photo transistor. You will probably need an LED to illuminate it when the housing is closed. You may also need to shroud the photo transistor to ensure it only "sees" light reflected from the pulley. I have done this in the past by putting the photo transistor inside some black heat-shrink tubing.

Just google "Arduino Phototransistor"

The pulley is actually a matte blue color, I'm guessing the inverse would work though?

This is the tachometer I used before I wonder if it would work right away or would need some variation to the code.
http://www.embedds.com/measuring-fan-speed-using-arduino-and-ir-pair/

I don't have any visible light photo transistors unfortunately, just one or two old infrared ones, however I have some aluminum tape, do you think making a small strip, and having an IR led and photo transistor aimed at roughly the same stop, with heat shrink around the receiver would work?

hmm that should work actually, I would just need to figure out how to make it work in inverse, so that it counts when the beam is reflected not interrupted, I just wonder if aluminum tape will work well enough.

XOIIO:
hmm that should work actually, I would just need to figure out how to make it work in inverse, so that it counts when the beam is reflected not interrupted

You probably want to have another think about what you wrote there. :slight_smile:

PeterH:

XOIIO:
hmm that should work actually, I would just need to figure out how to make it work in inverse, so that it counts when the beam is reflected not interrupted

You probably want to have another think about what you wrote there. :slight_smile:

oh derp lol.

Well later I'll get some parts and throw together a prototype. The end goal is to have an LCD on the drill press, and that should be easy. There is plenty of room in the plastic part with the switches for a small AC to DC adapter, I'm thinking an iphone one, and a pro mini. The unfortunate thing is I only have a 1602 LCD which is gonna stick out a fair bit, unless I can replace the LED I fried in my other 0802 lcd

And I think the wheel is just directly hooked to the drill bit holder, so I won't need to account for anything else. If the tape is reflective enough then this should work fine :slight_smile:

Obviously contactless is better in the long term but it just occurred to me that you could put a blob of hot melt glue or epoxy or something non-conductive on the pulley and have two brushes that get interrupted as it goes by.

Damn, the bottom of the wheel doesn't have enough room under it, I guess I'll have to have the LEDs come down from the top of the cover or something dumb like that :confused:

Put a magnet or two on the bottom of the output pulleys and the hall effect sensor near it from the side (between the two pulleys where there's room). Done....

int2str:
Put a magnet or two on the bottom of the output pulleys and the hall effect sensor near it from the side (between the two pulleys where there's room). Done....

Well the magnet might come off when I have it set to 3000+ rpm and I don't want to wait a month for the hall effect sensor to come in the mail.

well damnit, I've tried this code and it doesn't work from what I can tell.

//
// This example shows one way of creating an optoswitch
// using an IR LED as emiter and an IR LED receiver as
// light sensor.
// On this case it acts as a tachometer to count the
// revolutions per second of an aeromodelism plane's
// propeller.
//
//           + GROUND                                 +GROUND          
//           |                                        |  
//           <                                        < 
//           > 220 ohm resistor                       > 220 omh resistor
//           <                                        <      
//           |                                        |  
//           |                                        |
//         -----                                    -----
//          / \    >>IR LED emiter >>>>>>>>>>>>>>>>  / \   IR LED receiver
//         -----                                    -----
//           |                                        |
//           |                                        |
//           + +5VCD                                  +  ANALOG INPUT 0
//


int val;
long last=0;
int stat=LOW;
int stat2;
int contar=0;

int sens=25;  // this value indicates the limit reading between dark and light,
              // it has to be tested as it may change acording on the 
              // distance the leds are placed.
int nPalas=1; // the number of blades of the propeller

int milisegundos=500; // the time it takes each reading
void setup()
{
  Serial.begin(115200);
  pinMode(13,OUTPUT);
}

void loop()
{
  val=analogRead(0);
  if(val<sens)
    stat=LOW;
   else
    stat=HIGH;
   digitalWrite(13,stat); //as iR light is invisible for us, the led on pin 13 
                          //indicate the state of the circuit.

   if(stat2!=stat){  //counts when the state change, thats from (dark to light) or 
                     //from (light to dark), remmember that IR light is invisible for us.
     contar++;
     stat2=stat;
   }
   if(millis()-last>=milisegundos){
     double rps=((double)contar/nPalas)/2.0*1000.0/milisegundos;
     double rpm=((double)contar/nPalas)/2.0*60000.0/(milisegundos);
     Serial.print((contar/2.0));Serial.print("  RPS ");Serial.print(rps);
     Serial.print(" RPM");Serial.print(rpm);Serial.print("  VAL ");Serial.println(val);
     contar=0;
     last=millis();
   }
}

I have the leds set up like this, the only emitter i had is the small one, the big led with black around it is the receiver.

for some reason it always reads around 1200rpm or more when I an not doing anything to it. if i change the sensitivity to 75 then putting a mirror sometimes changes the value to 0 for a couple printouts but doesn't change the rpm.

It's way too finicky I guess I'll have to order a hall effect sensor and magnet to superglue on and wait a damn month to get the parts :confused: