How to create a pulse without a button

Dear All,

In order to switch on a module. I have to send a puls of two sec to the pin1 of the module

Then I try this

  digitalWrite(9, HIGH);
  delay(2000);
  digitalWrite(9, LOW)

But for sure it did not work.

It's the good way to create a pulse of 2sec send from pin 9 of Arduino Mini pro?

Thank

But for sure it did not work.

Whatever “works” means.

Hmmm, your code doesn't compile. Also, you have not set the pin to an output. Have you connected the flux capacitor?

Post all of your code and give better descriptions of what "doesn't work".

Also say what the module is and how it is connected up. Is the ground of this module common with the ground of the arduino?

Hello,
Sorry this is my code

//http://store.open-electronics.org/Breakout%20SIM900%20GSM%20Module
#include "SIM900.h"
#include <SoftwareSerial.h>
#include "inetGSM.h"
 
InetGSM inet;    

#define DEBUG;
 
char msg[50] = "teste";
int numdata;
char inSerial[50];
int i=0;
boolean started=false;


void setup()
{
  Serial.begin(9600);
//Generating  apulse of 2 sec
  pinMode(9, OUTPUT);
  digitalWrite(9, HIGH);
  delay(2000);
  digitalWrite(9, LOW);
 
  Serial.println("GSM Shield testing.");
  if (gsm.begin(2400)){
    Serial.println("\nstatus=READY");
    started=true;
  }
  else Serial.println("\nstatus=IDLE");
 
  if(started){
//if (inet.attachGPRS("internet.wind","", ""))
    if (inet.attachGPRS("internet","", ""))
      Serial.println("status=ATTACHED");
    else Serial.println("status=ERROR");
    delay(1000);
 
    gsm.SimpleWriteln("AT+CIFSR");
    delay(5000);
    gsm.WhileSimpleRead();
    numdata=inet.httpGET("qqqqqq.dyndns.org", 80, "/", msg, 50);
    Serial.println("\nNumero d'octet recu:");
    Serial.println(numdata);
    Serial.println("\nData recived:");
    Serial.println(msg);
  }
};
void loop()
{
};

My big problem is when I call the gps module with my mobile, it’s like if the module is switch off even if there is a green led flashing
I think it not good powered it is the reason why I was thinking about the pulse. I read thata pulse should be send to pin 1 of the GSM module, but I am not sure if I set correctely a puls

here are some other information but there is to much to read for you and I could not really understand what they seay. The support is totaly bad

#define DEBUG;

Not your problem right now, but not a good habit to get into.
Drop the semicolon

Also say what the module is and how it is connected up. Is the ground of this module common with the ground of the arduino?

No it's no commun, The module need 4V. Then created a Volt adatpator to have 4 V. And the GSM ground it connected to it

see the picture

It may be better explain

Ground is 0V. That 4V is 4V relative to ground. Arduino 5V is 5V relative to ground.
If the grounds are not the same the voltages relative to them will not be 4V and 5V.
Connect all the DC grounds together unless you have completely isolated circuits

This 2 second pulse; should it be HIGH or LOW?
Is it for the SIM900 that you have the library? If so then doesn't the library have an initialize function that does that?

If the grounds are not the same the voltages relative to them will not be 4V and 5V.
Connect all the DC grounds together unless you have completely isolated circuits

So you means both ground should be connected as I did with the white color?

This 2 second pulse; should it be HIGH or LOW?

In my understanding the pulse must be positive for 2sec.

Is it for the SIM900 that you have the library? If so then doesn't the library have an initialize function that does that?

Yes, the library is for the SIM900 and I using a exemple code. For now I do not think that the library is the cause of the issue, but may be I am wrong

Yes the grounds MUST be connected together.
But you have another problem. If you put a 5V pulse into a module that is powered from only 4V then there is a chance you will fry it. Use a transistor to convert the voltage levels. This will invert the signal so invert it in software to componsate.

OK this is a great information!!!!
But for I do not know how to convert and I do not have a transitor. May be I will use the voltage regulator (4V) to create manualy a pulse

May be I will use the voltage regulator (4V) to create manualy a pulse

Noooooooooo
Do not use a voltage regulator for this.

It is simple, output pin to a 1K resistor, the other end to the transistor's base. Emitter to the common ground.
Collector to module input and 1K resistor from that collector to the 4V module supply.

You wouldn't use a voltage divider? Or even a resistor from the 5V?

Also I guess you mean an NPN transistor?

hello,
I read the doc and it sate 4V for the GSm module, the I created a small circuit (LM317) to have 4V.
But it does not really work
I join the GND and the GSM greed led flash 12 time and stop flashing.I think it's like if it turn off.

Is there another way to have properly 4V for the gsm module?

I did say:-

If you put a 5V pulse into a module that is powered from only 4V then there is a chance you will fry it.

I am checking the max Volt of the GSM module but the the documentation is very very very poor.
Is there a way to check that ecause we are using a SIM900?

Same question with SIM908?

I did say:-
Quote
If you put a 5V pulse into a module that is powered from only 4V then there is a chance you will fry it.

Yes, I understood. I used a wire from the pin 1 (on/off) and I touched for about 2 sec the 4V output of the voltage regulator. Then I "use" un pulse of 4V. Ist'nt?

OK that is fine, rather than disconnect it it should be connected to ground.

Unfortunately it does not change by putting it on the ground :~