This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Anyone sending Signal-k from Arduino?
#4
(2018-02-15, 12:08 AM)seandepagnier Wrote:
(2018-02-05, 05:14 PM)LarsD Wrote: Hi,
I've just built a prototype of a wide sensor for my boat using parts of the weathersensor code from pypilot based on an Arduino Nano. I could of course use the NMEA0183 output as pypilot is doing but I also have an ethernet shield available so I was thinking of going directly for signal-k instead of over NMEA. Is there anyone who has done this?
It maybe makes sense with the ethernet shield as you can create a udp connection or even websocket.

It would make perfect sense for a 3d wind sensor, or wind sensor that gives data besides only speed and direction.

Converting NMEA to signalk is well supported, so unless you have data that cannot be represented in NMEA I don't really see the advantage of signalk here.

Quote:It is so much to read up on (being new to openplotter) so a pointer on how to go about this would be really appreciated (unless it is a stupid idea -??)

The reason for not using the pypilot full implementation is also that I already have the barometric sensor in openplotter (directly on the PI3) and that my wind instruments are 4-20mA units so that is different from the pypilot implementation anyhow...
How is your instrument different?  Details please!  What does "4-20mA" mean?

Did you make the instruments?

Hi,
I bought two wind sensors about 2 years ago (one direction and one speed)  that outputs a current between 4 and 20 mA. The 4-20mA current loop is a well established industrial sensor standard,  the device has three wires: gnd, power (9-24v of I remember correctly) and then signal (current) output.  It is very simple to detect the signal,  just a resistor ( less than 200 ohm) and an adc (or rather two as there are two sensors) . The advantage with the current loop is that if I detect less than 4 mA I know the sensor (or cable) is faulty. 
For direction 4mA is 0 degrees and 40mA 359,9 and for speed 4mA is 0 m/s and 40 is 32.4 m/s. Yes max is 32.4 but if I'm out in heavier wind than 32 I guess I have other problems besides inaccurate wind speed readings     Wink

I started with a Arduino Nano and serial output and an RS422 driver for nema 0183 but as this consumes a USB port on my RPi and an RS422 to USB converter I instead added a ethernet shield to the Nano but had some stability challenges.  I then ordered a bunch of Wemos d1 minis (esp8266 based with WiFi) but they only have one adc so there I need an adc expander (ads1115) or an analogue mux. I'm also  waiting for a bunch of esp32's and they have multiple adc's so I might in fact go for those instead as I also want to reduce cabling on my boat and use WiFi as much as possible.

This sort of leads me back to the original question about using signalk directly,  I have a bunch of other sensors (engine, tank levels, temperature, water flow etc etc) that will output signalk directly over WiFi (udp ) so if pypilot could use the same I would have less code to maintain on the sensors side....

I stil have a challenge getting the signalk server in openplotter to understand my  udp messages but I assume that I will eventually sort that out,  there are several others that got it to work so eventually I'll sort that out as well...  Netcat in my RPi gets the data ok and if I use Netcat to send the data to the signalk servers udp port it works fine - I must have missed something in the esp8266 code so far .....
Reply


Messages In This Thread
Anyone sending Signal-k from Arduino? - by LarsD - 2018-02-05, 05:14 PM
RE: Anyone sending Signal-k from Arduino? - by LarsD - 2018-02-15, 09:04 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)