TinyIOx input ports

http://jbperf.com/io_extender/index.html
http://jbperf.com/io_extender/tinyIOx.html for the TinyIOx

TinyIOx input ports

Postby edgedj » Sat Mar 03, 2018 7:32 pm

Evening all,

I'm so close to getting TinyIOx to do exactly what I want and I'm stuck on a last setting that I can't see that's causing Megasquirt itself to get a bit upset - even though it is essentially working as I want. I've got 4 ADC inputs which are running Fuel Gauge, Side lights, Main beam and Indicators, these are all in use on my realdash dashboard. I'm now working on getting a datalogging switch running from the dashboard and I've found a couple of default options from Megasquirt/Tunerstudio that get in the way by default, firstly the offset for the input ports defaults to 75 and it has to be changed to 45; secondly the CAN extended control > Programmable On/Off Outputs is by default set to output accel enrich - To use the input port I had to turn this off, naturally. It's not easy to find though because I didn't set it in the first place!

Here are some pictures of my setup, hopefully it's easy to see what's going on (hope Jean doesn't take offence at the business card box and hairband as an enclosure - it works really well :-)

20180303_164541451_iOS.jpg
TinyIOx behind this dashboard
20180303_164541451_iOS.jpg (250.79 KiB) Viewed 619 times


20180303_231625521_iOS.jpg
Business card enclosure
20180303_231625521_iOS.jpg (255.46 KiB) Viewed 619 times


20180303_231531299_iOS.jpg
Megasquirt error screen
20180303_231531299_iOS.jpg (324.38 KiB) Viewed 619 times
Last edited by edgedj on Sat Mar 03, 2018 7:39 pm, edited 2 times in total.
edgedj
 
Posts: 9
Joined: Sun Feb 18, 2018 3:23 pm

Re: TinyIOx input ports

Postby edgedj » Sat Mar 03, 2018 7:35 pm

Sorry 3 attachments per post limit, so continuing with the Megasquirt screens...

Megasquirt Generic Sensor Input screen
Screen Shot 2018-03-03 at 23.18.12.png
Screen Shot 2018-03-03 at 23.18.12.png (268.08 KiB) Viewed 618 times


Megasquirt CAN Parameters
Screen Shot 2018-03-03 at 23.17.57.png
Screen Shot 2018-03-03 at 23.17.57.png (211.23 KiB) Viewed 618 times
edgedj
 
Posts: 9
Joined: Sun Feb 18, 2018 3:23 pm

Re: TinyIOx input ports

Postby edgedj » Sat Mar 03, 2018 7:38 pm

And finally the CAN1 screens:

CAN1 Base I/O settings
Screen Shot 2018-03-03 at 23.16.50.png
Screen Shot 2018-03-03 at 23.16.50.png (103.39 KiB) Viewed 618 times


CAN1 Ports settings
Screen Shot 2018-03-03 at 23.17.10.png
Screen Shot 2018-03-03 at 23.17.10.png (134.96 KiB) Viewed 618 times


CAN1 Programmable Outputs (I had to turn this off!!!)
Screen Shot 2018-03-03 at 23.17.43.png
Screen Shot 2018-03-03 at 23.17.43.png (99.96 KiB) Viewed 618 times
edgedj
 
Posts: 9
Joined: Sun Feb 18, 2018 3:23 pm

Re: TinyIOx input ports

Postby edgedj » Sat Mar 03, 2018 7:45 pm

Well that didn't take long to sort out, I found the problem. Even though programmable outputs was set to not enabled, the power on value and power off values appear to conflict. So I enabled the output again, set them to off and then unticked the enabled and the warning has gone away. Here is the screenshot of the setting in question, hopefully clear how it's different from above.

Screen Shot 2018-03-03 at 23.42.09.png
Screen Shot 2018-03-03 at 23.42.09.png (99.3 KiB) Viewed 618 times
edgedj
 
Posts: 9
Joined: Sun Feb 18, 2018 3:23 pm

Re: TinyIOx input ports

Postby jbelanger » Sat Mar 03, 2018 7:55 pm

Can you post your msq? I'd like to have a closer look at this.

And I have absolutely no problem with the use of the business card box. I'm all for using whatever works and is still safe.

Jean
Image
jbelanger
 
Posts: 3578
Joined: Sat Oct 03, 2009 12:24 pm
Location: Quebec, Canada

Re: TinyIOx input ports

Postby edgedj » Sun Mar 04, 2018 3:34 pm

Sure of course, here you go:

CAN1_CurrentTune Dave Edge.msq
(38.02 KiB) Downloaded 21 times

CurrentTune Dave Edge.msq
(276.89 KiB) Downloaded 22 times


Dave
edgedj
 
Posts: 9
Joined: Sun Feb 18, 2018 3:23 pm

Re: TinyIOx input ports

Postby WestfieldMX5 » Mon Apr 09, 2018 5:47 pm

Thank you for sharing this information. Makes my setup a lot easier :)
Am I correct that there's only 2 digital inputs possible, no other inputs can be used as digital input. Is that the reason you are using ADC inputs for you lights / indicators?
Could you explain how you are using the ADC02,03,04 inputs as a switch ? You feeding them 5V when the lights are on? Why the 1.1 as 5V value?
Last edited by WestfieldMX5 on Mon Apr 09, 2018 6:16 pm, edited 1 time in total.
WestfieldMX5
 
Posts: 15
Joined: Mon Mar 27, 2017 5:09 pm

Re: TinyIOx input ports

Postby jbelanger » Mon Apr 09, 2018 6:03 pm

You can use the ADC inputs as digital inputs. Just have a look at the drop-down menus. You can even use them as digital outputs if you want. Of course, the hardware you use will be different for each application.

Jean
Image
jbelanger
 
Posts: 3578
Joined: Sat Oct 03, 2009 12:24 pm
Location: Quebec, Canada

Re: TinyIOx input ports

Postby WestfieldMX5 » Mon Apr 09, 2018 6:43 pm

Is there a reason to use an ADC input over a digital input? I had planned on using PTE2 and PTE3 to trigger launch and traction, but I could just as well use ADC's?

I would like to use AD6 to trigger datalogging so I selected it on channel 3:
Now how can I setup datalogging to start (and stop) logging using AD6? There's no AND function to test for a bit value.
Do I use a loop: canin1_8 AND threshold 4, hysteresis 0?
And then in datalogging use an expression: loop1 = 4 to start datalogging and loop1 <> 4 to stop datalogging?

Edit: seems using loop1 isn't correct :(


Image
Attachments
Schermafbeelding 2018-04-10 om 00.20.17.png
Schermafbeelding 2018-04-10 om 00.20.17.png (128.51 KiB) Viewed 411 times
WestfieldMX5
 
Posts: 15
Joined: Mon Mar 27, 2017 5:09 pm

Re: TinyIOx input ports

Postby jbelanger » Mon Apr 09, 2018 7:05 pm

The reason to use and ADC input is that you have an unused input and you need a digital input and not an analog signal. With the limited number of I/Os, once you've used the purely digital PTE2nad PTE3, you start using the other I/O pins.

If you want to start/stop SD card datalogging on an MS3 then that would be CANIN3 in your case. Using the loop and a programmable input just adds an unneeded step.

Jean
Image
jbelanger
 
Posts: 3578
Joined: Sat Oct 03, 2009 12:24 pm
Location: Quebec, Canada

Re: TinyIOx input ports

Postby WestfieldMX5 » Mon Apr 09, 2018 7:15 pm

My bad, I was looking in the Triggered Logging menu instead of the SD Card Datalogging. :oops:
WestfieldMX5
 
Posts: 15
Joined: Mon Mar 27, 2017 5:09 pm


Return to I/O Extender

Who is online

Users browsing this forum: No registered users and 4 guests

cron