Mturk Jobs

Mturk Jobs
Mturk Jobs

Tank

Saturday, September 7, 2019

How to Use Arduino GSM Shield SIM900



Arduino platform as an embedded system that you can make anything easily.
I got this GSM Arduino shield and decided to use it and share the experiment and knowledge with you.
This is a complete beginner guide to this GSM Shield. Soon I'll be sharing some useful projects I make with this module. But in this instructable I'm only sharing my experiments for getting started with this module.

Supplies:

Arduino UNO
SIM900 GSM Module

Choosing Power Supply Source
Picture of Choosing Power Supply Source
Picture of Choosing Power Supply Source
The module can be powered by one of two ways:
  • Separate power source.
  • Power from Arduino.
You can choose the power source from the DIP switch beside the Antenna.
Typically, the module has its own power socket. So you can power it from a separate power supply of about 12V/1A or 5V/2A.
This may be the maximum power rating or the maximum input power to support the module at its maximum power demand periods - at making calls.
But you can also power the module directly from Arduino only by connecting the shield on top of Arduino like any other shield. This will make Vcc and GND of the module connected to Vcc and GND of Arduino board.
At the beginning of my experiments, I made this connection without any problems. Yes you can power this high demanding module directly from Arduino board but this is not recommended because this module requires high power at transmission mode.
While I have been trying to try all types of code with this module I had no problem with power from Arduino.
But after a while I found that when I move the module and Arduino in different place I noticed that the power LED on the module started to faint and eventually it powers down.
At the beginning I thought there were something wrong with the module. And I even tried another SIM card from another service provider.
And then I remembered the power demand of this module so I went to another place with an open setup just as you go with your mobile phone to get a better signal for clearer voice.
So at the end of my trials with software, I decided to make my project as reliable as possible by giving the module its highest power demand from a dedicated power source.
I used a 12V/1A power adapter to power the module.
Note:
When you power the module from an external power source Arduino cannot be powered from the module. So you also need a separate power source for Arduino.

Power ON the Module and Automatic Powering

Picture of Power ON the Module and Automatic Powering
Picture of Power ON the Module and Automatic Powering
Picture of Power ON the Module and Automatic Powering
2 More Images
You can Power On and Power OFF the module by pressing the Power push button for one second.
You can do this easily every time you need to use you module.
But what if you need to have your module running in a remote area and you had Arduino restarted. Then you need to automatically Power ON the module using Software Power ON feature.
You only need three things to use this feature:
1- You need to solder the JP Jumper on the module. This jumper enable the feature from the module hardware.
2- You need to connect Arduino PIN 9 to PIN 9 on the module and this PIN will be dedicated to that purpose exclusively.
3- You need to run the code snippet that power on the module. This code typically simulates pressing the Power push button for one second.
digitalWrite(9,HIGH);
delay(1000);
digitalWrite(9,LOW);
delay(5000);

AT Commands

You can communicate and control SIM900 GSM Module using AT commands using either Serial() or SoftSerial() functions.
There are so many useful AT commands that you can commonly use.
For Example:
- Answer incoming call GPRS.println("ATA;");
- Hang up a call: GPRS.println("ATH;");


I uploaded the AT command guide.

Receiving a Call

Picture of Receiving a Call
void ListenToCall()
{
// Display any text that the GSMshield sends out on the serial monitor
if(GPRS.available() >0) {
// Get the character from the cellular serial port
// With an incomming call, a "RING" message is sent out
incoming_char=GPRS.read();
// Check if the shield is sending a "RING" message
if (incoming_char=='R') {
delay(10);
Serial.print(incoming_char);
incoming_char=GPRS.read();
if (incoming_char =='I') {
delay(10);
Serial.print(incoming_char);
incoming_char=GPRS.read();
if (incoming_char=='N') {
delay(10);
Serial.print(incoming_char);
incoming_char=GPRS.read();
if (incoming_char=='G') {
delay(10);
Serial.print(incoming_char);
// If the message received from the shield is RING

Called = Called + 1 ;
delay (1000);
}
}
}
}
}
}
Picture of Making a Call
void Call_PhoneNumber()
{ GPRS.println("ATD + xxxxxxxxxx;");
delay(1000);
}

Supply Power to Arduino

Picture of Supply Power to Arduino
Picture of Supply Power to Arduino
In this step we'll discuss a useful feature in this GSM Module. While you can supply it from Arduino, it's recommended to supply it from an external source of power.
Then as we've seen that's a more reliable approach.
So you can supply the GSM Module from a 12 V power supply but you still need to supply your Arduino Board or your main Microcontroller.
In this case you may need an extra 5V power supply. Here comes that useful feature from SIM900 Module in which it can supply Arduino or Microcontroller with 4.1V and even when it still in the OFF state.
That means it can still supply Arduino or Microcontroller as long as it's connected to its power source.
I've connected a couple of wires to the two pins indicating 4.1V and GND as shown in the image.
You can find 4.1V regulated and supplied from the shield in both OFF and ON states.
After you supply Arduino or Microcontroller from your GSM Module, Arduino or Microcontroller can power ON the Module as described in Step 3. Then you can start using the Module normally.

Read on My Website:
Read on Instructables:

Tuesday, September 3, 2019

How to Program ATtiny85 With Arduino UNO - Build Your Own Arduino Board Using ATtiny85 Microcontroller

Hello and welcome in this episode we're gonna study how to replicate Arduino in ATtiny85 Microcontroller many cases you need to use your Arduino as a standalone project and you need to use this Arduino board inside the project that you have to make it permanent.



Not just start playing with it and try some prototyping then disassemble no you need to make it to make it useful and reliable and permanent so you are giving away your Arduino board and you're not using it but that's a waste.


Because Arduino board includes programmer and it's actually a prototyping tool so why not use the main Microcontroller itself and sometimes you need just only some few pins and limited memory size that you don't need all Microcontroller.

Build Your Own Arduino Board Using ATtiny85 Microcontroller

So here is how we are using Arduino to clone it and make new Arduino.


Let's start by making Arduino compatible with ATtiny by making File --> Preferences we add here Arduino we paste it right here then we go to board manager go to ATtiny install installation complete clothes tools we choose ATtiny board now we have ATtiny support inside Arduino IDE choose a site on ATtiny85 and choose the internal Eight megahertz oscillator okay that's how we started to make ATtiny support on Arduino IDE.










So let's get started on programming ATtiny

First we need to load Arduino ISP example but on our Arduino UNO board.







So this Arduino UNO is gonna be our Arduino ISP programmer that will program bootloader and Arduino code inside ATtiny Microcontroller and we click upload on Arduino UNO.


Then we close this one and we start by making our circuit we connect our circuit this connection.




I've read warning that you need to put capacitor between reset and ground on your Arduino UNO programmer so that you don't hurt the bootloader I didn't want to hurt or overwrite my bootloader from Arduino UNO Board so I put the capacitor.


Then I connected all the stuff and I had this error error while burning bootloader I had bad connection.


So I started again then we need to program ATtiny board select ATtiny processor at the ATtiny85 and turn on 8 megahertz and use the programmer Arduino as ISP then we press Burn bootloader.








Then I check I found done burning bootloader it worked perfect.


Now we are ready to upload any program on Arduino this time on ATtiny so we opened the basic blink example and we checked that ATtiny board processor and programmer Arduino as ISP but we need to change some values.

For example, LED_BuiltIn we'll change it to pin number zero and this one and this one verified for Arduino ATtiny.

Now we are done compiling so we upload it.






Then we are done compiling now we try to run that blink program on Arduino ATtiny this is the ATtiny Microcontroller running the blink program that's all I hope you like it thank you please click like share and subscribe.







Read on my Website:



Tank