Wind speed Monitor - Failed to read registers

I am working on the wind speed monitor project and I cannot get the wind sensor to read on the project. I have the green and white wire in A and B and the red and black wire of the wind sensor connected to the power supply at 5 volts. Why does it keep failing to read and what can I do to fix this?

image

Hi,

I think I already gave advice on this one.

Please check the RS485 bus by using oscilloscope or decode the signals using a logic analyzer.

Check if you have a healthy RS485 bus and see in the datasheet if you are able to get the data on the specific address.

My oscilloscope is not the kind you were referring to, I have a really cheap one with alligator clips that won’t work for that. Also I have tried multiple buses, just used a new board and bus and it’s still giving me that error. PSU is at 5 volts

Do I need any additional hardware for the logic analyzer? If not what do I use, the power supply? What software would I use?

Hi @a1projects ,

I can share some good pointers on how to troubleshoot RS485 bus.

https://www.eetimes.com/a-troubleshooting-guide-for-rs-485/#

Also I have noticed in this picture they have added some piece to the end of the wire to make it connect better, and I am wondering if maybe that’s my issue.

Is this enough exposed wire to make a connection to the bus that I have here?

Also you mentioned grounding the ground port on the bus, how do I do that? All my wires are used up, what would I do?

Also Carl this is what the data sheet says, but I don’t know what the impedance means so I have no clue if 5 volts is enough. I went to 9 volts but I am scared to go any higher. When the device is plugged in at 5v it says it is running .02 amps
image

Some comments I have:

  1. The extra thing you see in the end of the wire is called a ferrule. It improves integrity of the contact but I doubt that is the problem. You can check using a multimeter if your connection is ok by unplugging the 4pin aviation type connector in the wind anemometer then check the continuity. This is also the reason why I want you to check using scope. If anything is wrong in the wiring electrically, you can easily spot that.
  2. The sensor is running at 9600, I am not sure why your scope can’t capture that. Even a 10Mhz bandwidth will see that. Hmm. No need to hook two probes to see the differential signal if that complicates things. Just connect one and see if there is any pulse. We are just dealing here with RS485 bus being converted to a UART signal. Let’s see what’s happening on those lines for us to have a better view.
  3. The grounding might not be necessary since the RS485 device is close to you. But it wont hurt making the ground at the same level. Just short it with a piece of wire. If you are not confident doing it, probably it is time to ask for help from someone who can help you there. You have a current-limited powersupply so you should be safe if you set the current limit at a reasonable level.
  4. I am not 100% sure about the impedance requirements in the datasheet but I suspect that is related to the termination needed on the RS485 bus. You are working at a very close distance so adding a termination might not be necessary. This termination resistor will depend on what signal you are seeing in the RS485 bus.

I strongly suggest you ask for a friend to see your setup and check it. If we are only neighbors, I’ll go there and hook some wires and run basic RS485 Arduino sketches (just to sniff the signal first and no LoRaWAN and other sensors) to see what’s happening :wink:


Are you saying put each prong on these wires that go in the bus to check for continuity?? I tried this and it didn’t register anything (also the red and black were still hooked up to psu with 5v runnings)
Ok I actually have some ferrules and was about to put them in!

Still getting

failed to read registers! Connection timed out
failed to read registers! Connection timed out
Sending frame now...
lmh_send ok count 6
failed to read registers! Connection timed out
Sending frame now...
lmh_send ok count 7
failed to read registers! Connection timed out
failed to read registers! Connection timed out
Sending frame now...
lmh_send ok count 8

Still getting

failed to read registers! Connection timed out
failed to read registers! Connection timed out
Sending frame now...
lmh_send ok count 6
failed to read registers! Connection timed out
Sending frame now...
lmh_send ok count 7
failed to read registers! Connection timed out
failed to read registers! Connection timed out
Sending frame now...
lmh_send ok count 8

Do you have a basic bus sketch u can recommend I try to make sure the bus is working so I can rule out if that is the problem or not? When you say scope do you mean oscilloscope? I have one with alligator clips prongs around here somewhere I can look for.

Basic modbus example here:

Ok can you check 2 posts up sorry I made a 2nd post, is that how I am supposed to be checking continuity?

Got this error trying to run that example code. I have the same settings as before on my other projects

/home/og/.arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: sketch/ModbusRTUClientToggle.ino.cpp.o: in function `setup':
/home/og/Arduino/libraries/ArduinoModbus/examples/RTU/ModbusRTUClientToggle/ModbusRTUClientToggle.ino:25: undefined reference to `Adafruit_USBD_CDC::begin(unsigned long)'
/home/og/.arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /home/og/Arduino/libraries/ArduinoModbus/examples/RTU/ModbusRTUClientToggle/ModbusRTUClientToggle.ino:26: undefined reference to `Adafruit_USBD_CDC::operator bool()'
/home/og/.arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /home/og/Arduino/libraries/ArduinoModbus/examples/RTU/ModbusRTUClientToggle/ModbusRTUClientToggle.ino:33: undefined reference to `Serial'
/home/og/.arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: sketch/ModbusRTUClientToggle.ino.cpp.o: in function `loop':
/home/og/Arduino/libraries/ArduinoModbus/examples/RTU/ModbusRTUClientToggle/ModbusRTUClientToggle.ino:54: undefined reference to `Serial'
/home/og/.arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: ../arduino_cache_762223/core/core_ddcf23c3198deeb51e1d6061e46ab0fa.a(Uart.cpp.o): in function `serialEventRun()':
/home/og/.arduino15/packages/rakwireless/hardware/nrf52/1.0.0/cores/nRF5/Uart.cpp:27: undefined reference to `Adafruit_USBD_CDC::available()'
/home/og/.arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /home/og/.arduino15/packages/rakwireless/hardware/nrf52/1.0.0/cores/nRF5/Uart.cpp:30: undefined reference to `Serial'
/home/og/.arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: ../arduino_cache_762223/core/core_ddcf23c3198deeb51e1d6061e46ab0fa.a(main.cpp.o): in function `_write':
/home/og/.arduino15/packages/rakwireless/hardware/nrf52/1.0.0/cores/nRF5/main.cpp:130: undefined reference to `Adafruit_USBD_CDC::operator bool()'
/home/og/.arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /home/og/.arduino15/packages/rakwireless/hardware/nrf52/1.0.0/cores/nRF5/main.cpp:132: undefined reference to `Serial'
/home/og/.arduino15/packages/rakwireless/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /home/og/.arduino15/packages/rakwireless/hardware/nrf52/1.0.0/cores/nRF5/main.cpp:132: undefined reference to `Adafruit_USBD_CDC::write(unsigned char const*, unsigned int)'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board WisBlock Core RAK4631 Board.

I modify the windspeed example and remove all parts that is related to LoRaWAN so you can have a bare sketch that is only related to the wind sensor. I am not 100% sure it will work but it compiles with no error. The example code I showed earlier seems to have some dependency another library based on the errors.

I have to be honest with you @a1projects , you need a professional help now on doing this project.