water filler code using pic16f877a

Thread Starter

damilarem

Joined Aug 5, 2017
41
Hi! pls

I want to do an automatic water filler code

The setup is going to be:
Motorized ball valve connected to the kitchen tap
Water flow sensor (YF-S201) measuring the amount of water from the ball valve.
A relay-board to open, and to close the ball valve when the flow meter has registered the wanted amount of water.
A pump connected to the water line, driven by the same relay output, if needed (which I don't believe is necessary)
pic16f877a
it is automatic water filler set up with a keyboard 4x3 and an LCD-screen.
dont know how to go about it
 

shteii01

Joined Feb 19, 2010
4,644
Make the list of "big" components.

Example 1.
PIC16F877A is just a chip. To make it run you will need additional circuitry. Such as crystal oscillator+capacitors or some kind of resonator, you will need reset circuit which is usually a momentary on button and a resistor. You will need power supply for the pic. Are you going to build one using 7805 chip (which will need a couple of resistor and capacitors and some kind of surface/board to mount them) or are you going to buy one off the shelf? You will also need some kind of surface/board for pic and its circuit. Or maybe just buy "project board" that has the pic already built for you, that way you only need to connect the sensors and other stuff you want, and write the program for pic to run.

Example 2.
Water sensor. Is it digital? Is it analog? What voltage/current it will output? Can pic actually safely receive the output of your sensor? PIC16F877A is 5 volt system, the highest voltage it can safely receive is probably 5-5.25 volts, maybe 5.5 volts, but you will need to double check the datasheet.

Example 3.
Pump. What voltage and current to operate the pump? Can it use same power supply that PIC will use or does it need its own power supply because its requirements so different from pic power supply?

Example 4.
Relay. Can pic activate the relay?
I work with industrial relays, wired 6 of them just today. We use one of industry standard relays, it is activated by 24 volts dc. This is just one of the standards, there are others. Like I said before, your pic is 5 volt system, you would need relay with the coil that can be activated by 5 volts or you can get some other kind of relay and then use additional circuitry to allow your pic to activate it.

Example 5.
Flow meter. In my very limited experience flow meters are actually bloody expansive. I am not saying this to discourage you. And my experience is limited in this area.
On the other hand, there is a bunch of cheap Chinese water level sensors on Ebay. They are compatible with 5 volt systems like PIC, maybe you could use one or more of them to monitor water level and turn pump on and off as needed.
 

spinnaker

Joined Oct 29, 2009
7,830
Actually

Step 1. Learn to program in C.

Step 2. Read and understand your pic's datasheet.

Step 3. Acquire a real PickKit 3 and not a clone.

Step4. Install and learn to use MPLapX.

Step 5. Work your skill level up to write to the LCD.

You can check back for the rest of the project once you have that all done. We can help with steps 1 -5 .
 

shteii01

Joined Feb 19, 2010
4,644
Actually

Step 1. Learn to program in C.

Step 2. Read and understand your pic's datasheet.

Step 3. Acquire a real PickKit 3 and not a clone.

Step4. Install and learn to use MPLapX.

Step 5. Work your skill level up to write to the LCD.

You can check back for the rest of the project once you have that all done. We can help with steps 1 -5 .
Does PK3 even support 877A? I mean 877A is ancient...
 

shteii01

Joined Feb 19, 2010
4,644
As far as I know Pickit 3 goes all the way back.


Step 0. Get a more up to date chip. ;)
Getting up to date chip is actually dangerous in this very specific case.
877A has about 30 or 40 years of user support, 20 or 25 of that is on the internetz. There are literally countless sites on the internetz with stuff that OP can simply copy, no need to even learn how to do keypad and lcd, just copy from one of the projects on the internetz.

Also, recall that 877A widely used in India and Pakistan for education/training. Judging by the OP's project (water), care to guess where OP actually from? My guess Middle East or Pakistan or India.
 

Thread Starter

damilarem

Joined Aug 5, 2017
41
Actually

Step 1. Learn to program in C.

Step 2. Read and understand your pic's datasheet.

Step 3. Acquire a real PickKit 3 and not a clone.

Step4. Install and learn to use MPLapX.
ebook to learn c pls
Step 5. Work your skill level up to write to the LCD.

You can check back for the rest of the project once you have that all done. We can help with steps 1 -5 .
ebook to learn c fast
 
Top