Multiple TinyIOX ADC setup

http://jbperf.com/io_extender/index.html
http://jbperf.com/io_extender/tinyIOx.html for the TinyIOx
N20junkie
Posts: 12
Joined: Thu Jan 03, 2019 2:26 am

Multiple TinyIOX ADC setup

Post by N20junkie » Thu Jan 03, 2019 2:35 am

I am just getting to the preliminary install phase for a pair of TinyIOX’s.

I am using all 9 ADC inputs (some EGT, some ADC for accelerometer and pressure sensors) on both boards.

When assigning ADC’s, I first turned on ADC groups in the MS3 can parameters using 1-4, 5-8, 9-12 assigned to the first board, and 13-16, 17-20 and 21-24 on the second board.

I then assume I set the EGT assignments using Board 1 AD0=ADC1, AD1=ADC2 and so forth, and then set the EGT’s going to board two as AD0=ADC13, AD1=ADC14 and so forth?

I really decided to start my CAN experiance with a complicated setup.

jbelanger
Posts: 3655
Joined: Sat Oct 03, 2009 12:24 pm
Location: Quebec, Canada
Contact:

Re: Multiple TinyIOX ADC setup

Post by jbelanger » Thu Jan 03, 2019 12:52 pm

Yes that's the way to go. But there is one thing you don't mention which is the CAN ID. You cannot have 2 devices with the same CAN ID on the bus. But this is easily fixable.

To change the CAN ID on one TIOx, you simply need to connect only this one to the CAN bus (or don't power the second one). Then run the port scanner (see here if you don't already have it). In the drop down menu besides the TIOx in the list, you have the option of changing the CAN ID. Simply select this option and change the CAN ID from the default 4 to a different value from 1 to 14; I recommend 3 or 5 unless you have other CAN devices on the bus that use those. This will take effect once you power cycle the TIOx.

Once this is done, you need to go back to the MS3 settings and set the CAN IDs to correspond to the appropriate ADC groups.

Jean
Image

N20junkie
Posts: 12
Joined: Thu Jan 03, 2019 2:26 am

Re: Multiple TinyIOX ADC setup

Post by N20junkie » Thu Jan 03, 2019 4:24 pm

Thanks Jean! You answered my other question that I was still researching as well!

Thank you for the help and the wonderful product you make.

N20junkie
Posts: 12
Joined: Thu Jan 03, 2019 2:26 am

Re: Multiple TinyIOX ADC setup

Post by N20junkie » Thu Jan 03, 2019 9:14 pm

Second question. I have 5v regulators installed on an add on board I made for the tinyiox. Where specifically is the jumper located if I want to remove the tie between 5v and vref on the tinyiox board?

jbelanger
Posts: 3655
Joined: Sat Oct 03, 2009 12:24 pm
Location: Quebec, Canada
Contact:

Re: Multiple TinyIOX ADC setup

Post by jbelanger » Thu Jan 03, 2019 9:29 pm

On the older boards, there is a solder jumper shown in the picture below. On newer boards, the solder jumper pads are still there but there is a trace between them so there is no need for solder initially. To remove the connection, simply cut the trace (use a sharp blade to scrape the trace between the pads). Check with a continuity meter to make sure the trace has been cut. If you ever need to remake the connection just add a solder jumper between the pads (it should then look like what is seen in the picture below).
tinyIOx_v1_0_5vjmp.png
Solder jumper for 5V-Vref connection
tinyIOx_v1_0_5vjmp.png (51.32 KiB) Viewed 474 times
Make sure you always have power on Vref when you power the 5V rail. Failure to do so for an extended period of time will burn the chip. That is why the default setting is to connect 5V to Vref.

Jean
Image

N20junkie
Posts: 12
Joined: Thu Jan 03, 2019 2:26 am

Re: Multiple TinyIOX ADC setup

Post by N20junkie » Thu Jan 03, 2019 9:58 pm

Thanks Jean, I was actually starting to sever that trace, but wanted to ensure I wasn't ruining a brand new board.

N20junkie
Posts: 12
Joined: Thu Jan 03, 2019 2:26 am

Re: Multiple TinyIOX ADC setup

Post by N20junkie » Tue Jan 08, 2019 4:35 am

Question for the day. As far as using the timer 2 channels (0 and 1), is it possible to use them as on/off circuits to control a standard magnetic relay or a solid state relay.

If not, and they are PWM only, would the same circuit as used for a MS extra output with a 2n2222a transistor be appropriate to drive an external solid state relay?

jbelanger
Posts: 3655
Joined: Sat Oct 03, 2009 12:24 pm
Location: Quebec, Canada
Contact:

Re: Multiple TinyIOX ADC setup

Post by jbelanger » Tue Jan 08, 2019 5:08 am

Yes the timer 2 channels can be used as on/off outputs through the programmable outputs. But regardless of whether you use them as on/off outputs or PWM outputs, you need a driver circuit such as the one with a PN2222A transistor. That circuit can handle up to 1A which is more than enough for driving an SSR or a standard relay.

Jean
Image

N20junkie
Posts: 12
Joined: Thu Jan 03, 2019 2:26 am

Re: Multiple TinyIOX ADC setup

Post by N20junkie » Tue Jan 08, 2019 6:32 pm

I’m trying to research what I can, to no ask 1,000 questions you already answered, but digging up what you don’t fully grasp is a shot in the dark. I really appreciate all the help Jean.

I ordered a custom board that has the condition circuits for the ADC’s, and they work spectacularly, along with PTE2 and 3 for outputs.

I have two things left to verify before I order a few more of these boards for friends, and I cannot seem to trigger timer2 channel 0 or 1 as outputs for a relay. They have the exact same circuit that the PTE’s have, but I am missing something. I am happy to test using the iox to trigger via its own programmable outputs, that verifys the circuit, but I really in the end want to be able to use the ms3’s programmable output menu to set the output parameters and the ms3 can/test modes to trigger things for off season testing. I assume that would involve a whole different setup.

Secondly, I built circuits using again a pn2222a using the MS3 optional input 12v trigger schematic. How do I configure the timer 1 channels to accept a 5v on/off input off of the transistor? How do I see when the inputs are triggered?

I attached the tune files, I know they are a mess :(

jbelanger
Posts: 3655
Joined: Sat Oct 03, 2009 12:24 pm
Location: Quebec, Canada
Contact:

Re: Multiple TinyIOX ADC setup

Post by jbelanger » Tue Jan 08, 2019 7:05 pm

N20junkie wrote:I’m trying to research what I can, to no ask 1,000 questions you already answered, but digging up what you don’t fully grasp is a shot in the dark. I really appreciate all the help Jean.

I ordered a custom board that has the condition circuits for the ADC’s, and they work spectacularly, along with PTE2 and 3 for outputs.
No problem with asking questions especially since the documentation is pretty much scattered around on the forum. And good to know that it's working as expected.
N20junkie wrote:I have two things left to verify before I order a few more of these boards for friends, and I cannot seem to trigger timer2 channel 0 or 1 as outputs for a relay. They have the exact same circuit that the PTE’s have, but I am missing something. I am happy to test using the iox to trigger via its own programmable outputs, that verifys the circuit, but I really in the end want to be able to use the ms3’s programmable output menu to set the output parameters and the ms3 can/test modes to trigger things for off season testing. I assume that would involve a whole different setup.
For that you need to enable the output ports in the CAN parameters (table 7 offset 45 and the CAN ID of the TIOx you're using). You also need to configure the digital ports on the TIOx.
N20junkie wrote:Secondly, I built circuits using again a pn2222a using the MS3 optional input 12v trigger schematic. How do I configure the timer 1 channels to accept a 5v on/off input off of the transistor? How do I see when the inputs are triggered?
The Timer 1 inputs cannot be digital inputs but only PWM inputs. And can you post or link to the exact schematic you're using? I want to avoid more confusion.
N20junkie wrote:I attached the tune files, I know they are a mess :(
You have posted 3 times the MS3 msq. You need to make sure that the correct device is selected when saving the file in TunerStudio. That's not obvious at first (at least it wasn't to me).

Jean
Image

N20junkie
Posts: 12
Joined: Thu Jan 03, 2019 2:26 am

Re: Multiple TinyIOX ADC setup

Post by N20junkie » Tue Jan 08, 2019 7:27 pm

I believe I have attached the correct files. I missed that little check box off to the right.

I am going to try to attached the schematics I chose as well. I used both the input and output from this diagram

Image
Last edited by N20junkie on Tue Jan 08, 2019 7:42 pm, edited 2 times in total.

jbelanger
Posts: 3655
Joined: Sat Oct 03, 2009 12:24 pm
Location: Quebec, Canada
Contact:

Re: Multiple TinyIOX ADC setup

Post by jbelanger » Tue Jan 08, 2019 7:38 pm

These are the same files as before. Make sure you post the files you just saved and check that the TIOx files are smaller.
Image

N20junkie
Posts: 12
Joined: Thu Jan 03, 2019 2:26 am

Re: Multiple TinyIOX ADC setup

Post by N20junkie » Tue Jan 08, 2019 7:44 pm

fat fingers...
Attachments
can2-2019-01-08_18.44.41.msq
(38.9 KiB) Downloaded 9 times
can1-2019-01-08_18.47.02.msq
(39.06 KiB) Downloaded 8 times
2019-01-08_18.44.27.msq
(289.01 KiB) Downloaded 10 times

jbelanger
Posts: 3655
Joined: Sat Oct 03, 2009 12:24 pm
Location: Quebec, Canada
Contact:

Re: Multiple TinyIOX ADC setup

Post by jbelanger » Tue Jan 08, 2019 8:13 pm

This looks like it should work for the digital outputs and the programmable outputs from the MS3. One thing you might want to do is to use an RPM higher than 0 (like 10) and an hysteresis other than 0 (like 5). I'm not sure that really matters but I'm also not sure how the code deals with 0 for both of these.

If that doesn't work let me know what happens because the settings on the TIOx and the MS3 seem like that should work.

Jean
Image

N20junkie
Posts: 12
Joined: Thu Jan 03, 2019 2:26 am

Re: Multiple TinyIOX ADC setup

Post by N20junkie » Tue Jan 08, 2019 10:18 pm

Jean, the offset from 75 to 45 fix it up nicely. Last question for hopefully a long time.

Can you recommend a 5v and 12v PWM input circuit.

5v would likely be a turbo shaft speed connection, and the 12v would monitor wastegate PW for an aftermarket controller.

jbelanger
Posts: 3655
Joined: Sat Oct 03, 2009 12:24 pm
Location: Quebec, Canada
Contact:

Re: Multiple TinyIOX ADC setup

Post by jbelanger » Wed Jan 09, 2019 12:33 pm

For a 12V PWM input, you can use the circuit in your post above (the lower circuit). But I would change the lower 2.2k resistor and the 470R resistor for a 1k resistor in both cases.

For a 5V signal, you can use this circuit:
pwm_input_5V.png
5V PWM input circuit
pwm_input_5V.png (4.42 KiB) Viewed 430 times
There is one thing I want to check with you and that is the turbo shaft speed signal. With the speed of a turbo shaft, you have to be careful how the signal is generate because that might be too fast for the TIOx. The TIOx can read with a precision better than a micro-second if needed but if you have a 100kHz signal that will be way too many interrupts and the CPU will not be able to do anything but try to read the turbo speed. So you may need a divider circuit if your raw signal comes from a pulse per vane for example.

Jean
Image

N20junkie
Posts: 12
Joined: Thu Jan 03, 2019 2:26 am

Re: Multiple TinyIOX ADC setup

Post by N20junkie » Wed Jan 09, 2019 5:56 pm

Thanks for the circuit help. I am having new PCB’s made to mount my IOX’s and want to make sure I have all my bases covered down the road.

I will be using one of the signal generators that condenses the vane count and divides the shaft speed as well so the signal is 6khz or so. I appreciate the warning about trying to use the IOX to do raw blade counts, as the thought did at one time cross my mind.

jbelanger
Posts: 3655
Joined: Sat Oct 03, 2009 12:24 pm
Location: Quebec, Canada
Contact:

Re: Multiple TinyIOX ADC setup

Post by jbelanger » Wed Jan 09, 2019 6:47 pm

I don't know if you can play with the divider for your shaft speed but if you can it might be a good idea to look for an additional division by 2 to get to around 3kHz. It will work at 6kHz but what I'm concerned about is that you are using a lot of features and I/Os (which is fine) but that number of interrupts won't leave a lot of CPU cycles for the rest. But that also depends if you need some filtering of the signal through the lag factor and if you use 16-bit or 32-bit data.

Jean
Image

N20junkie
Posts: 12
Joined: Thu Jan 03, 2019 2:26 am

Re: Multiple TinyIOX ADC setup

Post by N20junkie » Sat Jan 12, 2019 12:08 am

I did a bit more research, and at 100k of shaft speed, output is closer to 2.9k, which is good news because like you said, I am planning on using up most of each chips resources.

N20junkie
Posts: 12
Joined: Thu Jan 03, 2019 2:26 am

Re: Multiple TinyIOX ADC setup

Post by N20junkie » Sun Jan 20, 2019 12:33 am

I got my second version of my adapter boards in, and didn’t notice that when I moved a component in the design it got a little too close to a trace and I had an output touching a CAN pin trace by the smallest little hair. But during my quest to figure out why that one EGT wasn’t reading right, I cooked an IOX (as soon as I plug it in it shuts the ms3 communication to the laptop right down. :( . So I ordered a pair of replacements last night, one for the cooked board and one spare.


With that being said, is it possible to use the ms3 to control the output ports on 2 IOX’s? I am having great luck with the programmable output control on the MS3 switching the IOX outputs, but they only allow for the control of ports on one board to be used via the can parameters page.

I saw this response of yours in another thread. Is this the proper answer to my question?

“The virtual I/Os are similar to what is called loops on the MS3 (if that's something you've seen before). You can use them wherever you would use a CPU pin as either a digital input or a digital output. That means you can use them in the ports settings and in the programmable on/off outputs.

The first way to use it is to set one as an on/off output and then use the same one as the condition for another output (real pin or another virtual I/O). You can also use the same virtual I/O output as an input in the ports settings to be used on the MS through CAN. You can use one of the ports channel (coming from the MS over CAN) as an output virtual I/O and use it as a condition for an on/off output (again real pin or another virtual I/O). Finally, you can use a virtual I/O as an input on one port and and output on a second port to loop data from and to the MS over CAN (although I'm not sure that this has any real useful application). And you can mix and match all of these to create some relatively complex sequences and use the same virtual I/O for multiple things as long as there's only one place where is can be updated.”

Post Reply