Pages: [1]   Go Down
Author Topic: Project help  (Read 731 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Greetings,

I need some help with a project for mu church and there might be some compensation available.

We have a failing well.  We need to monitor the water flow and then text or email person(s) to let them know.

We have an electronic valve that I get 110vac when energized.  I am using a cell charger to provide me 5vdc when water flows.  I have built the circuit to provide a small dc voltage to the Arduino A0 input when the event occurs. I am not very good with coding and need to have a sketch with the following specs......

Start monitoring when A0 get a voltage...

Capture start time and end time
And evaluate if outside of normal hours
Evaluate if more than 4 hours
Room for me to add analysis

Any help would be appreciated.

Thanks

Mike

Logged

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

I think you will need an RTC, and some means to send your text/email or notify some other device to send the text/email on your behalf. You'd better decide how that side of things is going to be implemented at an early stage. For example, if the Arduino is going to be on its own you'll need to provide some sort of GSM modem or mobile data service, but if there is an internet connection available in the area then you would be better off looking for a way to access that.
Logged

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

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good Afternoon
I am trying to develop an Arduino applications to monitor water flow at our Church. We have a failing well and must be sure the water is not being used badly. We have a flow valve that presents 110vac to an extension cord every time there is flow. I have used an old Cell charger and am looking at the presence of +5vdc when the water flows.
I have built the circuit to give this voltage to the Arduino on Analog Pin #1. When it senses +5v the program needs to begin monitoring and look for a series of events.....

More than 4 hours of constant water flow
Any Water flow after normal hours (ability to set the hours)

I am not good with the C language. Would even consider paying someone to help me do this.

Thank you

Mike Quinn
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
There are 10 types of people in this world; those that understand binary numbers and those that don't.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When it senses +5v the program needs to begin monitoring and look for a series of events.....

More than 4 hours of constant water flow
Any Water flow after normal hours (ability to set the hours)


What do you want the program to do when it detects those events?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26632
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Topics merged.
Don't cross-post, it wastes time.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Poole, Dorset, UK
Offline Offline
Edison Member
*
Karma: 52
Posts: 2396
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you really need e-mail/SMS/text or is that just the first thing that came into your head?

Mark
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 654
Posts: 50931
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Do you really need e-mail/SMS/text
Getting a text message at 2:30 in the morning to come turn off the water, when the stupid computer could have done that instead, would have me kicking the thing all over the place.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I understand, but I am really having trouble with the coding.  Anyone out there really good with it?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Mark.

No, I have access to Cat 5 via the Ethernet Shield.  I just need to know how to make it send a message.
Logged

NE PA
Offline Offline
Full Member
***
Karma: 5
Posts: 156
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It sounds to me that you really don't plan to put effort into learning this. If that is the case and you'd rather just pay to have it done then post it in the Gigs and Collaborations forum http://arduino.cc/forum/index.php/board,26.0.html
Logged


Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 654
Posts: 50931
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I just need to know how to make it send a message.
What "it" needs to send a message? There are services available, like usamobility.net that let you make a GET request with appropriate fields valued, that will then send a text message to the appropriate phone number(s).
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All,

I am trying to detect on an analog pin when there is 3 vdc present and then when it is 0.  That is the event I need to monitor.  Sit all the time looping until it senses a + voltage at an analog pin. Then start counting until the voltage goes to 0. 

Can anyone help me with the actual coding?  I am having some problems....

Thank you in advance.

Mike
Logged

0
Offline Offline
Tesla Member
***
Karma: 148
Posts: 9754
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I am trying to detect on an analog pin when there is 3 vdc present and then when it is 0.  That is the event I need to monitor. 

What code and wiring have you tried so far?
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

This is my attempt to read A0 and upon a voltage begin a loop

/ the setup routine runs once when you press reset:
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
  int time=0;
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int accum;
  accum=0;
  int sensorValue = analogRead(A0);
  //Serial.println(sensorValue);
    if (sensorValue<60)
    {
      Serial.println("flow=on");
      Serial.println(sensorValue);
    }
    if (sensorValue>60)
    {
      Serial.println("flow off");
      Serial.println(sensorValue);

    } 
   //if (sensorValue>60)
   //{
    // Serial.println(
     
   
  delay(1000);        // delay in between reads for stability


Then I need to start counting when the flow = on and measure how long flow is on.  and do some calculations.  Then stop when flow=off.

Thanks

Mike

}
Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 72
Posts: 3763
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Use a boolean variable to record whether flow is on or off. Set it in the ifs you're using to send messages about the flow state. Before you set it, check whether you're about to change its state. If you're about to turn on from off, record the start time using millis. If you're about to turn off from on, use millis and the start time to tell how long it was on. Do your calcs.
Logged

Pages: [1]   Go Up
Jump to: