Posting sensor data to google spreadsheets using ESP8266 WiFi module

3,188 views
Skip to first unread message

John CC

unread,
May 11, 2015, 9:34:31 PM5/11/15
to sensor...@googlegroups.com
I managed to get an ESP8266 WiFi module to post data to a google spreadsheet.

Instead of using an arduino, the ESP module runs the code itself, acting like both an arduino and a WiFi module at the same time. It can also be connected to sensors like an arduino to read and send data.

Because neither the arduino or the RPi (or another WiFi enabled server) are required it brings both the cost and size of a sensor array right down. I think this ESP module cost about $3.50 including postage.

The ESP-01 I'm using only has 2 input pins but the ESP-03 has a bunch more, which could make it a better choice for this approach.
I need to solder an ESP-03 to a breadboard adapter before I can test it out.

Here's a link to the published data:
Currently it's just incrementing a value during each loop and posting that value. It can be easily replaced with the reading from a sensor.

Here's a document with some of the info you need to do it:

It's a draft and I'll probably add more info and links, etc. but it covers most of the important points.

It's not the easiest process to do. Many of the other arduino prototypes are easier to build.
But this approach is very cheap (for a wifi enabled sensor array) and results in a very small circuit. So in many way it's worth the tedious setup process.



jan...@gmail.com

unread,
Feb 2, 2016, 5:32:37 AM2/2/16
to sensorica-ecg
I'm looking for this, but I'm missing the #6 part,,, how do I manipulate the google API 

/jano

electron...@gmail.com

unread,
Apr 29, 2016, 3:51:55 PM4/29/16
to sensorica-ecg, jan...@gmail.com
He hasn't described it maybe because he didn't get it to work or he was using a middleman like temboo or pushingbox. I have published a project which enables direct connection from esp8266 to Google. No middleman required. Check it here: HTTPSRedirect

Tiberius Brastaviceanu

unread,
May 4, 2016, 1:51:22 AM5/4/16
to John CC, Scott Frederick Laughlin, sensorica-ecg
Hi John, 

Scott might be interested in this. 

Scott, are you subscribed to this mailing list (sensorica-ecg)? 

--
You received this message because you are subscribed to the Google Groups "sensorica-ecg" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sensorica-ec...@googlegroups.com.
To post to this group, send email to sensor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sensorica-ecg/CAK73SL2Tn3mteb3nsWGgOs0g4GRKMax%3D9vgTtXcSKEWCY7Mh1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
t!b! 
co-founder of SENSORICAan open value network (or open enterprise)
co-founder of CAKEconsulting for the new economy
founder of Multitude Project: informing the new multitude

John CC

unread,
May 8, 2016, 1:41:24 AM5/8/16
to Tiberius Brastaviceanu, Scott Frederick Laughlin, sensorica-ecg
Hey sorry for the slow reply on this issue, and for not completing that document.

I now use dweet.io instead of posting to google spreadsheets. Much simpler. No need to set up any accounts.
It's also possible to display data directly on freeboard.io from dweet.io, allowing easy set up of graphs, etc.

Here's the sketch:

Connect up the soil moisture sensor signal to A0 and connect the sensor power pin to D4 (labelled D2 for some reason on the ESP8266 development boards).
You also need to set the WiFi SSID and password, as well as change the "dweetID" to something different.

Change the publish interval variable to set the delay between each post. It's set at 5 seconds by default.

If anyone needs help getting that working let me know. I'll try to put together a walkthrough document at some point.

Cheers,
John

Scott Frederick Laughlin

unread,
May 8, 2016, 1:45:51 PM5/8/16
to Tiberius Brastaviceanu, John CC, sensorica-ecg
That's funny,

Independently this weekend I got an Adafruit feather huzzah (which is a breakout board for the ESP8266) working to post to a django server for data collection.

It has an ESP-12 module which is the latest version of that chip-set and there is actually an Arduino library that allows you to load Arduino sketches right to the ESP module. While there are 9 GPIOs including I2C and SPI headers, I was a little disappointed when I realized that there is only 1 analog ADC, and that it only takes 0 - 1V as input. That means that we can only attach 1 analog sensor and we'll need to be careful about its output range... :(.

I think the Feather Huzzah would be great for development, because it's a bit easier to solder and it has a USB mount for the ESP8266 module... it runs at about $15.

Best,

Scott

John CC

unread,
May 8, 2016, 9:05:25 PM5/8/16
to Scott Frederick Laughlin, Tiberius Brastaviceanu, sensorica-ecg
You should be able to use one of these to increase the number of analog inputs:
I've got 2 of them and I just soldered the pins on. Yet to try them though but I've used other similar chips before.

I use these ESP8266 boards:
I believe it's similar to the Huzzah.

If you do try those boards above, DON'T get the ones with "LOLIN" written on them. I got 2 and can't get them to work (probably a driver issue) whereas the others work well.
The ones I use look almost identical from a distance, but up close they're wider and have different pin configuration etc.

I wasn't actually aware of the 0-1v input range. I thought it was 0-3.3v (silly mistake).
Fairly sure I've supplied higher than that by connecting the soil moisture sensor to 3.3v. It seemed to work.
I need to do some reading and some more experimenting to figure out what's going on.

desig...@gmail.com

unread,
May 18, 2016, 2:12:21 PM5/18/16
to sensorica-ecg
Hi buddy, Have you a copy of the script you use for this spreadsheet.

Cheers

Dans
Message has been deleted

dro...@gmail.com

unread,
Nov 4, 2016, 12:40:15 PM11/4/16
to sensorica-ecg
Hi compulsivecoder ,

This is not the answer but rather a question:

I am trying to do this and struggling at bit with ESP8266.
When I use a URL constructed based on google spreadsheet with parameters to post data to sheet,
from a Desktop browsers like Chrome, IE, it successfully posts the data to the spreadsheet.
However when I put the same URL in ESP8266 I am getting 400 error.

Could you please share your sketch and/or any modification that you did to the link that google scripts gives you after publishing it?

Thanks much!
DX

Tiberius Brastaviceanu

unread,
Nov 4, 2016, 1:05:40 PM11/4/16
to dro...@gmail.com, sensorica-ecg
I think John already posted a link to github 

--
You received this message because you are subscribed to the Google Groups "sensorica-ecg" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sensorica-ecg+unsubscribe@googlegroups.com.

To post to this group, send email to sensor...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
co-founder of SENSORICAan open value network
co-founder of CAKEconsulting for the new economy
Part of Blocksense: blockchain and other p2p technologies
founder of Multitude Project: informing the new multitude
Reply all
Reply to author
Forward
0 new messages