Miata Turbo Forum - Boost cars, acquire cats.

Miata Turbo Forum - Boost cars, acquire cats. (https://www.miataturbo.net/)
-   MSPNP (https://www.miataturbo.net/mspnp-55/)
-   -   CAN Bus Termination: AEM to MS3 (https://www.miataturbo.net/mspnp-55/can-bus-termination-aem-ms3-98098/)

irodd 09-20-2018 12:29 PM

CAN Bus Termination: AEM to MS3
 
Gentlemen,
Should I use 120Ohm resistor in parallel with AEM 30-0300 X-Series AFR Gauge connected to MS3Pro PNP to terminate CAN bus?
Please advise

Update:
I have received an answer from Matt Cramer, DIY support:
"The MS3Pro has a 120 ohm resistor at its end. It looks like you'll need to put one on the AEM unit as well.
Matt Cramer.DIYAutoTune Support".

irodd 09-21-2018 10:49 AM

Matt Cramer please help

from AEM
30-0300 manual:

https://cimg3.ibsrv.net/gimg/www.mia...1609c995c5.jpg

SpartanSV 09-21-2018 11:38 AM

You don't need the resistor.

boileralum 09-21-2018 11:45 AM

I read that as needing the 120 Ohm terminating resistor since there is not one internally. Not quite apples to apples, but I am installing an AIM MXS Strada to my MSPNPPro, and I needed to enable the internal 120 Ohm resistor in the software for the MXS.

irodd 09-21-2018 12:41 PM


Originally Posted by SpartanSV (Post 1502796)
You don't need the resistor.

Thank you Spartan!
Do you know the reason why the resistor is not needed?

SpartanSV 09-21-2018 12:47 PM


Originally Posted by irodd (Post 1502804)
Thank you Spartan!
Do you know the reason why the resistor is not needed?

Nope. All I know is that I didn't use one when connecting that exact wideband to my MS3x which is essentially a MS3pro. There's been some discussion lately about running that wideband on the MS3pro and none of those guys mentioned a resistor either.

afm 09-21-2018 12:55 PM

You should add the resistor. It might work without the resistor, but there should be a resistor. You can even buy nice connectorized 120 Ohm termination resistors so you don’t have to mess with soldering stuff into your harness.

DTM termination resistor for $5

irodd 09-21-2018 01:02 PM

I have it connected without termination resistor too, and it is still working.
but I believe the termination in CAN Bus networks is for signal quality (and some other reasons).
From my SAAB Can bus expirience - there were lot of bricked ECUs during reflashing via can bus without termination resistor.

hi_im_sean 09-21-2018 03:29 PM

That's exactly what its for, signal quality. It keeps the end of the CAN run from becoming an antenna, and makes the input impedances play nicely with whatever buffer or I/O chip is in the CAN equipment.

irodd 09-21-2018 04:10 PM

I have received an answer from Matt Cramer, DIY support:
"The MS3Pro has a 120 ohm resistor at its end. It looks like you'll need to put one on the AEM unit as well.
Matt Cramer.DIYAutoTune Support".

Jesse99James 10-31-2021 06:38 PM

I know this is old and I've searched all over but am still confused as to exactly where a terminating resistor needs to be placed. My two AEM UEGO canbus wires attach directly to the MS3Pro wires at the options connector. Matt said the MS3 has a 120 Ohm resistor so... is that not the end of the run? AEM to MS3 w/ terminating resistor?

Thanks!

deezums 10-31-2021 06:57 PM

Think of canbus like a loop, broken at each end by the terminating resistor.

The very first and the very last thing connected to the network needs the terminating resistor. ECUs typically have a terminating resistor built in, whereas gauges do not.

https://cdn10.bigcommerce.com/s-7f2g...g?t=1457537025

Canbus is a differential signal, the state of each wire is important for determining a zero or a one. Without the termination, signals can reflect and cause issues determining those states. I say can, because it's not going to be an issue on a very short run or at lower baudrates. There are also restrictions on stub lengths, too.

When a bus is properly terminated you should be able to measure the resistance between CANL and CANH, and it should be about 60 ohms. Not always though, I use dual P mosfets for MCU toggleable termination. If you've got something that lets you set termination in software this test might not work.

Jesse99James 10-31-2021 08:35 PM

I apologize if my answer sounds rude, I don't mean it to be...so according to AEM and Matt, an X-series UEGO owner installation onto an NA/NB Miata (NC?) needs to cut open the outer insulation to access the wires near the inline controller or gauge and add a terminating resistor across the Canbus wires? Doesn't that put the controller/gauge outside the resistor unless you add wire to each and terminate across those added wires...or does it not matter since it's all parallel? There is no canbus network and nobody has really answered the question as to how to properly accomplish the task. This thread came closest but still not quite there. Maybe I'll email AEM directly, best from the horse's mouth, right?

deezums 10-31-2021 09:15 PM

The resistor can be outside the gauge or sensor, there's no electrical difference between that and a stub like Node B in the pic above. You could imagine moving Node X's connection on the bus to the very ends of the resistor on the right, wouldn't change a thing in function electrically.

You would not want the terminating resistor more than the longest allowable stub length away from the gauge.

Jesse99James 11-01-2021 07:25 AM

"longest allowable stub length" What? You're talking to somebody with a Master's Degree in Violin Performance and not quite an associate degree in computer programming from 20+ years ago. I searched quickly this morning and might ask my mechanical engineering brother that designed fuse panels and wire harnesses over the last decade but he hadn't even heard/read about PID controllers so...

I have the AEM X-series guage controller (30-0300) installed in my '04 MSM. I recently purchased the inline controller so I can replace the gauge and tuck the controller up under the dash as I get closer to being properly tuned. I don't want a flashy gauge attracting attention from boy racers and thieves and it's difficult to read with the top down. I'll use MSDroid with my phone mounted at the central vents when I want to monitor AFR and other data. I am concerned about signal quality thus my questions about how/where to install the resistor. I guess I'll open the outer wire sleeve as close as I can to the controller to access the canbus wires. Then solder a resistor across them or two wires to slightly extend out from the wire cover so I can more easily insulate everything. Soldering is fine but I'd rather not totally cut the canbus wires. I don't want to cause more problems that I'm solving and many say it works fine, as does mine, without any resistor on the AEM side of the wire run.

Thanks

deezums 11-01-2021 09:30 AM

To keep it simple, some standard somewhere says that your termination resistor should be no more than 0.3M from the transceiver/gauge. Some other standards will say 3M, others say more yet. As you seem to know, in some cases you don't even need it. To get more complex, canbus is self clocking as well as arbitrating between transmitting nodes priority, so propagation delay can desync a node from valid data or possibly crash the whole bus if something tries talking over something else. All that means no valid data is transferred, not much else. Canbus messages have CRCs or error checking, this ain't analog.

To have it proper you should do what you describe, 120 ohm resistor between CANL and CANH, preferably within 0.3M of the gauge.

If you want to get really fancy there are lots of terminating resistor connectors, like this one...

Deutsch 2P DTM 120 Ohm Terminating Resistor

You could track down the socket and terminals, just dual crimp the wires instead of soldering. That's how I've seen some OEM's do.

MetalMuffins 11-01-2021 11:43 AM

Sorry if I'm missing something here but I've got a 99 w/ an MS3Pro, and am running an AEM 30-0300 using CAN. I've just got the CAN H/L wired straight to the board and only had to set the "29bit Megasquirt CAN Enable" to Off to make it work, no resistor aside from what I assume is on the board of the MS3Pro.

deezums 11-01-2021 03:53 PM

If you had anything more complicated than what's probably less than 0.3M of canbus with only two transceivers it might not work. But it does, doesn't make it right, but it is what it is.

Maybe we can get Joe in here to tell us about eye patterns?

https://www.researchgate.net/figure/...fig3_224060363

Canbus "samples" the state of the lines at a fixed percentage usually, if the bus is still ringing it might not capture the proper state. The resistor helps with the ringing, really all there is to it.

https://www.tek.com/-/media/sites/de...al-quality.jpg

The upper image is an unterminated canbus network, while the lower has proper termination.

Jesse99James 11-01-2021 07:52 PM

Thank you very much. You've been super helpful. My gauge controller is mounted in the left side of the glove box on a modifed, adjustable mount so I can pivot it down to hide when I'm not using it. I left the wire length long, might have shortened it a little but I'm fairly certain it's at least 1M to the MS3. I'll correct this when I install the inline controller that will replace the gauge. The O2 sensor cable length is very long so it'll be easy to mount the inline controller above the driver's feet with a few wire tires. Then CANH and CANL wires will be as short as possible. Plus, installing a resistor to the controller while it's on a bench is much easier than trying to modify the gauge controller that's already mounted in my car. Now that I think about it, the 30-0300 gauge has two wire harnesses that plug into the back of the gauge. Simply unplug the one with the CANH, CANL, and power/ground wires and you can easily put a resistor very close to the gauge/controller.

Very soon my car will be parked in my garage for Winter season. I'm slowly making progress tuning the MS3 but want to minimize any signal quality issues. It looks like the first link above might be that same terminating resistor but there is a lot more information to work with. I'll try to find a matching connector and crimping sounds better than soldering. I always try to avoid permanently altering wire harnesses going so far as to buy plugs to make jumper harnesses. With the modification on the jumper harness (DRL module for one example), reverting back to the untouched OEM setup is plug and play if the modification is no longer wanted by you or a future owner.

EDIT, I looked and couldn't verify the recommended connector from the datasheet would fit. Visually it didn't look like they'd fit together and I don't see terminal data. The first link to this terminating resistor on Mouser website mentions not having to solder but I don't see how. I guess I'll buy and solder a 120 Ohm resistor in but now I have no clue which type/wattage to buy. :sad2: I know I don't want SMD. LOL

jetskibruce 11-01-2021 10:19 PM

I would recheck the docs, I am running the ms3pnp pro and the AEM on can bus and I think they each have the resistor. It is rock solid, no errors on can bus.

deezums 11-01-2021 10:25 PM

You mean the docs posted above? The ones that say it's not terminated and supposed to be connected to a properly terminated bus? After I roughly explained that it probably doesn't matter in some circumstances?

Yeah, it probably has a resistor built in...


Jesse99James 11-02-2021 01:22 PM

Direct from the X-series manual...

The X-Series controller does not have any internal termination and is intended to be connected to a pre-existing, properly terminated network.

After I posted I looked further into that terminated resistor and it says minimum of 4W, between 110-130 Ohm. I'll dig through my spare parts and maybe stop at the local Axe Man surplus store with my multimeter if I don't find what I need in my small box. Thanks Deezum for clarifying that it doesn't matter if the controller sits outside the resistor, that was my main question.

irodd 11-02-2021 02:00 PM


Originally Posted by Jesse99James (Post 1611955)
After I posted I looked further into that terminated resistor and it says minimum of 4W, between 110-130 Ohm.

4W is overkill
1/4W


MetalMuffins 11-02-2021 04:07 PM

0That's interesting Deezums, I recall seeing there was no resistor in the gauge, which makes sense if you were setting up a CAN network and not just a single CAN gauge, however I would lean towards the MS3 having one built in, though that's pure conjecture on my part. One last data point I'll add is I didn't trim down the harness at all on my gauge, so the RAN run in my car is a pair of ~6-8' wires. From what you're saying, I would expect there to be issues if there weren't a resistor on the CAN at some point, which leads me to my assumption that there is one in the ECU.

deezums 11-02-2021 04:16 PM

Curious, did you either not read all of what I posted or did you just not comprehend? Because literally everything you ask or infer has already been stated.

MS3 has it built in, it's R8 on a MS3x board. That's not enough, as I showed in pictures a few posts above. Does it matter? I also covered that above.

MetalMuffins 11-03-2021 10:51 AM

:facepalm:Just didn't comprehend. I'll shut up now and lurk some more. As you said, it works for me, so I'll leave it alone. Keeping all the above in mind though if ever I encounter issues.:likecat:

jetskibruce 11-04-2021 11:25 PM

Yep, you’re correct @deezums , no resistor in the AEM gauge, it took me a while to find the terminator plug they sell. Then they have cables etc. It is easier and I imagine just as effective to add a second 120 ohm resistor to meet the spec for high speed can. Interesting enough is that there is a lower speed can spec using only one resistor. Can bus units can be multi dropped and then compete for the bus, which probably increases the importance for the second resistor to pull the signal back to zero quickly. We are getting away with using only the ms3 resistor probably because of using slave mode and only point to point, not multi drop. I’m going to see about adding a resistor the next time I plan to pull the ecu out and certainly if another can sensor is added. I think I just gave it a shot originally and was happy with the unit reporting no can errors.

afm 11-05-2021 01:30 PM


Originally Posted by jetskibruce (Post 1612114)
Yep, you’re correct @deezums , no resistor in the AEM gauge, it took me a while to find the terminator plug they sell. Then they have cables etc. It is easier and I imagine just as effective to add a second 120 ohm resistor to meet the spec for high speed can. Interesting enough is that there is a lower speed can spec using only one resistor. Can bus units can be multi dropped and then compete for the bus, which probably increases the importance for the second resistor to pull the signal back to zero quickly. We are getting away with using only the ms3 resistor probably because of using slave mode and only point to point, not multi drop. I’m going to see about adding a resistor the next time I plan to pull the ecu out and certainly if another can sensor is added. I think I just gave it a shot originally and was happy with the unit reporting no can errors.

Low-speed CAN actually involves even MORE termination resistors: it requires each device to be internally terminated with two resistors, and that's very much irrelevant to everything here since the AEM gauge runs at 500kb/s.

It's true that the CAN resistors also help the open-collector transceiver outputs return to zero, and it's also true that going from 0->1 resistor is a much bigger improvement than going from 1->2 for draining the bus capacitance. However, whether or not the transceivers are competing (rather than one sending and the others listening silently) for the bus is basically irrelevant to how well a single resistor works to drain the bus.

For the other purpose of absorbing reflected signals discussed ad nauseam in this thread: all else being equal, it's better to have the parallel terminating resistor closer to the receiver.

As @deezums has posted approximately 400,000 times in this thread: nobody can tell you whether your CAN bus will work with one resistor. If it does work, it's because the cables are short (500kb/s allows a max length of 100 meters vs. however long your cable is), meaning capacitance is lower and reflections are closer in time and finish before the signal is sampled. It's kind of like "getting away with not using fuses."

jetskibruce 11-05-2021 04:12 PM

@afm Thank you for adding to the conversation. I've not had a need until now to dig into CAN and this is quite informative. I've just pulled up a great bit of information in a TI blog and I think it agrees with all you've posted along with some additional info on split termination which might be even better. the-importance-of-termination-networks-in-can-transceivers The other factor he mentions that the resistors need to be able to handle a potential power fault on the bus, such as supply voltage shorting to CANH. That might require a higher wattage resistor. The cable supplied with my AEM gauge is about a meter long and from what I am reading, the best place to put the second terminator would be to cut into the cable and place it close to the connector which plugs into the gauge. Otherwise I will end up with terminator in the MS3, one about 12 inches outside of it, and a run of 1 meter up to the second transceiver. Since I will more that likely keep the AEM gauge in possible future configurations cutting it's cable up would still be ok, I would keep it as the other 'end' of the BUS. @irodd what did you end up doing?

irodd 11-05-2021 04:54 PM


Originally Posted by jetskibruce (Post 1612141)
@irodd what did you end up doing?

I have the termination resistor installed on AEM controller side since 2018.
It took 5 cents and 5 minutes.



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


© 2024 MH Sub I, LLC dba Internet Brands