Logging voltages for weather sensors

I tried to take a photo, it was awful. The screen is very reflective and might as well be a mirror, so I'm not putting the result here, sorry.

If you wish I will move this topic to jobs and paid consultancy where you can advertise for someone to do the work for you. Would you like me to do this?

Hi

My weather website is hosted by a reputable company that have secure measures to stop hackers so a weather website like mine hosted by a company has no more chance than any other website on the internet of being hacked. I use FTP program to upload the files.

You could move the thread soon. However, before hand I would like to work out what type of logger could be best for my purpose based on what I said above. I thought analogue inputs may be more flexible.

Another thing I am thinking of adding would be the output from a load cell sensor. This could be used to make a weighing rain gauge as you can see at weighing rain gauge - Google Search . They are very expensive to buy but much more accurate than a tipping bucket version. However, I think I could make them for a much lower cost with an accurate load cell. I just need some help to get a circuit made for the load cell so the output could easily connect to the logger. On my current system it would need to generate between 0 and 5 volts. A 1 or 2kg load cell could be used.

The main thing is to first work out the type of logger I could use. Based on what I suggested here and in past replies, do you think the Arduino Mega2560 could be easier, faster and more cost effective to make up and program than other systems like D1 Minis ESP8266 or is there another logger that could work more effectively and be easier to make up and program?

Regards Richard.

I've run out of advice for you, if I give you any more I'll just be repeating what I have already said. The only additional advice I have is that if someone else is going to work on this then they will have an opinion on what device they think will be best for them to program, I suggest you go with whatever they say.

Let me know when you want to move this to the paid category.

Hi

You can move these posts to a better category where hopefully someone can help.

Does anyone know if https://pi-plates.com/pplogger-an-open-source-multi-channel-data-logger-for-the-raspberry-pi/ or https://www.instructables.com/Sending-data-from-Arduino-to-Excel-and-plotting-it/ could do what I need?

Regards Richard.

Hi Richard, please tell me if you are looking to pay someone to do this for you or looking for help for you to do it yourself.

Hi

I do have some friends that could do it with some advice so any suggestions would be appreciated. However, I could also pay someone else to do the whole thing if it will not cost too much. I am not sure how much work is involved. I value any suggestions or contacts of anyone that can help.

Regards Richard.

I have moved this to project guidance. I suggest more clarity about what help you want and whether you want to pay for it would increase your chances of getting help. If you want paid help it would help to indicate a budget.

put your data in a database, sql sqlite maria whatever
node-red is an excellent way to gather and store your data , it runs on a raspberrypie
its also excellent for displaying your data eg


or this

or

or selectively like this

Hi

Do you think a Raspberrypie would be much advantage over what appears to be a lower cost system at https://www.makerstore.com.au/product/elec-mega2560/ that appears to do what I need as it has over 10 analogue inputs? However, someone earlier suggested the MEGA2560 would not transmit wirelessly to the computer by itself. I wonder if a low cost transmitter could be added to it to make it do so and if a Raspberrypie set up to do this would then be lower cost? Or is there something else you suggest like others suggested above including D1 Minis ESP8266?

I also wonder what would be easier to program to do what I need which may be to log the voltages of the inputs in a text file as explained above.

Is it hard to program a logger to get the values of the sensors logged? Do you have an idea of how many hours work it could take as I may need someone to do it for me? Alternatively, there may be something done already that I could use.

Regards Richard.

It's a little 'hard' ( I mean long ) to read the whole thread... ( so I admit I didn't read ).

But the concept should be:

  • you have an old acquisition system working on an old pc via parallel port that samples analog inputs saves it as a text file which you elaborate via excel ( which is very manual if I understand )
  • now you want to 'replicate' this in a more 'modern way'. I propose different solutions:

1 old school) add a 'sensor hub' which connect to sensors via wire and connect to pc via ethernet or wifi, on the pc ( in place of the program thet reads your sensor via parallel port ) add a simple program that reads sensors via the net and saves the text data as you are doing now ( minimum effort ). In this solution everything continues to work in the same manner, you have only 'disconnected the acquisition board from the parallel port', and this sensor hub can be anywhere ther is ethernet or wifi coverage.

2 not so old school) add a 'sensor hub' which connect to sensors via wire and connect to pc via RF, in this case you have to add a an RF receiver that connects to the pc via ethernet or wifi, on the pc you add the same program ( as above ) that saves data in text form...

3 next gen) you can do everything ( and the opposite of everything ), there is a world of options... ( and even complications ; - )

There are also ready made ( commercial ) solutions ( that belong to the next gen solutions )
These are generally 'rf sensors' that connect to a 'gateway', the gateway can send data online to 'weather portals' and send data to pc too ( I have an ecowitt wheater station with various sensors and send data to my weather site too ). The drawback is you have to use their sensors, with their caracteristics, if it is ok this is a 'super solution' ( I mean very powerful ). I'm not affiliated to ecowitt in any way.

Regarding solutions 1) and 2) ( forget the arduino mega ) the board to use is an esp32 board, you can find ready made esp32 boards ( all have wifi and bluetooth ) which integrate also, ethernet, lora ( long distance rf transmission ) 16 a/d input ( 6 if using wifi ), lots of hardware periferals ( for example no need an analog pin for reading a tipping rain bucket or a wind speed sensor )...

Hi

Which esp32 board do you suggest for my purpose? There are many listed at https://core-electronics.com.au/development-boards/esp32.html. I was hoping to have at least 10 analogue inputs if I go that way.

I am now thinking of a weighing rain gauge as that is more accurate than a tipping bucket one. The weighing ones work off load cells and I could make a system up by buying a load cell.

I was just thinking a low cost wireless USB transmitter over 100 meters could work with a board that does not have inbuilt wifi like the MEGA2560. Is that so?

Why don't you suggest using the MEGA2560? It says it has 16 analogue inputs and on the link I sent it says: "Arduino is an open-source physical computing platform based on a simple i/o board and a development environment that implements the Processing/Wiring language. Arduino can be used to develop stand-alone interactive objects or can be connected to software on your computer (e.g. Flash, Processing, MaxMSP). The open-source IDE can be downloaded for free (currently for Mac OS X, Windows, and Linux)."

Regards Richard.

Because esp32 is a 'mega2560 on steroids', or 'esp32 can do it better', it outperforms in any aspect the mega ( only lower pin count ).
More seriously it integrates:

  • arduino ide compatible
  • wifi and bluetooth
  • dual core 240MHz processor
  • 500K of ram and 4-16M of flash
  • it has 16 a/d inputs ( but only 6 if wifi is used )
  • hardware serials
  • ....

Which wersion ( too much available ), but I'd say:

  1. base with everything said before
  2. ethernet base + ethernet
  3. lora radio base + lora rf transceiver + display + battery
  4. ...

If you search you can find easily boards with integrated screen ( very useful in debugging, for setting... ), with integrated battery management ( firebeetle ones are good )
The link I posted are only for reference ( I'm not sayng to buy from these or other sellers )

Regarding the rain weighing bucket, I had the same idea... but not very simple to do

  • you need a way to empty the bucket
  • also I considere there is some filtering to do on the weight measured, I imagine that the wind will induce vibrations and oscillations on the load cell... but nonetheless I have bought a 1Kg load cell ( but never used! )

Hi

Could you give me a link or model number of the best esp32 board for my purpose? There are many different ones including on the link you sent at https://www.dfrobot.com/product-2233.html . I looked at one of them and it did not say it had analogue inputs. I wonder if there are some with more than 6 analogue inputs if wifi is used. However, couldn't a wireless USB transmitter be simply added if I want to use more?

Microsoft Excel is very flexible and could enable filtering to get a load cell generate data to graph out rainfall. A large tipping bucket can be used to empty it or you can just empty it yourself every so often.

Regards Richard.

Which version ( with which option )?

  • the lora version ( with lora rf transceiver + display + battery + sdcard ) is a good board, it does not include ethernet, select frequency according your location ( 915MHz usa, 868MHz eu, 433MHz asia, but verify ) ttgo/lilygo $22
  • base $4

P.S.
Out of curiosity, why so many analog inputs are necessary? Lots of sensors are fully digital and you can connect them via I2C or SPI ( for example pressure sensor, temp and humidity sensors )
ESP32 has these ports available,
For example the weighing rain sensor can be made with an hx711 which uses a digital protocol...
Also for wind speed sensor ( for example ) you can select the 'npn type', which is digital, no need for an analog input.
Additional analog input can be added via additional board ( this is a 4 channel 16bit adc board )

P.S.
Sorry didn't reply to your question:

However, couldn't a wireless USB transmitter be simply added if I want to use more?

No, usb is not 'simple' ( is simple on a pc, but not on a microcontroller ), but we can easily add others a/d inputs ( as said before ) via i2c

Hi

I have never used digital sensors and I do not know about what is expected from the outputs. Analogue sensors produce a slow change in voltage as the temperature or light intensity changes and as the resistance changes. I am not sure if this is the case with digital sensors? If I use a similar method to calculate the values of temperature, light and other weather measurements I would need a set of numbers put into excel between 0 and 5 based on the measurement. My current logger logs between 0 and 5 volts and records the values in columns in a text file and that is pasted into Microsoft Excel. I am not sure if this will work with digital sensors? Also, I am not sure if digital sensors are more or less accurate than analogue ones? The LM335Z analogue temperature sensor has a repeatability of mostly around 0.2°C from what I have observed. I wonder what it is for a digital temperature sensor?

Regarding the load cell, is SparkFun Load Cell Amplifier - HX711 - SEN-13879 - SparkFun Electronics the part you mean and could that be set to make the voltage of the load cell to be amplified to range between 0 and 5 volts DC?

Regards Richard.

You can use the sensor you want ( I'm not saying you have to use this or that ) and if you want to use all analog sensors you ca do.

About the hx711 ( or any other digital sensor ) if you want to convert to analog it can be done, but there is no need to do this the 'sensor hub' could report directly the measure to the text file ( if having 200g of rain it could write directly 200 in the text file, no need to write 1V, cosidering 1Kg full scale as 5V, an then the spereadsheet converts 1V in 200g )

Regarding digital sensor they are 'analog inside' but also has a digital conditioning circuit that correct every 'analog inperfections' ( this was done also in anagogue ones, but only in 'analogue way' which is more limited.

If you look for example at sensirions sht3x or sht4x ( temperature/humidity sensors ) these are used by davis and ecowitt in their product, these sensors outperforms lm335z in any aspect ( to be expected as I can find the lm335 in my 'national smiconductor linear application databook' of 1986, a little improvement is to be expected in 40 years ; - )

Hi

I could use digital sensors and just put the weight in the text file for the load cell instead of the voltage. My concern is the programming of the board to create the text file with the columns of values. How hard would this be to do for the Esp32 board and how many hours of work would it take and could you possibly do it for me? If it is repetitive for each column, you could just do one and it may be possible for me or my friend to learn to do the rest. Alternatively, is it likely there will be a program already made up somewhere to do it that may only need a little modification to make it do what I want? Would the Esp32 board be as easy as any board to program to do what I need or could the MEGA2560 be easier?

Regards Richard.

Yes, and the weight will be exctly 1.0 ( that simple )

My concern is the programming of the board to create the text file with the columns of values. How hard would this be to do for the Esp32 board and how many hours of work would it take and could you possibly do it for me?

Ok I can do it ( the 'base option' I mean that consist in esp32 devkit board as 'sensor hub' connected to pc via wifi, and to sensors via wires, most similar to the one you are using now, I believe ). The task consist in two pards:

  • the program for esp32
  • a program for pc that generates the text file ( this could be simply a scheduled task of windows )

Would the Esp32 board be as easy as any board to program to do what I need or could the MEGA2560 be easier?

When using the ide, no difference between the two

P.S.
Only a note on my previous post, the lora board I prevoiusly linked has only 4 analog pins usable ( together with wifi )
This one from heltec has 7 ( I have both boards, this one does not have sd connector )

Hi David

Thanks very much for that. Let me know how much work is involved to do the programming. Do you know how long it could take to write a program? I am hoping to keep costs down for a non profit community service but could pay you a couple of hundred dollars to do it. My friend and I could do some of the programming if you can show us how. I thought some of the lines may be repetitive and just a matter of copying and pasting and changing values. With my current system, a new text file with a time stamp in the name is generated every hour. I have been using Windows task schedular and Mouse Tamer software to close the program and open it again every hour to create the new file.

Currently, my software records the voltage from each input every half a second so that each hour there are about 7200 lines of data in the file. A lot of samples are needed because wind gusts are often very short and if the sample rate was longer the maximum speed could be missed. What I do is a data summary to condense the file so that only the maximum or median values of the samples over the last 36 seconds are pasted into another file. This reduces the number of samples pasted into the main file with the graphs. You do not have to do this as my Excel program does it.

We may need a hand to assemble the boards as well unless you can show us how to do it. It appears as if three or four boards need to be connected where a 4 channel 16bit adc board is to give extra analogue inputs to increase the number to about 10. I could use some digital inputs as well.

Do you think WiFi LoRa 32(V3) – Heltec Automation may be the best board for my purpose? I am not sure if the sd connecter is a problem. Also, does it have a few digital inputs?

I can also email you my current program if you send me your address.

Regards Richard.