Embedded Programming Tutorials for Beginners with Step By Step Guide.

Saturday, July 11, 2015

Water Level Indicator Project using Microcontroller


Water tank controller  is an embedded project where motor switch automatically controlled by a microcontroller .When tank's water level is very low , the microcontroller system turns on the motor switch , Until the water level is full or 100% and the motor switch remains on . When microcontroller get notification tank is full , it turns off the switch of motor . Until the tank is empty this stage remains on . 
Now the question is , how can we get notification about water level ? We will apply a technique . Look at the picture given below .
Microcontroller Project : Water Tank Controller using pic18f2550 Microcontroller
Microcontroller Project : Water Tank Controller using pic18f2550 Microcontroller




Here microcontroller pins (RA0-RA4)  are connected to VDD through five 10k Ohm resistors . Five cables are connected to the points between resistors first end points and mcu (RA0-RA4)pin points . Those five (A,B,C,D,E) cables are hanged  into the tank at different five levels(A,B,C,D,E) so that each cable represents each of five levels individually .
Microcontroller Project : Water Tank Controller using pic18f2550 Microcontroller
Microcontroller Project : Water Tank Controller using pic18f2550 Microcontroller
Once water level goes to E level , it makes enable the connection between GND and 'E' level cable . So , it makes the RA4 pin GND(logical 0) and we get notification the tank is empty . Consequently the system turns on the motor of switch . 

Microcontroller Project : Water Tank Controller using pic18f2550 Microcontroller
Water Tank Controller Project using Microcontroller

When it's full, all the mcu pins(RA0-RA4) goes to low or 0 . We get the notification tank is full the motor needs to be turned off . That's the working process of this system.

Souece Code :






void main() {
   ADCON1=0x0F;                 // Configure RA) pin as input
   CMCON=7;
   TRISC.F0=0;
   TRISA.F0=1;
   TRISA.F1=1;
   TRISA.F2=1;
   TRISA.F3=1;
   TRISA.F4=1;
   TRISB=0x00;
 while(1){
  if(PORTA.F4==0 && PORTA.F3==0 && PORTA.F2==0 &&  PORTA.F1==0 && PORTA.F0==0){
      PORTB.F0=1;
      PORTB.F1=1;                                         // 100% full
      PORTB.F2=1;
      PORTB.F3=1;
      PORTB.F4=1;
      PORTC.F0=0;   //motor turned off
       }
   if(PORTA.F4==0 && PORTA.F3==0 && PORTA.F2==0 &&  PORTA.F1==0 && PORTA.F0==1){
      PORTB.F0=0;
      PORTB.F1=1;                                        // 80% full
      PORTB.F2=1;
      PORTB.F3=1;
      PORTB.F4=1;}
   if(PORTA.F4==0 && PORTA.F3==0 && PORTA.F2==0 &&  PORTA.F1==1 && PORTA.F0==1){
      PORTB.F0=0;
      PORTB.F1=0;
      PORTB.F2=1;                                            // 60% full
      PORTB.F3=1;
      PORTB.F4=1;

       }
   if(PORTA.F4==0 && PORTA.F3==0 && PORTA.F2==1 &&  PORTA.F1==1 && PORTA.F0==1){
      PORTB.F0=0;
      PORTB.F1=0;                                            // 40% full
      PORTB.F2=0;
      PORTB.F3=1;
      PORTB.F4=1;
 }
  if(PORTA.F4==0 && PORTA.F3==1 && PORTA.F2==1 &&  PORTA.F1==1 && PORTA.F0==1){
      PORTB.F0=0;
      PORTB.F1=0;
      PORTB.F2=0;
      PORTB.F3=0;                                              // 20% full
      PORTB.F4=1;
      PORTC.F0=1;   //motor turned on
       }
 }
}

Circuit :


Microcontroller Project : Water Tank Controller using pic18f2550 Microcontroller
Water Tank Controller Project using Microcontroller
Microcontroller Project : Water Tank Controller using pic18f2550 Microcontroller
Water Tank Controller Project using Microcontroller

Thank You!


19 comments:

  1. how did you manage to produce a hex file without assigning the PIC in the C source file? I'm having issues trying to compile the C source file given here.

    ReplyDelete
    Replies
    1. Ah! I used MikroC IDE and framework library.

      Delete
    2. Great Article. Thank you for sharing! Really an awesome post for every one.

      IEEE Final Year projects Project Centers in India are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Projects for CSE It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

      JavaScript Online Training in India

      JavaScript Training in India

      The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

      Delete
  2. This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post. view more

    ReplyDelete
  3. Your work is truly appreciated round the clock and the globe. It is incredibly a comprehensive and helpful blog. οικιακά φίλτρα νερού

    ReplyDelete
  4. I wanted to thank you for this excellent read!! I definitely loved every little bit of it. I have you bookmarked your site to check out the new stuff you post. project execution

    ReplyDelete
  5. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. Aegean College

    ReplyDelete
  6. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing. lora module

    ReplyDelete
  7. Considering Microcontroller project for water level is not a piece of cake so this post is quite helpful for understating water level indicator project. Assignment Writing Services

    ReplyDelete
  8. Can i get the header file from this coding?

    ReplyDelete
  9. Awesome and interesting article. Great things you've always shared with us. Thanks. Just continue composing this kind of post. crystal water bottle

    ReplyDelete
  10. Thanks for another wonderful post. Where else could anybody get that type of info in such an ideal way of writing? https://www.nox-emulator.com/hydrogen-water-and-their-advantages/

    ReplyDelete
  11. The gatherer liquid goes through one side of the exchanger and the tank water goes through the opposite side. รับติดตั้งโรงงานน้ำดื่ม

    ReplyDelete
  12. We as a whole need to have a pardon for our conduct when it isn't what we proposed; eliminate that hindrance. Liquor store near me

    ReplyDelete
  13. Admiring the time and effort you put into your blog and detailed information you offer!.. máy lọc nano

    ReplyDelete
  14. This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post!
    ultrasonic level sensor

    ReplyDelete
  15. These things are very important, good think so - I think so too... visit this page

    ReplyDelete

Course by The University of Texas at Austin

(FREE Edx Course) Embedded Systems - Shape The World: Microcontroller Input/Output. Offered by The University of Texas

Become a Robotics Software Engineer- Udacity Course

Ain't getting any visitors!
Please Share and Bookmark posts.

Tags

: (1) 18F2550 (1) 36KHz (3) and (1) arduino (1) Based (1) battery (1) Bipolar (1) Blinking (1) blinks (1) Bluetooth (1) bluetooth device interfacing (1) bluetooth module (1) button (1) circuit (1) clock (1) control (1) crystal oscillator (3) Db9 (1) DC Motor (2) digital (2) Digital Voting Machine (1) digital voting machine using pic (1) display (2) DS1307 (1) electronic (1) embedded c programming tutorial (11) embedded c tutorial (11) experiment kit (4) external interrupt (4) flash (1) flashing (1) Gas Leakage detector (1) HC-06 (1) home (1) how (1) How to (10) i2c tutorial (1) in (1) indicator (1) infrared Connection (3) interface (8) interfacing (3) Interrupt (3) Introduction (1) IR Connection (3) IR Receiver (4) IR Transmitter (4) key pad (1) keyboard (1) keypad (1) lavel (1) Lcd 16x2 (2) lcd 2x16 (2) led (1) lm35 (2) LPG (1) machine (1) make (1) Make bootloader (1) making (1) matrix (1) max232 (1) membrane keyboard (2) meter (2) Micocontroller (1) microchip (4) microchip pic (2) microchips (3) microcontroller (9) microcontroller based (3) microcontroller programming (3) Microcontroller Project (4) Microcontroller Projects (1) microcontroller_project (2) microcontrollers (4) Microprocessor (2) mikroC (5) mikroc code to start and stopstart and stop dc motor (1) mikroc pro for pic (2) Motion detector (1) MQ-9 Gas Sensor (1) musical (1) NEC Protocol (4) pcb (5) PIC (3) pic controller (11) pic microcontroller (11) pic microcontroller tutorial (11) pic programming (1) pic programming in c (12) pic proteus (1) Pic Tutorial (12) pic18 (2) pic18f2550 (11) picmicrocontroller (4) picRFモジュール (1) PIR Motion Sensor (1) printed circuit board (1) proteus (6) pulse width modulation (1) push (1) push button (1) PWM (1) real (1) rf transmitter (3) Rs 232 (1) Rs232 (1) scroll (1) scrolling (1) Serial communication (1) Serial Connection (1) Serial Port (1) serial port rs232 (1) Servo Motembedded c programming tutorial (1) simulation (2) Soil Moisture Meter (1) speed control (1) step by step (7) step bystep (1) Stepper Motor (2) text (2) Thief Detector (1) time (1) timer (4) timer0 (4) tone (1) TSOP38236 Receiver (4) tutorial (2) Unipolar (1) USART Connection (1) USB (1) usb 1.0 (1) USB bootloadere (1) USB HID (1) using (9) voltmeter (1) voting (1) water level indicator (3) with (2) work (1)

Traffic Feed


Live Traffic Feed
Visitor Tracking

Leave Your Message Here

Name

Email *

Message *

Like on Facebook