Arduino UNO weather station coms.

Hi all.

I have built a weather station, using an Arduino UNO, it consists of a BME280, (Pressure, Temp & Humidity) a BH1750, (Lux Level) and a UVM30A (UV Level) Currently this is powered by batteries, I would like to start storing the data I receive from the sensors. I have a PC running Windows 10 and an Internet connection via a Router.

My pc is loaded up with what's called WEATHER DISPLAY software, which displays real time data and stores it on file as well, so I need my Arduino to communicate with the Weather software on my PC. Research so far as pointed me towards using NRF24LO1 T/X & R/X modules, but some websites recommend using ESP 32 or BLUETOOTH ?? confused what, i need help, can anyone supply it, and guide me which way to go?

Regards

Ray

One way of doing it is through using MQTT.

I have 6 ESP32's communicating with a MQTT Broker running on a RPi4. A Python program on the RPi4 acts as a message traffic handler sending data to and from the ESP32's and my database on my website.

One of those ESP32's runs a weather station that sits in the yard. The weather station runs off a LiFePo4 8Ah battery that is recharged by a PWM controller that is supplied by 12V solar cells.

You could load up and use Node-Red on the PC as a communications interface, instead of writing a program.

My environmental sensor is a BME680 with low power mode.

By the look of it, your PC software expects to talk to a weather station over a COM port. So I imagine you'll have an Arduino near the PC that gets sensor data from your custom weather station, formats it appropriately and then passes it to the PC over Serial.

If you haven't already, you might want to get the local Arduino talking to the PC with some fake sensor data as a preliminary project.

As you have discovered, you have options when choosing the mechanism that the weather station Arduino uses to talk to the PC Arduino: Wifi, bluetooth, x-bee, LoRa, NRF24LO1 and others.

The critical thing is range obviously. I tried to do this at my Dad's house in England using wifi but multiple brick walls stymied that. Next I tried x-bee, which had similar problems although I could probably have got it working with more radios to make the hops shorter. Pricey though. Bluetooth is likely hopeless in your case - solid walls and the distance to the weather station are probably too much. How far is it?

I'd try the NRF24LO1 solution first and if that fails, upgrade to LoRa.

Hi, many thanks for your replies.

The Arduino TX will be about 20 foot in a clear line from the Arduino RX, the RX will be next to my pc, the RX will be connected to one of the PC Com Ports, I also intend to power the UNO TX by battery, re charged by Solar Panel via a Charge Controller.

At that range, unless you have thick walls, I'd expect most any of those communication methods to work although WiFi feasibility will depend on the distance to your router.

I suggest that you take a look at the options and choose whichever is easiest to code.

gresleyman:
The Arduino TX will be about 20 foot in a clear line from the Arduino RX, the RX will be next to my pc, the RX will be connected to one of the PC Com Ports,

Bluetooth should be OK if you really mean clear. but the above doesn't make much sense. Why don't you put a Bluetooth dongle on the PC and talk directly to that?

gresleyman:
Research so far as pointed me towards using NRF24LO1 T/X & R/X modules,

Not very clearly, I suspect. NRF24s are usually SPI devices. The performance and price are much the same as Bluetooth.

You might want to consider a Bluetooth link directly between your distant Arduino and the PC. Most PC's have Bluetooth as standard and Bluetooth appears as a Serial connection.

If you want to use nRF24L01+ modules between 2 Arduinos then this Simple nRF24L01+ Tutorial should get you started.

...R

Many thanks for the replies.

My router is in an upstairs bedroom, probably about 10 meters away from my pc with only two walls to go through, the house is a brick wall, with a large glass window, if that makes any difference. My pc is in a self built Garden Office, which is constructed from wood with 100 mm thick Insulation board, and one large glass window, has I have previously stated the Weather Station will be no more than 5 Meters away in a clear unobstructed line.

The object is to get data from the Weather Station onto my pc, how will BLUETOOTH communicate with software on my pc where the data will be stored, or have I missed something.

you can run any micro with an eithernet connectino to your router/switch
you can put one on the exterior wall, receive al the BT, RF and ESPNOW you want, dump that into your home network and Bob's your Uncle.

one RS485 from outside could connect to something inside.

you are not required to run wireless at every step. the WWW is wired, and faster.

Idahowalker:
One way of doing it is through using MQTT.

I have 6 ESP32's communicating with a MQTT Broker running on a RPi4. A Python program on the RPi4 acts as a message traffic handler sending data to and from the ESP32's and my database on my website.

have you made any of this available ?

dave-in-nj:
have you made any of this available ?

Of course.

Robin2 is suggesting that you dispense with the receiver Arduino and have your PC receive Bluetooth transmissions directly. If your PC is not Bluetooth capable you can get a receiver module that will plug into a USB port.

Either way, the Bluetooth device will appear to your PC as a COM port. You will need to configure your weather software so that it knows which port to use.

Then the weather station Arduino can send data to the Weather software via Bluetooth. Don't forget that you will need to send that data in a format that the weather program understands. It may have a standard format that it uses or you may need to emulate one of the commercial weather stations it knows how to talk to.

gresleyman:
The object is to get data from the Weather Station onto my pc, how will BLUETOOTH communicate with software on my pc where the data will be stored, or have I missed something.

What you have missed is that it's a lot simpler than you realise, and has nothing to do with the router upstairs. Either your PC has Bluetooth already installed or it hasn't. If the latter, you can install a dongle in a (hopefully) spare USB port for about $5. Your weather display apparently talks to Bluetooth devices, and Arduino should be just another of the same. The Arduino software would be no different to that used when Arduino is connected to PC with wires.

The advantage of Bluetooth is that it is made for talking to the outside world - which is where the PC is, i.e. the arduino with your sensors talks to PC directly - no intermediary. WiFi has the same character and may be quite appropriate in your case. Other wireless means, like NRF24, require another Arduino at the PC end to translate, which is probably not such a good idea in your case.

I will put in another recommendation for MQTT. I have dozens of sensors, switches and lights all over my property that all communicate over MQTT. It is ridiculously simple.

MQTT is platform agnostic and works over ESP, Arduino, Raspberry, PC and even, I think, Mac (though I don't know anyone using a Mac for anything resembling programming).

Did I mention that it is ridiculously simple? The PubSub library does all the heavy lifting for you.

I will try and go with Bluetooth, I have a com port dongle.

Your help is much appreciated..

Regards & Thank You

Ray

I suggest you use a plain-vanilla terminal, like RealTerm, on the PC to start with.

You might find the following background notes useful.