Need guidance on wiring the sparkfun weather meter kit

Hi there!

I finally found some time to start dabble with a esp32 i had on the shelf for
a while.
I have have been programming for years as a hobby and i have been curious about
embedded systems , now finally i got time.
So filled with ambition i ordered the sparkfun meter kit, rj11 plugs, etc
and started wiring this up. This is where my trouble starts.
I can get the anemometer working standalone, same with the rain gauge.
but when i connect the anemometer up with the wind vane, i dont get any readings.
Im guessing im wiring this up wrong and the diagrams on their site are to a beginner like me
worth close to nothing.
So what im asking for realy is some help with the wiring.
If there is anny information that is lacking in this cry for help please let me know and i will try to answer as good as i can

So to make make it a bit clearer for people to understand what the problem is will add a list of items in use and a image that discribes the problem( I hope )

so the issue:

The anemometer and wind vane is connected together.
The anemometer connects to the wind vane via rj11, then the wind vane connects to
a rj11 socket. The rj11 socket needs to be wired to the esp32, This is where i come in trouble.
how do i wire this correctly to get independent reads from both peripherals

Posting code and schematics would be a good idea. Else You might receive more guesses then You have time to read.
Please look at the topic "How to get the best out of this forum".

  1. Connect the two innermost pins of the cable from the rain collector one to ground, the other to the rc circuit shown ( VCC = 3.3V ), connect the rain_count to pin 27 of esp ( so to match the basic example of sparkfun library )

  1. Connect the two innermost pins of the cable from the wind sensor one to ground, the other to the rc circuit shown ( VCC = 3.3V ), the connections of the R/C is the wind_speed signal connect to pin 14 of esp

  2. Connect the two outermost pins of the cable from the wind sensor one to ground, the other to the r circuit shown ( V+ = 3.3V ), connect the output to pin 35 of esp ( hope the sparkfun library consider a R = 10K )

P.S.
The 10 pf capacitor makes me smile a little bit

Hi
I have now tried to follow your guide. this is what i got so far.


The result is kinda dodgey(probably becouse i do it wrong) but now i get a response on the voltage when i move the anemometer :slight_smile:

ok, are you using the sparkfun library ( it will make your life easier )?

P.S.
As you can see in the table linked above, as you move the 'wind direction' resistance will bounce back and forth, so your analog reading.

Nope. Im using Micropython for this project. handling the code should not be a problem, its the wiring i struggle with :slight_smile:

Confirmed: there is information that is lacking in this cry for help. Quite a lot missing! Maybe your should read the forum guide in the sticky post.

ok. The you can use the below table to calculate wind direction

    WMK_ANGLE_0_0 = 0,
    WMK_ANGLE_22_5,
    WMK_ANGLE_45_0,
    WMK_ANGLE_67_5,
    WMK_ANGLE_90_0,
    WMK_ANGLE_112_5,
    WMK_ANGLE_135_0,
    WMK_ANGLE_157_5,
    WMK_ANGLE_180_0,
    WMK_ANGLE_202_5,
    WMK_ANGLE_225_0,
    WMK_ANGLE_247_5,
    WMK_ANGLE_270_0,
    WMK_ANGLE_292_5,
    WMK_ANGLE_315_0,
    WMK_ANGLE_337_5,
    WMK_NUM_ANGLES

    // Tested with ESP32 processor board installed on Weather Carrier
    #define SFE_WMK_ADC_ANGLE_0_0 3118
    #define SFE_WMK_ADC_ANGLE_22_5 1526
    #define SFE_WMK_ADC_ANGLE_45_0 1761
    #define SFE_WMK_ADC_ANGLE_67_5 199
    #define SFE_WMK_ADC_ANGLE_90_0 237
    #define SFE_WMK_ADC_ANGLE_112_5 123
    #define SFE_WMK_ADC_ANGLE_135_0 613
    #define SFE_WMK_ADC_ANGLE_157_5 371
    #define SFE_WMK_ADC_ANGLE_180_0 1040
    #define SFE_WMK_ADC_ANGLE_202_5 859
    #define SFE_WMK_ADC_ANGLE_225_0 2451
    #define SFE_WMK_ADC_ANGLE_247_5 2329
    #define SFE_WMK_ADC_ANGLE_270_0 3984
    #define SFE_WMK_ADC_ANGLE_292_5 3290
    #define SFE_WMK_ADC_ANGLE_315_0 3616
    #define SFE_WMK_ADC_ANGLE_337_5 2755

    #define SFE_WMK_ADC_RESOLUTION 12

1 Like

So i tried to update my post with some more information now. If there is something else you feel you miss, let me know :sweat_smile:

Can you read the Analog input and print it to a monitor screen?

I think you have more problems than just the wiring. Have you read the analog input requirements? Look here

Ok, I spotted a problem. The breakout boards you linked to are for RJ45 sockets (8-pins), but your sockets are RJ11 (6-pins). So I doubt they will fit the sockets, and even if they do, this will confuse the wiring problems even further.

You need the RJ11 breakouts like these:

The next source of confusion may be that the RJ11 sockets have 6 pins but only 4 are used. But which 4? The images provided by Sparkfun are not helpful here because they show only 4 pins:
WindVane_Switches

I have used these sensors before. Use your multimeter on resistance measurement range and try every possible pair of pins, while slowly rotating the anemometer and vane, to see how the resistance readings change. For most pairs, you will get no reading ("E" or "-" or something).

When you find the correct pair for the anemometer, you will see alternating readings of zero (or close to zero) and no reading ("E") as the anemometer rotates, 4 changes per rotation.

When you find the correct pair for the vane, you will get 16 different readings as the vane direction changes.

Tnx for your answer it helps alot :slight_smile:
I got these breakouts for rj11

image of rj11 breakout

hi, if you have a working code for these sensors can you share it with me?

I do. But it may not be great example code for you because it is much more complex than you may need. This is because the code is optimised for low power consumption. Most of the complexity in the code is to achieve low power, not in reading the sensors.

In my project, an attiny85 chip is used to monitor the sensors and communicate the readings to an ESP8266 which transmits the readings to a server. I could not find a way to achieve low power with the ESP chip alone, so I added the ATtiny. This makes the project much more complex and I would not recommend following this design. If I were to re-build the project, I would try again to achieve low power in a different way.

Actually i'm using ESP32 and couple of sensors to form a low cost solar powered weather station. But i didn't have any problem with the power i guess till now. Thank you.