Forum Hardware Others components Optical sensor for ATO

Optical sensor for ATO


Post Number:#1 Post Wed Oct 29, 2014 10:15 am
Posts: 70
Topics: 12
Images: 3
Solve rating: 0
Joined: Tue Oct 28, 2014 11:06 am
Topics: 12
Age: 41
Gender: None specified
National Flag:
Netherlands
Hi,

I searched but couldn't find the ansewer. Is it possible with the ferduino board to use an optical sensor for ATO like tunze osmolator 3155? Is is much more accarate then the float switches.

Ruben
Last edited by Fernando Garcia on Wed Oct 29, 2014 10:27 am, edited 1 time in total.
Reason: Title fixed.

Post Number:#2 Post Wed Oct 29, 2014 10:35 am
Posts: 1651
Topics: 38
Images: 280
Solve rating: 219
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 35
Location: São Paulo
Gender: Male
National Flag:
Brazil

Hi!

Welcome Ruben!

All is possible.

The problem in my view is spend 2 digital pins to each sensor and oxidation caused for saltwater.

Here a simple example:

/*
 HC-SR04 Ping distance sensor:
 VCC to arduino 5v
 GND to arduino GND
 Echo to Arduino pin 7
 Trig to Arduino pin 8
 
 This sketch originates from Virtualmix: http://goo.gl/kJ8Gl
 Has been modified by Winkle ink here: http://winkleink.blogspot.com.au/2012/05/arduino-hc-sr04-ultrasonic-distance.html
 And modified further by ScottC here: http://arduinobasics.blogspot.com.au/2012/11/arduinobasics-hc-sr04-ultrasonic-sensor.html
 on 10 Nov 2012.
 */


#define echoPin 7 // Echo Pin
#define trigPin 8 // Trigger Pin
#define LEDPin 13 // Onboard LED

int maximumRange = 200; // Maximum range needed
int minimumRange = 0; // Minimum range needed
long duration, distance; // Duration used to calculate distance

void setup() {
 Serial.begin (9600);
 pinMode(trigPin, OUTPUT);
 pinMode(echoPin, INPUT);
 pinMode(LEDPin, OUTPUT); // Use LED indicator (if required)
}

void loop() {
/* The following trigPin/echoPin cycle is used to determine the
 distance of the nearest object by bouncing soundwaves off of it. */
 digitalWrite(trigPin, LOW);
 delayMicroseconds(2);

 digitalWrite(trigPin, HIGH);
 delayMicroseconds(10);
 
 digitalWrite(trigPin, LOW);
 duration = pulseIn(echoPin, HIGH);
 
 //Calculate the distance (in cm) based on the speed of sound.
 distance = duration/58.2;
 
 if (distance >= maximumRange || distance <= minimumRange){
 /* Send a negative number to computer and Turn LED ON
 to indicate "out of range" */
 Serial.println("-1");
 digitalWrite(LEDPin, HIGH);
 }
 else {
 /* Send the distance to the computer using Serial protocol, and
 turn LED OFF to indicate successful reading. */
 Serial.println(distance);
 digitalWrite(LEDPin, LOW);
 }
 
 //Delay 50ms before next reading.
 delay(50);
}


Wiring:

Image


Source: http://arduinobasics.blogspot.com.br/20 ... ensor.html

Best regards.

Fernando Garcia
Please do not PM me for support unless it is absolutely necessary.

I'll not write custom function to nobody unless you can pay for my job.

Post Number:#3 Post Wed Oct 29, 2014 8:09 pm
Posts: 92
Topics: 10
Solve rating: 0
Joined: Sat May 17, 2014 9:03 am
Topics: 10
Age: 39
Gender: None specified
National Flag:
France
HI! Fernando

Ruben want use an optical, not an ultrasound sensor !!

it's optical with an infrared emiteur when the capteur is in the water, the infrared stream is not reflected and the phototransistor is open, same as this sensor :

http://www.aliexpress.com/item/ESM-PE21 ... 12373.html
ov when level above
5v when level below

only one input need.

this sensor is more accurate than the float and not blocked.

it's interesting

Post Number:#4 Post Wed Oct 29, 2014 8:36 pm
Posts: 1651
Topics: 38
Images: 280
Solve rating: 219
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 35
Location: São Paulo
Gender: Male
National Flag:
Brazil


Post Number:#5 Post Thu Oct 30, 2014 8:59 am
Posts: 70
Topics: 12
Images: 3
Solve rating: 0
Joined: Tue Oct 28, 2014 11:06 am
Topics: 12
Age: 41
Gender: None specified
National Flag:
Netherlands

Post Number:#6 Post Thu Oct 30, 2014 2:15 pm
Posts: 60
Topics: 3
Images: 0
Solve rating: 1
Joined: Sun Jun 15, 2014 11:50 pm
Topics: 3
Age: 52
Gender: None specified
National Flag:
United States of America
I used 5v optical sensors for my ATO to replace float switch after several times the optical failed to trigger I went back to floats they just stopped working in fresh water I do not know if it was do to not enough light or algae growing on the front of it but it would stop working and there was no set time it would stop some times few days some times couple weeks to a few months

the optical I got from gem sensors here is a link to them http://www.gemssensors.com/Products/Lev ... vel-Switch

Post Number:#7 Post Tue Nov 11, 2014 3:22 am
Posts: 70
Topics: 12
Images: 3
Solve rating: 0
Joined: Tue Oct 28, 2014 11:06 am
Topics: 12
Age: 41
Gender: None specified
National Flag:
Netherlands

Post Number:#8 Post Tue Nov 11, 2014 5:52 pm
Posts: 1651
Topics: 38
Images: 280
Solve rating: 219
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 35
Location: São Paulo
Gender: Male
National Flag:
Brazil

Hi!

Using Ferduino Mega add float switch is very easy.

I think that the precision is enough.

Moreover it's very cheap.

Best regards.
Please do not PM me for support unless it is absolutely necessary.

I'll not write custom function to nobody unless you can pay for my job.

Post Number:#9 Post Fri Sep 02, 2016 11:56 am
Posts: 1651
Topics: 38
Images: 280
Solve rating: 219
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 35
Location: São Paulo
Gender: Male
National Flag:
Brazil

Hi!

If someone is interested in this type of sensor here a good option: http://www.ebay.com/itm/331615870709

Best regards.
Please do not PM me for support unless it is absolutely necessary.

I'll not write custom function to nobody unless you can pay for my job.




Return to Others components





Who is online

Users viewing this topic: No registered users and 1 guest

cron