Pages: [1] 2 3 4   Go Down
Author Topic: help for the program for water tank  (Read 3791 times)
0 Members and 1 Guest are viewing this topic.
Mumbai -INDIA
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi
I am new to ARDUINO and Programming in 'C'
I have design the   Circuit for the Wire less WATER LEVEL indicator
with [ Empty  10% , 20% , 25% , 30% , 40% , 50% / HALF , 60% , 70% , 75% , 80% , 90% , 100% / FULL  ]
to be display on the LCD
but
I don't know how to write the program for the same.
any help?????? 


* 16 channel Mux Demux.jpg (247.8 KB, 1700x1163 - viewed 69 times.)
Logged

"THE LIFE IS VERY SMALL TO LEARN ELECTRONICS"
                           ε∫εζτ√°ηiζ≈
                           AND
                           yes
                           PROGRAMMING

California
Offline Offline
Faraday Member
**
Karma: 88
Posts: 3382
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

any help?????? 

What code do you have so far?
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 73
Posts: 7198
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The sketch is a bit sketchy. Let's say your sensor + transmitter is working, what format of information is being transmitted to arduino? Is it ASCII like "12.5" or is it binary? Then some more detail on the 4X16 thing is also helpful.
Logged


Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2892
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Converting all to binary 1 of 16 is a waste of time as well as the Holtek devices. What schedules the tank transmitter or does it just blabber all the time?.
scan the tank sensor strip when the tank is being used and go to sleep...
Or inquire the tank status from time to time send the code as an byte (uint8_t) and decode the low order bits (0 to 15).
Typically I would have (and did many times) checked the tank status when either the valve or pump motor was used by the system.
All 'systems' are different and you are lacking some detail about what you are controlling, Tank volume, use, source of water, potable or irrigation...
All are important and are necessary...
For example the water sensor leaves some details out.
Are you scanning the sensor and is it AC and capacitive or DC and resistive. These are very important. What is the power source and is it reliable... There are many things that make or break a sensor like this...
I once built a sensor with 10 float switches calibratable from the input flow sensor data... as a matter of fact the final "Solution" for that job went to the programmer after I added a flow meter to the tank output line. The pump ran just enough to replace the water used and it was about 10 lines of code that obviated the sensor assembly I made for the job at the customers insistence and he paid happily for both the sensor and the modifications to his existing clock code to keep the tank happy.
I later mounted the sensor on the wall... all 20 feet of it as a reminder of how not to try to engineer a job.

Bob
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have design the   Circuit for the Wire less WATER LEVEL indicator

That sketch looks suspiciously like the sort of thing you're left with after your teacher/tutor has finished walking through the problem with you.

I don't know how to write the program for the same.
any help?????? 

You need to understand how your overall solution will work in terms of interactions between the Arduino, these various bits of hardware and the various people and things in the outside world that will interact with your solution.

You need to understand how the various bits of hardware work, how to connect, power and use them from the Arduino.

You need to write code that interfaces with the hardware, and implements the algorithms that join these inputs and outputs together into the overall solution, and test and fix that code until it does what you want.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2892
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Proof of concept drawing? Only?.

Bob
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Mumbai -INDIA
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi
thanks to all for the reply

##1
I think the (Tx section) have 00-15(0000-1111) binary input as a switch in the water tank (here we use 00-13(0000-1101) for the sensing switches in the tank) and 14(1110)turn on the audio (UM66) and 15(1111) to turn off the tank input.
The 16-04 Multiplexer convert the 16 I/P to 04 Hex (0000-1111) which will be Tx via HT12E   

##2
and the (RX Section) have 04 O/P via HT12D and fed to 04-16 De-Multiplexer and will light the LED  indicator as 00-13 (0000-1101) with
[ 00% , 10% , 20% , 25% , 30% , 40% , 50% , 60% , 70% , 75% , 80% , 90% , 100% ] 14(1110) turn on the audio (UM66) and 15(1111) to turn off the tank input.


##3
and the Arduino 328 will have pin no. 3,4,5 & 6 from HT12D as an Binary I/P as (000-1111) which to be displayed on the LCD of 2x16 as   
[ Empty  10% , 20% , 25% , 30% , 40% , 50% / HALF , 60% , 70% , 75% , 80% , 90% , 100% / FULL  ] from the pin no. 7,8,9,10,11,12 &13 of the ARDUINO 328

any IDEA pl ???? 
Logged

"THE LIFE IS VERY SMALL TO LEARN ELECTRONICS"
                           ε∫εζτ√°ηiζ≈
                           AND
                           yes
                           PROGRAMMING

Mumbai -INDIA
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Proof of concept drawing? Only?.

Bob

right now yes
the tx/rx is working I would like to add the ARDUINO or the MSP430 with it.
thanks in advance
Logged

"THE LIFE IS VERY SMALL TO LEARN ELECTRONICS"
                           ε∫εζτ√°ηiζ≈
                           AND
                           yes
                           PROGRAMMING

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

any IDEA pl ???? 

Idea about what?  Surely you don't expect people to write all the code for you, so what is it you're asking for help with?
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2892
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think there is a language disconnect here... OP didn't respond to my questions or comments. Or he really expects us to get out the crystal ball and figure out what he neglected to post... He keeps mentioning "C" platforms but nothing else.. useful. IMO

Bob
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Mumbai -INDIA
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

any help?????? 

What code do you have so far?


thanks for the reply
sir right now i don't have any code
I just wanted to know how to write code for the ARDUINO 328
which have 4 pins input A,B,C,D as (0000 to 1111) on Arduino pin no 3,4,5 & 6
and the output to be displayed on the LCD as desired
Logged

"THE LIFE IS VERY SMALL TO LEARN ELECTRONICS"
                           ε∫εζτ√°ηiζ≈
                           AND
                           yes
                           PROGRAMMING

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 615
Posts: 49412
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
sir right now i don't have any code
Here's a start:

Code:
void setup()
{
  // Put some stuff here
}

void loop()
{
   // and here
}

You have made NO attempt to do a damned thing for yourself. Why should we try to help you, when what you really mean is do your homework for you?
Logged

Mumbai -INDIA
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can Switch ON and OFF the one LED on pin #12 of Arduino with an Switch on pin #3 with this code's
but don't know the idea how to solve my problem


/*
  pin 12, when pressing a pushbutton attached to pin 2.
  The circuit:
* LED attached from pin 12 to ground
* pushbutton attached to pin 3 from +5V
* pushbutton attached to pin 4 from +5V
* pushbutton attached to pin 5 from +5V
* pushbutton attached to pin 6 from +5V
*/
const int buttonPin = 3;     // the pushbutton pin A
//const int buttonPin = 4;     // the pushbutton pin B
//const int buttonPin = 5;     // the pushbutton pin C
//const int buttonPin = 6;     // the pushbutton pin D
const int ledPin =  12;      // the LED pin

int buttonState = 0;

void setup()
{
    pinMode(ledPin, OUTPUT);      
    pinMode(buttonPin, INPUT);    
}

void loop()
{
    buttonState = digitalRead(buttonPin);
    if (buttonState == HIGH)
{    
    digitalWrite(ledPin, HIGH);  
}
  else
{
    digitalWrite(ledPin, LOW);
  }
}
« Last Edit: December 19, 2012, 08:17:49 am by mkbutan » Logged

"THE LIFE IS VERY SMALL TO LEARN ELECTRONICS"
                           ε∫εζτ√°ηiζ≈
                           AND
                           yes
                           PROGRAMMING

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 615
Posts: 49412
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but don't know the idea how to solve my problem
Which is?

It's time to CLEARLY state what your problem is.
Logged

Mumbai -INDIA
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just wanted to know how to write code for the ARDUINO 328
which have 4 pins input A,B,C,D as (0000 to 1111) on Arduino pin no 3,4,5 & 6
and the output to be displayed on the LCD as desired. the Arduino 328 will have
pin no. 3,4,5 & 6 from HT12D as an Binary I/P as (000-1111)
which to be displayed on the LCD of 2x16 as   
[ Empty  10% , 20% , 25% , 30% , 40% , 50% / HALF , 60% , 70% , 75% , 80% , 90% , 100% / FULL  ]
from the pin no. 7,8,9,10,11,12 &13 of the ARDUINO 328
Logged

"THE LIFE IS VERY SMALL TO LEARN ELECTRONICS"
                           ε∫εζτ√°ηiζ≈
                           AND
                           yes
                           PROGRAMMING

Pages: [1] 2 3 4   Go Up
Jump to: