How to configure Water Sensor for PIC18F4580 in c language?

Digital Fiber, Photoelectric, Laser Range, Optical, Temperature, Rotary Encoder, Ultrasonic, Gas, Gyro, Accelerometer, FlexiBend, Flexiforce, Compass......

How to configure Water Sensor for PIC18F4580 in c language?

Postby Aisar » Fri Sep 26, 2014 1:49 pm

How to configure Water Sensor for PIC18F4580 in c language? this is the product code SN-WS-11304P.
Aisar
Greenhorn
 
Posts: 3
Joined: Fri Sep 26, 2014 1:14 pm

Re: How to configure Water Sensor in ADC for PIC18F4580?

Postby yonghui » Sat Sep 27, 2014 9:33 am

what Water sensor? where is the sensor?why need to configure water sensor in ADC?
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Re: How to configure Water Sensor for PIC18F4580 in c langua

Postby Aisar » Sun Sep 28, 2014 6:39 pm

sorry for the wrong question previously....actually i need help how to declare water sensor in c language,because this sensor using analog signal.
Aisar
Greenhorn
 
Posts: 3
Joined: Fri Sep 26, 2014 1:14 pm

Re: How to configure Water Sensor for PIC18F4580 in c langua

Postby Aisar » Sun Sep 28, 2014 6:42 pm

water sensor.PNG
this is the sensor...
Aisar
Greenhorn
 
Posts: 3
Joined: Fri Sep 26, 2014 1:14 pm

Re: How to configure Water Sensor for PIC18F4580 in c langua

Postby ober » Sun Sep 28, 2014 8:32 pm

Declare sensor? Not really understand your question.

Basically it is just analog sensor just like other analog sensor, it output analog voltage.

Maybe checking this video by our internship student might be helpful.


Then configure your PIC to read analog voltage, compare it and decide what to do.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: How to configure Water Sensor for PIC18F4580 in c langua

Postby yonghui » Mon Sep 29, 2014 10:07 am

Hi,

i think you will need to read more on ADC part of datasheet of PIC. it will teach you on how to configure the PIC pin as analog pin, then configure the internal adc to read analog sensor. u can find sample code of ADC to refer. the water sensor will give analog value, and you will need to use the PIC internal adc to read the value.
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm


Return to Sensor

Who is online

Users browsing this forum: No registered users and 7 guests