Vaisala WXT520 driver for Raspberry Pi

236 views
Skip to first unread message

Andrew Terhorst

unread,
Sep 29, 2021, 10:30:02 PM9/29/21
to weewx-user

Hi

I have a Vaisala WXT520 with M12 connector and cable but no USB plug. If I configure the Vaisala to deliver data via RS232 what must I do to get weewx to understand the messages? 

Before judging me too harshly, I am not a Python expert or an embedded systems expert. I am a hobbyist. I assume I need to enable the GPIO to accept serial comms. Then I need to modify Matthew Wall's driver accordingly? I assume it expects a USB connection.

Please advise. Thanks.

DR

unread,
Sep 29, 2021, 10:41:12 PM9/29/21
to weewx...@googlegroups.com

Andrew:

If you make progress, or hopefully achieve full success I would hope you'd offer your experiences and code to the group so others could enjoy your abilities.

From the reading I've done to try to get a station interfaced, you'll need to look at one of two examples to see how either RS232 interface or a USB interface (use a converter to get to USB) and then do the coding to allow the incoming stream to be read by WeeWx. 


I have been looking at the FileParser way of taking information in, but you might be able to get it to read the data stream directly and skip that step.


Best wishes for a quickly finished project!

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/65c5491a-e9b0-4f0d-be4a-2fd56215d7dfn%40googlegroups.com.

Derek

unread,
Sep 30, 2021, 2:42:10 AM9/30/21
to Andrew Terhorst, weewx-user
Can you use a Serial/USB adapter - USB is a serial facility in itself (Universal Serial Bus).

--
Derek

Chris Howard

unread,
Sep 30, 2021, 8:18:03 AM9/30/21
to weewx...@googlegroups.com
I have WXT520 working with a BeagleBoneBlack single board computer.
On the BBB there are serial ports available through the pin connectors (UART via GPIO pins)
The cable from the WXT520 goes to those through a voltage converter chip.

You could do that same thing with a Pi.

For USB, I would build a cable from the M12 connector to a DB9 serial connector,
then use a DB9 to USB serial adaptor and plug that into the USB on the Raspberry Pi.

I dislike USB connectors for long-term unattended connections.  I feel that they
slowly degrade if they aren't disconnected/reconnected every so often.  Therefore
my recommendation would be to go the UART/GPIO route if you can.

The only thing you should have to do to the weewx code in either case is to
aim it at the correct serial port and get the speed/parity/stop-bits configured.







--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Chris Howard

unread,
Sep 30, 2021, 8:20:38 AM9/30/21
to weewx...@googlegroups.com
The serial port voltage conversion is usually called a "level shifter"

Andrew Terhorst

unread,
Sep 30, 2021, 8:25:53 AM9/30/21
to weewx...@googlegroups.com
Thanks, Chris.

I can enable the UART on the Raspberry Pi. The voltage converter chip is the bit I need to understand better.

Cheers

--
Andrew Terhorst

Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

Chris Howard

unread,
Sep 30, 2021, 8:59:00 AM9/30/21
to weewx...@googlegroups.com

The Pi  (and BBB) only allow 3.3 volts on their UART pins.  So if the weather station uses higher than 3.3 volts,
you have to have a serial level shifter to avoid harming the Pi/BBB.

For my station I was using a 12 volt battery and solar panels to power everything.
The BBB needed 5 volts for power.  I had 5 volts to the WXT520 also for power.
The documentation for WXT520 says it can use 5 to 30 volts input.  That's higher than 3.3.
I used a DC/DC converter to make the 5 volts.
Then the serial line  between BBB and weather station went through level shifter which I mounted on a "proto" HAT board.

I have a Vaisala USB/M10 cable.  It maybe OK to plug that straight into the USB of the Pi.
I don't think I ever tried that with the BBB.  It may be a non-soldering option.  Possibly I could
try that out. 



Chris Howard

unread,
Sep 30, 2021, 9:05:36 AM9/30/21
to weewx...@googlegroups.com
I looked in my old blog posts and found info about what I used.  The picture is not very clear about connections.
I still have this and could get you a better schematic if you need it.

Chris Howard

unread,
Sep 30, 2021, 9:05:45 AM9/30/21
to weewx...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages