[SOLVED] SN-LLS Liquid Level Sensor

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

[SOLVED] SN-LLS Liquid Level Sensor

Postby JDM » Tue Oct 30, 2012 11:28 pm

Hi. I've purchased the Liquid Level Sensor from Cytron here: http://cytron.com.my/viewProduct.php?pc ... l%20Sensor

And here's the datasheet (different from Cytron product page, because the sensor is updated): http://www.milonetech.com/uploads/eTape ... 15TC-8.pdf

I read from the Cytron product page that the connection is simply like using a potentiometer to microcontroller (i use Arduino Uno, if that matters). I've tried connect a 10k POT to Arduino, with +5V, analog pin and GND to the POT and it works. Reading the analog input is from the serial monitor where it produced 0-1023 value.

The problem here is, by using the same connection, i cannot make the water level sensor to works! I even tried some other connection, but still cannot. The serial monitor just produced 0 all the time.

Here is the front picture of the sensor:
Screen Shot 2012-10-30 at 11.04.26 PM.png


And here is the sample circuit taken from the datasheet.
Screen Shot 2012-10-30 at 11.05.01 PM.png
Screen Shot 2012-10-30 at 11.05.01 PM.png (26.85 KiB) Viewed 5361 times



From the datasheet, Rsense is pin 2 & 3 while Rref is pin 1 & 4. From Arduino, i connect +5V to pin 1 of the sensor, analog A0 to pin 2, and GND to pin 3. Am i doing it right? Because it's not working. Please, any help would be much appreciated!
JDM
Novice
 
Posts: 16
Joined: Thu Oct 25, 2012 4:18 pm

Re: SN-LLS Liquid Level Sensor

Postby robosang » Thu Nov 01, 2012 10:27 am

JDM WROTE:I read from the Cytron product page that the connection is simply like using a potentiometer to microcontroller (i use Arduino Uno, if that matters). I've tried connect a 10k POT to Arduino, with +5V, analog pin and GND to the POT and it works. Reading the analog input is from the serial monitor where it produced 0-1023 value.

The problem here is, by using the same connection, i cannot make the water level sensor to works! I even tried some other connection, but still cannot. The serial monitor just produced 0 all the time.

From the datasheet, Rsense is pin 2 & 3 while Rref is pin 1 & 4. From Arduino, i connect +5V to pin 1 of the sensor, analog A0 to pin 2, and GND to pin 3. Am i doing it right? Because it's not working. Please, any help would be much appreciated!


Really? They say like using potentiometer? I think it should be using like LDR because LDR have 2 terminals while POT have 3 terminals.

BTW, you should refer to the diagram for microcontroller in the datasheet, the right most diagram. The connection that you did, until when also cannot get any reading. If you study the datasheet thoroughly, Rsense work independently from Rref. Basically you can ignore Rref, on the other hand, you can also utilize it :)

Let try this: Connect 5V from arduino to pin 1, connect pin 4 to pin 3 and to A0 of arduino, connect pin 2 to GND of Arduino. Let's see the result.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: SN-LLS Liquid Level Sensor

Postby JDM » Thu Nov 01, 2012 8:17 pm

robosang WROTE:Let try this: Connect 5V from arduino to pin 1, connect pin 4 to pin 3 and to A0 of arduino, connect pin 2 to GND of Arduino. Let's see the result.


Man u rocks! It WORKS! :D Thank you so much!

On the Cytron product page, Admin replied to one of the enquiries "Its resistance changes with the liquid level, same concept like LDR (Light Dependent Resistor). So you can connect it like how you connect a variable resistor to any controller you wish." Well my bad. The other day i forgot to mention it works the same concept like LDR and was just focusing on a POT (because the other day i only have a 10k POT at my desk). My apologies ;)

Anyway just for everyone's information, the sensor is highly sensitive. A slight bend results in a very high error :roll:
JDM
Novice
 
Posts: 16
Joined: Thu Oct 25, 2012 4:18 pm

Re: SN-LLS Liquid Level Sensor

Postby JDM » Thu Nov 01, 2012 8:19 pm

Thanks again for your time. Really appreciate it :)
JDM
Novice
 
Posts: 16
Joined: Thu Oct 25, 2012 4:18 pm

Re: SN-LLS Liquid Level Sensor

Postby robosang » Fri Nov 02, 2012 10:11 am

No problem, hope you can share your project with us and also help others :mrgreen:
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: [SOLVED] SN-LLS Liquid Level Sensor

Postby wstay » Fri Nov 30, 2012 1:14 pm

Hi;
I also connected Pin 1 to 5V dc; pin 4 and Pin 2 to RA0 (analog input) of the PIC16f877a; and pin 3 to ground;
What i get the range is when empty it is 1023 ; and when its full 765+/- ; how can i get 1023 - 0 or 1023 to much lower value ? or is it something wrong with my circuit ?
the voltage range is small.
Thanks
wstay
Newbie
 
Posts: 10
Joined: Mon Oct 29, 2012 6:10 pm

Re: [SOLVED] SN-LLS Liquid Level Sensor

Postby robosang » Sat Dec 01, 2012 6:44 pm

I will not give direct solution. I hate spoon-feed style.

Let me ask you and you answer.

Why are you getting value of 1023 when it is empty and why you get 765 when it is full? Is very basic concept, if you understand this, we will continue :twisted:
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: [SOLVED] SN-LLS Liquid Level Sensor

Postby wstay » Sat Dec 01, 2012 10:00 pm

robosang
Power Source, Vin = 5V and from the circuit i connected, which is the voltage divider rule from the datasheet; when its empty the resistance is highest(1500 Ohm)
and gives out the voltage 5V at Vout , the value will be 1023,
when its full ; the resistance is lowest (300 ohm), and the voltage decrease to 765/1023 * 5 = 3.48V
am I correct ? ; Please correct me if I am wrong. feeling strange :?
Thanks

and of course there are some uncertainty in it
wstay
Newbie
 
Posts: 10
Joined: Mon Oct 29, 2012 6:10 pm

Re: [SOLVED] SN-LLS Liquid Level Sensor

Postby robosang » Sun Dec 02, 2012 7:37 am

Not really correct.

Why 1500 ohm give 5V? and why 300 ohm give 765 or 3.48V? Which formula are you using?

You mention voltage divider rule, but where is your calculation of voltage divider? 765 to 3.48V is not voltage divider, that is simply ADC resolution multiply with the ADC value. :mrgreen:
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: [SOLVED] SN-LLS Liquid Level Sensor

Postby wstay » Sun Dec 02, 2012 2:50 pm

okay using the voltage divider rule;

Vout = [ Rref / (Rref + Rsense) ] * Vin
Rref = 1500
Rempty = 1500
then at empty Vout = [1500/(1500+1500)] * 5 = 2.5V ADC decimal = 512
When Full Vout= [300/(1500+300)] * 5 = 0.833 V ADC decimal = 170

when measuring the sensor
but when Empty = 1023
when full = 765+
wstay
Newbie
 
Posts: 10
Joined: Mon Oct 29, 2012 6:10 pm

Next

Return to Sensor

Who is online

Users browsing this forum: No registered users and 8 guests

cron