This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Monday, July 18, 2016

Alarm on Leak

Today we are going to do about the leak alarm, which can be placed in hard to reach places.
The creation of such a signal was the incident happened at my house. Synulya unnoticed by us pulled the drain hose washing machine. The machine washed. And we were at home and did not know that we had was the bathroom and the water flowed out into the corridor.

Step 1: ​We will need.

Picture of ​We will need.
We will need.
  • Battery 3 volt CR1632
  • One transistor BC517, BC816 or any other NPN Darlington.
  • Resistor 1-2 megohms.
  • Piezo electric buzzer

Step 2: The scheme is very simple

Picture of The scheme is very simple

Step 3:

Picture of
connect a transistor and a resistor

Step 4:

Picture of
connect buzzer

Step 5:

Picture of
connect the battery

Step 6:

Picture of
Alarm on leak.mp4_snapshot_00.50_[2016.07.02_16.57.37].jpg
Alarm on leak.mp4_snapshot_00.55_[2016.07.02_16.57.48].jpg
Alarm on leak.mp4_snapshot_01.05_[2016.07.02_16.58.06].jpg
We put into the body

Step 7:

Picture of
Alarm on leak.mp4_snapshot_01.32_[2016.07.02_17.00.18].jpg
placed in hard to reach places
The more detail you can see in the video

VIDEO 

Alarm on Leak

Today we are going to do about the leak alarm, which can be placed in hard to reach places.
The creation of such a signal was the incident happened at my house. Synulya unnoticed by us pulled the drain hose washing machine. The machine washed. And we were at home and did not know that we had was the bathroom and the water flowed out into the corridor.

Step 1: ​We will need.

Picture of ​We will need.
We will need.
  • Battery 3 volt CR1632
  • One transistor BC517, BC816 or any other NPN Darlington.
  • Resistor 1-2 megohms.
  • Piezo electric buzzer

Step 2: The scheme is very simple

Picture of The scheme is very simple

Step 3:

Picture of
connect a transistor and a resistor

Step 4:

Picture of
connect buzzer

Step 5:

Picture of
connect the battery

Step 6:

Picture of
Alarm on leak.mp4_snapshot_00.50_[2016.07.02_16.57.37].jpg
Alarm on leak.mp4_snapshot_00.55_[2016.07.02_16.57.48].jpg
Alarm on leak.mp4_snapshot_01.05_[2016.07.02_16.58.06].jpg
We put into the body

Step 7:

Picture of
Alarm on leak.mp4_snapshot_01.32_[2016.07.02_17.00.18].jpg
placed in hard to reach places
The more detail you can see in the video

VIDEO 

Arduino Bluetooth Master, and Slave Using Any HC-05 Modules

Picture of Arduino Bluetooth Master, and Slave Using Any HC-05 Modules
Do you have HC-05 Blue-Smurf modules already, and have no idea what to do, or are you just looking to be able to connect two arduinos together wirelessly? This is the place to be!
This tutorial is meant to cut through all of the confusing tutorials on the internet, and show you how to finally get your HC-05 modules working together. I personally struggled for days trying to get mine working, and simply couldn't. I pulled through however, and here is an all encompassing tutorial meant to be the end all, be all of master, and slave connections, no matter the model number, or set up. I will have links to contributors in the reference section, in the code, and will also add to this tutorial as I see fit.
From ZS-040 models, to FC-114 models, to the strangest of the strange, this tutorial is meant to work with all HC-05's, and will hopefully adapt to help this purpose over time.
The setup we will be using is just a simple blink over Bluetooth serial program, but I currently have a setup for my BB-8 which uses an ultrasonic sensor in the dome to control the drive system in the ball. It will soon be able to roll around autonomously, and I will link to that instructable here when it is done.
http://www.instructables.com/id/Autonomous-BB-8-Drive-System/
Let's get started!

Step 1: Parts

Picture of Parts
1. Breadboard (you could also have two of them)
2. Two Arduino Boards (I am using a nano, and an uno, but I am sure a mega, and some others would work)
If you don't have a lot of arduino, I recommend getting a starter kit.
https://www.amazon.com/Kuman-Project-Complete-Star...
3. 2 HC-05 Bluetooth Modules (The ZS-040 modules are the best, but any one with a button is convenient w/o is hard)
https://www.amazon.com/gp/product/B00XXALRUG/ref=o...
http://www.banggood.com/3Pcs-HC-05-Wireless-Blueto...
Or, find one on ebay for cheap.
4. Push Button (any kind will work, but the one I started out with began to slip out of the breadboard)
5. Led's (any color, and size works, but if using small ones, I recommend a resistor)
6. One Resister (1k ohm I think)
7. Wires (you will need a lot of these in various colors, and sizes)

Step 2: Wiring if your HC-05 has a button!

Picture of Wiring if your HC-05 has a button!
There will be a small button connected to the En pin, it should be on the lower right hand side of the face with the electronics. If you don't have this button, skip to the next step, but if you do, follow the wiring above, and annotated below. This method has worked with the ZS-040, and FC-114 modules which I currently have.
Arduino 1 (Mine is the nano)
Plug the bluetooth module into the breadboard to the right of the nano.
5v to vcc on bluetooth module
gnd to gnd on bluetooth module
pin d10 to txd on bluetooth module
pin d11 to rxd on bluetooth module
Bridge the push button across the middle of the breadboard to the right of the bluetooth module.
pin d2 to push button top right
5v to push button bottom left
take out resistor 1k ohm from push button bottom right to gnd
Plug the led into the breadboard.
pin d8 to LED positive
gnd to LED negative
Arduino 2 (Mine is the uno)
Plug the bluetooth module into the breadboard opposite the nano setup.
5v to vcc on bluetooth module
gnd to gnd on bluetooth module
pin d10 to txd on bluetooth module
pin d11 to rxd on bluetooth module
Plug the led into the breadboard.
pin d8 to LED positive
gnd to LED negative
Skip the next step!

Step 3: Key Pin Wiring

Picture of Key Pin Wiring
If you do not have a button on your EN pin, in order to initialize AT mode, you will need to power the key pin with a refresh. The only change in the wiring is attaching pin 9 to your key pin. If you do have a button on your EN pin, skip this step!
Arduino 1 (Mine is the nano)
Plug the bluetooth module into the breadboard to the right of the nano.
5v to vcc on bluetooth module
gnd to gnd on bluetooth module
pin d9 to key pin on bluetooth module
pin d10 to txd on bluetooth module
pin d11 to rxd on bluetooth module
Bridge the push button across the middle of the breadboard to the right of the bluetooth module.
pin d2 to push button top right
5v to push button bottom left
take out resistor 1k ohm from push button bottom right to gnd
Plug the led into the breadboard.
pin d8 to LED positive
gnd to LED negative
Arduino 2 (Mine is the uno)
Plug the bluetooth module into the breadboard opposite the nano setup.
5v to vcc on bluetooth module
gnd to gnd on bluetooth module
pin d9 to key pin on bluetooth module
pin d10 to txd on bluetooth module
pin d11 to rxd on bluetooth module
Plug the led into the breadboard.
pin d8 to LED positive
gnd to LED negative

Step 4: Entering AT Mode

Picture of Entering AT Mode
If you have a button on your HC-05
First, upload the code named BluetoothModuleMasterAndSlaveNoCode below to whatever arduino is connected to the bluetooth module you are currently configuring.
Next, unplug the power to your bluetooth module, hold the button down, and plug the power back in, then release the button. This should put the bluetooth module into AT mode causing it to blink on, and off every 2 seconds, as seen in the video above.
If you don't have a button on your HC-05
First, upload the code named MasterAndSlaveBluetoothNoCodeKeyPin below to whatever arduino is connected to the bluetooth module you are currently configuring.
This should cause your HC-05 to enter into AT mode when the arduino is refreshed, to do this... before you plug in the USB cable to the arduino, unplug the power pin which goes to the bluetooth module, this is the 5v pin. Now, plug the power pin in, and the HC-05 should be blinking on, and off every 2 seconds, signifying at mode.
If this doesn't work, please check out techbitar's tutorial, and then come back for the next step..
http://www.instructables.com/id/Modify-The-HC-05-Bluetooth-Module-Defaults-Using-A/

Step 5: Entering AT commands, and uploading the code!

For The Slave Module (Whichever one you want to be the slave Hint: It doesn't matter!)
1. Connect to the computer to the port connected to the arduino which is connected to the bluetooth module you wish to configure.
2. Open Serial Monitor
3. Select 9600 as your baud rate, and both nl, and cr. If this config doesn't work, comment below, or go to one of the other links, and I will try to help.
4. Now, type AT, and hit enter. You should get a message saying OK, but if you get an error, try one more time until you seek help.
5. If that works, type AT+UART, and press enter to show your baud rate. It should be 38400, if it is, move on, if not, try the next step, then check again using this command. The baud rate must be the same for both modules, and this is often where things go wrong. If the next step doesn't fix it, leave a comment.
6. Next, type AT+ORGL, and press enter.
7. Finally, type AT+ADDR, and press enter. You should get an address like the one shown in the video 2016:3:250491, or something similar. Write this down, you will need it later.
8. Close the serial monitor, unplug, and re-plug in the arduino, and upload the code called B_SlaveLink below.
For The Master Module (The other one that will be controlling the link.)
1. Connect to the computer to the port connected to the arduino which is connected to the bluetooth module you wish to configure (not the same one as before, which is now the slave).
2. Follow Steps 2-6 above.
3. Now, type AT+BIND=2016,3,250491 obviously with your respective address to the slave. Note the commas instead of colons given by the slave module.
4. Alternatively, you may type AT+CMODE=1, and press enter. This will connect to all bluetooth modules within range, but does not work when you have more than two.
5. Close the serial monitor, unplug, and re-plug in the arduino, and upload the code called B-Master below.
6. Close all instances of the arduino IDE. This will counter any linkage, limiting the functioning of the program to only as long as it is initially plugged in.
7. The program should work now. If it doesn't, check your wiring, and look at the next step.

Step 6: Further Debugging, and Beyond

What should happen?
The modules should auto link when plugged in, and when the button is pressed, both LED's should blink.
What to do if it doesn't work!
1. Pressing the button doesn't do anything: Either your wiring is wrong, or the code got corrupted, and you should re-upload.
2. Pressing the button only causes the LED connected to it to turn on: Your HC-05's are not linked, so try some of the other tutorials below, and leave a comment.
3. The LED's are always off, or on: Your button is wired incorrectly.
3. My LED is still blinking slowly: Unplug for 30 seconds, and plug back in.
4. I am not getting any messages in the serial monitor: Check the comm port you are connected to, and that the type of arduino matches up with the one you are programming to. Make sure both nl, and cr are set, and that the baud rate is correct.
5. Any other issues, or suggestions: Post a comment.
Note: The LED's on the bluetooth modules will go out of sink after a while, this does not mean that the bluetooth connection has stopped.

Make Arduino Music

Picture of Let's Make Arduino Music
Hi,
SimpleCircuit here with a simple musical project. This Instructable is an extension of several previous Instructables and tutorials, so a tip of the hat to “Arduino-Music” and “Demotime – Arduino Music” by Misperry, “How to easily play music with buzzer on Arduino (The Imperial March – STAR WARS)” by eserra, and “Simple 12 Note Piano” by bprew1, to name just a few. However, these projects require that melodies be hard coded in Arduino sketches. This project consists of two programs for composing and playing melodies on the Arduino without having to enter or modify any code.

Step 1: Stuff needed for this project

Picture of Stuff needed for this project
Materials
Arduino board (I used an Arduino Uno for this project but almost any Arduino will do – check pin assignments for the SD card module for different boards.
SD card module
Breadboard and hookup wire
11 push button switches (optional)
The Hardware
Hardware configurations for the ArduinoMusic and SD_Card_Music sketches are very simple and are shown in the figures above. I used a speaker from an old home theater surround system which produced fairly decent tone reproduction, but a simple 8 ohm speaker will do. The Arduino output pin (A2) provided adequate power for my speaker. Some people recommend placing a 100 ohm shunt resistor in series between the tone output pin of the Arduino and the positive speaker (or buzzer) lead. I didn’t find this necessary.
The optional push button piano with its pin assignments is shown in the top figure. Some makers recommend placing a 10K ohm resistor in series with the ground pin of each push button to eliminate any possible feedback. I did not find feedback to be a problem, so to keep things simple, no resistors. The piano can only be used with the ArduinoMusic sketch since digital pin assignments are different in the SD_Card_Music sketch. The piano() function in the loop function of the ArduinoMusic sketch must be uncommented to use the piano.
The Arduino - SD card configuration is shown in the bottom figure. Aduino Uno pin assignments for the SD card module used for the SD_Card_Music sketch are:
Vcc = Arduino 5V
GND = GND
MOSI = digital pin 11
MISO = digital pin 12
CLK = digital pin 13
CS = digital pin 4
These pin assignments may vary for other Arduino boards so the pin assignments in the SD sketch will have to be changed accordingly.

Step 2: The Software

While the hardware configurations are really simple, the code, not so much. You can download the program sketches at https://github.com/SimpleCircuit/Arduino-Music . Click on the green download button and download and open the zip file that contains both the ArduinoMusic and SD_Card_Music sketches. Copy these to your Arduino sketch folder. Or, you can open each text file below and copy the code to a new Arduino sketch. The first option may be more reliable.
The musical characters and note frequencies are stored in arrays in program memory, of which only about 30% is used by the ArduinoMusic sketch and about 60% by the SD_Card_Music sketch, so additional note octaves could added as required. Any code can be improved upon and mine is no exception, so suggestions for improvements are always welcome. And, of course, please report any bugs that are found so I can fix them.

Step 3: The Music

The intent of this Instructable is not to reinvent the wheel, but to improve it. The code representing musical composition for the Arduino has been presented many times before with minor variations. Notes, rests, and note values (note duration) are assigned to variables that Arduino interprets and outputs as tones of proper frequency and duration. This is essentially Arduino “MIDI” music.
Check out the site, readsheetmusic.info/readingmusic.shtml, for a beginner's guide to reading music if needed. I will cover a few concepts that may help when entering music in the sketches. (Those of you with a musical background can skip this paragraph). Musical sketches written for Arduino are usually based on piano key frequencies. The keys on a piano are divided into octaves, beginning with a C note and ending with the next C note in succession (C,D,E,F,G,A,B,nextC). The piano keyboard contains 7 complete octaves, numbered 1 to 7 from left (lowest C) to right (highest C). Notes are followed by the number of the octave in which they are located, so C4 would be the beginning note in the fourth octave. C4 is also called middle C since the fourth octave is also the middle octave on the keyboard. One last point – the same note doubles in frequency every time it moves up an octave. For example, A3 has a frequency of 220 Hz, A4 has a frequency of 440 Hz, and A5 a frequency of 880 Hz.
Notes
The following characters represent the 3 octaves of notes available for this project:
c3, c#3, d3 d#3, e3, f3, f#3, g3, g#3, a3, a#3, b3, c, c#, d, d#, e, f, f#, g, g#, a, a#, b, c5, c#5, d5, d#5, e5, f5, f#5, g5, g#5, a5, a#5, b5, and c6.
These characters are entered into the programs exactly as they are written here. I’ve used lower case letters and dropped the 4 from the notes of the middle octave to simplify data entry (I hope). There are no flat notes because every flat note is the same as the sharp of the lower note next to it. So if a melody has a B-flat, use the equivalent a# instead.
Note Values (note duration)
The following note values are available in the sketches:
1, 1., 2, 2., 4, 4., 8, 8., and 16.
1 represents a whole note, 2 a half note, 4 a quarter note, 8 an eighth note, and 16 a sixteenth note.The quarter note is the default for this project because a majority of music is written in quarter time (3/4, 4/4, etc.), with a quarter note getting one beat. I set the duration of one beat to 400 milliseconds because it sounded about right to me. This can be changed by changing the value of the #define beat statement at the beginning of each sketch. A quarter note will last 400 msec, a half note 800 msec, an eighth note 200 msec. There are also dotted notes available (1., 2., 4., and 8.) A dotted note has a note value one and a half times that of the note. For example, a dotted quarter note is held for a beat and a half, or in our case, 600 msec. Note values are entered before the note whose value is to be changed.
Ex: a<>g<>a<>g<>2<>c5<>4<>a<>g<>a<>g<> (<> = ENTER)
In this example, the note sequence is entered from the serial monitor using the ArduinoMusic sketch. The first 4 notes are quarter notes (the default), entering 2 changes c5 to a half note, and 4 changes the last 4 notes back to quarter notes.
Rests
The sketches contain the following rest values:
r1, r2, r4, r4., r8, and r16.
Rests are periods of silence in a musical score, and are analogous to note values - r1 is a whole rest, r2 a half rest, and so forth. Entering r4 would result in one beat of silence; entering r16 would produce ¼ beat of silence. There is one dotted rest (r4.).
Play the Morse code file which uses a combination of note values and rests. The code spells out the time-honored programmer's phrase, "HELLO WORLD".

Step 4: The Sketches

Picture of The Sketches
ArduinoMusic Sketch
The ArduinoMusic sketch enables you to enter and play music using Arduino’s serial monitor. Compile and upload the sketch, and open the serial monitor. The following message will print, “Set serial monitor to [Newline] and enter musical composition characters, one at a time.”. Enter the music, one character at a time and press ENTER after typing each character. The note buffer can hold up to 120 characters. Type “play” and ENTER to play the melody after all characters have been entered. You can play the music as many times as you like until the note buffer is cleared. Press the Arduino reset button or close the serial monitor to purge the note buffer.
So let's try an example. We'll enter and play the top staff (double set of 5 lines containing the notes) in the figure above. The staff contains 5 measures (time periods) of notes which are delineated by vertical lines.The first note in the music is a half note G4, so the first two characters to enter are 2 (change to half note) and g (note G4). Keep going till everything is entered.
The full character sequence looks like this:
2<>g<>4.<>g<>8<>a<>4<>b<>g<>b<>d5<>2<>g5<>4.<>b5<>8<>a5<>4<>g5<>d5<>b<>g<>2<>c5<>4<>e5<>c5<>play<> (<> = ENTER)
Play the Scotland file to hear the result.
SD_Card_Music Sketch
The serial monitor is great for developing compositions or entering simple melodies on the fly, but it has its limitations. It is first and foremost a code debugging tool – it has no text editing or data storage capabilities. If a wrong note is entered, there’s no way to take it back, and there’s no way to store a melody once it’s entered using the ArduinoMusic sketch. The SD_Card_Music sketch addresses these issues.
Using this sketch is a two part process. The first step is to write some music and store it in a file on an SD card. You can use any simple text editor to do this. I use Notepad since I have a Windows based system. To write a melody, type each character and follow it with a comma (no spaces).
Ex: c,d,e,f,g,a,b,c5,
When finished composing, store each melody on the SD card as a plain text file with the extension, .txt. File names need to be 8 letters or less.
Now for step 2. Insert the SD card in its module and make sure the module is correctly configured with the Arduino board. Compile and upload the SD_Card_Music sketch, then open the serial monitor. If everything is hooked up correctly, the serial monitor will print the message, "SD Initialization done...". Type in the name of the file you want to play and include the .txt extension (ex. flute.txt). If the filename has been entered correctly the following will happen:
The serial monitor will display the message, "filename.txt exists", the music will play, the serial monitor will print each note as it's played, and after the music has finished the monitor will display the number of characters in the file.

Step 5: Wrapping Up

Well, that's the nuts and bolts of this Instructable. I started this project to improve my programming skills, but in the end it was just a lot of fun messing around with simple melodies and learning a little more about music composition. I hope you find it as much fun and as educational as I have.
A good site for lots of free sheet music that is perfect for this project is http://www.8notes.com . I have also included several melodies in the attached pdf file that are ready to play in ArduinoMusic or loaded into files for SD_Card_Music.
I'll add one last song (Bamboo Flute 1) to inspire you to compose a simple symphony.
SimpleCircuit saying So Long

DIY mini Amplifier using TDA2822

Picture of DIY mini Amplifier using TDA2822
Building a homemade amplifier using TDA2822
Follow the steps here or watch the video to make your own amplifier

Step 1: Things Required

1. 10k Potentiometer
2. 100uF / 16 volt Capacitor
3. TDA2822
4. 10 Ohm Resistor (3)
5. 0.1uF Ceramic Capacitor (2)
6. 0.01uF Ceramic Capacitor
7. 10uF / 50 Volt Capacitor
8. 3.5 mm Male & Female Jack
9. Switch
10. USB Cable
11. PCB Board, Wires, Battery
12. Soldering Rod. Soldering Wire & Soldering Paste
13. Enclosure for Amplifier
14. Insulation Tape & Scissor

Step 2: Circuit Diagram & TDA2822 Pin Configuration

Picture of Circuit Diagram & TDA2822 Pin Configuration
11.jpg

Step 3: Construction

Picture of Construction
13.jpg
14.jpg
15.jpg
16.jpg
18.jpg
Make all the necessary connection according to the Circuit Diagram as shown in the previous step

Step 4: Finished Images

Picture of Finished Images
18.jpg
Enjoy Making !!!
--------------------------------------------------------------------------------------
Buying Links:
India
TDA2822 - http://amzn.to/29PvfLD
10 K Potentiometer - http://amzn.to/2a1EA0R
Capacitors, Resistors & Other items - http://amzn.to/29GbUwT
Switch - http://amzn.to/29SqL6Z
Hot Glue Gun - http://amzn.to/29HEslT
Soldering Kit - http://amzn.to/29P00wv
Wires - http://amzn.to/29GdPBl
Battery - http://amzn.to/29HEp9E
PCB Board - http://amzn.to/29Ged2O
Scissor - http://amzn.to/29P2ECE
Insulation Tape - http://amzn.to/29HGzpJ
USB Cable - http://amzn.to/2a5dCWj
3.5 mm Jack - http://amzn.to/2a5dSEL
US:
TDA2822 - http://amzn.to/29NTxax
10 K Potentiometer - http://amzn.to/29FTYlS
Capacitors, Resistors & Other items - http://amzn.to/29P7K48
Switch - http://amzn.to/29Pd2wh
Hot Glue Gun - http://amzn.to/29PatKQ
Soldering Kit - http://amzn.to/29PayhG
Wires - http://amzn.to/29ISSRY
Battery - http://amzn.to/29Pb6UO
PCB Board - http://amzn.to/29OhN89
Insulation Tape - http://amzn.to/2amGYhY
Scissor - http://amzn.to/29Ofqqh
USB Cable - http://amzn.to/29PfJy5
3.5mm Jack - http://amzn.to/29O1mqE
--------------------------------------------------------------------------------------
TEST VIDEO CLICK HERE 

RC CONTROLLER WITH CAMERA

Picture of RC CONTROLLER WITH CAMERA
FOR ORIGINAL DESCRIPTION, CLICK HERE

About this project?
  • Direction control via Android
  • Video streaming from RC-Car to mobile phone simultaneously
  • Follow Me (Very Soon)
Materials
  • Arduino Nano * Raspberry Pi
  • Raspberry Pi Camera Module
  • L298N Motor Drive * DC MOTOR X 2
  • 12V Lipo Battery * Car Frame (Body)

Step 1: Arduino

Picture of Arduino
PURPOSE AND TASKS:
  • Arduino was used for motor control.
  • Arduino and Raspberry Pi were connected by serial communication.
  • Before PWM signal interval which will be sent from Android phone to Arduino don't transfer, this signal was calculated. (Because of the next updates and easily interfere to PWM variable by users.)
  • The Raspberry Pi provides the Wi-Fi communication with Arduino and the user (Android phone).
  • In the following section, we show the circuit schematic for Raspberry Pi, Raspberry Pi Camera, Arduino, L298N Motor Driver, motors and batteries.
SETTING UP ARDUINO AND PIN CONNECTION SCHEMATIC
  • Data which come to Arduino is sent as a PWM interval that go to the motors directly. There are two values `+ (forward)` or `- (backward)` for decide direction with PWM value.
  • Above-mentioned situations is considered by us, there can be made various modifications.
  • PWM interval is between` 0-255.`
  • RIGHT AND LEFT motor PWMs' and servo motor angle is taken as a String(e.g. `200:200!888`) from phone. This String value is splitted with `:` and `!` characters and created the array that has 3 elements.
  • The value after the `!` character is the servo motor's angle value which connected with camera. Servo motor is not used in this project.
Motor Moving, PWM data and situations of the car
Example:
0:0 //stop
200:200 // move forward. (2 motors work with 200pwm)
200:-200 //move backward. (2 motors work with 200pwm)
200:-200 // left motor turns 200 pwm to forward, right motor turns 200 pwm to backward (The car turns its around from left to right.)
200:-200 // left motor turns 200 pwm to backward, right motor turns 200 pwm to forward (The car turns its around from right to left.)
200:100 // The car moves as turning to the right.
https://github.com/zafersn/WiFi-RC-Controller-With-Camera/blob/master/images/wificontrol.png
  • Connections among Arduino, Raspberry pi,Raspberry pi camera module, L298N motor driver, Motors and Power Supply are set up as above picture.
  • After connected Arduino pins and Raspberry pi as above picture, we can load our codes to Arduino. That do by this sequence:
  • Detail information about Arduino codes is placed in that codes.
  • Download `androidToRaspberry.ino` file and open this file with double click.
  • For uploading that project file to Arduino, first you must select the Arduino model from `Tools => Board` menu.
https://github.com/zafersn/WiFi-RC-Controller-With-Camera/blob/master/images/ra1.png
  • Again from `Tools` menu, you must show which port plugged to Arduino board. `Tools => port`
  • After realize all steps, now you can upload the codes to Arduino board. You can complete the uploading process by pressing `Upload` button from left-up corner of the program.
https://github.com/zafersn/WiFi-RC-Controller-With-Camera/blob/master/images/ra2.png

Step 2: RASPBERRY PI:

Picture of RASPBERRY PI:
PURPOSE AND MISSIONS:
  • Taking video stream with Raspberry Pi camera module and trasfer that stream to phone via Raspberry pi.
  • Connection between Arduino and Android phone.
RASPBERRY PI SETUP:
We need some additional packages for can work our application. These are;
GSTREAMER1.0 :
After connect with SSH, we must type that in order:
I. Write `sudo nano /etc/apt/sources.list` and press Enter. From coming screen;
https://github.com/zafersn/WiFi-RC-Controller-With...
II. Write `deb http://vontaene.de/raspbian-updates/ . main` command and exit the page with CTRL + O ==> Y
https://github.com/zafersn/WiFi-RC-Controller-With...
III. Write `sudo apt-get update` and get latest updates.
https://github.com/zafersn/WiFi-RC-Controller-With...
Then by turns, apply that steps:
IV. `sudo apt-get dist-upgrade`
V. `sudo reboot`
VI. `sudo apt-get install gstreamer-1.0`
https://github.com/zafersn/WiFi-RC-Controller-With...
VII.`sudo apt-get install gstreamer1.0-tools`
And after this steps, we installed gstreamer package.
SETUP MAIN FILE:
Now we install the main file of the application;
  • We are downloading our GitHub file in Raspberry pi terminal screen. git clone https://github.com/zafersn/Wi-Fi-Gstreamer-Server.git
  • Also with `ls` command with control that file. The file which we downloaded is shown as a `Wi-Fi-Gstreamer-Server` name.
  • Write `cd Wi-Fi-Gstreamer-Server` and enter in the file. You can see with `ls` command a `robotcontrolV1.pyc` named python application.
  • We need to move this file with `sudo cp robotcontrolV1.pyc /home/pi` command to our `/home/pi` directory. If you can't do this, application is not working correctly.
  • https://github.com/zafersn/WiFi-RC-Controller-With...
  • In case of skip that steps successfully, we give our first start on the Raspberry Pi manually. Because, this is useful for us to see working this application.
  • Execute the application manually: execute the program with `sudo python robotcontrolV1.pyc` command in main terminal. If you are setting up until this step successfully, you must see `Client Baglantisi Bekleniyor...` print.
  • Last, you try to conncect from Android phone to Raspberry Pi via our application.
  • If we are execute our Python code (`robotcontrolV1.pyc`) in Raspberry Pi manually, our phone's IP and port informations will appear in the screen when we connect from Android.
FOR ORIGINAL DESCRIPTION, CLICK HERE

Step 3: ANDROID

Picture of ANDROID
PURPOSE AND MISSIONS:
  • Maintaining control of RC-Car that made from Android and Raspberry Pi.
  • Simple and pure design for user.
  • Taking video stream via Raspberry Pi and show this to user.
INSTALL ANDROID APPLICATION:
  • There are two application for car control; that are pro and demo versions of the application. There is no difference between pro and demo version of the application in point of using features. Only in demo version using count of the application is restricted. This using count is 30 and this can be increased and decreased by administator. (Note: When calculaing of the using count, there won't be used entering to application or exiting from application, there will be used in connecting and controlling from Android to RC-Car successfully. For increasing using count in that case, system must work as a whole. Peace of mind there can be downloaded the application and there can be used the system as a freeware from your side.)
  • https://play.google.com/store/apps/details?id=com....
  • https://play.google.com/store/apps/details?id=com....
  • When above-mentioned case is considered, installing of the application is very simple. Only after enter the ANDROID GOOGLE PLAY market, you can type in searching box com.stackcuriosity.tooght or application name RC CONTROLLER WITH CAMERA for directly access to application.
USING THE APPLICATION AND HINTS
Raspberry Pi Connection Informations
APPLICATION DETAILS
1. EXPLAINING OF THE VISUAL DESIGN AND PROGRAMMING LOGIC
Our application rely on 3 basis. These are;


I. Provide direction control of the car.

II. Transfer live video streaming from car to user.

III. Follow Me (Vey Soon). (Following the car its owner.)
To that 3 basis;
  • Main details using direction control of the car was told in `Arduino` section. If we explain to the Android side, there will be available `Seek bar (Velocity setting)` and `Arrow keys`.
  • ![Screen Shot](images/device-2016-06-30-195734 english information.png)
  • Seek bar(Velocity setting) is created from 15 slice and velocity coefficient is 17. So any move of the Seek bar, there will be changing 17 and its multiples. For instance, If Seek bar in fifth order, produced pwm = 5*17 = 85. * Arrow keys provide seperating directions of data which take from Seek bar(Velocity setting). For moving direction of the car, `+` or `-` sign come to head of the PWM value.
For example:
200:200 // move forward. (2 motors work with 200pwm)

200:-200 //move backward. (2 motors work with 200pwm)

200:-200 // left motor turns 200 pwm to forward, right motor turns 200 pwm to backward (The car turns its around from left to right.)

200:-200 // left motor turns 200 pwm to backward, right motor turns 200 pwm to forward (The car turns its around from right to left.)

200:100 // The car moves as turning to the right.

2.SENSITIVITY IN TURNING LEFT AND RIGHT
ICON OF OUR APPLICATION:
https://github.com/zafersn/WiFi-RC-Controller-With-Camera/tree/master/images/raspi_car.png

English translator: Mustafa YEMURAL
Thanks Mr. YEMURAL


FOR ORIGINAL DESCRIPTION, CLICK HERE

Step 4: TEST VÄ°DEO

VIDEO