Weather station project

Hello everyone.

I hope you could help me with my project because I am at a loss for solutions.

I am a beginner in the field, which is why my last hope is found here.

So my project is to make a weather station in two parts, one which is outside and the other which is inside my home. These are the exterior part which causes all the sensors to give me a problem. So I have a total of 3 sensors that I can't get to work and I don't know why if these are the code or if these are the connections I tried them all, nothing to do I can't find the solution. In the 3 sensors I have 2 sensors which are the same... So I have an AS3935 ([AS3935](https://fr.aliexpress.com/item/32828168133.html?spm=a2g0o.order_list.order_list_main.15.5f345e5bdLxswQ&gatewayAdapt= glo2fra)) which must be a sensor for thunderstorms and lightning, and the other two sensors are for wind ([Wind Sensor](https://fr.aliexpress.com/item/1005005579975730.html?spm=a2g0o.order_list.order_list_main.41.5f345e5bdLxswQ&gatewayAdapt =glo2fra)) in RS485 Kit so I also took this: "RS485" to connect to my Arduino UNO WiFi R4. So here are the sensors that give me a problem because I can't use them (connection and code level). I haven't received any documentation on the sensors so I don't have much information, all I can tell you about the wind sensors is that it says: ZTS-3000-FSJT-N01 for the speed and ZTS-3000-FXJT-N01 for the direction, also there is marking on it Yellow 485-A and Blue 485-B which I suppose I have to connect to 2 RS485 module to the green thing with the screws?

I'm keeping my fingers crossed that someone will help me realize my project because I'm really blocked by this...

Thanks in advance.

Can you please post both the code that you are using and a schematic of how you connected everything?

Be sure to use CODE tags around your code. Any kind of schematic image should be good, even if it is hand drawn. Once we have that, we might be able to help.

Hi, welcome to the forum

Do everyone a favour and kindly read How to get the best out of this forum so you can post effectively. The more information we have the more we can help.
Here is the link

OK give me a moment while I do this if

BTW, there are dozens or hundreds of weather station projects on the net. There are even a few in the Arduino Project Hub. Some are beginner friendly, a few are not. Yours is in the later category. All that means is doing more research, looking at samples, and taking your time.
Good luck.

1 Like


Here is my connection diagram, as for the code I have tried a lot of things that I no longer know where I am. Normally for the AS3935 I try to do something in I2c and I use the AS3935 library from Steve Marple.

So does this help? I also tried other connections but I have shown you the ones I currently have.

Reiterating the requests and reminders:

Essentials

Hardware
We need to know exactly what hardware you have. We need to know what Arduino board (or other brand, such as ESP32) you are using and exactly what other hardware you are connecting it to. The more details we have, the easier it is to help.

Code problems
We can only find problems in code we can see. Please supply your complete code in code tags < CODE > More about posting code and using code tags.

As @xfpd mentioned, there is nothing we can do without looking at your code. However, here are some questions about the hardware.

  1. What do the RO, RE, DE, and DI pins do on the RS485 converter?
  2. Does the terminal block that you have drawn actually connect to the RS485 pins or to the power pins on the converter board?
  3. What do the A1 and A0 pins do on the lightning sensor board do?
  4. Have you considered the noise that a WIFI module is going to induce on your lightning sensor?
  5. Do you have any datasheets for any of the parts that you are using?

And some programming questions:

  1. Have you included both the RS485 and MODBUS libraries?
  2. Do your RS485 sensors actually use the MODBUS protocol? Because that is the only protocol that the converter boards are using.

And here's some additional notes that you might want to look in to:

  1. Are the SCL and MOSI pins on your lightning detector 5V tolerant? because you have them directly connected to the SCL and SDA pins on your Arduino, and those pins will output 5V.
  2. Forgiving the fact that you have labeled resistors in your schematic as "U" instead of as "R", I still have to ask, why are the resistors connected in a way that they both have 3.3V on one side of them, and they have 5V or 0V on the other side? Are you trying to bias the SCL and SDA pins on the Arduino with 3.3V? It seems like if you needed pullup resistors for the I2C line, they should be pulled up to 5V instead of 3.3V, but again, this only works if the pins on the sensor are 5V tolerant. In this configuration, the 3.3V pullup resistors will actually be pulling the 5V I2C signal from the Arduino down instead of up.

Just some food for thought. I hope this helps!

Hello, as I said, I don't have any documentation with the sensors, I search a lot on the internet but I'm a bit in the dark. As for the code, I'm not really into it because I'm trying several different pieces to test the sensors, but as nothing works I don't know what to do... (I'm trying codes already included in the libraries .) So here I am a little lost and I'm going in circles so I'm starting from scratch a little.... I'm not necessarily asking that we correct a code or anything but that someone can guide me towards documents or video to put me back on track :).Hello, as I said, I don't have any documentation with the sensors, I search a lot on the internet but I'm a bit in the dark. As for the code, I'm not really into it because I'm trying several different pieces to test the sensors, but as nothing works I don't know what to do... (I'm trying codes already included in the libraries .) So here I am a little lost and I'm going in circles so I'm starting from scratch a little.... I'm not necessarily asking that we correct a code or anything but that someone can guide me towards documents or video to put me back on track :). Also for the 2 sensors for the wind I don't know how it works. I connected the 2 rs485 modules like this because I had seen on the internet that these pins were to receive the data and as my goal is to recover the data from the sensors it seemed logical to me not to connect the rest . For the AS3935 sensor I don't know if my connection is just to have the I2c mode, I had put capacitors and resistors in order to filter and one can protect the sensors, without having too much. I remind you that this is my very first project and I found out about it on the internet which is also not 100% correct.

You entered a field you "are not into" with a shoebox of parts, refuse to follow guidance yet want people to do your work for you. Not everyone finds computers, programming and electronics interesting. I have a friend who started with music and finished as a concrete engineer (within civil engineering). Sometimes what you start with is not what you end with, and that is good. So, either do some work, or find your passion.

So you want us to research the parts for you, create the correct wiring diagram for you, and write the code for you. Got it.

I'll get right on that.

Smart move.