Mturk Jobs

Mturk Jobs
Mturk Jobs

Tank

Thursday, November 28, 2019

Arduino Bluetooth RGB Mood Light in 5 Minutes - Hint: Easy Circuit

This is a Smartphone Bluetooth controlled RGB Mood light lamp using Arduino and HC-06 Bluetooth Module.


This project is both easy and rewarding. Mood light is a nice project to make for your kids and family. It adds a touch of beauty to your home and warmth to your surroundings.

Some of Mood Light projects can be somehow hard to implement. But in this project, I managed to make it as simple as possible.
You should be able to complete this project in less than fifteen minutes.

The power behind this kind of simplicity comes from the wonderful application and website Remote XY.



You can use it to create any wireless and remote Arduino project from anywhere in the world. Whether you connect your phone to your project using Bluetooth, WIFI or even through the internet, you can always connect them both easily.

Also, the design process is much easier than many other platforms.

Components

Arduino UNO Board
HC-06 Bluetooh Module
Red, Green and Blue LEDs
I connected the negative (shorter) leg of the three LEDs together for easy use.

Jumper wires









Connection
You need to connect Arduino to the HC-06 Module only through four wires.
Arduino           HC-06
Vcc           Vcc
GND  GND
Tx          Rx
Rx          Tx


Application design
Go to RemoteXY.com and open the Editor. Choose connection, device and wireless module. Then you can place application visual controls and indications.
























Software Generation
You need to download the generated code from the editor. You also need to include the Remote XY library from the same page.

Then you need to edit the code in Arduino IDE.

That's because the generated code only configures the controls. Then you need to code the actions between Arduino and those controls.

The final code is attached here.
And you can download the RemoteXY Library from the website or from here.





Final Interface

Download Remote XY App from Google Play or Apple Store.

Open it and connect to your device.

You can see the interface loads on your smartphone.

This is how the interface looks on the Smartphone.

Note:

You don't need to be connected to the internet for using this interface between the phone and Bluetooth Module.



Operational Test

Run the application and power up the device.

Try the different modes of operation.

In the RGB mode, you can control the output color using the RGB circular control.

In the MOOD mode, the light fades in and fades out automatically.











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:



Monday, August 12, 2019

Simple and Straight Forward: Drive a 220V / 16A Relay With Arduino - How Drive 12V Relay with Arduino

This is a simple circuit for driving 220V/16A Relay with Arduino UNO.



Why use relay with Arduino?

You need to use a relay to control devices and appliances with Arduino. As you already know, Arduino - like all Microcontrollers - has many GPIOs that have 5V output. And you need to drive devices using 220V for operation. Here comes the rule of relay. It's an electromechanical device that can be electrically controlled to control high voltage and currents.


12V - 220V/16A Relay
Diode
10K Ohm Resistor
2N2222 NPN Transistor
Arduino UNO
Wires
Soldering Iron
Soldering Wire
Breadboard
1mm Copper Wire



Drive a Relay With a Transistor - Transistor As a Switch

But if you want to drive a relay with Arduino here comes another challenge. Arduino GPIO output voltage is only 5V and limited current. But the relay in hand needs 12V to energize its relay and it draws larger current than that what Arduino can support.

You then use transistor as a switch.




This is a powerful circuit that makes you drive a relay using Arduino with a transistor as a switch for the larger voltage and current that the relay's coil uses.

In short, you can use a 5V Output PIN from Arduino to drive a large device that is 220V operated by bootstrapping a 12V relay using a 5V operated transistor.





Circuit


If you are like me, then you may want to take a fast look at the schematics of the circuit. So here it is.



Just a simple circuit that contains our transistor, diode, resistor and of course, the relay.

Transistor acts as a switch to control the 12V to relay coil.

Diode acts as a protection for transistor against back EMF induced through relay coil during transit conditions.

Resistor adjusts input current from Arduino to the transistor.



I had an old Microwave over that had its Megatron defected (that's the most expensive part of the Microwave Oven).






















So I used parts from it in many projects. And here I used its control panel.

The relay that drives the Megatron (Microwave Generator) has a 12V control voltage and it can drive a 220V/16A device trough its coil.

I also found a transistor that I took and used for the same purpose.

As for the diode, I found a small surface mount diode soldered under the relay on the Microwave control panel circuit board. You can see it in the photo and you can also note the diode sign on the printed board.




Prepare and Start Assembling



So I used the board as it is.

I used a saw to cut the printed board to get the relay and the diode with their footprints on the printed board.

And it worked great. 



So I only needed to solder wires on the relay control pins. And then I connected a 1mm copper wire to the coil contacts. Those are the wires that​ hold the high voltage/ high current.



Connect to Arduino, Upload Software and Run the Test


​Here I connected Arduino UNO Board to the circuit. I connected the 10K Ohm to the PIN 12 of Arduino UNO to get its output.


Note:
Connect relay and transistor VCC and GND to the 12V power supply and not from 5V from Arduino.


I opened Arduino IDE and then opened the famous Blink Example. I added 3 lines of code to add output on PIN 12 besides LED PIN 13. This makes synchronized visual and audible feedback from both LED and Relay.


Compile the sketch and upload it to Arduino.
Run and Have fun.




Thank you for reading.



Tank