I want to use multiple gas sensors to be displayed online.

I plan to possible use an arduino or a board with integrated BLE. If you have any other suggestions hardware wise for the sensors that would help. I have very little coding experience so what would i need to learn in order to program the arduino or device to send the data via Bluetooth to the computer. I think i could use a bluetooth ibeacon usb for this purpose. but my main struggle is the coding. Any videos, tips, or articles would be a lot of help.

Hi,

I have implemented the instructable below to log readings from my gas meter:

However I did it with a Picaxe microcontroller (which I already had) so the code wouldn't be applicable to you, but the instructable was of great help for me.

Riccardo

I want to use multiple gas sensors to be displayed online.

As in a web page?

What sort of gas sensors are you planning to use?
What do you want to detect or to measure?
How many sensors will you have?
How far apart will they be?

...R

zoomkat:
As in a web page?

Yeah

Robin2:
What sort of gas sensors are you planning to use?
What do you want to detect or to measure?
How many sensors will you have?
How far apart will they be?

...R

I plan on using an Mq series gas sensor
Im going to sense smoke(i am using a gas sensor cause i can't useradioactive materials)
I will have at least 50 sensors
I plan to have the maximum distance between the sensors of 50 yards.

Simple server test code for displaying data in a web page.

// zoomkat's meta refresh data frame test page 5/25/13
// use http://192.168.1.102:84 in your brouser for main page
// http://192.168.1.102:84/data static data page
// http://192.168.1.102:84/datastart meta refresh data page
// for use with W5100 based ethernet shields
// set the refresh rate to 0 for fastest update
// use STOP for single data updates

#include <SPI.h>
#include <Ethernet.h>

const int analogInPin0 = A0;
const int analogInPin1 = A1;
const int analogInPin2 = A2;
const int analogInPin3 = A3;
const int analogInPin4 = A4;
const int analogInPin5 = A5;

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //physical mac address
byte ip[] = { 192, 168, 1, 102 }; // arduino ip in lan
byte gateway[] = { 192, 168, 1, 1 }; // internet access via router
byte subnet[] = { 255, 255, 255, 0 }; //subnet mask
EthernetServer server(84); //server port
unsigned long int x=0; //set refresh counter to 0
String readString; 

//////////////////////

void setup(){
  Serial.begin(9600);
    // disable SD SPI if memory card in the uSD slot
  pinMode(4,OUTPUT);
  digitalWrite(4,HIGH);

  Ethernet.begin(mac, ip, gateway, gateway, subnet);
  server.begin();
  Serial.println("meta refresh data frame test 5/25/13"); // so I can keep track of what is loaded
}

void loop(){
  EthernetClient client = server.available();
  if (client) {
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
         if (readString.length() < 100) {
          readString += c; 
         } 
        //check if HTTP request has ended
        if (c == '\n') {

          //check get atring received
          Serial.println(readString);

          //output HTML data header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println();

          //generate data page
          if(readString.indexOf("data") >0) {  //checks for "data" page
            x=x+1; //page upload counter
            client.print("<HTML><HEAD>");
            //meta-refresh page every 1 seconds if "datastart" page
            if(readString.indexOf("datastart") >0) client.print("<meta http-equiv='refresh' content='1'>"); 
            //meta-refresh 0 for fast data
            if(readString.indexOf("datafast") >0) client.print("<meta http-equiv='refresh' content='0'>"); 
            client.print("<title>Zoomkat's meta-refresh test</title></head><BODY>
");
            client.print("page refresh number: ");
            client.print(x); //current refresh count
            client.print("

");
            
              //output the value of each analog input pin
            client.print("analog input0 is: ");
            client.print(analogRead(analogInPin0));
            
            client.print("
analog input1 is: ");
            client.print(analogRead(analogInPin1));
                        
            client.print("
analog input2 is: ");
            client.print(analogRead(analogInPin2));
            
            client.print("
analog input3 is: ");
            client.print(analogRead(analogInPin3));
                                    
            client.print("
analog input4 is: ");
            client.print(analogRead(analogInPin4));
            
            client.print("
analog input5 is: ");
            client.print(analogRead(analogInPin5));
            client.println("
</BODY></HTML>");
           }
          //generate main page with iframe
          else
          {
            client.print("<HTML><HEAD><TITLE>Zoomkat's frame refresh test</TITLE></HEAD>");
            client.print("Zoomkat's Arduino frame meta refresh test 5/25/13");
            client.print("

Arduino analog input data frame:
");
            client.print("&nbsp;&nbsp;<a href='http://192.168.1.102:84/datastart' target='DataBox' title=''yy''>META-REFRESH</a>");
            client.print("&nbsp;&nbsp;&nbsp;&nbsp;<a href='http://192.168.1.102:84/data' target='DataBox' title=''xx''>SINGLE-STOP</a>");
            client.print("&nbsp;&nbsp;&nbsp;&nbsp;<a href='http://192.168.1.102:84/datafast' target='DataBox' title=''zz''>FAST-DATA</a>
");
            client.print("<iframe src='http://192.168.1.102:84/data' width='350' height='250' name='DataBox'>");
            client.print("</iframe>
</HTML>");
          }
          delay(1);
          //stopping client
          client.stop();
          //clearing string for next read
          readString="";
        }
      }
    }
  }
}

lelanl:
I plan on using an Mq series gas sensor
Im going to sense smoke(i am using a gas sensor cause i can't useradioactive materials)
I will have at least 50 sensors
I plan to have the maximum distance between the sensors of 50 yards.

That's a lot of sensors and a lot of distance.
As you have not posted a link to the datasheet for the sensor (hint) I don't know how they would connect to an Arduino or how many of them you could connect to a single Arduino.

The idea of having a 50 yard cable between a sensor and the Arduino does not sound feasible.

...R

Robin2:
That's a lot of sensors and a lot of distance.
As you have not posted a link to the datasheet for the sensor (hint) I don't know how they would connect to an Arduino or how many of them you could connect to a single Arduino.

The idea of having a 50 yard cable between a sensor and the Arduino does not sound feasible.

...R

I think all of the sensors would be arduinos while the reciever(BLE) would be an actual desktop computer.
Also i havent finished coding all of the sensors so i have no data sheet

lelanl:
I think all of the sensors would be arduinos while the reciever(BLE) would be an actual desktop computer.
Also i havent finished coding all of the sensors so i have no data sheet

We may have a confusion of terminology. I use the word "sensor" to mean the gas detector on its own. If you have identified a suitable product you should be able to link to its datasheet. Without a datasheet it will be difficult to plan the rest of the project.

It sounds like what you have in mind is 50 separate gas detectors each connected to its own Arduino (50 Arduinos).

It may be easier to implement that sort of thing with NRF24 wireless transceivers because they don't have to be paired and they probably have longer range. One of the Arduinos could be the master which collects data from the others and passes it on to the PC - either by USB cable or by Bluetooth.

...R

Robin2:
We may have a confusion of terminology. I use the word "sensor" to mean the gas detector on its own. If you have identified a suitable product you should be able to link to its datasheet. Without a datasheet it will be difficult to plan the rest of the project.

It sounds like what you have in mind is 50 separate gas detectors each connected to its own Arduino (50 Arduinos).

It may be easier to implement that sort of thing with NRF24 wireless transceivers because they don't have to be paired and they probably have longer range. One of the Arduinos could be the master which collects data from the others and passes it on to the PC - either by USB cable or by Bluetooth.

...R

So when u mean using a NRF24 on each arduino connected to a sensor then have an arduino collecting all of the data which is then given to the pc. Would it be simpliler for an computer to recieve all of the sensor data? Thanks for the info so far too.

lelanl:
So when u mean using a NRF24 on each arduino connected to a sensor then have an arduino collecting all of the data which is then given to the pc. Would it be simpliler for an computer to recieve all of the sensor data? Thanks for the info so far too.

To receive the data directly on a computer you would need an NRF24 device that connects directly to a PC USB port. I think you can get such things. I really don't know whether that would work the same as, better than or worse than using an Arduino as a master device.

If you need to receive a lot of readings per second you should be aware that USB performs badly with small amounts of data. In that situation using an Arduino to consolidate readings should improve throughput.

...R

Robin2:
To receive the data directly on a computer you would need an NRF24 device that connects directly to a PC USB port. I think you can get such things. I really don't know whether that would work the same as, better than or worse than using an Arduino as a master device.

If you need to receive a lot of readings per second you should be aware that USB performs badly with small amounts of data. In that situation using an Arduino to consolidate readings should improve throughput.

...R

So would I need 2 NRF24 devices one for pc and one for Arduino. Also do you know any good libraries, videos, or articles for sending Arduino data over Bluetooth. All your help is very appreciated.

lelanl:
So would I need 2 NRF24 devices one for pc and one for Arduino. Also do you know any good libraries, videos, or articles for sending Arduino data over Bluetooth. All your help is very appreciated.

I'm confused now. I don't understand why you are asking if you need 2 NRF24s. I thought you were going to have 50 of them?

If the Arduino is connected to the PC using a USB cable or Bluetooth the PC won't need an NRF24.

Sending data with Bluetooth is just done with Serial.print() etc.

...R

Sounds like you're unprepared for the challenge:
an arduino data logger + wireless + gateway collecting data + web server. I've been using arduino long enough to know how to connect these dots. The hint is programming. A lot of it. If you have so little programming skill, you should focus on one thing only, maybe arduino taking sensor data and saving to sd card. That is doable with your skill level. Then expand to one-to-one wireless communication and so on.

liudr:
Sounds like you're unprepared for the challenge:
an arduino data logger + wireless + gateway collecting data + web server. I've been using arduino long enough to know how to connect these dots. The hint is programming. A lot of it. If you have so little programming skill, you should focus on one thing only, maybe arduino taking sensor data and saving to sd card. That is doable with your skill level. Then expand to one-to-one wireless communication and so on.

liudr:
Sounds like you're unprepared for the challenge:
an arduino data logger + wireless + gateway collecting data + web server. I've been using arduino long enough to know how to connect these dots. The hint is programming. A lot of it. If you have so little programming skill, you should focus on one thing only, maybe arduino taking sensor data and saving to sd card. That is doable with your skill level. Then expand to one-to-one wireless communication and so on.

liudr:
Sounds like you're unprepared for the challenge:
an arduino data logger + wireless + gateway collecting data + web server. I've been using arduino long enough to know how to connect these dots. The hint is programming. A lot of it. If you have so little programming skill, you should focus on one thing only, maybe arduino taking sensor data and saving to sd card. That is doable with your skill level. Then expand to one-to-one wireless communication and so on.

You are right sortave. I know i am unprepared somewhat but I am trying to complete this project within a year so the time span of learning this is large so i think in a year i will be capable.

Lelani I am trying to get USB over radio ( nrf24 links ) as well , I have not found any direct libraries for this so far but it would be a nice system to have in place . I am looking at these however it is a USB to nRF24l01 adapter

http://www.amazon.com/dp/B00Y7G3IUM/ref=pe_861660_138883610_fxm_4_0_n_id

lelanl:
You are right sortave. I know i am unprepared somewhat but I am trying to complete this project within a year so the time span of learning this is large so i think in a year i will be capable.

In that case I would recommend building your project from bottom up, i.e. make a robust data logger node, add telemetry, having multiple nodes and possibly sleeping nodes in mind, develop a protocol to log data from these nodes, then add a web server to receive, process, present data. One year (full-time job aside? full-time student?) is a good time line. Check back often. Post your questions, get some help, read some posts.