Welcome, Guest
You have to register before you can post on our site.

Username/Email:
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 1,830
» Latest member: awwbaker@yahoo.com
» Forum threads: 903
» Forum posts: 5,820

Full Statistics

Online Users
There are currently 36 online users.
» 2 Member(s) | 34 Guest(s)
Crinan, keithwhite

Latest Threads
Create action from switch...
Forum: How do I...?
Last Post: jim321
3 hours ago
» Replies: 20
» Views: 4,741
How do I pipe temp data f...
Forum: How do I...?
Last Post: jim321
8 hours ago
» Replies: 20
» Views: 705
It's Alive!
Forum: How I did it
Last Post: JeroenAdam
Yesterday, 11:57 AM
» Replies: 14
» Views: 341
OpenPlotter para no inici...
Forum: Español
Last Post: dione
Yesterday, 11:14 AM
» Replies: 139
» Views: 6,958
OP hangs using Faytech di...
Forum: Bug Reports
Last Post: agv
Yesterday, 09:47 AM
» Replies: 10
» Views: 230
headless pypilot
Forum: How do I...?
Last Post: JeroenAdam
Yesterday, 09:32 AM
» Replies: 1
» Views: 40
Raspebrry - arranque tras...
Forum: Español
Last Post: gypsylyon
Yesterday, 03:38 AM
» Replies: 24
» Views: 796
Naming for Serial Ports A...
Forum: Bug Reports
Last Post: abarrow
07-14-2018, 07:22 PM
» Replies: 0
» Views: 31
WIFI konfiguration
Forum: How do I...?
Last Post: jim321
07-14-2018, 06:18 PM
» Replies: 33
» Views: 939
OPLotter Y el condenado S...
Forum: Español
Last Post: gypsylyon
07-14-2018, 11:32 AM
» Replies: 9
» Views: 255

 
  Using ADS1115 in differential mode
Posted by: olewsaa - 04-30-2017, 03:41 PM - Forum: Feature Requests - Replies (12)

Hi, 
I have set up a configuration using ADS 1115 in differential mode.
This is suggested for some applications by the well known American
company Adafruit. They also supply a nice library for Pi (and Arduino
if you are not satisfied with 10 bits). 

My application is current measurement using Hall effect sensor (often referred 
to as current transformer, commonly used for AC) and measurement of 12V using a 
ladder which isolate both high amp +12V and GND (12V) system from the low voltage 
system on the Pi yacht server. See: 
https://sites.google.com/site/olewsaa/ya...ry-monitor
I plan to use several Hall effect sensors to keep track of current flowing and 
monitor the batteries. I do not want to bring in neither 12V nor GND from the 
high amp service 12V supply into the computer system / Pi. 
 
For background and overview of my project see:
https://sites.google.com/site/olewsaa/ya...-raspberry


So far I have interfaced this setup into openplotter  by writing an extra file:
differential_ads1115.py which is referenced from the setup file like this in 
the openplotter.conf :
[TOOLS]
py = [['Differential ads1115', 'put analog values to SignalK', 'differential_ads1115.py', '1'],['Analog ads1115', 'put analog values to SignalK', 'analog_ads1115.py', '0'], ['Analog Firmata', 'put analog values to SignalK', 'oppymata.py', '0'], ['SignalK Simulator', 'change values with sliders and send values to SignalK', 'SK-simulator.py', '0'], ['Auto Setup', 'configure basic system', 'autosetup_tty.py', '1']]

It shows up with an extra button.
In addition I have introduced two new entries in the 
tools/openplotter_analog.conf file :
[ADS1115_4]
active = 1
gain = 0
samples = 6
sk_name = electrical.batteries.current

[ADS1115_5]
active = 1
gain = 4
samples = 6
sk_name = electrical.batteries.voltage


So far none of the values are included and read into the differential_ads1115.py. 
This differential_ads1115.py file still have the things coded in the file 
and it's functions. Some relevant parts look like:


#
# Quick and dirty hack for differential measurements using ADS1115        
# Put the settings here before moving them  to config files.
GAIN_0 = 4 # 1 = +/-4.096V 2 = +/-2.048V 4 = +/-1.024V
GAIN_3 = 1 #
#
# Note you can change the differential value to the following:
#  - 0 = Channel 0 minus channel 1
#  - 1 = Channel 0 minus channel 3
#  - 2 = Channel 1 minus channel 3
#  - 3 = Channel 2 minus channel 3
#
#        


# Define functions to get the current i and voltage u.
# Eventually the settings parameters will be read from the
# config file.

def get_i():
    offset_0=200
    val=adc.read_adc_difference(0, gain=GAIN_0, data_rate=8)

#  Large Hall element, http://www.yhdc.com/en/product/379/ 50A version.
#  Pins from edge Vref Vout 0V Vdd
#  Linear regression, cal using multimeter.
#  y (current) = -0.52372 + 0.0024236 * x (counts)

    i = -0.52061 + 0.0024236 * val
    return i

def get_u():
    offset_3=1
    val=adc.read_adc_difference(3, gain=GAIN_3, data_rate=8)

    val=val-offset_3
    # 10k/54k=0.185185 ; rounded to 0.1841 after cal with voltmeter.
    u=(((float(val)/float(32768))*4.096)/0.1841) 
    return u

<snip>


else:
index+=1
if index>5: index=4

                        if index == 4:
                                a_value[index]=get_i()
                        else:
                                a_value[index]=get_u()                           
#                        print(index,a_value[4],a_value[5])

It all works fine and I and U display nicely on the instrumentpanel on 
the web page at port 3000.


There is a potential problem by setting the 
[ADS1115_4]
active = 1

and the [ADS1115_5 entry ad the normal ads1115 file will try to process it. 
I could us 2 as the code for active in the differential file and it would 
be taken as not 1 within the analog ads1115 file. Not a very clean way. 

This brings me to the question of the best way of setting this up and how the 
openplotter developers thinks this should be addressed ?

In due time the differential functions with it's parameters in the  
openplotter_analog.conf would be forwarded to the relevant processing scripts.

I would like to get some guidelines on how I should proceed in order
for the differential code should be written in order to get it included in the repository.


Regards,
Ole W. Saastad
https://sites.google.com/site/olewsaa/home


  [SOLVED] 0.11.3a action commands not working
Posted by: Littlechay - 04-29-2017, 11:45 PM - Forum: Bug Reports - Replies (9)

I am trying to us a sensor, in this case a 1W sensor using sig K handle environment.water.temperature.value to trigger actions. 

I set up the trigger with the trigger as above, operator >= and value 303 (30 Centigrade)

I set two actions, the first just shows a message; which works fine

the second should operate set a GPIO output high using the command 


Code:
echo 1 > /sys/class/gpio/gpio16/value


This works fine from the command line in the terminal but nothing happens in OP. When I run OP from the command line there are no error messages.

Any ideas?


  GPIO triggered actions
Posted by: Alpenskipper - 04-29-2017, 01:58 AM - Forum: How do I...? - Replies (1)

Hi,
I updated to OP 0.11.3 and do not succeed in configuring GPIO triggered actions.

I cant't see the inputs in SK diagnostics, nor can I trigger an action with GPIO inputs.
The configured GPIO inputs do not show up in the Signal K key lists. I had to wrote the names in sensors.* by hand.

Actions with I2C sensors are working.

What am I doing wrong?

[Image: 8889b247d7135b17961fcf251327a5d2.jpg]

[Image: 6eb5c37ebe42a9528ae549bd7811eeb5.jpg]

[Image: 5ac536ecb73740899b5fcaff67ea88f4.jpg]

[Image: 3f8a00c00d2dc4420394af992e6b815e.jpg]


  [SOLVED] Temp, Humidity, Pressure - Format
Posted by: Alpenskipper - 04-29-2017, 01:49 AM - Forum: Bug Reports - Replies (11)

Hi,

The format of the o.m. sensors could be shortend, the temperature value ist reported wrong.
The decimal of the pressure value is wrong.


[Image: ad66f60663e300589281ad68c0bade86.jpg]

[Image: f05fe950f9be82107427c41d06b67932.jpg]


  Problem with IMU Adafruit 10-DOF
Posted by: kste - 04-28-2017, 02:59 AM - Forum: How do I...? - No Replies

Hi,
The 10-DOF seems to work properly in the calibration program but no SignalK values are generated.
If I start Openplotter with Startup restart, this message is continually displayed:
Could not parse JSON:{"updates":[{"$source":"I2C.L3GD20H + LSM303DLHC","values":[{"path": "navigation.headingMagnetic","value":nan},{"path": "navigation.attitude.roll","value":nan},{"path": "navigation.attitude.pitch","value":nan}]}]}

Other sensors (ADS115, BMV700 and USB GPS) work properly.

What's the problem?
Tks


  RDP does not work
Posted by: Luckbert - 04-27-2017, 04:20 PM - Forum: Bug Reports - Replies (10)

Hallo zusammen,
Ich habe die neueste OP-Version installiert und ein Update gemacht. So weit, ist es gut. Heute wollte ich über RDP auf den Pi zugreifen und der folgende Fehler entstand. siehe Bild
   
VNC arbeitet.
Ist es ein Fehler oder meine Unfähigkeit? Huh

Grüße aus dem sonnigen Deutschland 
Jürgen


  Documentation Project I did start a complete documentation to 120 languages
Posted by: tocan - 04-25-2017, 05:23 AM - Forum: General discussion - Replies (17)

Hi is my first posting here and i hope i am correct.

I did start a complete documentation first from English to German. It's my mother language.

I put it to a system that translate backwards and store it in MYSQL database to 120 Languages. For this i use 4 different translator engines. For the moment the English language sucks and is like i read English translation with google translator but no worry about this. As soon the German translation ids finished i will start with help of my wife who is romanian the complete translation to romanian language from German, because she do not speak english.

Every translation will be seperate in small phrases and can be easyly like in wikipedia translate to arround 120 languages. also seldom languages like caribean.
There is no restriction and can be corect easy online without any registration. so it neads later just a copy and paste and also if someone reads in his own language can improve the translation.

Now some things i need. The project is going on and some parts are empty and also some parts are outdate. Can someone complete and proof it in next time. Because its CC-by-SA all this was possible so i could adapt some phrases to german culture and grammar. I say its a free translation with little differences. German is complete arround 75 % now.

Most problem to use and start a project is that programmers dislike documentations , because they are advanced and know what they wish. But good dokumentation have the same level and needs like programming if you like to have a productive usefull system and most users do not speak english and so they pass the project.

Hope it will be soon available.

I use another domain where you can play with it. Not on my openplotter documentation page.

go to
 
http://tocan.de 

there you click on the flag of yours language. all the page is written in German so the english will suck. Smile Smile

if you point the edit box you see green red and yellow buttons. green means a human did translate, red no translation exists, yellow e robot did translate the phrase.

if green and you think a better translation is possible klick an correct.
if you click on one of the collored buttons than a popup appears and you see the german text and below the translation and on the fly you can correct or use other engines for help or can correct spelling mistakes like special language characters. with the arrow you store yours translation.

Its important not to translate absolute correct the original because of the phrases you can chose a free more better style in yours languages.

https://tocan.de/faq/

i will point later at each page to the official english translation andf correct the links.

Another word i plan to put a phone system inside my openplotter installation with asterisk that can be used for free international calls as long you have internet 
to any phone number. 

Also i plan because its more familiar for me a big part of the home automation to use FHEM what is widely used in germany and is flexible for lights and so on.

Be patient my server is very slow for the moment. If you get errors by database just try some minutes later.

Most important is for the moment to review documentation to the new openplotter versions and complete it.

Thanks Wilfried


  Multiplexeur
Posted by: petrouch - 04-20-2017, 09:30 AM - Forum: General discussion - Replies (3)

Hello, I have a pi3 with openplotter 9beta 02.
I using a mimiplex-3usb,  create in openplotter usb0, baud 57600. No data in inspector.
I write in lxterminal : sudo stty -F /dev/ttyUS0 460800
All the data is coming, good.
Have you got a solution to automatically a connection usb0.
Thanks for your response.
I am sorry for English, i am French !!!


  SOG damping
Posted by: SkipperEarly - 04-19-2017, 02:20 AM - Forum: How do I...? - No Replies

I am using the u-blox GPS dongle and like its sensitivity, however when the speed over ground is calculated in op I get variances between 0,01 - 1,2knots ! even when staying static on land. 

Is there any way to set a damping so that only "real SOG" is send as NMEA or signalK message ?


PS: have in the meantime also found a related threat on the cruisersforum - beta tests and it seems that ocpn has changed SOG calculation in 4.6.1 from earlier versions. This may explain that I didnt notice this behaviour earlier.


  Which Radar might work in the future?
Posted by: YachtShah - 04-18-2017, 06:53 PM - Forum: General discussion - Replies (1)

Hey guys,

I have been reading this blog, and love the work that you are all achieving here.  I will definitely be making up my own system over the next year or two.  Other boat jobs will stop me from achieving this any sooner.

Right now I have a problem with the resident Nav system and wondering what I should be repairing or not.  I am guessing that proprietary analog radars (like my existing Raymarine RD218) will never talk to anything other than their dedicated partner display.

Any ideas which Radar will be supported in future year(s)?  I see that most of the new HD Digital Radar offer Ethernet / Wifi connectivity. 

Already the Garmin HD/xHD are able to be displayed as overlays on OpenCPN - anyone have experience of this?  Is a reliable function or just for playing?  Anyone know of other development for other manufacturers'?

In summary, I am wondering if I should remove the Raymarine system and replace with Garmin, then implement OpenPlotter and OpenCPN as the ultimate tool in a year or two.

Thanks, Andy