I bought an arduino set and I want to make a project with right hardware configuration. Could you suggest me the right confirmation based on idea below?
1- I/O signals will be taken from a sensor or an I/O signal producer. (avg is between every 1-10 sec)
2- I want to calculate time between I/O signals.
3- collect data in an memory unit
4- get the data or avg time of between signals every min to a server database via Wifi
5- I run php on server I want to analyze and display data using php, java script etc...
I tried to create the configuration using by ESP8266 + arduino uno + SD card module. I can collect data in SD card however I can't take the data from SD card using by ESP8266 module. I will really appreciated if you can help me. (what do you think about Raspbery pi3 for this project?)
I am working on something similar. Can you elaborate a little on the type of signals you want to store and send and from how many sensors?
I think you don't need the arduino uno and can use the esp8266 to read the sensors, store the data (on an sd card) and when a connection to the database is available send it via wifi. There are various examples online which explain the individual components, most of them focus on sending temperature data.
I will take signals from output of a machine. Actually, I want to calculate machine speed, stoppages etc... based on between I/O signals.
I know that how to get signals from the machine. Maybe I will add another sensor for counting on conveyor belt in order to count output from the machine.
I want to store the data in txt file in SD card in order to keep safe data if the connection lost. Therefore, when the connection provided again the server will get the data automaticly from SD card via wifi connection.
I thought that txt file can be taken from SD card if we can run the configuraion as FTP server.
I saw some examples but I couldn't run FTP on ESP8266 and Arduino. I need it only to read the data from SD card.
If you know better solution, I can try it.
Could you share a link if you know some examples like that? Thank you again.
I am working on the exact same problem, but approaching the sensory part differently (hoping to gather more info and making the sensor node more versatile).
I used this data to db tutorial to figure out the basics of mysql databases and php. I do have to note that you should also look into PDO to prevent the risks of SQL injection.
My approach would be measuring the I/O of the machine (probably 24V so you need something to get that down to 3.3V!), having the input high during the entire machine cycle, recording this period and put the variable together with a timestamp from an RTC module into the sd card. When a connection to the db is established get the data from the buffer or from the sd card if it hasnt been transmitted yet and push the data to the db. You can get useful information by querying the db, like the machine utilization.
Depending on the type of machine you could also have intermediate steps that are of interest (multiple ops in cnc machining for example), I would use a long pulse for start and end and short pulses for intermediate steps.