MEGAsquirt A place to collectively sort out this megasquirt gizmo

CAN on a MSPNP2

Thread Tools
 
Search this Thread
 
Old 10-17-2021, 07:12 AM
  #1  
Senior Member
Thread Starter
 
rwyatt365's Avatar
 
Join Date: Dec 2007
Location: ATL
Posts: 1,348
Total Cats: 128
Default CAN on a MSPNP2

I'm looking to use an AEM X-Series WB controller, and want to use the CANbus for the AFR reading. I've spent the morning pouring through posts that say, "Yea, just plug in the CAN-H and CAN-L outputs and, voila! Super stable AFR readings!" Of course, most of those comments refer to those lucky ones that have MS3's or MSPro's. When I go the the CAN Parameters on the MSPNP2, I'm faced with the following menu and I don't have a clue as to where to go from there;


There are two threads on msextra (here and here) that look promising, but they never get to the punchline (i.e. what settings to make). I HATE when someone starts a thread, makes a point, and then never follows through with relevant information.

Anyone want to help a fellow out?

And, NO, I'm not going to upgrade to a MS3Pro - at least not yet...
rwyatt365 is offline  
Old 10-17-2021, 02:24 PM
  #2  
Senior Member
 
gooflophaze's Avatar
 
Join Date: May 2007
Location: Atlanta
Posts: 997
Total Cats: 156
Default

been years since i touched ms2, but the long story short is ms2's can bus is laughable at best and implemented as an afterthought. I'm gonna go ahead and say "can't be done." unless you start writing code.

edit: additionally, 0-5v analog signal is perfectly fine. canbus only has an advantage if your grounds are *****, which you should address before hopping on the hype train of digital sensors.
gooflophaze is offline  
Old 10-17-2021, 05:14 PM
  #3  
Elite Member
iTrader: (3)
 
deezums's Avatar
 
Join Date: May 2014
Location: Kansas
Posts: 3,146
Total Cats: 201
Default

It's simple, MS2 doesn't do that. If you read the threads you yourself posted you'd see that info came from the horses mouth.
deezums is offline  
Old 10-17-2021, 06:39 PM
  #4  
Senior Member
Thread Starter
 
rwyatt365's Avatar
 
Join Date: Dec 2007
Location: ATL
Posts: 1,348
Total Cats: 128
Default

User jmscortina says; "MS2 supports "Megasquirt CAN" just fine.", in the first thread.

In the second thread Matt Cramer says; "You will need to disable the 29 bit MegaSquirt CAN communications when using the X series.", I, like user stanek7110 want to know, "how did you turn it off and scroll through the ports?"

if the MS2 can't do this, then...I'll concede.

rwyatt365 is offline  
Old 10-17-2021, 07:03 PM
  #5  
Senior Member
 
gooflophaze's Avatar
 
Join Date: May 2007
Location: Atlanta
Posts: 997
Total Cats: 156
Default

maaaaaaaany years ago I wrote my own innovate LC1 serial data decoder with the intent of making my own canbus convertor into MS2. I stopped bothering with it when I noticed the digital stream and megasquirt logs were exactly the same. no value gained.

"megasquirt can" is exceedingly dumb. It's a raw read/write directly to the memory of megasquirt. Either AEM somehow writes directly to the memory via 'megasquirt can' (hint: this is bad and dumb and bad) or you have something in between that converts aem canbus values to megasquirt canbus (which would be... dumb and bad). The 'ports' they're listing is the little used ADC port expander thru canbus that read 0-5v then wrote directly to megasquirt can bus. (hint: guess what I think this is? yeap, dumb and bad). tldr i believe cramer is talking about an accessory that still reads AFR off the ADC port.

gooflophaze is offline  
Old 10-17-2021, 07:29 PM
  #6  
Elite Member
iTrader: (3)
 
deezums's Avatar
 
Join Date: May 2014
Location: Kansas
Posts: 3,146
Total Cats: 201
Default

MS2 has no CAN receiving, which is the problem in the first place.

MS3's CAN receiving is most certainly not "directly writing into memory." If you ever tried to push data directly to a table, you'd know this to be true. That is, it does not work.

It's almost like you've no idea what you are talking about...
deezums is offline  
Old 10-17-2021, 07:40 PM
  #7  
Senior Member
Thread Starter
 
rwyatt365's Avatar
 
Join Date: Dec 2007
Location: ATL
Posts: 1,348
Total Cats: 128
Default

I don't that's why I'm asking. CAN is brand new territory for me.

Thanks for indulging my ignorance.
rwyatt365 is offline  
Old 10-17-2021, 07:53 PM
  #8  
Senior Member
 
gooflophaze's Avatar
 
Join Date: May 2007
Location: Atlanta
Posts: 997
Total Cats: 156
Default

I think deezum's was directed at me. And it's alright, it has been many many many years since I last worked on that project.
gooflophaze is offline  
Old 10-17-2021, 08:08 PM
  #9  
Elite Member
iTrader: (3)
 
deezums's Avatar
 
Join Date: May 2014
Location: Kansas
Posts: 3,146
Total Cats: 201
Default

MS2 AKA "Megasquirt CAN" is a polling format. When properly followed, a can connected device will not reply with data till the megasquirt requests it. This does not work if the device is not native "Megasquirt CAN" from the get go, it will not understand the data request packet and so it never responds with data. You could theoretically ignore the request packet and just broadcast the response packet, but at that point you have full control and may as well respect the protocol. AEM knows nothing on this protocol so it won't work, don't understand the request, and couldn't format the reply right if it did.

MS3 added can receiving, normally a canbus network has a constant timed stream of packets being broadcast by their sources. All it does is read those messages and store it in a local CAN variable, ADC, or EGO pretty much is it. MS3 is entirely passive on the canbus, never sends anything. The EGO output from the AEM is broadcast this way, and if you had MS3 you could tell it to copy that packet to memory whenever it sees it. It's a separate memory address for all the can variables, and that's probably why memory constrained MS2 does not have it.
deezums is offline  
Old 10-17-2021, 08:18 PM
  #10  
Senior Member
Thread Starter
 
rwyatt365's Avatar
 
Join Date: Dec 2007
Location: ATL
Posts: 1,348
Total Cats: 128
Default

Then it looks like I'll stick with analog until I join the 20th...I mean 21st century.
rwyatt365 is offline  
Old 10-18-2021, 04:27 PM
  #11  
Senior Member
Thread Starter
 
rwyatt365's Avatar
 
Join Date: Dec 2007
Location: ATL
Posts: 1,348
Total Cats: 128
Default

Originally Posted by deezums
MS2 AKA "Megasquirt CAN" is a polling format. When properly followed, a can connected device will not reply with data till the megasquirt requests it. This does not work if the device is not native "Megasquirt CAN" from the get go, it will not understand the data request packet and so it never responds with data. You could theoretically ignore the request packet and just broadcast the response packet, but at that point you have full control and may as well respect the protocol. AEM knows nothing on this protocol so it won't work, don't understand the request, and couldn't format the reply right if it did.

MS3 added can receiving, normally a canbus network has a constant timed stream of packets being broadcast by their sources. All it does is read those messages and store it in a local CAN variable, ADC, or EGO pretty much is it. MS3 is entirely passive on the canbus, never sends anything. The EGO output from the AEM is broadcast this way, and if you had MS3 you could tell it to copy that packet to memory whenever it sees it. It's a separate memory address for all the can variables, and that's probably why memory constrained MS2 does not have it.
Great explanation, thanks!

Now, this has piqued my interest and I'm about to climb into another rabbit hole over this.

I did some more Google-ing and came across some interesting things;
1. A page from the MS-II Mega-Manual that speaks to the MS-II's CAN capabilities (here) that pretty much says that the MS2 has the (most likely archaic) capability to push/pull data across the CAN bus.
2. A device from DIYAutotune (my original source for my mspnp2), the CAN-EGT which, supposedly, is MS-II compatible and which gets thermocouple data, conditions it and sends it to a MS via a CAN bus.

The reason that the CAN-EGT is interesting is that it has a place to plug in a WB signal and have it get "digested" and sent via CAN to the MS. I'm not trying to spend $350 for a(nother) device that I don't need, just to get a WB CAN source. BUT, all of this infers the possibility of (somehow) being able to get something from the AEM into the mspnp2 via CAN. My logic is; if the MS "polls" the CAN bus for a location on the AEM (at the right ID, and right table, and right offset) , then the AFR data will be delivered to the MS. That assumes that the MS and AEM will cooperate with each other.

All of this is conjecture and assumption, but WTH...where's the fun in using an already-sorted, proven solution when you can spend hours (days, weeks?) doing something pointless and possibly an ultimately failed "solution"?
rwyatt365 is offline  
Old 10-18-2021, 08:55 PM
  #12  
Elite Member
iTrader: (3)
 
deezums's Avatar
 
Join Date: May 2014
Location: Kansas
Posts: 3,146
Total Cats: 201
Default

The CAN-EGT is a native Megasquirt can device and follows the polling sequence. It or something similar can easily read another CAN or serial stream and then reply that data to MS2 whenever it asks. That's what Reverant used to sell, and JBperf before him or still does with the tinyiox, JBperf I think had a lot to do with how MS CAN works in the first place.

I also built a arduino uno based device that read innovate serial and formatted it to the JBperf megasquirt EGO format, plus a bunch of ADCs, EGT, accelerometer and some other stuff. I've got the wasting time thing down pat!


deezums is offline  
Old 10-19-2021, 05:54 AM
  #13  
Senior Member
Thread Starter
 
rwyatt365's Avatar
 
Join Date: Dec 2007
Location: ATL
Posts: 1,348
Total Cats: 128
Default

Then it sounds like the rabbit hole is well-established, it's 'bout time I fall into it. I won't worry about a "safety line" 'cause it's only a MS2!
rwyatt365 is offline  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
RC84
ECUs and Tuning
3
08-16-2021 12:36 PM
Sailor Jerry
Miata parts for sale/trade
1
05-19-2021 09:05 AM
Golcems
MEGAsquirt
0
05-28-2020 05:06 PM
RmJ
WTB
3
05-21-2017 02:19 PM
daiki72650
DIY Turbo Discussion
7
04-23-2015 12:11 PM



Quick Reply: CAN on a MSPNP2



All times are GMT -4. The time now is 04:56 AM.