TinyIOx Questions

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

Moderators: jsmcortina, muythaibxr

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

TinyIOx Questions

Post by SethU »

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)
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: TinyIOx Questions

Post by racingmini_mtl »

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
SethU
Helpful MS/Extra'er
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Post by SethU »

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?
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: TinyIOx Questions

Post by racingmini_mtl »

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
SethU
Helpful MS/Extra'er
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Post by SethU »

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.
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: TinyIOx Questions

Post by racingmini_mtl »

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
SethU
Helpful MS/Extra'er
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Post by SethU »

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
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: TinyIOx Questions

Post by racingmini_mtl »

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
SethU
Helpful MS/Extra'er
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Post by SethU »

How about the 5v regulator? Is all the additional circuitry desirable too?
Screenshot (8).png
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: TinyIOx Questions

Post by dontz125 »

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.
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
SethU
Helpful MS/Extra'er
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Post by SethU »

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?
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: TinyIOx Questions

Post by dontz125 »

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!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
SethU
Helpful MS/Extra'er
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Post by SethU »

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?
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: TinyIOx Questions

Post by dontz125 »

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.
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
SethU
Helpful MS/Extra'er
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Post by SethU »

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.
Laminar
Master MS/Extra'er
Posts: 644
Joined: Wed Aug 06, 2014 7:45 am

Re: TinyIOx Questions

Post by Laminar »

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.
SethU
Helpful MS/Extra'er
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Post by SethU »

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

Post by SethU »

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-
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: TinyIOx Questions

Post by racingmini_mtl »

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
SethU
Helpful MS/Extra'er
Posts: 84
Joined: Tue Mar 29, 2016 6:57 pm

Re: TinyIOx Questions

Post by SethU »

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
Post Reply