NMEA2000 compatible sensors: off the shelf or self built - nmea

I am currently upgrading my boat CanBus system and I need to add some more sensors to the backbone, mainly an engine control system and a satellite sms modem.
As most of marine equipment uses NMEA2000 standard, my autopilot (built with Raspberry Pi) code only interprets NMEA2000 messages coming from the GPS, NAV unit, compass, wind sensor, etc. However, I could not find NMEA2000 compatible satellite modems.
I now have three viable alternatives:
Use only off the shelf NMEA2000 compatible parts, which are generally expensive, power consuming and cannot be customised;
Build a N2k adapter using a uC to perform the given task(s) and send/receive N2k messages;
Rely to generic CAN controllers too and implement a double standard CanBus (N2k and general can frames).
NMEA2k is a closed standard and I am using reverse-engineered C++ libraries, so switching to an open source protocol such as Signal K could also be possible; I'm just concerned about the additional converters from N2k to Signal K needed for the aforementioned sensors already installed and the increased power requirements.

Related

What considerations to make for selecting Bluetooth Chipsets for control of LED via PWM?

I am involved working on new hardware LED products where we are selecting a Bluetooth chipset to use in multiple products controlled by iOS and Android apps, for at minimum the next 3-4 years. Also I am not the developer, a third party will be contracted for this project.
As part of background research, I wanted to ask for feedback from Stack Overflow communities' experience with programming for Bluetooth, more specifically with custom firmware and GPIO PWM for LED?
What kind of challenges did you come across?
Are there any granular details or features to look out for with the hardware?
**Edit: based on first answer-
Requirements:
BLE 5
I do need OTA update capability
Chip size not big constraint, plastic enclosure can accommodate up to 1 inch/25mm or bit more easily.
Not high temp application
Single-chip solution, that will be programmed with our firmware, controlling 4x PWM Channels is ideal for our LED strips, avoiding separate MCU
Cost per unit (lowest average cost/unit)- important factor at volume, TBD
**Qualities I can not gauge well myself, being a designer and not an experienced programmer:
Ease of integration/support (lowest cost of development)
Quality of the chip manufacturer's software tools
Quality of the chips documentation
I have found some questions related with Raspberry Pi that seem generally helpful, but those questions don't help me with features or the support and documentation as related to BT SOCs.
**Edit: Yes I we are only considering BLE, and the NORDIC Semiconductor link I have included below are BLE and BT 5.
NORDIC chips are on my short list, they seem well supported and capable of 3x or 4x PWM channels for example nRF52832 Nordic nRF52832 Spec info. or the newer model RF5340. Does anyone have experience with them?
I really appreciate any answers regarding development considerations with Bluetooth.
I will edit & clarify if needed.
If you wish to support iOS Apps, a BLE device is necessary, BT classic requires a special apple license (for your product) to be able to connect with iOS Apps.
But other than that, your specifications dont really help to rule out ANY chip.
The first question that comes to mind is what other features do you
have already on your specification list that could be satisfied with
a common solution. I.e. if you also need WiFi, don't choose two
separate BLE/WiFi Chips, buy a chip that can do both (it's both
2.4GHz RF). If you need OTA updates for your firmware, choose a chip manufacturer with extensive and well documented tooling.
Consider special requirements:
Do you need a very small chip?
Does it need to be run at high temperatures (i.e. inside a light bulb)?
Do you need to run at ultra-low-power?
Does it need a high performance RF transceiver?
Decide whether you need a single-chip solution, that will be programmed with your firmware, or if your firmware will run on a dedicated microcontroller which is connected to the BLE chip.
Unless you have absolutely no special requirements to narrow down the selection, I'd base my decision along these criteria (not ordered):
Ease of integration (lowest cost of development)
Cost per unit (lowest average cost/unit)
Quality of the chip manufacturer's software tools
Quality of the chips documentation
GPIO-PWM Output should be possible with almost any programmable BLE chip.

where is the bluetooth 'dual-mode' definition?

I been reading through the Bluetooth 4.0 core specification. However, I cannot find anywhere which states the true definition of 'dual-mode'.
From other google results, it looks like 'dual-mode' means that a BT device that has this capability can communicate with a LE device and a BR/EDR device simultaneously. However, I cannot find any official bluetooth docs that states this feature.
The closest one that I can get is:
The Brand book uses the term “dual mode” device to refer to a design
(host and/or controller) that is qualified in compliance with the
Basic Rate and Low Energy Combined Core Configuration as defined in
the Bluetooth specification. It is also referred to in the Bluetooth
specification as a BR/EDR/LE design.
from here
Could someone point out the location where 'dual-mode' is defined?
There is some different logic.
The two most prevalent implementations of the specification are
Bluetooth Basic Rate/Enhanced Data Rate (BR/EDR), which was adopted as
version 2.0/2.1, and Bluetooth with low energy (LE), which was adopted
as version 4.0/4.1/4.2. Each implementation has different use cases
and each implementation uses a different chipset to meet essential
hardware requirements. Dual-mode chipsets are also available for
applications that include both use cases. https://www.bluetooth.com/specifications/bluetooth-core-specification
There is Bluetooth 2.x - BR/EDR spec and there is Bluetooth 4.x (now 5.0). They are individuals specification with different purposes and different tech implementation (different modulation, different DSP blocks, different modes of work, etc). Manufacturer like TI, STM and so on just implement both of theese specs on one chip (System on Chip) or in SiP (System in Package). And theese SoC and SiP named "dual-mode devices" and often BT 2.0 and BT 4.x work in theese SoCs (SiPs) simultaneously.

Does DirectSound usually support echo cancellation and noise reduction?

I'm currently using the waveInOpen set of Windows API functions to record audio for a VOIP application. I'm now being asked to add echo cancellation, and possibly noise reduction, and gain control. I know nothing about DirectSound, but while searching on "echo cancellation" on Google I came across references on MSDN to DirectSound such as CaptureAcousticEchoCancellationEffect.
If I switch to DirectSound will I get some of these features "for free"? Are they only supported if the hardware supports it, and if so, how often will that hardware be present in the average consumer PC?
Starting with Windows Vista, Microsoft provides a separate component Voice Capture DSP:
The voice capture DMO includes the following DSP components:
Acoustic echo cancellation (AEC)
Microphone array processing
Noise suppression
Automatic gain control
Voice activity detection
Applications can turn each component on and off individually.
You can use it in your DSP application to leverage EAC and NS implemented in software.
As far as I know these features are not professionally supported in DirectSound. A hardware device that has support for these features usually is equipped with a special processor/DSP and costs a lot more than the standard hardware device.

J2ME architecture

I was reading about the J2ME architecture where it was written that there are 3 layers
1) Configuration Layer: It has JVM and interacts with the OS
2) Profile layer: Minimum set of API's for small device
3) MIDP layer: Contains Java API's
The book is J2ME: The Complete Reference
QUESTIONS
1) Do every phone have an OS? If not what is the first layer doing in that case?
2) What is API's for small device?
3) MIDP is itself a profile which means it should be at second layer then how come it is at third layer?
Configurations and profiles are the main elements that comprise J2ME’s modular design. These two elements enable support for the plethora of devices that
J2ME supports.
A J2ME configuration defines a minimum Java platform for a family of devices.
Members of a given family all have similar requirements for memory and processing power.
A configuration is really a specification that identifies the systemlevel facilities available, such as a
set of Java language features,
the characteristics and features of the virtual machine present,
and the minimum Java libraries that are supported.
Software developers can expect a certain level of system support
to be available for a family of devices that uses a particular configuration.
A configuration also specifies a minimum set of features for a category of devices.
Device manufacturers implement profiles to provide a real platform for a family
of devices that have the capabilities that a given configuration specifies.
The other J2ME building block, the profile, specifies the application-level interface
for a particular class of devices. A profile implementation consists of a set of Java
class libraries that provide this application-level interface. Thus, a profile theoretically could specify all kinds of functionality and services.
This is not the intention of its creators, however. The creators of J2ME intend that
a profile should address the needs of a specific device category or vertical market
pertaining to that device category. The idea is not to place a plethora of unrelated
application level features in a profile. Rather, the main goal is to guarantee interoperability—which doesn’t necessarily imply compatibility between different manufacturers’ implementations—between all devices of the same category or vertical
market family to define a standard platform for Java application development.
For example, a profile might support a network communication facility for the
popular Short Message Service (SMS) standard widely used by mobile phones.
Because the SMS standard is a ubiquitous feature of mobile telephony, it makes
sense to define this service in a profile that targets mobile phones, rather than to
build it into a configuration.
A profile is implemented on top of a configuration, one step closer to the implementation of real-world applications.
Typically, a profile includes libraries that are
more specific to the characteristics of the category of devices they represent than
are the libraries that comprise configurations.
Applications are then built on top
of the configuration and profile; they can use only the class libraries provided by
these two lower-level specifications. Profiles can be built on top of one another. A
J2ME platform implementation, however, can contain only one configuration.
Figure 1.1 shows the conceptual layers that comprise the J2ME platform.
So far, these notions of configurations, profiles, and platform definitions is somewhat abstract. The next section gives you a more concrete description of the characteristics of actual environments.
Configurations and Profiles
A configuration specifies three basic elements:
• a set of Java programming language features
• a set of Java virtual machine features
• a set of supported Java libraries and application programming
interfaces (APIs)
Hope this will help you to understand J2ME Architecture.
Answers are as follows,
Yes, Every Phone has Operating System.
API's for small device(mobile phone) is depends on the oprating system loaded into the device.
MIDP is made up of Libraries, this is the reason it is on third layer as shown in the picture in above answer of Sajid.

Live graphing multiple channels of data, platform / framework selection

What framework / library / platform would you suggest for creating a Linux, preferably multiplatform, application displaying eight oscilloscope like graphs, updating in realtime? I'm imagining a view of the eight channels scrolling steadily to the left, with the newest data coming in on the right.
The data source is a microcontroller device I'm developing right now, which AD converts the 8 channels and blasts all measurements to the PC by an USB virtual com port, I'm thinking in the order of 100 samples/sec. I can brew my own protocol for this data transfer, but again, is there some standard out there I should use to get compatibility and not reinvent the wheel?
(this is a hobby project for monitoring whats going on in my car's non-OBD motorcontroller)
Thanks,
Lars
I have used the JFreeChart package in a couple of projects. It is a very powerful and flexible tool and is free and open source.

Resources