Big Meteorologic GrovePi+ project

hi everyone, as promised here is the project I mentioned to Karan:

system runs DietPi, autologins, autostarts python file, saves CSV data into microSD and sends it using WIFI dongle to Android App

@karan and others: do you see at a glance anything wrong with the system? (enough power for all sensors or conflicts)

Main issue I have is which x2 CO2 sensors (>10% o 10.000ppm) to use, if need cables or pump and in which port to place them?

then the PH sensor (Atlas Scientific) got affected so where to plug in as well?

Thanks everybody

Wow, this is quite an undertaking. This might probably be the biggest sensor setup I have seen with the GrovePi in a while.

There are few points to note though:

  • The GPS is usually a UART device and you can only connect one UART device on the RPISER port
  • The K33 CO2 module can be use with the GrovePi+ but you’ll have to make a custom cable for it. If you are planning to use 2 of them, then make sure that there is an address select on the sensor, otherwise you’ll not be able to use 2 of them.
  • The pump takes a lot of current and the GrovePi won;t be able to supply that. You should connect a DC relay and use that to power the pump
  • The CO2 setup looks pretty costly. What do you think about this: http://www.seeedstudio.com/depot/Grove-CO2-Sensor-p-1863.html.But the bottleneck is that we only have 1 UART on the GrovePi.
  • Any part number for the pH sensor.
  • Since you have too many UART devices, a Serial port expander might be better. I found this: http://www.atlas-scientific.com/product_pages/components/port_connector.html. Haven’t used it before but looks pretty good. Or you can use something like a UART to I2C convertor: https://www.sparkfun.com/products/9981.

Do keep us updated about your project and we’ll be more than happy to help you out as well as feature it on our site.

-Karan

thank you very much for the professional advices, nice to see I have enough ports for the sensors, few points:

  • so the GPS port goes to the UART instead of the D4, ok
  • the cable you said I think you mean this l2c: http://www.co2meter.com/products/i2c-sensor-communication-cable and what do you mean with " make sure that there is an address select on the sensor, otherwise you’ll not be able to use 2 of them", do you mean if the sensor can be programmed to choose 2 addresses or if I need to program RPi in order to choose 2 addresses?
  • I think we should not use pump because the CO2 meter guys said it has so little life, but not sure if not having the pump will affect the readings a lot
  • I think should use a floating device connected externally with metal of piece, so the ultrasonic or distance interrup sensor wont take humidity, being isolated. Which sensor would you use to meter the level of liquid of a moving tank?
  • the grovepi sensor provides so very little measures (2.000 ppm), that is why I need K-33 (30% or 30.000ppm) or others similar like Cozir
  • what is the problem of having too many UART devices? and why do I need the UART to I2C convertor?

after your help, this is how the system looks like:

I try to avoid the GPIO serial because I think it is more complex, requires breadboard and so on, even when Athlas allows both interfaces, please respond to the answers above or tell me whatever you notice :wink:

Thanks in advance for your time, I will continue updating this thread

  • The GPS looks better now in the UART port
  • The cable I was talking about was something that converted the signals from the CO2 sensor to the Grove connector. Maybe you can use something like this: http://www.seeedstudio.com/depot/Grove-4-pin-Male-Jumper-to-Grove-4-pin-Conversion-Cable-5-PCs-per-Pack-p-1565.html?cPath=98_106_57 to get the data from the sensors to the grovepi. There are lot of different cables on Seeed’s site, so choose the one that works for you: http://www.seeedstudio.com/depot/s/grove%20cable%20.html?search_in_description=0
  • You can try using one of the CO2 sensors without the pumps and if it works well, then great, otherwise you might have to use a pump.
  • I would also prefer not using a pump
  • I think for the measuring the water level, you can use the ultrasonic sensor, the water should refect back the waves and give a good reading. Do try this out and let us know if it works .
  • All the I2C devices come with an address, like the GrovePi+ itself has 0x04, this ADC has 0x51 http://www.seeedstudio.com/depot/Grove-I2C-ADC-p-1580.html?cPath=98_16. So you cannot connect multiple sensors unless there is an address select on the sensor. If you check the ADC above, it has solder jumpers to change the address and this is something you do on the sensor itself, it cannot be done from the Pi. Please check if the address of the CO2 sensor can be changed.
  • With UART/Serial you can only connect one sensor unless there is hardware handshaking (which is not there with the Pi or the Grove sensors) so if you have multiple UART sensors, then you’ll have to either change them to use something else like I2C or change the sensors themself.

-Karan

thanks a lot Karan, I simply don’t get the last paragraph

With UART/Serial you can only connect one sensor unless there is hardware handshaking (which is not there with the Pi or the Grove sensors) so if you have multiple UART sensors, then you’ll have to either change them to use something else like I2C or change the sensors themself.

I seem to have only the GPS as UART/serial sensor as the last table shows?

Sorry for confusing you. That is just a note to keep in the back of your mind. The CO2 sensors is an I2C/UART sensor, so if there is no address select on it then you might be forced to use UART, which might cause a clash with GPS or use a UART/I2C multiplexer.

ok clear, thanks a lot :wink:

for now I am receiving the rp2 b, grovepi+, light, temp+humidity pro sensors and clock just to start with dietpi and will try to send its CSV via WIFI dongle + FTP to and android app created with mit inventor, will update you later

when I run

sudo i2cdetect -y 1

I get error

could not open file/dev/i2c-1’ or /dev/i2c/1’: No such file or directory

perhaps is a problem for using DietPi?

edit: fixed it after installing i2c

works like a charm under DietPi! it is reading from light sensor now

one consideration for your customers is must install i2c using the DietPi config menu

dear Karan,

I implemented part of the system so far, it writes on csv values of sensors and time but receive an error which seems a malfunction of the grove analog light reader:

http://s2.postimg.org/55t1w0nmx/IMG_20160105_215133.jpg

this error occurs very random, sometimes after a couple of seconds, and sometimes after a minute

got idea of what is wrong or if the sensor has malfunction? thank you so much

The GrovePi does read IOErrrors sometimes. The easiest way to handle these is to use a exception handling and just print an error in case of an IOError and try again. It should be something like this: https://github.com/DexterInd/GrovePi/blob/master/Software/Python/grove_analog_read.py#L49-L50.

-Karan

Excellent Karan, for some reason my code didn’t have it :wink: