sensor for pic to measure water level

Status
Not open for further replies.
Dear chandresha1,
I feel that your experience is good on this
first of all I need to order ultrasonic sensor and have to do some research
I already odder sensor from your link
I will come back to you
let me know how do you measure the pulses from the sensor
 

ok. first of all i want to tell u that u dont need to measure the pulses. u need to measure the "hightime" of echo pulse. i measure this using timer0 in pic16f877a.. the program seems like that:

---------------------------------------
int cont;
void interrupt()
{
cont++;
INTCON.TMR0IF=0;
tmr0=110;
}

void main()
{
trisd.b0=0; //trigger pin output.......
trisd.b1=1; // echo pin as input......
do{
PORTD.B0=1;
DELAY_US(10);
PORTD.B0=0;
while(portd.b1==0); wait u
TMR0 = 110; // preset for timer register
INTCON.GIE= 1;
INTCON.TMR0IE=1;
OPTION_REG.PSA = 1; // bit 3 Prescaler Assignment bit.
OPTION_REG.PS2 = 0; // bits 2-0 PS2S0: Prescaler Rate Select bits
OPTION_REG.PS1 = 0;
OPTION_REG.PS0 = 0;
while(portd.b1==1);
INTCON.GIE=0;
cont=cont/2; // distance is travelled twice from transmitter towater & water to transmiiter so devide by 2.
}while(1);

while choosing the preload value of timer....care must be taken about ur crystal frequency. i have crystal frequency of 20mhz.
 

Dear chandresha1
they replied that they do not have sensor
can I know online purchasing web site to buy ultrasonic sensor
 

I am struck with purchasing ultrasonic Distance measurement sensor
please advice to purchase online a sensor at low price ( one unit) with shipping
 


Dear chandresha;
I tried to purchase ultrasonic distance measurement sensor, unfortunately I can not order it
but it is possible to buy ultrasonic transducer
see link RS | Process Control | Sensors and Transducers | Ultrasonic Proximity Sensors | Ultrasonic Transducers |MA40S4R
can you advice me using this how may I implement my project
 

dayanpad,
i have seen your link. but it is only ultrasonic trasmitter & receiver. so if u purchase this one, you have to implement oscillator module & other signal conditioning part at ur side. & i think it will become more complex. i dont have any experience on this ultrasonic module. search in your local market........may be u will find the ultrasonic that i preffered u..........
 
Dear chandresha;
following link contain ultrasonic sensor model no: GH 311
please advice me, is this sensor able to connect with PIC 16f877 to measure distance
it has only three pin. also available in the our country
**broken link removed**
 

hey actuly it looks good but the information is not enough. my question is where is the trigger pin? it has three pins. one is Vcc, second ground & third is output. in my sensor there is one another pin called trigger. & we need this one. & there is one another notice at the end of page is: This module can not be used for distance measurement. so i think it will not work.
 
Last edited:

Dear All,
I need to measure water amount (in liter) in the domestic water tank
anybody should knows about sensor that cat input to PIC. it should be cheapest and simple mechanism

its a simple problem,..just use a potentiometer,..if u dnt understand just read the instrumentation book,..and u finally found that is really easy,..its upon to your program,..in ADC,..
 

Dear All,
I have purchased ultrasonic distance sensor which has five pins

1. Vcc
2. Gnd
3.Trig
4.echo
5. out

can I know, pin connection with 16f877 , if I measure distance (circuit diagram)?

Example

trig to ccp1 of MCU pin 33 of 16f877
echo to INT of MCU pin 16 of 16f877

is above correct
 


Hello chandresha1,

I have a question regarding this sensor . How are you protecting it from the elements (rain, wind etc)? I would like to put this sensor on the top of the tank and aim it towards the tank bottom. However I figure if I enclose this in a weather proof case with a lens, that the ultrasonic signal will only reflect back into the enclosure.

Any information from your experience would be greatly appreciated,
Rangersfan
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…