Motor regulator project

Hello everyone :D, sorry for my poor english

I'm about to start a new project.
I want to use an Arduino to control a Blower speed.
the idea is that i grab data from a certain number of sensor (8-10), send them to a SQL Server or MySQL via libraries( for mySQL), or via PHP ( for SQLServer, i couldn't find any libraries that can connect to SQL Server) which process the data which are retrieved by the arduino..
on the arduino there will be a touchscreen shield that displays data.
The Arduino also works as a WebServer, so that if i connect to it it displays the data read and the processed datas
the blower speed then, will be sent to a PLC via modbus.

I made some researches to find which product is the best to do all this stuff, i have chosen an Arduino MEGA that can read all the sensors and has enough program memory.

for the touchscreen, i found this one: 2.8 TFT Touch Shield for Arduino with Resistive Touch Screen : ID 1651 : $34.95 : Adafruit Industries, Unique & fun DIY electronics and kits
it seems pretty much what i'm looking for, compatible with Arduino, and uses about 8 digital pins, with the amount of pins that the mega has, this shouldn't be a problem.

Since all the logic (the one that regulates the speed) is on a server, the Arduino just read sensors, send them to the database, read the blower speed, and send it to the PLC (meanwhile those datas are wrote to the WebServer)

Now, do you have some advices about this project?
1 - can the hardware do all i wanna do?
2 -both the touchscreen and the modbus library communicate via serial, can this be a problem? is it better to have the arduino and PLC on the same network and communicate via ethernet (is it possible?)?

I'm not convinced the Arduino is the best board for what you seem to require.

You say that the board needs to operate as a web server and also at the same time to send data to an external server (PHP) which seems to save and process this data and send it back to the Arduino, or the Arduino will download the data from the server.

You've not mentioned anything about sensors etc, and communicating with hardware is one of the main advantages of the Arduino, yet it seems to be a very small part of your project.

I think that programming all the data comms to the PHP server and having a web server running at the same time is going to be a challenge.

I suspect that you would be better off using a Raspberry PI and attach an external USB server interface for MODBUS, and perhaps just use a mini arduino to communicate with the PI via SPI etc to read the sensor data.

Thank you for your reply, rogerClark.

I didn't talk about sensors because it's the easiest part of this project.
You have a point though. it is possible to have the Arduino act like a WebServer and send datas to a database directly (or via PHP), but i have to switch between roles (is this what you mean?).

The alternative is to move everything online, so the arduino reads sensors and comunicates with the database only, and i use the server to show the datas.

Crazy idea: if i attach a wifi shield, can i keep the Database communication and the webserver separated?

I wanna learn more about Raspberry PI, but the idea of changing the hardware kinda discourages me, because I don't wanna throw away all the progress i made since know, but if the project needs it I will.

Sorry for the double post.

I have something working now.
I connected two arduinos via i2c, one is the webserver, the other one receives data and connects to the database.
i couldn't host the webserver and the mySQL part together on the same Arduino: if i try to it gets stuck somewhere (it doesn't give me feedback on the Serial monitor).
i'm starting to think it isn't possible to do it on only one arduino (without a PHP server), am i wrong?
Any help is appreciated, i want to do it on only one Arduino because this project has to be replicated, and if i have to buy double the arduinos it gets pretty heavy on my wallet :smiley:

If you send the data to the database via a web app instead of directly, you can eliminate the SQL client from your sketch.

that's one of the possibilities i'm taking in exam, and probably the easiest one,
in this case, if i want to read data from a database, how can I grab it from the Arduino? I know how to execute a query, but i don't know how to
get the results of it. do i have to echo my results in a blank page so i can read them?

You've got almost unlimited options available to you. You could just carry out an HTTP GET request which returns a text document containing the values you want.