Go Down

Topic: Is471Fe (Read 1 time) previous topic - next topic


Hello,to evryone I have arduino from 2 days and I am like crazy at home.  :) I have the above sensor IS471FE I wrote a code and it's work's well,but mine question to the audience is the following:
Is there a way to program the arduino and the sensor to activete the code I wan't in the smallest detect Ir light.(It's hard to explain  ;))


Oct 17, 2010, 04:16 pm Last Edit: Oct 17, 2010, 04:17 pm by mrmeval Reason: 1
I'm not sure I understand. That is a sensor that will respond to a light source (LED) clocked off of pin 4 GL output. You an LED at 940 nanometers, an IR LED. You will need to connect the diode to the chip as shown in FIG 4 of the data sheet. You will need to run the V0 pin to the arduino. When the LED turns on with the GL output and there is nothing blocking the sensor V0 will respond. If there is something blocking it V0 will not respond. In this way you hae an optical switch.

V0 will be a LOW when the sensor detects the LED and a HIGH when blocked.

You must only use +5V to power this with the arduino. You need a 0.33uf capacitor at 5V and it seems a 280 ohm pullup on GL.


If it was designed by man it can be repaired by man.


Man I already did the schematic and write a code I just ask is there a way for more quick response,because sometimes the sensor don't detect fast the object and the platform smash it.



Man I already did the schematic and write a code

So man show us like.


Ok that is the code:
Code: [Select]

const int sharpPin = 2;
const int sharpPin2 = 4;
const int ledPin =  13;
const int motorPin1 = 11;
const int motorPin2 = 10;

int sharpState = 0;  
int sharpState2 = 0;

void setup() {
 pinMode (motorPin1, OUTPUT);
 pinMode (motorPin2, OUTPUT);
 pinMode(ledPin, OUTPUT);      
 pinMode(sharpPin, INPUT);
 pinMode(sharpPin2, INPUT);  

void loop(){
 sharpState = digitalRead(sharpPin);
 sharpState2 = digitalRead(sharpPin2);

 if (sharpState == LOW) {
   analogWrite(motorPin2, LOW);    
   // turn LED on:    
   digitalWrite(ledPin, HIGH);  
 else {
   analogWrite(motorPin2, 100);
   // turn LED off:
   digitalWrite(ledPin, LOW);
  if (sharpState2 == LOW) {
   digitalWrite (motorPin1, LOW);    
   // turn LED on:    
   digitalWrite(ledPin, HIGH);  
 else {
   analogWrite(motorPin1, 100);
   // turn LED off:
   digitalWrite(ledPin, LOW);

Soon I will add l293 integral circuit,to control the motors in both directions.
Now the motors are controled via 2N3904 (work like a switch.)

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131