TinyIOx Questions

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

Moderators: jsmcortina, muythaibxr

TinyIOx Questions

Postby SethU » Mon Mar 13, 2017 2:16 pm

I've purchased the TinyIOx primarily to be able to data log additional sensors. It's being used with a MicroSquirt on a Twin Turbo GM LS V8, in a boat.


What sort of things can the timer channels be used for? What about the Spare Digital I/O's?
I won't be using the Serial port for Inovate O2's, is there any other practical use for the serial port?
What about the I2C bus? No idea what that is. What might it be used for?

If all the ADC's are used for sensors, does the functionality to provide an on/off output, for something like water injection, available in some of the other I/O's?
Is there any way to have one of them provide a tachometer output? (I'm using the TACHOUT of the MicroSquirt for boost control)
SethU
Helpful MS/Extra'er
 
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Postby racingmini_mtl » Mon Mar 13, 2017 2:45 pm

SethU wrote:What sort of things can the timer channels be used for?

You can use them for speed inputs (timer 1) or PWM outputs (timer 2). It's more obvious on the MS3 where you have options for wheel and shaft speeds. But on the Microsquirt (and MS2) you can do this too for logging purposes using the TunerStudio ultimate features or by adding a custom.ini file to your project (there's more information in the setting up manual).

SethU wrote:What about the Spare Digital I/O's?

Some MS2/extra features can use remote digital I/Os. You can also use the programmable on/off outputs on the TinyIOx.

SethU wrote:I won't be using the Serial port for Inovate O2's, is there any other practical use for the serial port?

You can connect to the TIOx directly from the PC using the correct adapter. You can also communicate to the Microsquirt using CAN passthrough. But that's it at this time.

SethU wrote:What about the I2C bus? No idea what that is. What might it be used for?

You can use it to get digital AFR data from up to eight 14point7 SCL OEM wideband controllers. You can also use it to display data on a LED display.

SethU wrote:If all the ADC's are used for sensors, does the functionality to provide an on/off output, for something like water injection, available in some of the other I/O's?

PTE2 and PTE3 are always available for either digital outputs or inputs.

SethU wrote:Is there any way to have one of them provide a tachometer output? (I'm using the TACHOUT of the MicroSquirt for boost control)

There is no way currently to do a tachometer output. However, you can use one of the PWM outputs for boost control. You could then use the Microsquirt tachout for a tach output.

You should go through all the menus in TunerStudio to see the different features. That will give you an idea of what can be done. You will probably have more questions too but you can then ask them.

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 Questions

Postby SethU » Mon Mar 13, 2017 2:58 pm

racingmini_mtl wrote:There is no way currently to do a tachometer output. However, you can use one of the PWM outputs for boost control. You could then use the Microsquirt tachout for a tach output.

You should go through all the menus in TunerStudio to see the different features. That will give you an idea of what can be done. You will probably have more questions too but you can then ask them.

Jean

Thank you Jean.

I don't see the option to use the TinyIOx for boost control. In the Tuner Studio drop down for Boost Control Pin, In Boost Control Setings menu, it only lists FIDLE, TACHOUT, ALED, and WLED. Is there a setting for the TinyIOx that will add it to the list of available control pins?
SethU
Helpful MS/Extra'er
 
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Postby racingmini_mtl » Mon Mar 13, 2017 3:20 pm

You need to enable ports polling in the CAN parameters on the Microquirt and have at least one output port. Then you will be able to select a remote port in boost control instead of local.

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 Questions

Postby SethU » Mon Mar 13, 2017 5:01 pm

That did it. Couple questions about using the TinyIOx for boost control.

Does the PWM frequency default to 24Hz? No adjustments available? I think 24Hz is fine either way.

Does the TPM2CH0 output need a PNP or NPN ( or... P or N channel MOSFET) between the TinyIOx and Boost control solenoid?

Sorry if it's been covered elsewhere. I've read nearly everything I could find over the past couple months, it's just all too spread out to reference.
SethU
Helpful MS/Extra'er
 
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Postby racingmini_mtl » Mon Mar 13, 2017 5:59 pm

All the inputs and outputs on the TinyIOx require a circuit to connect to an external device. A good guide is to look at the schematics in the MS manuals to have an idea of the type of circuit that can be used for each type of I/O.

So a logic level NPN or N-channel FET is what you'd use for boost control (with a current limiting resistor). As for frequency, there is a need to adjust the timer parameters to get the frequency you want. It is more complex than simply setting a PWM frequency; you need to use this spreadsheet and look what clock speed, prescale and PWM divider to use (by the way the clock speed is 24MHz not 24Hz; that's 1000000 times more and the speed of the CPU clock).

For example if you want 24Hz , you can use the bus clock (2400000), a prescale of 64 and a PWM divider of 60. You would then put those number in the base I/O settings for timer 2. You would also need to enable the digital I/Os and configure the ports settings. In the ports settings, you would need to match what you have in the Microsquirt in terms of number of inputs and outputs and you would need to set your output to a single value with PTD0/PTM2CH0 as channel 1.

You can have a look at the old IOx web page where there is some information about this but it is for older version of the IOx and MS2/Extra firmware so that's not completely accurate or relevant. But the basic idea is still valid. And there is a tool to choose the correct timer parameters for a specific PWM frequency.

Also, for more information on the TinyIOx latest features you can have a look at this post on my forum.

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 Questions

Postby SethU » Mon Mar 13, 2017 10:19 pm

That leads right into my next question. Seems there are a few different circuits for the sensor inputs. Is one better or more desirable than the others? Zenner diodes in one, 1M resistors in the other, and one without either.
Screenshot (5).png

Screenshot (7).png

Screenshot (6).png
You do not have the required permissions to view the files attached to this post.
SethU
Helpful MS/Extra'er
 
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Postby racingmini_mtl » Mon Mar 13, 2017 10:37 pm

It depends on the sensor you want to connect. But don't use Zeners. The spare ADC circuits in your second picture is the most generic and the one I would use. However, you only need the 2.49k pull up resistor if the sensor is a variable resistance sensor like a thermistor (temp sensor). If you're using a pressure sensor or another sensor that generates a 0-5V signal, don't use the pull up resistor.

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 Questions

Postby SethU » Mon Mar 13, 2017 11:06 pm

How about the 5v regulator? Is all the additional circuitry desirable too?

Screenshot (8).png
You do not have the required permissions to view the files attached to this post.
SethU
Helpful MS/Extra'er
 
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Postby dontz125 » Tue Mar 14, 2017 12:20 am

Take a look at the Murata integrated power supplies, in TO-220 format; OKI-78SR-5/1.5-W36H-C (horizontal) and OKI-78SR-5/1.5-W36-C (vertical). Price is pretty much what you'd pay for a set of components.
dontz125
Super MS/Extra'er
 
Posts: 3539
Joined: Mon May 11, 2009 7:14 pm
Location: Scarborough, ON

Re: TinyIOx Questions

Postby SethU » Tue Mar 14, 2017 12:37 am

dontz125 wrote:Take a look at the Murata integrated power supplies, in TO-220 format; OKI-78SR-5/1.5-W36H-C (horizontal) and OKI-78SR-5/1.5-W36-C (vertical). Price is pretty much what you'd pay for a set of components.


Looks like heat sinking isn't needed with that one. Do you suppose it would be okay encased in potting resin?
SethU
Helpful MS/Extra'er
 
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Postby dontz125 » Tue Mar 14, 2017 12:58 am

The MTBF in 40C air is 59 *million* hours. It'll probably survive being potted. All the same, good practice would have it as close to the enclosure as practical, and face-to-face vs edge-on.

The data sheet does mention a lack of reverse protection, so you'll want to add either a diode, or a P-channel Mosfet like 2SJ652-1E; it's cheap, it's ridiculously overspec'd for the application, it has an insulated tab, and - while it doesn't specifically declare ESD protection - it does have Zeners across the gate and drain for static *oops* destruction.

Don't forget a fuse!
dontz125
Super MS/Extra'er
 
Posts: 3539
Joined: Mon May 11, 2009 7:14 pm
Location: Scarborough, ON

Re: TinyIOx Questions

Postby SethU » Tue Mar 14, 2017 1:09 am

dontz125 wrote:All the same, good practice would have it as close to the enclosure as practical, and face-to-face vs edge-on.


Was hoping to not use a case and simply encase the whole TinyIOx assembly in resin for a water proof solution, externally wired to the MicroSquirt. Which side of that regulator is the heat transfer side?
SethU
Helpful MS/Extra'er
 
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Postby dontz125 » Tue Mar 14, 2017 1:12 am

Ok, block o' stuff it is; placement comment remains. Without ever having one in my hands, I would think the coil (the big thing on the one side) is most likely to get warm.
dontz125
Super MS/Extra'er
 
Posts: 3539
Joined: Mon May 11, 2009 7:14 pm
Location: Scarborough, ON

Re: TinyIOx Questions

Postby SethU » Tue Mar 14, 2017 1:38 am

It does free up valuable space on the proto area as well as cut the soldering down quite a bit. I'll give it a shot. Thanks for the recommendation Don.

I'll be very surprised if it's able to over heat in a chunk of resin with a surface area of 8+ square inches. For good measure there's an aluminum plate I can zip tie the block o' stuff to.
SethU
Helpful MS/Extra'er
 
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Postby Laminar » Tue Mar 14, 2017 2:39 pm

Here's the circuit I used:

Image

I think I managed to squeeze six of them into the proto area, but I can't seem to find the pic I took.
Laminar
Experienced MS/Extra'er
 
Posts: 287
Joined: Wed Aug 06, 2014 7:45 am

Re: TinyIOx Questions

Postby SethU » Wed Mar 15, 2017 10:57 am

Laminar wrote:Here's the circuit I used...

Thank you Laminar.
SethU
Helpful MS/Extra'er
 
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Postby SethU » Wed Mar 15, 2017 11:15 am

Couple more rookie questions...

Does it make any sense to run multiple ground leads to the TinyIOx? Ground for PWM/switched loads, sensor ground, and power ground? Is there any benefit to be had over a single ground?


And, looking at how everything is arranged in Tuner Studio, it looks like if I want to have boost control on the TinyIOx and also control Water Injection, that I'll have to sacrifice the use of one of the sensor input's/ADC's. Port 1 8 ADC inputs, port 2 output boost control, port 3 output remote on/off. Am I understanding that correctly?

Are PTE2 and PTE3 the correct outputs for boost control and remote On/Off?

Thank you.

-Seth-
SethU
Helpful MS/Extra'er
 
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Postby racingmini_mtl » Wed Mar 15, 2017 12:41 pm

You don't use the digital ports for analog inputs. You either use the CAN ADC polling if you want the data in the Microsquirt datalog (in the 8 gpioadc variables) or you get TunerStudio to read the data directly from the TIOx where you can get all 9 ADC channels.

For boost control, you need to use one for the timer outputs since you want a PWM output so it's either PTD0/PTM2CH0 or PTD1/PTM2CH1. For water injection, you can use any of the available I/O but for a digital on/off signal PTE2 or PTE3 is a good choice since these can only be digital I/Os.

And you can simply ignore the third port since you only need 2 of them.

As for grounds, run a power ground from the TIOx to the car ground, run the ground for your high load devices to the same car ground location (not to the TIOx) and run the sensor ground directly to the TIOx ground (not a car ground or some other ground location).

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 Questions

Postby SethU » Wed Mar 15, 2017 2:40 pm

racingmini_mtl wrote:You don't use the digital ports for analog inputs. You either use the CAN ADC polling if you want the data in the Microsquirt datalog (in the 8 gpioadc variables) or you get TunerStudio to read the data directly from the TIOx where you can get all 9 ADC channels.

For boost control, you need to use one for the timer outputs since you want a PWM output so it's either PTD0/PTM2CH0 or PTD1/PTM2CH1. For water injection, you can use any of the available I/O but for a digital on/off signal PTE2 or PTE3 is a good choice since these can only be digital I/Os.

And you can simply ignore the third port since you only need 2 of them.

As for grounds, run a power ground from the TIOx to the car ground, run the ground for your high load devices to the same car ground location (not to the TIOx) and run the sensor ground directly to the TIOx ground (not a car ground or some other ground location).

Jean
Okay, got it. Two grounds. One to/for the 5v regulator, TinyIOx, and Sensor grounds. The other to the transistors for the PWM/switched 12v loads. Both grounded at the same location on the engine. It's a fiberglass boat, so no chassis grounds.

I'm a little confused about the ports. So, the two ports I need are for 1)Boost Control and 2) Remote On/Off? And the 8 analog sensors don't need a port designation? They're set up in the area noted below and polled? Am I understanding that correctly now?

Screenshot (11).png
You do not have the required permissions to view the files attached to this post.
SethU
Helpful MS/Extra'er
 
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Next

Return to Expansion boards

Who is online

Users browsing this forum: No registered users and 1 guest