Vous êtes sur la page 1sur 105

Best

Arduino Automation Project


Index Of Contents
Best Arduino Automation Project
1. Arduino Powered Service Elevator
1. Three Phase Motor Wiring
2. Ground Detection
3. Motor Up and Down control
4. Flyback diode for extra safety
5. User Input Manipulate
6. Isolation Of Control From Inputs
2. Arduino Digital Light
Schematics
CODE
3. Arduino Low Cost High Power Motor Driver 1 to 220V
Schematics
Code
4. Power Saving with Arduino
1. Hardware & Block Diagram
2. Programming Attiny with Arduino
3. Software Program And the Flow Chart
4. Configuring The Machine
5. Energy Saving Verification
6. Scope of Upgrades
7. Caveats
Schematics
Code
5. Make an Autonomous "Follow Me" Cooler
1. How We built It
2. Electronics
3. Motorized Lid
4. Preparing Your Blynk App
5. Custom Elements and Enclosures
Code
6. Control Electronics By Sliding Your Phone
Step 1: Materials Required
Step 2: Approximately 1SHEELD
Step 3: Area Your 1sheeld Efficaciously
Step 4: Download 1sheeld Library
Step 5: The Code
Step 6: Add The Code
Step 7: Down load 1sheeld App
Step 8: Solder The Resistor to LED
Step 9: In addition Uses
SCHEMATIC
CODE
7. Touch Display: Game "Flappy Bird"
How "Flappy chook" works
CODE
8. Intel Arduino 101 BLE Blynk Tank
Parts
Hardware
Wiring
Blynk App
Arduino Software
Its Time To Going
Code
9. Christmas Neopixel Led Strip
Schematic
Code
10. Digital Dashboard
Schematic
11. Android App-Based Home Automation System Using IOT
Conditions
Step 1- wire Up the complete gadget
Step 2- Create Temboo Account and set up Dropbox API
Step 3: Installing Drivers in Arduino Yun
Step 4: stay Video Surveillance
Step 5: Putting in place Twilio Account for textual content messages
Step 6: Putting In place blynk account and configuring blynk app
Voice controlled operations of devices
12. Chatbot Controlled Robotic Arm
Summary
Hardware
Software Program
Schematic
Code
13. Traffic Light Information System
Intro
Example
How we've made it?
Instructions
Schematics


Wouldnt it's exquisite to water your greenhouse with out leaving your chair, or
open your garage door remotely?
Rather than permit your Arduino sit down on a shelf amassing dust (were all
responsible of that occasionally), have interaction it as the key issue of some
home automation projects. Weve compiled this list of 5 to show you simply
what is feasible.
One of the super matters about Arduino home automation projects is that with
the addition of an Ethernet protect, you can flip your Arduino into a web-
connected tool, able to transfer lighting, TVs, coffee machines pretty a lot
something you may think of on and off, the use of both a browser-primarily
based interface or a timer. See my littleBits infra-crimson mild transfer challenge
for a evidence of idea the identical can be completed with an Arduino.
1. Arduino Powered Service Elevator
Layout and take a look at a manipulate device for a provider raise working for
four floors. The microcontroller (ATMega2560) is used to decide which
contactor to provide strength for you to set off the carry motor to transport the
raise up or down by means of checking the floor the lift is currently at. The
control gadget ought to be additionally capable of prevent the energy to the lift
whilst it has reached the desired floor. An integral safety factor must be
implemented to continually close the lift door earlier than transferring up or
down. The manage device is successfully able to determine which contactor
wishes to be powered which will circulate the elevate to the desired ground. The
gadget is able to manipulate the protection carry door motor for you to near the
door whilst the elevate wishes to transport and open the door automatically while
it has reached the specified ground.
1. Three Phase Motor Wiring

A three section motor is used in this software as this is requires a powerful motor
which could cope with a heavy load. The 3 section motor is powered via the
primary 3 phase strength. power through the mains runs thru two fundamental
contactors. while the primary contactor is switched on and the second contactor
is switched off, power runs via the primary contactor to the winding of the motor
which moves the motor inside the forward direction.
when the second one contactor is switched on and the primary contactor is
switched off, power runs thru the second contactor to the winding of the motor
which actions the motor within the backward direction. word that the wiring is
different for the reverse course.
2. Ground Detection
so one can stumble on the floor the raise is presently at, a restrict switch is used.
because the elevate movements up or down it closes and opens a restriction turn
on each floor. when the lift is at a specific ground the limit floor at that particular
floor is closed indicating to the microcontroller the ground the elevate is at.
because the carry actions the limit switch opens indicating to the microcontroller
that the lift is transferring.

The transition from low to excessive signal produced with the aid of the limit
transfer whilst the lift moves through a floor takes place in a fragment of a
second and regularly too quick to be detected by way of the microcontroller. The
restriction switches are related to a 5V DC supply and the output from the
NO(commonly Open) terminal is hooked up to an IO pin of the microcontroller.
4 limit switches at four flooring ship facts to the microcontroller. This enables
the microcontroller to determine the ground the elevate is at with the aid of
checking which pin went from low to excessive. The transition of a restrict
switchs nation is proven inside the diagram underneath:
The problematic challenge is to permit the microcontroller to hit upon the
transition from low to excessive. There are two methods to method this problem.
First technique is to decide if a restrict transfer pin is going excessive in the loop
characteristic using an if circumstance. the program basically whilst executing
other code continually tests if a pin is going high. This takes up a variety of
reminiscence as the application is continuously searching out a high sign from a
limit transfer pin. every other problem is that occasionally the program might
leave out this transition as the loop feature turned into executing a few other
code while a transition takes place. if you want to avoid those troubles,
Interrupts are used. Interrupts essentially pause the execution of code and
execute a separate feature while a selected interrupt circumstance is satisfied.
This is right for the carry operation. whilst a restriction transfer pin goes from
low to excessive an interrupt characteristic is executed and this function tests if
the lift is on the modern-day floor and stops the lift or allow it to move further.
for the reason that application is forced to execute the interrupt feature whilst a
restrict switch is switched the system can ensure that this system does now not
intentionally skip detecting a ground.
The microcontroller used for this application is the Arduino Mega 2560 which
has 6 digital pins usable for interrupts which is ideal to use for the 4 flooring. the
first parameter to attachInterrupt is an interrupt quantity. usually you have to use
digitalPinToInterrupt(pin) to translate the actual digital pin to the precise
interrupt range. as an instance, in case you connect with pin 3, use
digitalPinToInterrupt(3) because the first parameter to attachInterrupt. it's also
critical to note that the put off() function receivedt work in the function
accomplished by way of the Interrupt provider habitual(ISR).
The diagram above shows how the restriction switches are related to the MCU.
The pins in the MCU are related through a pull down resistor. This resistor pulls
down the pin of the MCU to floor to ensure that a LOW voltage analyzing is
examine through the MCU when the restriction switch is left open. The resistor
configuration is proven within the diagram underneath.
3. Motor Up and Down control
two 12V DC relays are used to interchange AC electricity to the contactors of
the motor which manipulate its path (either Up or Down). The circuit designed
using Multisim is shown within the diagram underneath:

One cease of the coil contactor of each the relays are related to the 12V DC
supply through a PNP transistor. the primary reason of doing that is to ensure
that the Motor isn't always supplied energy until the raise door is closed. as soon
as the lift door is closed, the DoorSwitch output pin to the gate of the PNP
transistor is pulled to floor ensuring that the PNP is became directly to offer the
VCC strength to both the relays. consequently the relay isn't became on even
though the MotorUp or MotorDown signal is excessive. the alternative end of
the relay coil is pulled to ground via a NPN transistor. The MotorUp signal is
generated from the MCU. whilst the MotorUp sign is excessive, the primary
NPN transistor is activated and it pulls the other coil contact to floor to complete
the circuit to energy the coil of the Up Relay to electricity the motor. The
identical method is used to set off the Down Relay. motives for the usage of
transistors to replace the Relays are:
Each relays have 12VDC coils, therefore it's far essential to apply a PNP
transistor to exchange the high facet (12V) part of the coil because the
MCU is best able to generating 5V which is not enough to show the relay
coil on.

Transistors can be used to switch on the relay by means of the use of
minimum current from the MCU as little cutting-edge thru the base of the
transistor turns on it. this protects power in the MCU when it wishes to
interchange the relays.

It additionally isolates the MCU from any back current that can float back
to the pin of the MCU which could probably damage the MCU.

4. Flyback diode for extra safety
A Flyback diode is hooked up throughout the coil contacts of the relay to ensure
that the back current has a course to drift while the coil is switched on and
rancid. Inductive hundreds together with a coil in the relay create unexpected
voltage spikes while the deliver modern-day is interrupted. This adds extra
protection to the MCU. The diagram underneath shows a way to connect a
flyback diode throughout the coil contactors of the relay.
5. User Input Manipulate
consumer controls the operation of the elevate through ground buttons. There are
4 floor push buttons, while pressed indicates to the microcontroller that the lift
wishes to be brought to the desired floor.

A push button when pressed momentarily creates a excessive signal and a then
LOW signal when the user releases the button. The challenge of the
microcontroller is to pick out a excessive signal from a floor button pressed by
using the consumer. This unique mission need now not be handled through an
interrupt. so long as the person presses the button for a sufficient time period the
MCU is able to sign up the signal from the button. the next venture of the
microcontroller is to evaluate whether or not to show the Up or Down motor
depending on the person enter and the current ground of the elevate.

With smart programming through microcontrollers we can get rid of extra


hardware that might have been required if a gadget is designed basically through
common sense and analog. The previous machine for the lift required an
additional directional transfer as proven within the diagram beneath changed into
used to enable the system to pick out the course the elevate is travelling (Up or
down).

however via designing an set of rules to hold the modern-day ground of the raise
in a variable and comparing it to the input from the consumer enabled the device
to absolutely rid of the directional switches to decide the course the raise ought
to move so as to get to the desired ground. as an example: within the input and
floor sense connections to MCU diagram proven above, the carry is indicating to
the MCU that it is on the second ground thru Pin three. Then the person inputs
through pushing the Fourth ground button. The MCU receives this command and
compares the 2 inputs. because the enter from the person, four is greater than
the enter from the restriction switch, 2 the MCU sends a sign thru the
MotorUp Pin to prompt the transistor to power the Up relay.
because the carry movements up, the modern-day ground variable in the
software gets up to date while it receives to the 1/3 ground. As quickly as a limit
transfer is triggered it's miles as compared to the input value from the person
which in this example is four and once more compares this fee to the up to
date modern ground to determine if the carry has approached the favored
ground. as soon as the fourth ground restrict switch is caused, the MCU
identifies that the carry has approached the fourth floor and sends a LOW sign
thru the Motor Up signal pin to prevent power to the motor to save you it from
shifting further.
6. Isolation Of Control From Inputs
every other vital component is to isolate the DC manage facet of the
microcontroller from any AC interference that might have an effect on the MCU
thru the inputs of the machine. A hassle i was faced given that I did now not
have any isolation hardware established to start with, AC interference which
originated from the metallic body of the lift became transferred to the MCU
through the restrict switches. even though the limit switches function on a
separate DC supply, enter from the restrict switches are directly fed to the
microcontroller, interference then happens whilst the elevate starts moving and
because of this AC interference the MCU isn't capable to correctly discover the
ground the lift is at. To counteract this issue an Optocoupler turned into used for
every enter to isolate the MCU from out of doors interference.

The motive of the optocoupler is to transfer the input signal generated from the
ground limit switch to the MCU through an LED and phototransistor. when the
limit switch is closed the LED is powered up and the incoming mild from the
LED turns on the gate of the phototransistor which then transfers a high sign to
the MCU successfully isolating the input from the outside and the MCU7.
2. Arduino Digital Light

the primary goal of the undertaking is to reveal one of the feasible applications
of the Octowide virtual light modules. This modules can be purchased on Ebay
with wattages of 1W, 2W, 3W and 2 extraordinary colour temperatures: warm
White 2700K and bloodless White 5000K.
every module has multiple pads to solder wires and/or connect with different
modules. On every aspect you may locate 12V / GND / 3.3V signal to connect to
a uC (like the Arduino) and PWM manipulate each module (or organization of
modules).
on this application we used 4 modules (2 warm / 2 bloodless White) so that we
should tweak the coloration temperature additionally.
you will find all of the technical info concerning the Octowide light digital
modules on the datasheet, to be had at: http://www.octowide.com/octowide-
mild-datasheet-en.pdf
Schematics

CODE
With this code you may be capable of control 2 units of octowide light with an
infrared far flung controller - tweaking the brightness, colour temperature and
fade velocity.
Download Here
3. Arduino Low Cost High Power
Motor Driver 1 to 220V
I decided to make this venture because after I make any project with motors and
use a motor driver, it consumes lot of power and yields low performance. due to
this, every so often projects might not work nicely. And so that is the reasoning
behind this challenge.
Schematics
Off Condition
Code
Motor DriverArduino
const int in1 = 9;
const int in2 = 8;
const int in3 = 4;
const int in4 = 3;

void setup() {
pinMode (in1, OUTPUT);
pinMode (in2, OUTPUT);
pinMode (in3, OUTPUT);
pinMode (in4, OUTPUT);

}

void loop() {
//Move Farword
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
digitalWrite(in3, HIGH);
digitalWrite(in4, LOW);
delay(2000);

//Move Reverse
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
digitalWrite(in3, LOW);
digitalWrite(in4, HIGH);
delay(2000);

//Move Left
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
digitalWrite(in3, LOW);
digitalWrite(in4, HIGH);
delay(2000);

//Move Right
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
digitalWrite(in3, HIGH);
digitalWrite(in4, LOW);
delay(2000);


}
4. Power Saving with Arduino
Almost each present day microcontroller comes with strength saving / sleep
functions to reduce the energy consumption of the system.
blessings of Low electricity/Sleep in initiatives/products
Longer battery existence from months up to years
less protection
surroundings friendly, reduces carbon emission (consider billions of
microcontrollers products)
Reduces operation value
allows far flung operation
but there may be a trouble, when you build a mission using a development board
as opposed to simply using the naked microcontroller, sleep is not going to store
energy.
most development forums have a energy LED that's constantly on. There are
debugging circuits and sensors on board which devour power even though the
number one MCU is sleeping. another culprit is on board voltage regulator
which attracts quiescent current all of the time. development boards are USB
powered and run on 5 volts however the MCU at the board usually runs on 1.8
Volts to a few.6 Volts. lots of strength is wasted even if the principle MCU is
snoozing.

right here is a pleasant article on this rely from Sparkfun.
the solution is simple: use every other naked bone low strength microcontroller
to control the electricity for the whole improvement board. right here, my answer
is to apply a Attiny 84 to periodically on and rancid the development board as
required. The timing may be person programmed. The device will energy down
each itself and the improvement board that is powered through it.
1. Hardware & Block Diagram
The device is built the usage of an Attiny84 microcontroller, an RGB LED for
reputation, 2 push switches for person placing and reset, one n-MOSFET for
electricity manage, a few bypass capacitors, resistors and a opposite polarity
safety diode.

working voltage variety is three volts to six volts, making it ideal for 2/three/4
AA or AAA battery-powered / USB-powered / single cell LiPo-powered
(with/with out sun) answers viable.

strength may be input via Screw Terminal Blocks and strength may be fed to
outside circuits via Screw Terminal Blocks/USB girl port making it a plug-n-
play answer for any development Board.
2. Programming Attiny with Arduino
earlier than using the Attiny84 with Arduino, it desires to be organized. First,
down load the Attiny Arduino center. subsequent, observe the training from this
tutorial.
you'll want any other Arduino as ISP programmer to do that, any AVR ISP
programmer ought to work!
In case an Uno is used as ISP programmer, connection ought to be as follows:

For every other ISP programming connection ought to be as follows:



Prog MOSI >> Attiny84 MISO
Prog MISO >> Attiny84 MOSI
Prog SCK >> Attiny84 SCK
Prog SS >> Attiny Reset
3. Software Program And the Flow Chart
The code is written in Arduino IDE with some AVR sign in Configurations.
here's a flowchart of what essentially happens within the application:

i've functionized agencies of responsibilities for ease of knowledge. inside the


setup function, I/O initialization is achieved first. subsequent, user enter is taken
for programming a custom timing of on and off instances. The user switch is
connected to the INT0 which activates on the falling edge and increases a
unstable variable for acting enter accepting mission and showing that output
with LEDs.
The person switch works on each the clicking and press & preserve foundation
to take seconds/minutes/hours of off time and on time. next the LED blinks to
confirm the consumer that the input is ok.
Then the ADC is disabled, seeing that there may be no use for ADC here.

in the end the watchdog is configured to bark!
within the void loop, the CPU goes to sleep. whilst the watchdog timer expires,
the CPU wakes up, disables sleep, updates time and exams if the off time has
expired or now not. If the off time is over, then the MOSFET is grew to become
on for the entire on time.
subsequent the CPU goes to sleep until the following watchdog timeout. right
here, i have configured the timeout approx 1 2d. The LED blinks in short each
2d with purple, blinks inexperienced each minute and BLUE each hour. This
guarantees the gadget is up and jogging.
4. Configuring The Machine
The On/Off Timing for the outside load is configured in line with user's desire at
some point of energy up.
there's simplest ONE enter user switch (besides RESET) and ONE OUTPUT
RGB LED.
The trick is to use the equal transfer as:
PRESS & release right away Mode
PRESS & maintain DOWN Mode
Off Time represents the period while the external load will stay powered off,
which may be a aggregate of seconds, minutes & hours.
On Time represents the length even as the outside load will live powered up,
which may be a combination of seconds, minutes & hours, too.
right here is the begin up sequence to configure the device:
After the Off-Time is set, a similar process is needed to observe to set On-Time.
when placing is complete, the LED will blink in colors to represent general off
and on time so the person can affirm.
right here are the policies for the RGB LED glow/blink:
the primary blink is constantly disregarded. After first blink in each shade:
consecutive crimson blinks count as Seconds
consecutive green blinks matter as minutes
consecutive Hours blinks matter as Hours
Off-time is set first, then press and release to enter on-time (RGB all blinks). On-
time is about subsequent (similar to off-time placing method). when putting is
completed, the LED blinks to confirm off-time and on-time inside the respective
colorings. each off and on time setting are shown separated with the aid of RGB
blinks in among them.

E.g. think I want to prompt time of five Sec, 4 Min, zero Hrs: i can do 6 pink
blinks, 5 inexperienced blinks and 1 blue blink. See the motion video for better
understanding.
5. Energy Saving Verification
An Arduino Uno is powered via the sleep controller and here are the effects:

26.6 mA or 26600 uA when energetic and when off best 8.6 uA. Ratio is about
3100!!
6. Scope of Upgrades

There are different versions of thrilling solutions viable to make.

One technique might be wherein the improvement board's MCU will
communicate with the sleep controller's MCU asking to initiate a snooze
for a given duration like this:

Watchdogs aren't very correct for timing. In my case, my mins have been
off through nine seconds due to the inaccuracy of WDT, delay calls,
execution time for the code. A technique to this problem is to apply a
software time correction/reimbursement or use an outside RTC for
calculating elapsed time.
the use of Battery Packs start with a barely higher rated voltage will
provide longer battery existence. as an instance, a 5 volts USB
powered/programmed development board will run excellent inside four-6
volts variety. 4AA Battery packs are exceptional preference for extracting
most juice from battery.

7. Caveats
there is a RC (2.2k + 10 uF) network parallel to person input turn on
INT0/Arduino Pin eight/Attiny84 pin 5 for hardware Debouncing. This
ensured the clicking switch does not flicker for the duration of high to
LOW transition.
bypass Capacitor is a must on Vcc and Gnd pin of Attiny84, in any other
case the MCU might restart when external load sucks an excessive amount
of spike juice.
considering, the n-MOSFET used right here isn't always a logic-level
MOSFET, voltage drop turns into widespread for modern-day greater than
one hundred mA. With appropriate MOSFET and effective Battery packs,
numerous Amps can be transferred.
4AA battery p.c. offers barely higher than 6 volt at some point of sparkling
begin, which is higher than absolutely the maximum of Attiny84. A diode
in collection may additionally assist to safe limit the deliver voltage.
there is touch resistant loss related to breadboard layout and electricity
terminals, a soldered layout on protoboard/pcb can be more green.
sometimes the user switch, LED blink would possibly get tousled,
resetting the MCU for restart will assist then.
Watch dog timer may be off by way of as much as +/- 20 % and
temperature dependent, so timing isn't always ideal.
Brown out detection is disabled, on uncommon instances flash application
would possibly get corrupted
Reliability examined for 8 hrs with around 1 hrs, 1 min, three sec off-time
and 12 seconds on-time and gadget turned into observed operational with
out problems. If there may be a likely trojan horse within the code, timing
might mess up for different combinations.

There you've got it, one approach to all power saving issues with prototyping.
save battery, keep on prices and store the environment!
References
a few codes are used from AVR Library Dev page and Marcelpost Wiki
Schematics

Code
Download Here
5. Make an Autonomous "Follow
Me" Cooler
on this project, we use an Arduino Uno to construct an self reliant "comply with
me" cooler. The robotic cooler connects to a cellphone via Bluetooth and uses
GPS to navigate. all of the electronics will be contained in the base in order that
other objects may be carried as properly.
1. How We built It
To assemble the base, we used a massive piece of scrap 1/four" MDF board and
a pair 1x3" planks to serve as the sidewalls. status the forums up on stop to
create a box helped preserve the cooler in vicinity while the bottom turned into
transferring.

We measured the MDF to be about 1 inch large on every aspect than the scale of
the bottom of the cooler. In this situation, the cooler was 17.5x11.five", so we
reduce the MDF to be about 19.5x13.5". The more area allowed the 1x3" forums
to be nailed on pinnacle of the MDF. Our jigsaw worked properly to cut this
piece.
The 1x3" planks were reduce to the identical period because the intensity of the
bottom, however we made them about 2 inches shorter on the width in order that
they may align with the rims of the MDF. The planks were connected to the
MDF with a few small nails.
as a way to residence the electronics, we made a small container the usage of the
equal manner because the base platform (albeit the usage of some 1x2" planks in
preference to 1x3"). We eyeballed the size here, however it grew to become out
to be about 11x9". The electronics container became nailed to the bottom of our
platform once we reduce a hollow in the MDF with our jigsaw.

in the end, we brought the additives for the drive machine. The wheels used a
pair 3D revealed brackets (3D elements provided below) to mount our excessive
torque 12v automobiles. A 3D published connector changed into connected to a
metal hub to mount the wheel at the motor shafts.
A simple swivel wheel become used at the again of the platform. It changed into
connected with another 3-d revealed bracket.
2. Electronics
The electronics had been installed in the field cutout beneath the platform. We
used an Arduino Uno and a 5v battery to electricity the sensors, Bluetooth, and
control good judgment. A 3s LiPo battery changed into used to strength the
automobiles.

A HC-05 Bluetooth module was established at the the front of the platform for
better variety. The relaxation of the components such as a L298N motor driving
force, PAM-7Q GPS, and HMC6883L compass were installed inner and linked
to the Arduino thru the breadboard.
The compass works with I2C, so we linked the SLC and SDA pins to A5 and A4
respectively. The rest of the pins were linked thru virtual I/O. For more
information on how we related the wires, see the diagrams provided within the
schematics section under.
The vehicles were powered by way of drilling holes through the platform and
attaching them the L298N motor driving force board. The 3s LiPo turned into
linked as the main power source and we tied the ground together with the
Arduino electricity source for manage good judgment.

the subsequent image indicates what everything appeared like once it was related
inside the electronics field.
3. Motorized Lid
The motorized lid wasn't included in either of our construct films, so we posted
some supplemental instructions on a way to upload it.
Our cooler lid had a couple notches that kept the lid snapped close while it
closed. Our servo wasn't robust sufficient to lift the lid while it become snapped
shut, so we used a small Dremel device to sand down the notches.
We used a MG996R excessive torque servo electricity the lid. We 3D revealed a
hinged arm to attach the servo horn to the pinnacle of the cooler. as a way to
hold it in region, we used some gorilla glue. The servo become set up at the
aspect of the cooler with a piece of 3M double sided out of doors mounting tape.
A hole became drilled at the back of the cooler to feed the servo wires thru. We
used a couple of extension wires to connect it to energy, floor, and the sign wire
pin three at the Arduino.
4. Preparing Your Blynk App
this is the configuration we used for our Blynk app.

once you've got the whole lot configured belongings, affirm and add the code for
your Arduino. if you are outside, it'll take some seconds for the GPS to
accumulate a satellite tv for pc lock. once it does, it's going to start flashing.
make sure your android device is paired with HC-05 bluetooth module. If it asks
for a password, it have to be default 1234 . Open Blynk and press play!
all of the code for this task is supplied open source on our Github page. For
greater instructions on how to use it, view the README.md.
5. Custom Elements and Enclosures
Motor Mount
Motor mount used to mount DC motor to chassis. Mounts motor by using
clamping. STL report for 3-d printing.
Wheel Hub Adapter
Hub/adapter to evolve a 4mm motor shaft hub to the 6-inch wheel. STL record
for 3-d printing.
Swivel Wheel Mount
A mount to attach the swivel wheel to the wood body of the chassis. STL
document for 3-d printing.
Actuator Attachment
Attaches the actuator arm to the top of the cooler lid.
Cooler Servo Mount
Mounts the servo in the cooler.
Servo Horn Adapter
Attaches the servo horn to the actuator arm.
Lid Actuator Arm
Actuator arm for the motorized lid.
Pivot Cap sixty five
Cap for the the actuator attachment.
Pivot Cap sixty eight
Cap for the servo horn attachment.
Schematics
Code
Download as Zip
6. Control Electronics By Sliding
Your Phone
This project will take you to through the a laugh whilst power of RF, android
phone and arduino are mixed.
To regulate the brightness of your desk lamp/lights in studio in case you are a
photographer, velocity of ceiling fan, alter the volume of your private home
theater, or to govern the rate of motor, you need to regulate the
potentiometer/dimmer or slide something, but can you do those matters with any
telephone/tablet?
nicely, the answer can be sure, in recent times home automation thru
net/bluetooth/WiFi are very popular all you need to do is turn on your pc or
phone and send some values or modify any slider, however the way you're going
to see in this instructable is a good deal extra less complicated than that.
You just want to slip your android smartphone/tablet, no want to liberate it no
need to regulate any slider simply keep your telephone on the desk and rotate it.
lets Get started out
Step 1: Materials Required

1sheeld
Arduino
USB for Arduino
Android telephone with orientation capability
An LED
Resistor any will work < 1K
Arduino IDE mounted to your laptop
you may leap to step five in case you know approximately 1sheeld and already
set up its library
Step 2: Approximately 1SHEELD

here introduction to 1sheeld turns into essential if you do not understand


approximately it, as it runs the complete project.
if you know approximately the Arduino and its shields like GSM and WIFI, and
additionally shopping for each of them for use is high priced. To update all of
them with simply one, the Egyptian inventors made a notable single guard which
connects to your android smartphone via Bluetooth and uses all of the sensors
and connectivity of it. you could also use multiple guard at a time like GSM,
WIFI, Accelerometer, Gyroscope and many others.
1sheeld - http://www.1sheeld.com/
Step 3: Area Your 1sheeld Efficaciously

You want to area your 1sheeld efficiently, confusion can get up at the same time
as using with Arduino Mega.
Step 4: Download 1sheeld Library

You need to down load and place 1sheeld library from right here-
https://github.com/Integreight/1Sheeld-Arduino-Lib...
and then extract it to the place in libraries of arduino.
Step 5: The Code
Open arduino IDE then copy and paste this code.
The code is based totally on 10 easy analogWrite instructions.
i am now not a good programmer at all, i'm still in 11th grade and should deal
with my academics/college so I cant spend an awful lot time gaining knowledge
of coding, there may be lot of errors inside the application and i will surprisingly
appreciate the tips for development. The code just beneath is the correct
working, do no longer use the older one.
#include <OneSheeld.h>
int ledPin1 = 11;
float xOrientation;
void setup() {
/* Start communication. */
OneSheeld.begin();
pinMode(ledPin1,OUTPUT);
}
void loop() {
// Check X-axis orientation.
xOrientation = OrientationSensor.getX();
// Map orientation to brightness
if(xOrientation < 102) analogWrite(ledPin1,xOrientation * 2.5);
// Or turn off the LED if the orientation is > 125 degrees
else analogWrite(ledPin1, 0);
}
Step 6: Add The Code

Open arduino IDE then reproduction, paste this code and then add.
Step 7: Down load 1sheeld App
down load it from Playstore, open it, flip the Bluetooth on, connect with the
1sheeld and then select the Orientation shield.
Step 8: Solder The Resistor to LED
Solder the resistor to led after which connect the caused arduino to pin no.
eleven. ( you could change the pin number within the code)
Step 9: In addition Uses
Now its as much as you what you need to govern, for example in case you need
to show the lighting on and of you could use relays, in case you want to alter the
brightness of the lamp you may make a dimmer with MOSFET as proven on this
instructable so with that you will be capable of manipulate the speed of ceiling
fan, excessive strength halogen or heater.
Be careful while connecting any inductive load on the circuit, recollect to use a
Flyback diode while doing so.
SCHEMATIC

CODE
Untitled file
Codebender.cc

7. Touch Display: Game "Flappy
Bird"
this is a very easy mission as a long way as the hardware is worried, however
with the software, we've got very disturbing paintings. on the Arduino Uno
immediately area the Arduino TFT lcd contact display show. this system is
inserted into the Arduino Uno.
How "Flappy chook" works
The "flappy" item is placed in a hard and fast role at the X-axis even as actions
are carried out via shifting the Y-axis.

All descriptions can be illustrated in the original Java IDE or Greenfoot tasks. all
of the identical love of the Arduino TFT show.
when you contact the keys or the display item, Flappy movements to -10 px Y-
axis. boundaries appear. Flappy both receives in contact with an impediment or
exits from the world that's dictated through the edges of the display display. the
sport is stopped while Flappy stops and the message "recreation OVER" and an
finished rating are displayed.
Of direction, the contact show may be revealed and messages along with group
call or message, press.
CODE
Download as Zip
8. Intel Arduino 101 BLE Blynk Tank
Intel Arduintegratedo one hundred and one based tank with BLE and Blynk!
This built-ing uses the Intel Ardubuilt-ino one zero one board that has IMU and
Bluetooth Low electricity (BLE). For the far off manipulate, I used the loose
Blynk app that's available for Android and iPhone; it built-in you to rapidly drag
and drop a few buttons to create a user built-interface. The chassis is a Dagu
DG012 from Sparkfun.

I attempted to strength the entire rig from the 5 AA battery p.c. that came with
the chassis but the Ardubuilt-ino stored resettintegratedg on low voltage.
preferably, i might use a pleasant LiPo battery p.c., however to keep built-in
simple and now not expect built-inners to study the care and feedintegratedg of
LiPos and buy a charger, I selected to electricity the automobiles one at a time
from the Ardubuilt-ino built-inthe use of a USB Battery p.c.. built-in to built-
inate the non-obligatory battery jumper at the Adafruit motor defend, built-in
you can fry a few built-in; the electricity sources want to be separated.
Parts
Tank Chassis or built-ing platform you want.
Polarized battery connector JST (Pictured I made one with header
pintegrateds)
4 jumper wires
Arduintegratedo one hundred and one board
Motor driver board (Adafruit Motor/Stepper shield V2)
four M2.5 nylon standoffs with nuts and screws
five AA Batteries (For cars)
USB Battery % (For Arduintegratedo)
quick USB A to USB B cable
1 warmness decreaseintegrated
some male and woman header pintegrateds 0.1
Zip ties
Hardware

gatherintegrated the tank chassis, the built-in picture built-in is good


enough, depart the top plate off of the chassis.
Mount the Arduintegratedo to the pbuiltintegrated plate integrated
standoffs. I decide upon M2.5 nylon standoffs.
Wiring
Use jumper wires to attach the motors to M1 and M2 headers at the
Ardubuilt-ino Motor guard.
installation the polarized connector between the motor guard and the 5 AA
battery %. depart the motor defend jumper removed to isolate motor
power from Ardubuilt-ino energy.
dispose of the pbuiltintegrated plate and integratedsert a few zipties to
built-intabuiltintegrated the USB battery connector.
Blynk App

download the Blynk App for Android or iPhone and create a brand new
app.
Drag 4 buttons, a slider, and the BLE widget builtintegrated new app.
Edit the slider, it needs to write down zero-255 to V0.
The buttons are configured as momentary push buttons, they send a one at
the same time as pressed and a zero while released: Left forward = V1,
proper forward = V2, Left Backward = V3 right Backward = V4.
From the Blynk app configuration click on the button to e mail the
authentication token to your self, we can use this builtintegrated
Arduintegratedo App.
Arduino Software
download the Ardubuilt-ino cartoon from Github
Open the cartoon built-inthe use of the Arduintegratedo IDE. As of
integrated post your IDE model should be someplace between 1.6.7 and
1.6.13, older variations may not aid Currie forums and 1.8.0 won't built-
ing together the code (skilled by way of several human bebuiltintegrated at
our built-inintegrated workshop)
Open equipment > Board > Board manager and look for
Arduintegratedo one zero one, and built-in the board is established, you
can additionally upgrade to the contemporary model.
Open caricature > built-in Library > manage Libraries and search for
Adafruit Motor, set up the Adafruit Motor shield V2 Library.
also look for and install the Blynk Library.
update the auth[] token with the only you emailed to your self from the
Blynk app created above.when you have more than one Ardubuilt-ino one
hundred and one forums rename the blePeripheral.setLocalName and
blePeripheral.setDeviceName variables so the names can be unique.
replace the Arduintegratedo one hundred and one board firmware by
means of built-in your arduintegratedo programmer to "Ardubuilt-
ino/Genubuilt-ino a hundred and one Firware Updater", after which built-
inselectbuiltintegrated "Burn Bootloader"
make sureintegrated to builtintegrated the the Ardubuilt-ino Programmer
returned to "ArduintegratedoISP"
download the sketch for your board, press the "grasp Reset" button at the
arduintegratedo, then dowload built-inagabuiltintegrated for properly
degree.
Its Time To Going
From the Blynk app click at the BLE widget, hook up with your
Arduintegratedo a hundred and one.
positioned the Blynk App built-in run mode.
builtintegrated'r ardubuilt-ino a hundred and one BLE carrier does not
show up press the grasp reset button on the arduintegratedo.
Play!

here are a pair other Ardubuilt-ino one zero one chassis tasks that I gained some
thought from.
Arduino 101 BLE RoverBLE Bot 9000
Code
Download As Zip
9. Christmas Neopixel Led Strip

it is truly easy, due to the fact the magic is inside the software! just solder three
wires, upload software and voila: you have lively led strip! You cannot find this
in any save, it's far specific. this system caricature includes 33 special animation
styles, selected in random order. you may revel in this toy all night.
The software program can be downloaded from the github repository.
Merry Christmas!
Schematic

Code
Download Here
10. Digital Dashboard
Our tugbout ( construct in 1951, nonetheless original engine, in day by day use )
needed an instrumentation improve. The boat additionally has 2 wheelhouses
and a pair of mills, 2 chargers/inverters and shore connection.
i have mounted an Arduino Ethernet inside the engine room, used a corridor
sensor to measure rpm of the engine, for now there are 6 ds18b20 in use, #7 may
be hooked up shortly. furthermore the Arduino also steers the unique ( read:
antique ) RPM tool inside the primary wheelhouse.
i'm sourcing the sensors to measure exhaust temperatures and oil/air stress
(Honeywell has 'm).
in spite of sampling temperature on 6 factors, be counted rpm and steer analog
meter, i am handiest using three ports at the Arduino and spent less than one
hundred twenty on hardware! The maximum steeply-priced components are the
adapters to mount the sensors watertight into the cooling system.
To display this data i'm using steelseries gauges, designed through Gerrit
Grunwald, locate all resources right here.
i have tailored the radial demo page to my wishes and got very fascinating
results.
Schematic

Code
arduino sketch
updated and refined sketch, 7 temp sensors in use
My dashboard updated version
My dashboard

11. Android App-Based Home
Automation System Using IOT
In beyond few years, smart houses have grow to be very humming and famous
word. Many human beings tried to endorse their very own version of clever
domestic structure but most of them lacks integration of smart home gadgets.
additionally safety is also a chief challenge in the smart home architecture. a
number of the communications generation utilized by these clever home
architectures consists of bluetooth, GSM, Zigbee and many others. a lot of these
architectures have their very own execs and cons.

In my very last year of my engineering, I tried to enforce an included smart


domestic architecture which can be monitored and controlled by easy person
pleasant cell application. additionally, all of the structures will be interconnected
and voice instructions can be delivered for controlling the gadgets inside a
specific variety. So right here are the silent capabilities of my domestic
automation architecture:
level security system using Numeric keypad and RFID save you the get
admission to of the house to intruders.
uploading of photo on-line in case of burglary, remote video surveillance
in which video is uploaded to the neighborhood server which may be
regarded with the aid of the person the use of any internet browser.
monitoring the home environment the use of the readings of numerous
sensors which includes DHT11, flame sensor, MQ3 and MQ135 sensors
thru android application.
Controlling gadgets along with led, servo cars and so forth through
android software.
automatic scheduling of devices primarily based on the options set with
the aid of the user thru android utility.
domestic getting ready the devices ( geysar, espresso device) primarily
based at the choices set via the person while user is drawing close closer to
domestic.
Controlling the devices the usage of human voice.

Conditions

You have to be familiar with C programming
You should be familiar with the usage of Arduino IDE and deploying code
to Arduino board
Instructions - observe those steps
earlier than shifting forward, please checkout my video for this assignment so
that you can get an idea of how matters are operating and how connections are
made.
Step 1- wire Up the complete gadget
Make connections in step with the circuit diagram attached beneath. There are
lots of connections to be made so be affected person and do all the connections
carefully. i'm able to recommend to make some home kind architecture using
cardboard so that you can get the real experience of home Automation. Be
cautious about PIR movement sensor as it is susceptible to touchy alternate. fix it
tightly so that it does not give fake tremendous in any other case your door can
be commencing suddenly.
RFID Connection is as follow:
MOSI ---> PIN 51
MISO ---> PIN 50
SCK ---> PIN 52
SS/SDA ---> PIN nine
RST ---> PIN eight
also join pin 20 of mega to pin 2 of arduino yun and pin 21 of arduino mega to
pin three of arduino yun for I2C communique.
Step 2- Create Temboo Account and set up Dropbox API
the following step in this task is to create and set up an account at the web carrier
Temboo, so you can use the wide range of offerings supplied by Temboo. To
achieve this, step one is to really visit the Temboo internet site at
http://temboo.com/. On the main page, sincerely input your
1ec5f5ec77c51a968271b2ca9862907d deal with to register and click on sign on.
you will then be asked to enter some simple statistics approximately your
account, inclusive of your account call. Then, you will be triggered to create
your first app.
Make certain which you store the details of your account, such as the call of your
first app and the important thing a good way to receive to you.if you need to get
these values once more or create a new application, you may always get entry to
this records in the My Account segment of the Temboo website by way of
clicking on the manipulate button beneath packages.
Now, on the software side, you may need a bit extra than simply the Arduino
IDE. we are going to set up the specified software for the camera without delay
at the Yn board when we connect to it thru SSH, however you will want the
Temboo Python SDK to upload photographs on to Dropbox. you can locate the
SDK at https://temboo.com/python. it's time to unpack it and region it at the
foundation of the SD card as properly.
Just make certain that it seems with the call temboo inside the root of the SD
card, so the Python document we just created can get entry to it successfully
Then, you furthermore may need to have a Dropbox account, so you can add
pics directly to it. you may simply create an account with the aid of going to
https://www.dropbox.com/domestic. once your account is created, you want to
create an app with a view to be utilized by your venture. This basically way that
you have to authorize the project you are going to construct in this chapter to
robotically send snap shots on your Dropbox account while not having to enter
your login and password every time. you'll also accept all the required records
(consisting of an API key) that we can enter later inside the Python script on
Yn.
1) To create an app, first visit https://www.dropbox.com/builders/apps.
2) Then, click on on Create app within the pinnacle-right nook of the
window. you can now pick the kind of app you need to create. In our case,
we need to use the Dropbox API at once.
3) you may then be triggered to select the sort of information your app
desires to store. We want to add pix, so pick out documents and datastores.
4) you can then end the manner of creating your Dropbox app.
5) at the confirmation page that describes the app, you'll want to write
down down the App key and App secret, which we will want for the
relaxation of the challenge.
6) also, ensure that the Permission type discipline is ready to App folder.
this could make certain that the images are uploaded to the folder
committed to the app and that the Yn might not have get admission to to
the rest of your Dropbox folder.
7) What you need to get now could be the Token key and Token mystery
relative on your Dropbox app, so that you can enter them later in the
software of our task. To get them, the first step is to visit the
InitialiseOAuth Choreo at the Temboo internet site at
https://temboo.com/library/Library/Dropbox/OAuth/InitializeOAuth/.
right here, you may want to enter the App key and App mystery. this could
generate a few additional statistics which includes a callback identity and
a brief token mystery. you'll also be asked to visit a hyperlink to Dropbox
to confirm the authentication.

8) in the end, visit the FinalizeOAuth web page to complete the process.
you may be requested to go into your App key, App mystery, callback
identity, and transient token mystery at
https://temboo.com/library/Library/Dropbox/OAuth/FinalizeOAuth/. After
this step, you'll be given your final Token key and Token secret. Write
them down as you will want them later.
Step 3: Installing Drivers in Arduino Yun
set up Putty software and open it. enter the ip deal with of your arduino yun and
pick out ssh and click on open. enter root as your username and you may then be
prompted to enter the password that you selected on your Yn (Default password
is arduino). If it really works, you should see the subsequent screenshot being
displayed to your terminal, which indicates which you at the moment are
working directly on the Yn.
you can get entry to all the features out of your Yn Linux device. we're now
going to install the specified software for the digicam. This calls for the Arduino
Yn to be linked to the net in order that it could get the desired packages, as
defined within the following steps:
The method starts by updating the bundle manager, okay, as follows: o.k.
update
install the UVC drivers, as follows: alright install kmod-video-uvc
install the python-openssl package that we can use later in the venture, as
proven in the following command: all right set up python-openssl
eventually, you may set up the fswebcam software program that we will
use to take pics, as shown inside the following command: alright deploy
fswebcam
Step 4: stay Video Surveillance
To make the application paintings, we first need to install some additional
software program programs on the Yn, as proven in the following steps:
connect to the Yn once more the usage of SSH along with your Arduino
Yn call and password, and type the following command to get the
appropriate package for stay streaming: wget
http://www.custommobileapps.com.au/downloads/mjpgstreamer.ipk
notice that if the hyperlink is not legitimate anymore and also you cannot
discover the files, this bundle is likewise to be had in the code of this
bankruptcy. you can now install it with the following command: alright
install mjpg-streamer.ipk
you could now start the stay streaming software program for your
Arduino Yn the use of the subsequent command:
mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 640x480 -f 25" -o
"output_http.so -p 8080 -w /www/webcam" &

right here, the parameter after h is the resolution and the one after i is the port
on which the circulation might be available. We additionally targeted the number
of frames in keeping with second using the I command.
The alternative options are much less essential and also you do not ought to
worry approximately them. you may then access your circulate by going for your
Arduino Yn's deal with for your net browser observed via 8080 to specify the
correct port. as an example, the hyperlink could be like this
http://yourarduinoyunipaddress.local:8080/flow.html. update
yourarduinoyunipaddress within the above hyperlink with the ip deal with of
your arduino yun.
Step 5: Putting in place Twilio Account for textual content
messages
join up on https://www.twilio.com/ . observe down the account sid and auth
token. buy a loose number on twilio and also affirm the range to whom you
gonna send the textual content message below verified caller ids phase. as soon
as your variety is validated, you are ready to ship message to that variety. Now
log in to temboo.com. go to this hyperlink
https://temboo.com/library/Library/Twilio/SMSMessages/SendSMS/ and
provide the credentials you bought from twilio. earlier than you click on run
now, word down the additional records. click on run now and offer the additional
facts required and keep the profile with a few name.
This profile name may be used in the arduino yun code. visit line 208 inside the
arduino yun code and update the your_profile_name with your profile call. make
certain that whilst you click run now button in temboo, it shouldn't give any
mistakes over there in any other case there may be something wrong together
with your credentials which you want to troubleshoot your self.
Step 6: Putting In place blynk account and configuring blynk app
down load the blynk app from playstore using this link
https://play.google.com/store/apps/information?identification=cc.blynk.
after you download the Blynk App, youll need to create a new Blynk account.
after youve efficiently logged into your account, start via creating a brand new
undertaking. select the hardware version as Arduino yun. Auth Token is a
completely unique identifier which is needed to attach your hardware to your
telephone. each new challenge you create will have its own Auth Token. Youll
get Auth Token automatically on your electronic mailemail after mission
creation. you could also reproduction it manually. click on gadgets segment.
Now press the Create button. add the widgets in line with following
instructions:
Make 4 tab as home, hvac, tracking and control
Home
below home tab pick out 4 widgets: lcd, fee display, stage H and notification.

Configure the input of lcd as V1.
name the cost display as fireplace sensor and configure the enter of fire sensor as
V11 and map it from range zero to 1023 and make studying fee as 1 sec.
name the level h as hearth stage and configure the enter as V12 and map it from
range 0 to 1023 and make analyzing price as push.
Configure the notification with precedence as regular.
HVAC
underneath HVAC tab choose lcd, Slider, cost show(2) , history graph.
Configure the enter of liquid crystal display as V3.
Rename the slider as fan and configure the output as D9 and map it from 0 to
255.
Rename the 2 cost displays with room1 temp and room2 temp. Configure one
enter as V2 and other input as V6 and map them both from 0 to 50 with
analyzing fee as 1 sec.
Configure the inputs of history graph as V9 and V8. put the name room1 temp
similar to V9 and room2 temp corresponding to V8.
Tracking
under tracking tab select categorised cost (2), graph(2), records graph.
Rename the 2 categorized cost widgets with room1 humidity and room2
humidity and set the inputs as V5 and V7 and map them from zero to a hundred
with reading charge of one sec.
Rename the two graphs as room 1 humidity and room 2 humidity with enter pins
as V10 and V9 with variety 0 to one hundred and reading rate as 1 sec.
Configure the inputs of records graph as V10 and V7. positioned the name
room1 humid similar to V10 and room2 humid similar to V7.
Control
under manage tab select lcd, price show(2), classified cost, slider, time enter ,
GPS song.
Configure the enter of lcd as V4.
Configure the inputs of value display as V19 and V20 with range from zero to
1023 and studying fee of one sec.
Configure the input of labeled fee as V21 and variety varying from zero to 1023
with studying price of one sec.
Rename the slider settings as essential room light and output from zero to 255
with write durations 100ms.
Configure the time input V31 and configure permit begin/forestall input as yes,
allow day of week selection as yes, allow timezone choice as yes.
Configure the gps music enter as v29 and cause while as enter. this may allow
the machine to trigger the v29 pin on (which can be linked to geysar for
instance) whilst user has arrived within the map. you may change the radius of
the map as in step with your comfort.
click on run button.
Congrats! Now you could control and reveal the home surroundings out of your
android phone.
Voice controlled operations of devices
down load the AMR_VOICE app from this link and configure the bluetooth with
HC05. installation the code mentioned underneath named as voice manipulate
for arduino uno to arduino uno. click on connect robot inside the app. ensure you
have got your cellphone bluetooth paired with hc05. Press the voice icon and
speak the strings mentioned in the code to turn on/off your gadgets.
Do permit me recognise if you faced any issues whilst making this mission.
some of the stairs aren't shown in info thinking about the fact that customers
might be familiar with basics of arduino, c and fundamental linux programming.
feel free to invite any questions within the remarks segment if you purchased
caught everywhere or in any step.
Security system algorithm
System Architecture
Schematic
Arduino Mega connection
Arduino Yun

Code
Arduino Yun Code
embooAccount.h
Arduino Mega code
Voice control code for Arduino Uno

12. Chatbot Controlled Robotic Arm
Summary

There are numerous initiatives about creating a robotic arm at the internet, but
they all have a comparable way of controlling it. And wherein is the amusing in
that! So we determined to make a robot arm that might be controlled the use of a
chatbot. How cool would it not be, in case you just had to say "move left forty
five stages" and the arm would apprehend it..!
Hardware
The hardware design is more or less based at the uArm schematics. It has five
levels of motion. The servo vehicles used are 3- Mg995 (metal equipment) at the
side of 2- Sg90 (silicon gear). every servo motors takes upto 1.5A of
contemporary so offer the strength deliver should be adequate.
Arduino Uno is used because the controller together with Raspberry Pi. The
feature of Arduino is to continuously concentrate for a Serial command from the
raspberry pi.
Software Program

The software section consists of an Arduino code and a Python script for
Raspberry PI. the relationship between Arduino and Raspberry Pi is thru a serial
cable.
Custom Parts
Acrylic CAD files for uArm
Acrylic CAD files for uArm 2

Schematic

Code
Download as zip
13. Traffic Light Information System
Intro
Traffic has the ability to irritate the first-class people and it is getting worse.
What if that can be changed with intelligent site visitors lighting? We created a
visitors mild statistics device that lets the motive force recognise at which
velocity he needs to power with a view to get on the junction and bypass the
inexperienced light with out exceeding the most velocity restriction. And whilst
the driving force has to look ahead to the inevitable red mild, it shall we him
recognize when the mild is about to turn inexperienced.

A traffic mild sends information about how long it's going to continue to be
green or the time until the subsequent green mild and many others. to an internet
database. A GPS or an application for your phone will retrieve records from the
database and calculates the favored velocity to pass the inexperienced mild. it's
going to show the remaining ready time till the quit of the red mild phase while
it's unavoidable that you may have to wait.
Example
you are using in a 70 km/h zone, keeping to the restrict. The visitors mild up in
advance of you is red and the mild is about to show green in 30 seconds. you're
500 meter faraway from the traffic light, so the device will endorse you to
continue closer to the mild at 60 km/h.
How we've made it?
to illustrate our venture, we created a traffic mild with the Arduino Yun. The
visitors mild consists of three LEDs and a real-Time-Clock. The lights will
exchange at a given c language. The Arduino Yun saves the time that the traffic
light will flip green/pink. Then, it runs a php document that makes a connection
to the web MySQL database and inserts the statistics acquired from the Arduino
Yun. An Android app (created with Android Studio) will retrieve the date from
that database. that is carried out via every other personal home page document
that returns the site visitors light facts in JSON format. The app calculates the
favored pace and it'll display a countdown timer whilst you're now not able to
pass the green mild.

To calculate the favored velocity, the app wishes to recognize the space to the
visitors mild. that is done by calculating the distance according to the GPS
coordinates. however sadly, a GPS in a smartphone isn't specific sufficient to
show our concept because we are working on a small scale. it is why we made
use of the ultrasonic ranging module (HC-SR04). The Arduino Yun receives the
distance among the auto and the traffic mild via 433 MHz RF modules.
whenever the Yun receives a new dimension from the alternative Arduino, it
updates the statistics within the database. Now, the app is capable of calculate
the desired velocity.
Instructions
Create a web MySQL database (We used freemysqlhosting.internet )
Add a table 'TrafficL_data' to the database:
Installation the hardware (transmitter). You may locate the schematic
'Arduino transmitter' right here.
Add 'Arduino Transmitter Code' to the Arduino. You can locate the code
right here.
Join the Arduino Yun in your WiFi community
Get right of entry to Linux Server of Arduino YUN with Putty:

opkg update
opkg install php5-mod-mysqli
opkg install php5-cli
nano /mnt/sda1/MySQL_UpdateTrafficLData.php

You could find 'MySQL_UpdateTrafficLData.Hypertext Preprocessor' right here.
in case you see this mistake: '-ash: nano: no longer observed', you have to set up
'nano' (this is a basic textual content editor):
opkg install nano

chmod 755 /mnt/sda1/MySQL_UpdateTrafficLData.php
/mnt/sda1/MySQL_UpdateTrafficLData.php
nano /mnt/sda1/MySQL_UpdateDistance.php

you can locate 'MySQL_UpdateDistance.Hypertext Preprocessor' right here.
chmod 755 /mnt/sda1/MySQL_UpdateDistance.php
/mnt/sda1/MySQL_UpdateDistance.php

Installation the hardware (Arduino Yun receiver). You can find the
schematic 'Arduino Yun receiver' right here.
Add 'Arduino Receiver & MySQLdb' to the Arduino Yun. You may locate
the code right here.
Open the Serial screen
You need to see some thing comparable:
Android Studio files
activity_main.xml
MainActivity.java*
AndroidManifest.xml
strings.xml
*keep in mind to alternate the URL
you can locate 'EchoJSON.Hypertext Preprocessor' right here.
Upload the Android Studio mission on your telephone
Schematics
Schematic: Arduino Transmitter
RF 433MHz module:
tx_pin --> pin 3
HC-SR04 module:
trig_pin --> pin 5
echo_pin --> pin 6

Schematic: Arduino Yun Receiver


RF 433MHz module:
rx_pin --> pin 3
TrafficLight (3 LEDs):
RedLED --> pin 5
OrangeLED --> pin 6
GreenLED --> pin 7
DS3231 (Real-Time-Clock):
SCL --> SCL (pin 3 on Arduino Yun)
SDA --> SDA (pin 2 on Arduino Yun)

Code
Arduino Transmitter Code
Arduino Receiver & MySQLdb
MySQL_UpdateTrafficLData.php
MySQL_UpdateDistance.php
EchoJSON
MainActivity.java
AndroidManifest.xml
strings.xml
activity_main.xml

CONTINUED TO BOOK PART 2 ...

Vous aimerez peut-être aussi