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/)
-   -   Adding regular USB? (https://www.miataturbo.net/mspnp-55/adding-regular-usb-95688/)

Joe Perez 02-12-2019 10:34 PM


Originally Posted by Lokiel (Post 1522608)
Joe, I believe that the MS3 is an embedded device so from a programming perspective, you just have a main loop within which you handle EVERYTHING.

In the base MS3 design, external I/O is all handled via RS-232, which is native to the CPU hardware (minus the physical UART, of course.)

Also:



Originally Posted by Lokiel (Post 1522608)
Think about how long Windows or Linux takes to detect an inserted USB stick. They're REAL operating systems that can run high-end machines with multiple cores and hyperthreading, not simple embedded devices, and even they still take a while to detect them.

Two differences here:

1: In the above example, the Windows / Linux machine is the host, whereas in the case of the MS3, the ECU is the guest. Reconsider your example from the point of view of the USB stick. They don't contain a lot of general-purpose CPU capacity.

2: Again, I go back to my earlier assumption that DIY is most likely using an ASIC to convert between USB (on the PC side) and RS-232 (on the MS side). If this is true, and I'd bet $1 that it is, this means that all of the heavy tasks of "participating in a USB connection" on the ECU side are being handled by hardware external to the MS3 CPU, and therefore, completely invisible to it.


Consider the following: Assume that I have a modern computer, running Win10-64, and I attach a USB - RS232 dongle to it. On the DB9 end of the dongle, I attach a 1980s vintage 9600 baud external modem.

In this scenario, do you believe that the modem is being tasked with performing any computational challenges greater than it was back when it was plugged into my '386?

No. The USB dongle takes care of that.

In this scenario, the chip which is translating between RS-232 (which the ECU CPU speaks naively) and USB (which has a high computational overhead) is taking care of all of the heavy stuff which isn't directly related to transmitting and receiving data.

Again, all of this is just speculation, since the heartless, kitten-killing bastards Bruce Bowling and Al Grippo, who control the Megasquirt intellectual property, changed their minds and decided that us peons outside the Holiest of Holies, are not worthy of seeing the schematics.

Lokiel 02-13-2019 12:07 AM

Agreed that we're just speculating what it MIGHT be and I don't really care as long as it "just works" when I have it already plugged in before starting the engine, I can live with it not being able to be dynamically plugged in and out with the engine running (would prefer it though).

sixshooter 02-13-2019 09:16 AM

I can plug a USB cable from my serial adapter on the reverent built ms3 basic into my laptop when both are already running without any issue resulting. I have no idea if that's helpful or not. Maybe since the serial adapter stays plugged into the ms3 it has already initiated communication at power up.

pyr0boy 02-13-2019 11:08 PM

While I have no where near as much experience in the programming side of this equation, my initial thought, which granted could be completely wrong, is that there is an error on the ground side of things, potentially an internal short.

The fact that it reverts to running well simple by removing the cable, with no interaction with tunerstudio indicates to me that it is a ground issue (maybe between the ground and shielding), regardless of whether or not its internal or external.

First suggest fix would be to try a different USB socket, second would be to ensure that no pin of the socket or cabling itself is touching a metal component.
A ground loop though the usb and something like the crank/cam sensor could in theory, atleast in my mind, result in enough decreased resolution to prevent acceptable running.

While its not visible in by pathetic images above.no part of my wiring or socket is anywhere near other metal objects.

I truly do not believe this is a software or ecu hardware issue, unless there is a short somewhere around the usb header.
I hope this provides somewhere for you to start looking.

Ted75zcar 02-13-2019 11:49 PM

There is a big difference between a true USB Host/device and a usb to uart serial bridge. "Real" usb almost always requires a transceiver. The USB in the MS is a UART bridge. It converts serial to usb. The VBUS line must be handled appropriately or you can get back drive issues that are bad mamma jamma.

gooflophaze 02-14-2019 12:02 AM

Looked at the pictures again - and hey, isn't that a FTDI 232RL right above the header?

Unpin/unplug the 5v. I have a theory - it's spamming the TX line (RX to MS) with garbage, probably keeping the mcu from doing it's loops properly. http://www.msextra.com/doc/pdf/Megas...2014-10-28.pdf has some details on the protocol. So it's programatical, not electrical - though why it's losing it's timing... bad decoupler cap on vbus, resetting the ftdi, garbage in 1 cylinder out?

Mudflap 02-14-2019 04:20 PM

After poking at it a couple more times, I've abandoned the idea. The entire reason I did this was because I wanted to use the OEM ecu bracket. But the bracket sits directly on top of the RS-232 port.

So I pulled all the USB business, machined a new bracket and am back to RS-232 setup.

Good luck guys!

BTW: who in their right mind would NOT use Tunerstudio with the engine running? If I was unable to tune realtime, I would not use this platform.

pyr0boy 02-14-2019 11:35 PM


Originally Posted by Mudflap (Post 1522965)
After poking at it a couple more times, I've abandoned the idea. The entire reason I did this was because I wanted to use the OEM ecu bracket. But the bracket sits directly on top of the RS-232 port.

So I pulled all the USB business, machined a new bracket and am back to RS-232 setup.

Good luck guys!

BTW: who in their right mind would NOT use Tunerstudio with the engine running? If I was unable to tune realtime, I would not use this platform.

Your right about not using tunerstudio and plug/unplug with engine on/running.
I do that rather often, mainly because I leave the laptop in the car, and if something doesn't feel right I plug it right in while running, and it works fine.
Something is definitely up with yours, honestly I wish you stuck with it because inquiring minds want to know, but understand the frustration that it caused, and your actions there after.

My main motivation wasn't like yours, I didn't like the chain of cables and adapters


All times are GMT -4. The time now is 01:46 PM.


© 2024 MH Sub I, LLC dba Internet Brands