TinyIOX adding ground switching beside analogue - MS2

A forum for discussing the MegaSquirt related (but non-B&G) board development, assembly, installation, and testing.

Moderators: jsmcortina, muythaibxr

TinyIOX adding ground switching beside analogue - MS2

Postby hybrid » Tue Sep 19, 2017 4:05 pm

I'm currently using two ADC's on the tinyIOX for pressure sensors.

So in the TinyIOX settings, I have only activated the ADC channels and in MS I have just grouped ADC0-3.
Now I also want to add a ground switch for table switching (failsafe for water/meth injection).

So I guess I have to enable Digital I/O in the main TinyIOX settings.
That opens up the port settings window where I have port 1,2,3

How do ports 1,2,3 correlate to the ADC channels?
If I have grouped ADC0-3, what do I use for the first digital ground switch input?

Also, is this "Activate Low Input" circuit what I need to build for this? Does it need the pullup etc?
Image
Do not load someone elses tune and expect it to work for you!
Image
User avatar
hybrid
Super MS/Extra'er
 
Posts: 1105
Joined: Thu Apr 07, 2005 11:23 pm
Location: Sydney, Australia

Re: TinyIOX adding ground switching beside analogue - MS2

Postby racingmini_mtl » Tue Sep 19, 2017 4:30 pm

The ADC channels and the digital I/Os are 2 different and independent things. The pressure sensors connect to ADC inputs on the TIOx and are transferred to the MS2 using the CAN ADC groups. The switch inputs are connected to digital inputs on the TIOx and are transferred to the MS using the ports polling. You also need to enable the digital I/Os on the TIOx and set the ports as digital inputs.

For example, you can connect your switch to PTE2 and set port 3 to 8 digital inputs with channel 1 set to PTE2 (leave the channels unassigned on all ports until you need them). On the MS2 enable ports polling, set the ports direction to 3 inputs and the ports to digital (8 signals). Then in table switching use remote port 3 bit 0 as the switch location.

And yes, use the active low input circuit as shown, including the pull up.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
racingmini_mtl
Super MS/Extra'er
 
Posts: 8013
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada

Re: TinyIOX adding ground switching beside analogue - MS2

Postby hybrid » Tue Sep 19, 2017 4:32 pm

Thanks Jean - sorry for the stupid questions. It all makes sense now... this is my first IO extender project.
Do not load someone elses tune and expect it to work for you!
Image
User avatar
hybrid
Super MS/Extra'er
 
Posts: 1105
Joined: Thu Apr 07, 2005 11:23 pm
Location: Sydney, Australia

Re: TinyIOX adding ground switching beside analogue - MS2

Postby hybrid » Wed Sep 20, 2017 5:36 am

Works perfect, thanks Jean.
Do not load someone elses tune and expect it to work for you!
Image
User avatar
hybrid
Super MS/Extra'er
 
Posts: 1105
Joined: Thu Apr 07, 2005 11:23 pm
Location: Sydney, Australia

Re: TinyIOX adding ground switching beside analogue - MS2

Postby racingmini_mtl » Wed Sep 20, 2017 6:19 am

Good to see that. And by the way, those are not stupid questions; a lot of that is not intuitive and not well documented on the TIOx side.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
racingmini_mtl
Super MS/Extra'er
 
Posts: 8013
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada


Return to Expansion boards

Who is online

Users browsing this forum: No registered users and 1 guest