Product Details

 12v 1500 RPM Motor encoder fitted JLN4B02 TB4Y04W
12v 1500 RPM Motor encoder fitted JLN4B02 TB4Y04W
MPN :
SKU : EM12V1500R-C192
Brand :Brand
Stock : 11pcs
Price:PKR 550.00
12v 1500 RPM Motor encoder fitted JLN4B02 TB4Y04W with pully installed


Length: 50 + 17, Width: shaft=3, pully = 16
Weight: 150g

Arduino Example codes:
Note:
Base resistor: 10-ohm to 220-ohm.
Transistor: any kind of NPN.

int rpm_pin=4, state, state2, read_time=1000;
double counter, rpm, last=0, rps;
void setup() {
 
 Serial.begin(9600);
 pinMode(rpm_pin, INPUT_PULLUP);
}

void loop() {
  if(digitalRead(rpm_pin)==LOW){ state=LOW; }
  else{ state=HIGH; }
  if(state2!=state){ counter++; state2=state; }
  if(millis()-last>=read_time){
  rps = counter/2;
  rpm = rps*60;
  counter=0;
  Serial.println(rpm);
  Serial.println(rps);
  last=millis();
  }

}
  • Google Checkout
  • Master Card
  • Paypal
  • Acc
  • Acc2
  • Visa

Copyright © 2014, All rights reserved.