Go Down

Topic: NMEA 2000 Shield (Read 305666 times) previous topic - next topic

autopilotNOR

Hello Tino,

I found OpenSkipper, which you also are the author for (nice thx!), and want to use it to simulate my MFD to avoid to take out all the cabling from the boat.

I have usb to ttl cable (ftdi ttl232r 3v3) or usb to RS232 cable. Now I thought to use this with the MCP2515 CAn shield (see picture) to get the data shown with OpenSkipper.

Do I have to use some kind of Arduino inbetween or can I "just" hook this up and I have the NMEA2000 bus on the PC?


timolappalainen

It's Timo ;)

Your MCP2515_can board uses SPI for communication and PC does not have any SPI board. Either you USB-TTL cable does not help, since there is no sw handling that communication from PC. There are some options.

1. Buy Actisense NGT-1 USB. This is the easiest, but expensive (180 € ?)

2. Buy Arduino Mega board and wire your MCP2515_can board to that. Then use ActisenseListener example under my NMEA2000 library examples. Note that your board is made by Niren and it has 8 Mhz clock instead of default 16 MHz, so you have to set that for example.

3. I prefer to by Teensy 3.2 and MCP2562 chip or "Teensy CAN-Bus Breakout Board Include Teensy 3.2". It is much more powerfull than Mega and so more usefull, if you decide to make some own devices to bus. With Teensy you also use ActisenseListener example.

autopilotNOR

Sorry for the "n"..

damn, I have seen the oscilator right after I posted the picture. I am not sure if I just can change that one out to 16mhz ( I have 8 peaces of this shield). The chip which should be the mcp2551 is on that board a (t)ja1050. Not  sure if that can handle the bandwith. It`s written up to 1mbit. How ever, may I change both the oscilator and the tja1050 to mcp2551. I looked at the chinese to find the one with 16mhz. Looks like they just produce the once with 8 mhz and the 1050 to save money.

Which teensy are we talking about? I found several versions with different proc at mouser.

Is the Due still slower performing than the teensy once?

I made one for the due with mcp2562. Picture attached.


Libera-8

Who can help me?
I am trying tu use the NMEA2000 lib, with arduino due, MCP2562 and a Lowrance HDS9 MFD.
Example sketch ActisenseListener is working, I see all Messages from the MFD.
Temperature Monitor is also working via USB and Actisense NMEA reader, but does not send data via can.



timolappalainen

It should be OK to run mcp with 8 MHz clock. You just need to use
#define USE_MCP_CAN_CLOCK_SET 8
before including NMEA2000_CAN.h

Due used more power and is much bigger board than Teensy. Teensy 3.2 can do a lot. Teensy 3.5 has SD card, if you need it.

If you have due, then try it with it. Now there are three cases with problems on sending data to bus from due. So I am not sure can there be something with newer Dues, since my old from 2 years back has no problem. Or is there some mix with libraries.


autopilotNOR

Good morning,

I have build up 2 mega's with the existing mcp2515 shields I have. Made the changes regarding the clock frequenz.
The first one got the ActisenseListener flashed and on the other I tried several different like windsensor or temp sensor.

OpenSkipper is always finding the one with the sensor flashed on but I guess just through the com port. I get shown wind speed and angle in OS but it looks like there is nothing recived through the bus. Both H & L are connected through a short kabel (5 cm).
I didn't used yet any termination resistor, can that be the reason?

timolappalainen

You need to allways use terminating resistors!

Libera-8

Hello Timo,
First I thank you verry much for your work on NMEA2000.
Yes, teensy looks very good, I would rather take teensy today.
But I use with the DUE the quadinput for an incremental poti, one of the two analog outputs and the Yun-Shield to transfer programs wireless.
I tested with two DUE, both have the same problem.
- First I had the fatal error: can_common.h: No such file or directory
- Then test with clean environment, all libraries deleted,
only due_can-master, NMEA2000_due-master, NMEA2000-master;
fatal error was gone even though the libraries were the same.
But can does not send.


autopilotNOR

Hey Libera-8,

same isseu here with two mega. Did you used termination resistors? I didn't used it so I will try now with termination resistor on both ends. have to be between 100-120 Ohm like I know on each end between H&L.

Had also the same problems with compiling errors. If you completly clean out all libraries and just install the once needed it is working just fine.

I will report soon if this was the problem, resistor..

autopilotNOR

Hei,

looks like it is working. NICE!

So no Resistors on the ends, no signal. And yes I should know that of course..

timolappalainen

Libera-8,

Did you load due_can library from my repository? I have not yet checked changes, what collin80 had made, so I can not say does that work even you would load all missing libraries.

Libera-8

#341
Dec 29, 2017, 03:30 pm Last Edit: Dec 29, 2017, 03:35 pm by Libera-8
Timo,
I am not sure.
I tested again now several times and with two different systems.
Your due_can lib is working without compiling error, but can does not send.

due_can 2.0.1 from Collin brings compiling error with due, can_common.h: No such file or directory

due_can 2.0.0 from Collin is working completely.

Would you tell Collin?

timolappalainen

I have to make comparison to see changes and ensure I have run tests with same version as on my repository.

autopilotNOR

Hallo Timo,

sorry flooding the topic may with stupid questions...

I got delivered the rudder position sensor. It is a Hall Effect Sensor, Position, 90°, 4.5 V to 5.5 V, Pin, Cylinder Rotatable, 200 mV.

A view pages earlier I have read that you added rudder position to the library. I could not find something in the reference about it.

Do you have an example how to integrate it?

Thank you!

timolappalainen

Look at the MessageSender example on line 123  SetN2kRudder(N2kMsg,DegToRad(5),1,N2kRDO_MoveToStarboard,DegToRad(-5));
For the unnecessary vales use defined NA value.

Go Up