Show Posts
Pages: [1] 2 3 ... 6
1  Using Arduino / Project Guidance / Re: Battery operated Weather GPRS station report once per day on: Today at 09:34:04 am
Can you connect your anti-tamper devices in such a way that they wake the Arduino up too, perhaps using the other interrupt pin (assuming an Uno)? So one interrupt says "Wake and send a weather report", the other says "Wake up, send for help"?

Yes...
Yes....
and Yes...

I ll have to study about RTCs and how to connect them .

Thank you dannable...
i m sure i'll come back with more questions..soon !! smiley
2  Using Arduino / Project Guidance / Re: Battery operated Weather GPRS station report once per day on: Today at 06:15:02 am
Many SIM900 shields can be turned on and off by software, no need for any other components. Once it's awake wait until you have a signal before transmitting. Then shut it down again.

Yes..i know..
i ll test both to define which solution is more effective

but the main problem is to keep counting while arduino is in sleep mode.
Can be done ONLY by arduino
OR
 do i have to use external Clock ?
3  Using Arduino / Project Guidance / Battery operated Weather GPRS station report once per day on: Today at 02:52:06 am
Hi.
I'm planning to build a project and i need your guidance on how can be achieved.

The idea:
A battery operated weather station that will report sensor readings once per day through SMS.
At the same time i want ot monitor one switch and one accelerometer to be sure that no one is trying to open or move the systems box.

So far i managed to send sensors reports through SMS msgs .

The main problem seems to be the power consumption of the "system".
What i belive that will be the best approach to the power problem is to power down as much parts as posible during the period that the system stands and waiting .

GSM SIM900 module can be turned OFF through the LM2596 ( i haven't test it yet) and turn it ON only when the report is ready to be send OR when an alarm is triggered  by switch or accelerometer.

Arduino can be put in sleep mode during waiting period to save even more battery power.
I'm planning to use watchdog for that functions ( i don't know exactly how so far .. but i assume that can be done).

The problem that i don't know how to deal with is the "time schedule" . especially while the arduino is in sleep mode.

in my mind things goes like ..

1. Read real time from Network using SIM900.
2. Calculate how much time is till the predefined time (when report must be send)
3. turn systems OFF to save power
4. wait for alarm inputs (switch , accel )
5. time to send report so wake up the system
6. send report
7. go to sleep again until the next report

Question.
There is a way to calculate and keep the remaining time till the next report using arduino or do i have to use an external clock ?

Oups.. i forgot to mention that the battery i'm planning to use is 7Ah and the desired period of operation is at least two months

Thank you in advance for your help.

Nikos
4  Using Arduino / Networking, Protocols, and Devices / Re: SIM900 function on: September 27, 2014, 07:36:15 am
The following code seems that is working ..

Code:
String sendATcommand(char* ATcommand, char* expected_answer, unsigned int timeout){

  uint8_t x=0,  answer=0;
  char response[100];
  unsigned long previous;
  String reply = "";
  memset(response, '\0', 100);    // Initialize the string

  delay(100);

  while( SIM900.available() > 0) SIM900.read();    // Clean the input buffer

  SIM900.println(ATcommand);    // Send the AT command
 // Serial.println(ATcommand);

  x = 0;
  previous = millis();

  // this loop waits for the answer
  do{
    if(SIM900.available() != 0){   
      // if there are data in the UART input buffer, reads it and checks for the asnwer
      response[x] = SIM900.read();
      x++;
      // check if the desired answer  is in the response of the module

      //Serial.println(response);

      if (strstr(response, expected_answer) != NULL)   
      {
        answer = 1;
      }
    }
    // Waits for the asnwer with time out
  }
  while((answer == 0) && ((millis() - previous) < timeout));   
 
  reply +=answer ;
  reply += " , ";
  reply += response;
 
   return reply;
  //reply = (answer + "#" + response);
}

Please verify that there is NO ERROR in the above function
5  Using Arduino / Networking, Protocols, and Devices / SIM900 function on: September 27, 2014, 05:07:41 am
Hi.
Based on the function found here  http://www.cooking-hacks.com/documentation/tutorials/arduino-gprs-gsm-quadband-sim900

Code:
int8_t sendATcommand(char* ATcommand, char* expected_answer, unsigned int timeout){

    uint8_t x=0,  answer=0;
    char response[100];
    unsigned long previous;

    memset(response, '\0', 100);    // Initialice the string

    delay(100);

    while( Serial.available() > 0) Serial.read();    // Clean the input buffer

    Serial.println(ATcommand);    // Send the AT command


        x = 0;
    previous = millis();

    // this loop waits for the answer
    do{
        // if there are data in the UART input buffer, reads it and checks for the asnwer
        if(Serial.available() != 0){   
            response[x] = Serial.read();
            x++;
            // check if the desired answer is in the response of the module
            if (strstr(response, expected_answer) != NULL)   
            {
                answer = 1;
            }
        }
        // Waits for the asnwer with time out
    }while((answer == 0) && ((millis() - previous) < timeout));   

    return answer;
}

which
1 .Sends AT commands to SIM900 module
2. Reading the answer
3. Comparing them to the expected answer 
4. Return 1 or 0 depending if the answer was correct or wrong.

I would like to modify this function in order to receive the actual responce also .
Something like
return ( 1 or 0 , responce)
or whatever is posible in order to use that responce later in my code.

Can be done ?
Could you please guide me on how to do it ?

Thank you in advance
6  Using Arduino / Motors, Mechanics, and Power / Re: Arduino and LM2596 on: September 27, 2014, 04:28:37 am
Thank you all for your replies.
7  Using Arduino / Motors, Mechanics, and Power / Re: Arduino and LM2596 on: September 25, 2014, 05:47:21 am
Hi, how are you powering the arduino, with the LM2956?

Tom........ smiley
Sorry but just need to get the situation clear.

Thom No..
LM2956 powering my GSM module and i'm trying to find out a way to reduce the consumption of power to minimum.
Powering Arduino is a second problem that i'll have to deal later.

---------------------------------------------------------------

Quote
Using a 9V battery 565 mAh smoke alarm battery,
565/4.55= 124.17582417582417582417582417582 hours = ~ 124 hours operation for resistor & transistor when ON,
565 mAh /0.25 mA = 2,260 hours if OFF.

So i guess...  that this modification is more than necessary in a power saving project
8  Using Arduino / Motors, Mechanics, and Power / Re: Arduino and LM2596 on: September 24, 2014, 11:12:36 am
yes

Thank you for the short reply .  smiley-lol

How can i invert the signals produced from Arduino ?
Can you please post a link ?

Thank you again.
9  Using Arduino / Motors, Mechanics, and Power / Arduino and LM2596 on: September 24, 2014, 10:57:29 am
Hi
I m planning to use LM2596 in a project that the power consumption must be reduced to LOWEST possible levels.
According to the Datasheet http://www.ti.com/lit/ds/symlink/lm2596.pdf page 18

PIN5

"Allows the switching regulator circuit to be shut down using logic level signals thus dropping the total input supply current to approximately 80 μA. Pulling this pin below a threshold voltage of approximately 1.3V turns the regulator on, and pulling this pin above 1.3V (up to a ON /OFF maximum of 25V) shuts the regulator down. If this shutdown feature is not needed, the pin can be wired to the ground pin or it can be left open, in either case the regulator will be in the ON condition "

So  i must write my Arduino
PIN HIGH to save power
or
LOW to Turn Module ON...

Right ?

But in the first case consumption will be increased in my Arduino due to the High PIN..
Right ?

If all the above are correct i wonder if there is a way to  invert the signal produced from the Arduino Pin to save a litle more power

Thank you in advance.
10  Using Arduino / Sensors / Capacitive sensor Vs better responce time on: January 22, 2014, 08:54:53 am
Hi.
The last few weeks i'm trying to build a reaction meter , and so far i tried to use capacitive sensors to track the presence of a hand to turn on or off the time counter.
The "system" works very well but i belive that the response time of this kind of sensor is not accurate enough.
Could you please make any suggestions on what is the best sensor for my case  of use ?
The only "rule" that this sensor must follow is to avoid any physical touch with the human body and of course better responce time than the capacitive sensor

Thank you in advance
11  Using Arduino / Programming Questions / Re: Capacitive Sensor Responce time on: January 20, 2014, 06:43:16 pm
Hello again Paul.. smiley

In my application :
1) Latency +- 1msec is accepted
2) I dont want to use traditional ON-OFF switches .

I want to sense the presence of a hand and when it moves to activate the counter.
Apart the Capacitive Sensor there is any other sensor that can fulfil the above rules ?

Any suggestions are more than welcome.
Thank you.
12  Using Arduino / Programming Questions / Re: Capacitive Sensor Responce time on: January 20, 2014, 01:06:52 pm
Thank you for your fast reply.
Already doing this but during the tests i made i noticed that is not accurate...
let me explain a bit more what i mean...
Lets assume that the Capacitive sensor No1 senses values between min=5 and max=150.
And my threshold is 50...so every time the sensor values are  below 50 i set that is not pressed(touched) and when above 50 is pressed(touched).
The problem is that it takes some time when i release the sensor to go from 150 which is the max sensing value to 50 where my threshold is.
There is any way to calculate this time ?
 
13  Using Arduino / Programming Questions / Capacitive Sensor Responce time on: January 20, 2014, 12:51:49 pm
Hi.
I'm using Capacitive library to sense two different aluminium foil pieces to act as a on-off switch.
So far working fine and can correctly sense the two 'switches".
The problem is that they will be used in a time sensitive aplication and i want to know the responce time of each sensor.
Any idea how can i calculate the responce time of each sensor ?

Thank you in advance.
14  Using Arduino / Programming Questions / Re: Count Time in 2 different states on: January 13, 2014, 09:14:52 am
Quote
Any idea WHY ?
Nope. I've never used capacitive sensors, nor had any desire to do so.
  smiley

And one last question..
do you think that this aproach to calculate the latency introduced by the sensor is correct ?

Code:
case 1:
         
          SensorStartMillis = millis();
          BaseState = ReadBaseSensor();
          SensorEndMillis = millis();
          SensorLatency = SensorEndMillis - SensorStartMillis;
          Serial.print(" BASE SENSOR LATENCY  ");
          Serial.println(SensorLatency);
15  Using Arduino / Programming Questions / Re: Count Time in 2 different states on: January 13, 2014, 08:49:16 am
I'm trying to help you debug your code, but you're really not making it easy.

Sorry...i'm doing the best i can do  smiley-red smiley-red smiley-red

The function used to look like this:
Code:
int ReadBaseSensor(){
  BaseSensor.set_CS_AutocaL_Millis(0xFFFFFFFF);     // turn off autocalibrate on channel 1 - just as an example
  long total1 =  BaseSensor.capacitiveSensor(10);
  if (total1 > 20) { return 1; } else { return 0; }
}

Quote
Done.
Tested and the function called .
So, you made some changes.

Yes ..the new function i use in order to make sure if is called or not is the following

Code:
int ReadBaseSensor(){
  BaseSensor.set_CS_AutocaL_Millis(0xFFFFFFFF);     // turn off autocalibrate on channel 1 - just as an example
  long total1 =  BaseSensor.capacitiveSensor(10);
  if (total1 > 20)
  {
    Serial.print("------------  BaseState ------  1  ---------");
    return 1;
  }
  else
  {
    Serial.print("------------  BaseState -----  0  ----------");
    return 0;
  }
}

Feel free to volunteer information that you think might be useful.

Hmmmm...
i've made some changes and seems that when i put
Code:
BaseSensor.set_CS_AutocaL_Millis(0xFFFFFFFF);     // turn off autocalibrate on channel 1 - just as an example
 long total1 =  BaseSensor.capacitiveSensor(10);
in void setup()
and changes function to
Code:
int ReadBaseSensor(){
  long total1 =  BaseSensor.capacitiveSensor(10);
  if (total1 > 20)
  {
    Serial.print("------------  BaseState ------  1  ---------");
    return 1;
  }
  else
  {
    Serial.print("------------  BaseState -----  0  ----------");
    return 0;
  }
}

the function is working fine at the begining of the loopp ABD inside the case 1.  smiley-confuse
Any idea WHY ?
Pages: [1] 2 3 ... 6