MSPNP MSPNP specific Megasquirt related discussion.

Adding regular USB?

Thread Tools
 
Search this Thread
 
Old 02-12-2019, 10:34 PM
  #21  
Boost Pope
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,049
Total Cats: 6,608
Default

Originally Posted by Lokiel
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
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.
Joe Perez is offline  
Old 02-13-2019, 12:07 AM
  #22  
All-round "Good Guy"
 
Lokiel's Avatar
 
Join Date: Dec 2009
Location: Brisbane, AUSTRALIA
Posts: 993
Total Cats: 245
Default

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).
Lokiel is offline  
Old 02-13-2019, 09:16 AM
  #23  
Moderator
iTrader: (12)
 
sixshooter's Avatar
 
Join Date: Nov 2008
Location: Tampa, Florida
Posts: 20,664
Total Cats: 3,013
Default

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.
sixshooter is offline  
Old 02-13-2019, 11:08 PM
  #24  
Newb
 
pyr0boy's Avatar
 
Join Date: Feb 2015
Location: Melb, Australia
Posts: 23
Total Cats: 4
Default

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.
pyr0boy is offline  
Old 02-13-2019, 11:49 PM
  #25  
Tweaking Enginerd
iTrader: (2)
 
Ted75zcar's Avatar
 
Join Date: Mar 2013
Location: Boulder, CO
Posts: 1,778
Total Cats: 359
Default

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.
Ted75zcar is offline  
Old 02-14-2019, 12:02 AM
  #26  
Senior Member
 
gooflophaze's Avatar
 
Join Date: May 2007
Location: Atlanta
Posts: 997
Total Cats: 156
Default

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?

Last edited by gooflophaze; 02-14-2019 at 12:24 AM.
gooflophaze is offline  
Old 02-14-2019, 04:20 PM
  #27  
Junior Member
 
Mudflap's Avatar
 
Join Date: May 2017
Location: Louisville, Co
Posts: 466
Total Cats: 86
Default

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.
Mudflap is offline  
Old 02-14-2019, 11:35 PM
  #28  
Newb
 
pyr0boy's Avatar
 
Join Date: Feb 2015
Location: Melb, Australia
Posts: 23
Total Cats: 4
Default

Originally Posted by Mudflap
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
pyr0boy is offline  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
EErockMiata
MEGAsquirt
6
09-24-2015 09:49 AM
richyvrlimited
MEGAsquirt
32
08-26-2013 04:15 PM
Chiburbian
MEGAsquirt
3
05-15-2013 08:19 PM
Senor Aguas
Hydra
5
05-05-2011 07:44 AM
magnamx-5
MEGAsquirt
26
01-06-2011 09:42 AM



Quick Reply: Adding regular USB?



All times are GMT -4. The time now is 09:53 PM.