Advice needed: A beginner programmer wants to develop simple 220V relay on/off

Hello. I am planning to build a simple system, in which

A relay switch is turned on/off, on a smartphone web browser.

I attached the concept drawings below, and it is like below:

(smartphone web) → (web server) ->(arduino uno) → (high voltage relay) → 220V AC motor

(Database)

It is to develop a livestock house monitoring system, so I need to stack up data
to the database.

I have made this quite a bit but it is not working, and I am working on it.

But I feel, as a beginner programmer who just finished a basic academy course,
(learned java, javascript, jquery, ajax, database, html, css, hybrid app, using
eclipse, oracle, phonegap etc. Mostly just basics and just did what teacher did
exactly same, or just change a little bit of the coding. I did 2 small projects too
but it was all about internet bulletin board with database making DAO file and SQL
query file)

Everything is blurred, I don’t even know where to begin sometimes,

and on top of all I am doing this all alone.(Other students in this academy are focused
on different things. Not arduino)

I use google and ask a teacher in my academy but he is not willing to help and always busy.

I think there will also be beginners like me, who just learned the basics, but who is working alone.

If there is anyone who was like me and who became more than normal-level programmer,

I want to request for some advice.

1. How can I connect with people who have similar/same interest with me?

2. How can I save time to do trouble shooting? IE. By asking the people I got to know from NO.1 above?
3. Isn’t my basic system designing right? or how can I get the best designing?

Ultimately I need to develop livestock house automation system, using smartphone hybrid app.

So, as a preliminary project, I am trying to develop this simple example.

But I feel stuck and nothing is progressing recently. :frowning:

20161005_115230_671[1].jpg

20161005_115221_780[1].jpg

Break up the project.

First get the Arduino to open and close a relay in a steady pattern. Then add an input button to toggle the relay. Then figure out how you want to store whatever data it is you're monitoring (you don't mention anything at all about what's being monitored/measured) The phone stuff sounds like you just want to use your phone to 'push a button'. You need to describe what your needs are. Will you be near the arduino and motor? How near? Or do you need to turn on a farm machine from the other side of your country?

It may look simple on paper, but this will be a very challenging project for a beginner. However, such a system is certainly possible and you can find a number of useful examples on the web.

Start with Arduino by spending some time with the example projects, learning to blink an LED, etc. then move on to something more challenging, like connecting to the internet (you will need an ethernet, wifi or other Arduino compatible interface).

Then figure out how to use the internet to connect to the Arduino and command it to blink an LED.

When you get that far, you are ready to think about more serious challenges.

@INTP Thanks for your reply.

I practiced with some examples. I am using ardiono UNO, ethernet shield, DHT11 sensor, and a Relay switch. I made a web page using jsp, jquery mobile to show sensor value every 2 seconds, and it has on/off buttons to control relay. But I didn't make database table yet, also the button on/off is not sended to arduino side.

I am going to use wifi, as I showed in the attached photo. Distance will be just a wifi range. Just a farmer can see and control his inside livestock house with his phone, in his shelter.

@jremington

Thanks for your relply. I would love to do step by step course, but unfortunately I am facing an urgent need from my company. I think they will use other company service at first and let me manage it and research it. But for now at least I must show what I achieved so far in a few month's learning course and I am not seeing any progress now :(

ESP8266 module such as a D1 Mini Wemos using MQTT will do everything you want

Reading temperature every 2 seconds is unnecessary, the DH11 may not even be that fast. I don't know if I would trust livelihood and livestock on its results. You need to code it carefully to constrain wild readings.

there are many videos and instructables about connecting a cell phone to turn a switch on and off.

it is far faster to copy someone else's work and then take credit for it that is a sign of a corporate manager

It take far more skil and education to understand what you are doing and making it happen. that is a sign of an engineer.