Interfacing Gsm modem with Picaxe-18m2

Mike.

Member
Hello Guys,
How do I interface GSM Modem with Serial Interface to my picaxe18m2 to receive dtmf tones.
I have purchased "GSM Modem with Serial Interface" from this LINK
But I dont know how do I interface to my Picaxe18m2 to receive call and receive dtmf tones to control various appliance.

Thanks:
Help :)
 

g6ejd

Senior Member
You don't want to know much then :)

This is not a trivial project; but in essence, you will need to link your PICAXE to the Modem via the TTL ports. You will need to determine the polarity of the data I/O for the TTL inputs and then start programming your PICAXE to send and receive the command strings from the GSM module, that topic with examples is already covered elsewhere in this forum. You will find the AT command structure for GSM devices widely available.

Reading the DTMF codes will require more inputs on the PICAXE to be used and the necessary logic to be determined in your software.

Where is your draft code to do all this, plus a schematic?

Good luck in your endeavour... you will need it!
 

hippy

Technical Support
Staff member
Good luck in your endeavour... you will need it!
It might not actually be too hard with the right modem. Just send commands to auto-answer and have it report DTMF tones received then send a hang-up command or set an auto-hangup.

If the modem doesn't report DTMF tones received it will require a voice channel interface and DTMF tone detection hardware.

I would suggest an X2 rather than an M2 if using the modem to report DTMF over serial to take advantage of the background serial buffer.
 

Mike.

Member
It might not actually be too hard with the right modem. Just send commands to auto-answer and have it report DTMF tones received then send a hang-up command or set an auto-hangup.

If the modem doesn't report DTMF tones received it will require a voice channel interface and DTMF tone detection hardware.

I would suggest an X2 rather than an M2 if using the modem to report DTMF over serial to take advantage of the background serial buffer.
My gsm module datasheet you can found on this link..

Friend, I have dtmf Decoder circuit to decode DTMF signal.. i have also used my gsm mobile to Decode DTMF signals.
I was connecting my DTMF decoder at handfree jack of my gsm mobile..
But now I have Gsm module , so where do I connect My dtmf decoder...
I know AT commands... but how do I send or receive AT command using my gsm module and Picaxe18m2..
Rest I will code...

THanks :eek:
 
Last edited:

hippy

Technical Support
Staff member
But now I have Gsm module , so where do I connect My dtmf decoder...
From the look of the circuit diagram; JP2.

http://probots.co.in/Manuals/GSM Modem - Circuit.png

The manufacturer of the modem would have more information than we or members of this forum do.

I know AT commands... but how do I send or receive AT command using my gsm module and Picaxe18m2..
Sending should be a case of using something like -

SerOut TX_PIN, BAUD, ( "ATD=12345678", CR )

If you want to receive AT command replies it would be better to use an X2 and the high-speed serial with something like -

HSerOut 0, ( "ATD=12345678", CR )

And receive responses into the background receive buffer then parse what data is returned. That is where, as g6ejd suggests, things stop being trivial. If you can get everything working by sending AT commands blind without relying on responses it will be a lot easier.
 

Mike.

Member
From the look of the circuit diagram; JP2.

http://probots.co.in/Manuals/GSM Modem - Circuit.png

The manufacturer of the modem would have more information than we or members of this forum do.



Sending should be a case of using something like -

SerOut TX_PIN, BAUD, ( "ATD=12345678", CR )

If you want to receive AT command replies it would be better to use an X2 and the high-speed serial with something like -

HSerOut 0, ( "ATD=12345678", CR )

And receive responses into the background receive buffer then parse what data is returned. That is where, as g6ejd suggests, things stop being trivial. If you can get everything working by sending AT commands blind without relying on responses it will be a lot easier.
Friend , I want to use picaxe18m2 because I am not making advance project.
It's simple..
I only want to receive gsm call automatically using at commands.. thats' all..
Meas When I call to my gsm module then the picaxe-18m2 should check my mobile number and answer my call..
that's all
SImple.. no advance..
 

inglewoodpete

Senior Member
I have no experience with interfacing a GSM phone or modem with a PICAXE.

However, the modem's documentation should provide details on how to drive the modem: physical wiring and commands and expected responses. You should be able to connect a serial cable between the modem and your PC and use a serial terminal program like Putty (or even the PICAXE Programming Editor's Terminal) to get an understanding of what actually works for the modem and see what responses to expect.

Once you can get the modem working and have an understanding of what is required to drive it, you can develop a solution using a PICAXE.
 

MPep

Senior Member
I have developed an application with an AT modem, in this case a 9601 Iridium modem.
In almost all cases, I found that the modem will respond with "OK" after a command is sent and accepted.

I connected the modem to the PC serial port first, and tested command structures, before proceeding with code writing for the PICAXE. Then, the only step is to get the "T4800" or "N4800" (or whatever Baud rate you use) correcet, and the code should work fairly quickly after that.:)
 

rossko57

Senior Member
Meas When I call to my gsm module then the picaxe-18m2 should check my mobile number and answer my call..
that's all
Okay, no need to worry about DTMF then.
You'll need to use your existing knowledge of AT commands and a more detailed refeence for for your GSM module to find out how to -
Disable Auto-answer
Detect ringing
Read incoming caller ID
Accept or reject the call
 

Mike.

Member
Okay, no need to worry about DTMF then.
You'll need to use your existing knowledge of AT commands and a more detailed refeence for for your GSM module to find out how to -
Disable Auto-answer
Detect ringing
Read incoming caller ID
Accept or reject the call
Which command in picaxe-18m2 I should use to receive and transmit data..
serin or hserin
and which pins should I use in picaxe-18m2
 

hippy

Technical Support
Staff member
As the 18M2 only offers limited background receive options it would be most appropriate to use SERIN to receive data and correspondingly use SEROUT to send data.

You can use any of the input pins on the 18M2 for SERIN, and any of the output pins for SEROUT, but you can choose to use B.2 (leg 8) for SERIN and B.5 (leg 11) for SEROUT, then you can change to HSERIN and HSEROUT if required without having to change hardware connections.
 

Mike.

Member
As the 18M2 only offers limited background receive options it would be most appropriate to use SERIN to receive data and correspondingly use SEROUT to send data.

You can use any of the input pins on the 18M2 for SERIN, and any of the output pins for SEROUT, but you can choose to use B.2 (leg 8) for SERIN and B.5 (leg 11) for SEROUT, then you can change to HSERIN and HSEROUT if required without having to change hardware connections.
So what will be the best command to Receive and transmit data in 18m2...
SERIN or HSERIN
And can we read more then one byte of data...
 
Top